https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691

            Bug ID: 87691
           Summary: transparent_union attribute does not work with
                    MODE_PARTIAL_INT
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jozef.l at mittosystems dot com
  Target Milestone: ---

msp430-elf uses the partial int type __int20 for pointers in the large memory
model. __int20 has PSImode, with bitsize of 20.

A few DejaGNU tests fail when built with -mlarge for msp430-elf, when
transparent unions are used containing pointers.
These are:
- gcc.c-torture/compile/pr34885.c
- gcc.dg/transparent-union-{1,2,3,4,5}.c

Consider the following C source code:

typedef union {
  __int20 a;
} union_a __attribute__ ((__transparent_union__));

Compiling produces a warning:
> msp430-elf-gcc -S testcase.c
> warning: 'transparent_union' attribute ignored [-Wattributes]

Reply via email to