public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34953]  New: ICC on destructor + noreturn-function at -O3
@ 2008-01-24 14:15 bisqwit at iki dot fi
  2008-01-24 14:43 ` [Bug c++/34953] " bisqwit at iki dot fi
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: bisqwit at iki dot fi @ 2008-01-24 14:15 UTC (permalink / raw)
  To: gcc-bugs

This code crashes GCC versions 4.1.2, 4.1.3, and 4.2.3, when compiled using the
-O3 option.


void B_CLEAR(void* ret);
void B_NeverReturns(void* ret) __attribute__((noreturn));

int main()
{
    const struct AutoErrPop { ~AutoErrPop() { } } AutoErrPopper = { };
    B_NeverReturns(0);
}

void B_NeverReturns(void* ret)
{
    B_CLEAR(ret); /* Never returns (does a setjmp/goto) */
}

Tested on x86_64 and i386. To reproduce: g++ a.cc -O3

Expected result:
a.cc:4: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.


-- 
           Summary: ICC on destructor + noreturn-function at -O3
           Product: gcc
           Version: 4.1.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bisqwit at iki dot fi
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/34953] ICC on destructor + noreturn-function at -O3
  2008-01-24 14:15 [Bug c++/34953] New: ICC on destructor + noreturn-function at -O3 bisqwit at iki dot fi
@ 2008-01-24 14:43 ` bisqwit at iki dot fi
  2008-01-24 15:48 ` [Bug c++/34953] [4.1/4.2 Regression] ICE " rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bisqwit at iki dot fi @ 2008-01-24 14:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bisqwit at iki dot fi  2008-01-24 13:52 -------
The body of the function B_CLEAR() is not included, and not relevant, since the
error happens without the body as well, and does not progress to linking.


-- 

bisqwit at iki dot fi changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bisqwit at iki dot fi


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/34953] [4.1/4.2 Regression] ICE on destructor + noreturn-function at -O3
  2008-01-24 14:15 [Bug c++/34953] New: ICC on destructor + noreturn-function at -O3 bisqwit at iki dot fi
  2008-01-24 14:43 ` [Bug c++/34953] " bisqwit at iki dot fi
@ 2008-01-24 15:48 ` rguenth at gcc dot gnu dot org
  2008-01-24 15:53 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-24 15:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-01-24 15:15 -------
Confirmed.  We ICE in apply_return_prediction() because we come along an
empty BB.  This was fixed on the trunk by

2007-05-01  Zdenek Dvorak  <dvorakz@suse.cz>

...
        * predict.c (apply_return_prediction): Check for empty blocks.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-01-24 15:15:13
               date|                            |
            Summary|ICE on destructor +         |[4.1/4.2 Regression] ICE on
                   |noreturn-function at -O3    |destructor + noreturn-
                   |                            |function at -O3
   Target Milestone|---                         |4.2.3


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/34953] [4.1/4.2 Regression] ICE on destructor + noreturn-function at -O3
  2008-01-24 14:15 [Bug c++/34953] New: ICC on destructor + noreturn-function at -O3 bisqwit at iki dot fi
  2008-01-24 14:43 ` [Bug c++/34953] " bisqwit at iki dot fi
  2008-01-24 15:48 ` [Bug c++/34953] [4.1/4.2 Regression] ICE " rguenth at gcc dot gnu dot org
@ 2008-01-24 15:53 ` rguenth at gcc dot gnu dot org
  2008-01-24 16:06 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-24 15:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-01-24 15:23 -------
I have a patch.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
      Known to work|3.3.6 4.0.4                 |3.3.6 4.0.4 4.3.0
   Last reconfirmed|2008-01-24 15:15:13         |2008-01-24 15:23:46
               date|                            |


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/34953] [4.1/4.2 Regression] ICE on destructor + noreturn-function at -O3
  2008-01-24 14:15 [Bug c++/34953] New: ICC on destructor + noreturn-function at -O3 bisqwit at iki dot fi
                   ` (2 preceding siblings ...)
  2008-01-24 15:53 ` rguenth at gcc dot gnu dot org
@ 2008-01-24 16:06 ` rguenth at gcc dot gnu dot org
  2008-01-24 16:07 ` [Bug c++/34953] [4.1 " rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-24 16:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2008-01-24 16:00 -------
Subject: Bug 34953

Author: rguenth
Date: Thu Jan 24 15:59:18 2008
New Revision: 131781

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131781
Log:
2008-01-24  Richard Guenther  <rguenther@suse.de>

        PR middle-end/34953
        * predict.c (apply_return_prediction): Check for empty blocks.
        (tree_estimate_probability): Likewise.

        * g++.dg/torture/pr34953.C: New testcase.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/torture/pr34953.C
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/predict.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/34953] [4.1 Regression] ICE on destructor + noreturn-function at -O3
  2008-01-24 14:15 [Bug c++/34953] New: ICC on destructor + noreturn-function at -O3 bisqwit at iki dot fi
                   ` (3 preceding siblings ...)
  2008-01-24 16:06 ` rguenth at gcc dot gnu dot org
