[Bug c/89013] New: ice for packed attribute

dcb314 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Wed Jan 23 15:26:00 GMT 2019


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

            Bug ID: 89013
           Summary: ice for packed attribute
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C source code on recent gcc trunk:

typedef struct {
} __attribute__((__packed__)) a;
typedef const a *b;
c(b *d) { b e = c(e); }

I get

bug499.c:4:1: internal compiler error: Segmentation fault
0xe5d9f7 crash_signal
        ../../trunk/gcc/toplev.c:326
0x8faba4 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*
, int, char const*)
        ../../trunk/gcc/tree.h:3289
0x8faba4 check_address_or_pointer_of_packed_member
        ../../trunk/gcc/c-family/c-warn.c:2762
0x8faba4 check_and_warn_address_or_pointer_of_packed_member
        ../../trunk/gcc/c-family/c-warn.c:2838

$ ~/gcc/results/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/dcb/gcc/results/bin/gcc
COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.268100/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../trunk/configure --prefix=/home/dcb/gcc/results.268100
--disable-multilib --disable-werror --enable-checking=df,extra,fold,rtl,yes
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 9.0.0 20190119 (experimental) (GCC) 
$

This seems to go wrong sometime between revision 267300 and 267400.


More information about the Gcc-bugs mailing list