view gcc/testsuite/gcc.dg/debug/dwarf2/sso-3.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-gdwarf-3 -dA" } */

typedef int   int_t;
typedef short short_t;

#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define REVERSE_SSO __attribute__((scalar_storage_order("big-endian")));
#else
#define REVERSE_SSO __attribute__((scalar_storage_order("little-endian")));
#endif

struct reverse
{
  int_t i;
  short_t a[4];
} REVERSE_SSO;

struct native
{
  int_t i;
  short_t a[4];
};

struct reverse R;
struct native  N;

/* Verify that we have endianity on the common base type of 'i' and the
 *  element of 'a' in the first 2 structures.  */
/* { dg-final { scan-assembler-times " DW_AT_endianity" 2 } } */
/* { dg-final { scan-assembler-times "DIE \\(\[0-9a-z\]*\\) DW_TAG_base_type" 5 } } */