This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/47889] [4.7/4.8/4.9 Regression] Segmentation fault in useless_type_conversion_p, at tree-ssa.c:1228


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47889

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldyh at gcc dot gnu.org

--- Comment #10 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Can we remove 4.7, 4.8, and 4.9 from the failing targets?  It seems we diagnose
it just fine and we don't even error out (just a warning).  This is what we get
on 4.8 and 4.9:

reynosa:/dev/shm/trunk/gcc$ ./xgcc -B./ main.c s.c  -flto -O -DPR47889
main.c:1:13: warning: type of 's' does not match original declaration [enabled
by default]
 extern char s[1];
             ^
s.c:1:14: note: previously declared here
 struct S { } s;
              ^

Similarly for 4.7:

reynosa:/build/pristine-4_7/gcc$ ./xgcc -B./ main.c s.c  -flto -O -DPR47889
In file included from :0:0:
main.c:1:13: warning: type of 's' does not match original declaration [enabled
by default]
In file included from main.c:3:0,
                 from :0:
s.c:1:14: note: previously declared here

So I don't see any segfault as reported in the PR.  And I don't see any hard
error (since Richi said we shouldn't error, which we don't...).

The only place where I see an ICE is in 4.6:

reynosa:/build/pristine-4.6/gcc$ ./xgcc -B./ main.c s.c  -flto -O -DPR47889
main.c:1:13: warning: type of 's' does not match original declaration [enabled
by default]
s.c:1:14: note: previously declared here
In file included from :0:0:
main.c: In function 'main':
main.c:5:5: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: ./xgcc returned 1 exit status
/usr/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status

Can we just flag this exclusively as a 4.6 problem?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]