[Bug c/57750] New: Internal compiler error when initializing struct member with array
dabler at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 28 12:09:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57750
Bug ID: 57750
Summary: Internal compiler error when initializing struct
member with array
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dabler at gmail dot com
A code that causes the problem:
void main(){ struct a { int *b; } a = { (int*){1} }; }
Command line:
gcc bug.c
The compiler output:
bug.c: In function 'main':
bug.c:1:21: warning: initialization makes pointer from integer without a cast
[enabled by default]
bug.c:1:21: warning: (near initialization for '(anonymous)') [enabled by
default]
bug.c:1:35: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
Output of gcc -v:
gcc (Gentoo 4.6.3 p1.7, pie-0.5.2) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Output of gcc bug.c -save-temps; cat bug.i:
# 1 "bug.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "bug.c"
void main(){ struct a { int *b; } a = { (int*){1} }; }
More information about the Gcc-bugs
mailing list