gcc/testsuite/gcc.dg/sso-18.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* PR c/104822 */ |
| 3 | |
| 4 | #include <stddef.h> |
| 5 | |
| 6 | struct Sb { |
| 7 | int i; |
| 8 | } __attribute__((scalar_storage_order("big-endian"))); |
| 9 | struct Sl { |
| 10 | int i; |
| 11 | } __attribute__((scalar_storage_order("little-endian"))); |
| 12 | |
| 13 | /* Neither of these should warn about incompatible scalar storage order |
| 14 | as NULL pointers are compatiable with both endian. */ |
| 15 | struct Sb *pb = NULL; /* { dg-bogus "" } */ |
| 16 | struct Sl *pl = NULL; /* { dg-bogus "" } */ |