aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/sso-19.c
blob: 6cf848dc2cfcc3afc05a401b8920a3cda73e0dba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-std=c23" } */
/* PR c/104822 */

#include <stddef.h>

struct Sb {
  int i;
} __attribute__((scalar_storage_order("big-endian")));
struct Sl {
  int i;
} __attribute__((scalar_storage_order("little-endian")));

/* Neither of these should warn about incompatible scalar storage order
   as NULL pointers are compatiable with both endian. */
struct Sb *pb = nullptr; /* { dg-bogus "" } */
struct Sl *pl = nullptr; /* { dg-bogus "" } */