public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/54340] New: internal compiler error: Illegal instruction (int main() returns nothing, only when -O2/-O3 used)
@ 2012-08-21 7:07 socketpair at gmail dot com
2012-08-21 7:22 ` [Bug c/54340] " mikpe at it dot uu.se
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: socketpair at gmail dot com @ 2012-08-21 7:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54340
Bug #: 54340
Summary: internal compiler error: Illegal instruction (int
main() returns nothing, only when -O2/-O3 used)
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: socketpair@gmail.com
$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 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.
$ gcc test.c
$ LANG=C gcc -O2 test.c
test.c: In function 'main':
test.c:6:1: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccYojEN6.out file, please attach this to
your bugreport.
$ cat test.c
int main (void)
{
volatile int a;
if (a == 42)
return 1;
}
--------------------------------
If I add "return 0;" to the end of function - problem is fixed. I understand,
that program is not correct, but, as I think, gcc should not fail on that. It
seems, it is optimizer bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/54340] internal compiler error: Illegal instruction (int main() returns nothing, only when -O2/-O3 used)
2012-08-21 7:07 [Bug c/54340] New: internal compiler error: Illegal instruction (int main() returns nothing, only when -O2/-O3 used) socketpair at gmail dot com
@ 2012-08-21 7:22 ` mikpe at it dot uu.se
2012-08-21 7:30 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: mikpe at it dot uu.se @ 2012-08-21 7:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54340
--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2012-08-21 07:22:09 UTC ---
You didn't specify the host, but since it's Ubuntu I'm guessing Linux/x86_64.
I can't reproduce the SIGILL with either 4.7.1, 4.6.3, or 4.5.4 on a Core i7.
Can you reproduce with a gcc built from unpatched upstream sources? If not
then you should report this to Ubuntu as their gcc is a heavily modified
version.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/54340] internal compiler error: Illegal instruction (int main() returns nothing, only when -O2/-O3 used)
2012-08-21 7:07 [Bug c/54340] New: internal compiler error: Illegal instruction (int main() returns nothing, only when -O2/-O3 used) socketpair at gmail dot com
2012-08-21 7:22 ` [Bug c/54340] " mikpe at it dot uu.se
@ 2012-08-21 7:30 ` pinskia at gcc dot gnu.org
2012-08-21 7:32 ` socketpair at gmail dot com
2012-08-21 8:00 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-08-21 7:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54340
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |arm-linux-gnueabi
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-08-21 07:30:29 UTC ---
I think this is a Linaro toolchain which means you should report this to Ubuntu
and they will most likely report this to Linaro.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/54340] internal compiler error: Illegal instruction (int main() returns nothing, only when -O2/-O3 used)
2012-08-21 7:07 [Bug c/54340] New: internal compiler error: Illegal instruction (int main() returns nothing, only when -O2/-O3 used) socketpair at gmail dot com
2012-08-21 7:22 ` [Bug c/54340] " mikpe at it dot uu.se
2012-08-21 7:30 ` pinskia at gcc dot gnu.org
@ 2012-08-21 7:32 ` socketpair at gmail dot com
2012-08-21 8:00 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: socketpair at gmail dot com @ 2012-08-21 7:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54340
--- Comment #3 from Коренберг Марк <socketpair at gmail dot com> 2012-08-21 07:32:25 UTC ---
Yes, I tested on gentoo, no error appear.
I have reported to ubuntu bug tracker:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.6/+bug/1039401
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/54340] internal compiler error: Illegal instruction (int main() returns nothing, only when -O2/-O3 used)
2012-08-21 7:07 [Bug c/54340] New: internal compiler error: Illegal instruction (int main() returns nothing, only when -O2/-O3 used) socketpair at gmail dot com
` (2 preceding siblings ...)
2012-08-21 7:32 ` socketpair at gmail dot com
@ 2012-08-21 8:00 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-21 8:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54340
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-21 08:00:18 UTC ---
.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-21 8:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-21 7:07 [Bug c/54340] New: internal compiler error: Illegal instruction (int main() returns nothing, only when -O2/-O3 used) socketpair at gmail dot com
2012-08-21 7:22 ` [Bug c/54340] " mikpe at it dot uu.se
2012-08-21 7:30 ` pinskia at gcc dot gnu.org
2012-08-21 7:32 ` socketpair at gmail dot com
2012-08-21 8:00 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).