public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug pending/37879] New: g++: internal compiler error: Segmentation fault
@ 2008-10-21 7:10 gcc-bugzilla at gcc dot gnu dot org
2008-10-27 1:58 ` [Bug tree-optimization/37879] [4.3/4.4 Regression] ICE with "wrong" use of noreturn attribute and optimization pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2008-10-21 7:10 UTC (permalink / raw)
To: gcc-bugs
NOTE: Defaulting component because reported component no longer exists
ICE: Segmentation fault when compiling with an incorrect used
__attribute__((noreturn));
Environment:
System: Linux molybdaen 2.6.26-1-686 #1 SMP Wed Sep 10 16:46:13 UTC 2008 i686
GN
U/Linux
host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-9'
--with-b
ugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran
,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib
--libexecdir=/usr
/lib --without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-i
nclude-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu
--ena
ble-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all
--enable
-cld --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--ta
rget=i486-linux-gnu
Thread model: posix
gcc version 4.3.1 (Debian 4.3.1-9)
How-To-Repeat:
source code (preprocessed file looks the same):
inline unsigned f( unsigned i ) { return i; }
unsigned i = 23;
static inline void g( unsigned ) __attribute__((noreturn));
static inline void g( unsigned j ) { if( j ) asm ("hlt"); }
void main_func() asm("main_func") __attribute__((noreturn));
void main_func()
{
unsigned j;
g( f( j = i++ ) );
asm("hlt");
}
compile with:
g++ -save-temps -m32 -MD -Os -ffunction-sections -fstrict-aliasing
-fno-rtti
-fno-exceptions -fcheck-new -fshort-enums --param max-inline-insns-single=100
-
mregparm=3 -fomit-frame-pointer -minline-all-stringops -nostdinc -ggdb
-Wconver
sion -Wctor-dtor-privacy -Wdeprecated -Winvalid-offsetof -Wnon-template-friend
-
Wold-style-cast -Woverloaded-virtual -Wpmf-conversions -Wreorder -Wsign-promo
-W
strict-null-sentinel -Wsynth -Waggregate-return -Wattributes -Wcast-align
-Wdepr
ecated-declarations -Wextra -Winline -Wmissing-noreturn -Wpacked -Wshadow
-Wstac
k-protector -Wstrict-aliasing -Wswitch -Wswitch-default -Wswitch-enum
-Wsystem-h
eaders -Wunsafe-loop-optimizations -Wvolatile-register-var
-Wdisabled-optimizati
on -Wformat -Wreturn-type -Wno-non-virtual-dtor -Wuninitialized -c -o
segfault.o
segfault.cc
------- Comment #1 from benjamin at os dot inf dot tu-dresden dot de 2008-10-21 07:09 -------
Fix:
use __attribute__((noreturn)) correctly
--
Summary: g++: internal compiler error: Segmentation fault
Product: gcc
Version: 3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: pending
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: benjamin at os dot inf dot tu-dresden dot de
GCC build triplet: i486-pc-linux-gnu
GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37879
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/37879] [4.3/4.4 Regression] ICE with "wrong" use of noreturn attribute and optimization
2008-10-21 7:10 [Bug pending/37879] New: g++: internal compiler error: Segmentation fault gcc-bugzilla at gcc dot gnu dot org
@ 2008-10-27 1:58 ` pinskia at gcc dot gnu dot org
2008-10-27 9:33 ` jakub at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-10-27 1:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2008-10-27 01:57 -------
Confirmed.
1620 if (e->dest != bb->next_bb
1621 && e->dest != EXIT_BLOCK_PTR
1622 && single_succ_p (e->dest)
1623 && single_succ_edge (e->dest)->dest == EXIT_BLOCK_PTR
1624 && gimple_code (last_stmt (e->dest)) == GIMPLE_RETURN)
last_stmt (e->dest) is NULL as there are no statements in the basic block.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Component|c++ |tree-optimization
Ever Confirmed|0 |1
GCC build triplet|i486-pc-linux-gnu |
GCC host triplet|i486-pc-linux-gnu |
GCC target triplet|i486-pc-linux-gnu |
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2008-10-27 01:57:26
date| |
Summary|g++: internal compiler |[4.3/4.4 Regression] ICE
|error: Segmentation fault |with "wrong" use of noreturn
| |attribute and optimization
Target Milestone|--- |4.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37879
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/37879] [4.3/4.4 Regression] ICE with "wrong" use of noreturn attribute and optimization
2008-10-21 7:10 [Bug pending/37879] New: g++: internal compiler error: Segmentation fault gcc-bugzilla at gcc dot gnu dot org
2008-10-27 1:58 ` [Bug tree-optimization/37879] [4.3/4.4 Regression] ICE with "wrong" use of noreturn attribute and optimization pinskia at gcc dot gnu dot org
@ 2008-10-27 9:33 ` jakub at gcc dot gnu dot org
2008-10-27 20:39 ` jakub at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-10-27 9:33 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2008-
| |10/msg01132.html
Status|NEW |ASSIGNED
Last reconfirmed|2008-10-27 01:57:26 |2008-10-27 09:32:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37879
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/37879] [4.3/4.4 Regression] ICE with "wrong" use of noreturn attribute and optimization
2008-10-21 7:10 [Bug pending/37879] New: g++: internal compiler error: Segmentation fault gcc-bugzilla at gcc dot gnu dot org
2008-10-27 1:58 ` [Bug tree-optimization/37879] [4.3/4.4 Regression] ICE with "wrong" use of noreturn attribute and optimization pinskia at gcc dot gnu dot org
2008-10-27 9:33 ` jakub at gcc dot gnu dot org
@ 2008-10-27 20:39 ` jakub at gcc dot gnu dot org
2008-10-27 20:43 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-10-27 20:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2008-10-27 20:37 -------
Subject: Bug 37879
Author: jakub
Date: Mon Oct 27 20:36:32 2008
New Revision: 141390
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141390
Log:
PR tree-optimization/37879
* predict.c (tree_estimate_probability): Check if last_stmt is
non-NULL before dereferencing it.
* gcc.dg/pr37879.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr37879.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/predict.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37879
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/37879] [4.3/4.4 Regression] ICE with "wrong" use of noreturn attribute and optimization
2008-10-21 7:10 [Bug pending/37879] New: g++: internal compiler error: Segmentation fault gcc-bugzilla at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-10-27 20:39 ` jakub at gcc dot gnu dot org
@ 2008-10-27 20:43 ` jakub at gcc dot gnu dot org
2008-10-30 6:57 ` cnstar9988 at gmail dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-10-27 20:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2008-10-27 20:42 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37879
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/37879] [4.3/4.4 Regression] ICE with "wrong" use of noreturn attribute and optimization
2008-10-21 7:10 [Bug pending/37879] New: g++: internal compiler error: Segmentation fault gcc-bugzilla at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-10-27 20:43 ` jakub at gcc dot gnu dot org
@ 2008-10-30 6:57 ` cnstar9988 at gmail dot com
2008-10-30 9:16 ` [Bug tree-optimization/37879] [4.3 " jakub at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cnstar9988 at gmail dot com @ 2008-10-30 6:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from cnstar9988 at gmail dot com 2008-10-30 06:57 -------
fixed in gcc 4.3 branch?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37879
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/37879] [4.3 Regression] ICE with "wrong" use of noreturn attribute and optimization
2008-10-21 7:10 [Bug pending/37879] New: g++: internal compiler error: Segmentation fault gcc-bugzilla at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-10-30 6:57 ` cnstar9988 at gmail dot com
@ 2008-10-30 9:16 ` jakub at gcc dot gnu dot org
2008-11-03 11:29 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-10-30 9:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2008-10-30 09:15 -------
Not fixed there yet.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Known to fail| |4.3.2
Known to work| |4.4.0
Resolution|FIXED |
Summary|[4.3/4.4 Regression] ICE |[4.3 Regression] ICE with
|with "wrong" use of noreturn|"wrong" use of noreturn
|attribute and optimization |attribute and optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37879
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/37879] [4.3 Regression] ICE with "wrong" use of noreturn attribute and optimization
2008-10-21 7:10 [Bug pending/37879] New: g++: internal compiler error: Segmentation fault gcc-bugzilla at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-10-30 9:16 ` [Bug tree-optimization/37879] [4.3 " jakub at gcc dot gnu dot org
@ 2008-11-03 11:29 ` jakub at gcc dot gnu dot org
2008-11-05 20:42 ` jakub at gcc dot gnu dot org
2008-11-05 20:47 ` jakub at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-11-03 11:29 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37879
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/37879] [4.3 Regression] ICE with "wrong" use of noreturn attribute and optimization
2008-10-21 7:10 [Bug pending/37879] New: g++: internal compiler error: Segmentation fault gcc-bugzilla at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-11-03 11:29 ` jakub at gcc dot gnu dot org
@ 2008-11-05 20:42 ` jakub at gcc dot gnu dot org
2008-11-05 20:47 ` jakub at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-11-05 20:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jakub at gcc dot gnu dot org 2008-11-05 20:41 -------
Subject: Bug 37879
Author: jakub
Date: Wed Nov 5 20:39:50 2008
New Revision: 141620
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141620
Log:
PR tree-optimization/37879
* predict.c (tree_estimate_probability): Check if last_stmt is
non-NULL before dereferencing it.
* gcc.dg/pr37879.c: New test.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pr37879.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/predict.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37879
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/37879] [4.3 Regression] ICE with "wrong" use of noreturn attribute and optimization
2008-10-21 7:10 [Bug pending/37879] New: g++: internal compiler error: Segmentation fault gcc-bugzilla at gcc dot gnu dot org
` (7 preceding siblings ...)
2008-11-05 20:42 ` jakub at gcc dot gnu dot org
@ 2008-11-05 20:47 ` jakub at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-11-05 20:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jakub at gcc dot gnu dot org 2008-11-05 20:46 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37879
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-11-05 20:47 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-21 7:10 [Bug pending/37879] New: g++: internal compiler error: Segmentation fault gcc-bugzilla at gcc dot gnu dot org
2008-10-27 1:58 ` [Bug tree-optimization/37879] [4.3/4.4 Regression] ICE with "wrong" use of noreturn attribute and optimization pinskia at gcc dot gnu dot org
2008-10-27 9:33 ` jakub at gcc dot gnu dot org
2008-10-27 20:39 ` jakub at gcc dot gnu dot org
2008-10-27 20:43 ` jakub at gcc dot gnu dot org
2008-10-30 6:57 ` cnstar9988 at gmail dot com
2008-10-30 9:16 ` [Bug tree-optimization/37879] [4.3 " jakub at gcc dot gnu dot org
2008-11-03 11:29 ` jakub at gcc dot gnu dot org
2008-11-05 20:42 ` jakub at gcc dot gnu dot org
2008-11-05 20:47 ` jakub at gcc dot gnu dot 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).