@ 2008-01-24 16:07 ` rguenth at gcc dot gnu dot org
  2008-01-24 16:16 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-24 16:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2008-01-24 16:03 -------
Fixed for 4.2.3.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rguenth at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW
      Known to fail|4.1.2 4.1.3 4.2.3           |4.1.2 4.1.3
      Known to work|3.3.6 4.0.4 4.3.0           |3.3.6 4.0.4 4.2.3 4.3.0
            Summary|[4.1/4.2 Regression] ICE on |[4.1 Regression] ICE on
                   |destructor + noreturn-      |destructor + noreturn-
                   |function at -O3             |function at -O3


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/34953] [4.1 Regression] ICE on destructor + noreturn-function at -O3
  2008-01-24 14:15 [Bug c++/34953] New: ICC on destructor + noreturn-function at -O3 bisqwit at iki dot fi
                   ` (4 preceding siblings ...)
  2008-01-24 16:07 ` [Bug c++/34953] [4.1 " rguenth at gcc dot gnu dot org
@ 2008-01-24 16:16 ` rguenth at gcc dot gnu dot org
  2008-02-01 17:05 ` jsm28 at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-24 16:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2008-01-24 16:03 -------
Subject: Bug 34953

Author: rguenth
Date: Thu Jan 24 16:02:51 2008
New Revision: 131782

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131782
Log:
2008-01-24  Richard Guenther  <rguenther@suse.de>

        PR middle-end/34953
        * g++.dg/torture/pr34953.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr34953.C
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/34953] [4.1 Regression] ICE on destructor + noreturn-function at -O3
  2008-01-24 14:15 [Bug c++/34953] New: ICC on destructor + noreturn-function at -O3 bisqwit at iki dot fi
                   ` (5 preceding siblings ...)
  2008-01-24 16:16 ` rguenth at gcc dot gnu dot org
@ 2008-02-01 17:05 ` jsm28 at gcc dot gnu dot org
  2008-05-19 20:33 ` jsm28 at gcc dot gnu dot org
  2008-07-04 16:18 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-02-01 17:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jsm28 at gcc dot gnu dot org  2008-02-01 16:55 -------
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.3                       |4.2.4


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/34953] [4.1 Regression] ICE on destructor + noreturn-function at -O3
  2008-01-24 14:15 [Bug c++/34953] New: ICC on destructor + noreturn-function at -O3 bisqwit at iki dot fi
                   ` (6 preceding siblings ...)
  2008-02-01 17:05 ` jsm28 at gcc dot gnu dot org
@ 2008-05-19 20:33 ` jsm28 at gcc dot gnu dot org
  2008-07-04 16:18 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jsm28 at gcc dot gnu dot org  2008-05-19 20:24 -------
4.2.4 is being released, changing milestones to 4.2.5.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.4                       |4.2.5


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/34953] [4.1 Regression] ICE on destructor + noreturn-function at -O3
  2008-01-24 14:15 [Bug c++/34953] New: ICC on destructor + noreturn-function at -O3 bisqwit at iki dot fi
                   ` (7 preceding siblings ...)
  2008-05-19 20:33 ` jsm28 at gcc dot gnu dot org
@ 2008-07-04 16:18 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 16:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jsm28 at gcc dot gnu dot org  2008-07-04 16:17 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.2.3


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-07-04 16:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-24 14:15 [Bug c++/34953] New: ICC on destructor + noreturn-function at -O3 bisqwit at iki dot fi
2008-01-24 14:43 ` [Bug c++/34953] " bisqwit at iki dot fi
2008-01-24 15:48 ` [Bug c++/34953] [4.1/4.2 Regression] ICE " rguenth at gcc dot gnu dot org
2008-01-24 15:53 ` rguenth at gcc dot gnu dot org
2008-01-24 16:06 ` rguenth at gcc dot gnu dot org
2008-01-24 16:07 ` [Bug c++/34953] [4.1 " rguenth at gcc dot gnu dot org
2008-01-24 16:16 ` rguenth at gcc dot gnu dot org
2008-02-01 17:05 ` jsm28 at gcc dot gnu dot org
2008-05-19 20:33 ` jsm28 at gcc dot gnu dot org
2008-07-04 16:18 ` jsm28 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).