public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40445]  New: g++   void f() { __builtin_unreachable(); }
@ 2009-06-15 13:10 wouter dot vermaelen at scarlet dot be
  2009-06-15 13:59 ` [Bug c++/40445] [4.5 Regression] " rguenth at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: wouter dot vermaelen at scarlet dot be @ 2009-06-15 13:10 UTC (permalink / raw)
  To: gcc-bugs

Compiling the single line program

void f() { __builtin_unreachable(); }

works fine with gcc, but triggers an ICE when compiled with g++

unreachable.c:1:37: internal compiler error: in remove_insn, at emit-rtl.c:3796

I'm using SVN revision 148487.


-- 
           Summary: g++   void f() { __builtin_unreachable(); }
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wouter dot vermaelen at scarlet dot be


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


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

* [Bug c++/40445] [4.5 Regression] g++   void f() { __builtin_unreachable(); }
  2009-06-15 13:10 [Bug c++/40445] New: g++ void f() { __builtin_unreachable(); } wouter dot vermaelen at scarlet dot be
@ 2009-06-15 13:59 ` rguenth at gcc dot gnu dot org
  2009-06-15 14:59 ` [Bug c++/40445] " hjl dot tools at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-06-15 13:59 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|g++   void f() {            |[4.5 Regression] g++   void
                   |__builtin_unreachable(); }  |f() {
                   |                            |__builtin_unreachable(); }
   Target Milestone|---                         |4.5.0


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


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

* [Bug c++/40445] g++   void f() { __builtin_unreachable(); }
  2009-06-15 13:10 [Bug c++/40445] New: g++ void f() { __builtin_unreachable(); } wouter dot vermaelen at scarlet dot be
  2009-06-15 13:59 ` [Bug c++/40445] [4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2009-06-15 14:59 ` hjl dot tools at gmail dot com
  2009-06-15 15:00 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-15 14:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2009-06-15 14:59 -------
Why is this a regression? Do we support _builtin_unreachable() in 4.4?


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.5 Regression] g++   void |g++   void f() {
                   |f() {                       |__builtin_unreachable(); }
                   |__builtin_unreachable(); }  |


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


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

* [Bug c++/40445] g++   void f() { __builtin_unreachable(); }
  2009-06-15 13:10 [Bug c++/40445] New: g++ void f() { __builtin_unreachable(); } wouter dot vermaelen at scarlet dot be
  2009-06-15 13:59 ` [Bug c++/40445] [4.5 Regression] " rguenth at gcc dot gnu dot org
  2009-06-15 14:59 ` [Bug c++/40445] " hjl dot tools at gmail dot com
@ 2009-06-15 15:00 ` pinskia at gcc dot gnu dot org
  2009-06-17  0:24 ` daney at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-06-15 15:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2009-06-15 15:00 -------
(In reply to comment #1)
> Why is this a regression? Do we support _builtin_unreachable() in 4.4?

Well it is a regression as it compiled before and did not do what the user
expected though.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/40445] g++   void f() { __builtin_unreachable(); }
  2009-06-15 13:10 [Bug c++/40445] New: g++ void f() { __builtin_unreachable(); } wouter dot vermaelen at scarlet dot be
                   ` (2 preceding siblings ...)
  2009-06-15 15:00 ` pinskia at gcc dot gnu dot org
@ 2009-06-17  0:24 ` daney at gcc dot gnu dot org
  2009-06-21 14:18 ` daney at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: daney at gcc dot gnu dot org @ 2009-06-17  0:24 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]



------- Comment #3 from daney at gcc dot gnu dot org  2009-06-17 00:23 -------
At r 148555 on x86_64-pc-linux-gnu I can confirm:

[daney@dd_xps junk]$ /home/daney/gccsvn/native-clean/gcc/g++
-B/home/daney/gccsvn/native-clean/gcc/ -fomit-frame-pointer -m32 -S dd1.cc 
dd1.cc: In function ‘void g(int)’:
dd1.cc:4:1: internal compiler error: in remove_insn, at emit-rtl.c:3796
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[daney@dd_xps junk]$ cat dd1.cc
void g (int c)
{
  __builtin_unreachable ();
}
[daney@dd_xps junk]$ /home/daney/gccsvn/native-clean/gcc/g++
-B/home/daney/gccsvn/native-clean/gcc/ -fomit-frame-pointer -m32 -S dd1.cc 
dd1.cc: In function ‘void g(int)’:
dd1.cc:4:1: internal compiler error: in remove_insn, at emit-rtl.c:3796
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

I will take a look.


-- 

daney at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |daney at gcc dot gnu dot org
                   |dot org                     |


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


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

* [Bug c++/40445] g++   void f() { __builtin_unreachable(); }
  2009-06-15 13:10 [Bug c++/40445] New: g++ void f() { __builtin_unreachable(); } wouter dot vermaelen at scarlet dot be
                   ` (3 preceding siblings ...)
  2009-06-17  0:24 ` daney at gcc dot gnu dot org
@ 2009-06-21 14:18 ` daney at gcc dot gnu dot org
  2009-07-10 22:56 ` [Bug rtl-optimization/40445] " daney at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: daney at gcc dot gnu dot org @ 2009-06-21 14:18 UTC (permalink / raw)
  To: gcc-bugs



-- 

daney 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         |2009-06-21 14:18:30
               date|                            |


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


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

* [Bug rtl-optimization/40445] g++   void f() { __builtin_unreachable(); }
  2009-06-15 13:10 [Bug c++/40445] New: g++ void f() { __builtin_unreachable(); } wouter dot vermaelen at scarlet dot be
                   ` (4 preceding siblings ...)
  2009-06-21 14:18 ` daney at gcc dot gnu dot org
@ 2009-07-10 22:56 ` daney at gcc dot gnu dot org
  2009-07-25 20:25 ` daney at gcc dot gnu dot org
  2009-07-26  5:05 ` daney at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: daney at gcc dot gnu dot org @ 2009-07-10 22:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from daney at gcc dot gnu dot org  2009-07-10 22:55 -------
This is the proposed patch for this bug:

http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01978.html


-- 

daney at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug rtl-optimization/40445] g++   void f() { __builtin_unreachable(); }
  2009-06-15 13:10 [Bug c++/40445] New: g++ void f() { __builtin_unreachable(); } wouter dot vermaelen at scarlet dot be
                   ` (5 preceding siblings ...)
  2009-07-10 22:56 ` [Bug rtl-optimization/40445] " daney at gcc dot gnu dot org
@ 2009-07-25 20:25 ` daney at gcc dot gnu dot org
  2009-07-26  5:05 ` daney at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: daney at gcc dot gnu dot org @ 2009-07-25 20:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from daney at gcc dot gnu dot org  2009-07-25 20:25 -------
Subject: Bug 40445

Author: daney
Date: Sat Jul 25 20:25:18 2009
New Revision: 150090

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150090
Log:
2009-07-25  David Daney  <ddaney@caviumnetworks.com>

        PR rtl-optimization/40445
        * emit-rtl.c (next_nonnote_insn_bb): New function.
        * rtl.h (next_nonnote_insn_bb): Declare new function.
        * cfgcleanup.c (try_optimize_cfg): Don't remove an empty block
        with no successors that is the successor of the ENTRY_BLOCK.
        Continue from the top after removing an empty fallthrough block.
        * cfgrtl.c (get_last_bb_insn): Call next_nonnote_insn_bb instead
        of next_nonnote_insn.

2009-07-25  David Daney  <ddaney@caviumnetworks.com>

        PR rtl-optimization/40445
        * g++.dg/other/builtin-unreachable-1.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/other/builtin-unreachable-1.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgcleanup.c
    trunk/gcc/cfgrtl.c
    trunk/gcc/emit-rtl.c
    trunk/gcc/rtl.h
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug rtl-optimization/40445] g++   void f() { __builtin_unreachable(); }
  2009-06-15 13:10 [Bug c++/40445] New: g++ void f() { __builtin_unreachable(); } wouter dot vermaelen at scarlet dot be
                   ` (6 preceding siblings ...)
  2009-07-25 20:25 ` daney at gcc dot gnu dot org
@ 2009-07-26  5:05 ` daney at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: daney at gcc dot gnu dot org @ 2009-07-26  5:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from daney at gcc dot gnu dot org  2009-07-26 05:05 -------
Should be fixed by the patch.


-- 

daney at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2009-07-26  5:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-15 13:10 [Bug c++/40445] New: g++ void f() { __builtin_unreachable(); } wouter dot vermaelen at scarlet dot be
2009-06-15 13:59 ` [Bug c++/40445] [4.5 Regression] " rguenth at gcc dot gnu dot org
2009-06-15 14:59 ` [Bug c++/40445] " hjl dot tools at gmail dot com
2009-06-15 15:00 ` pinskia at gcc dot gnu dot org
2009-06-17  0:24 ` daney at gcc dot gnu dot org
2009-06-21 14:18 ` daney at gcc dot gnu dot org
2009-07-10 22:56 ` [Bug rtl-optimization/40445] " daney at gcc dot gnu dot org
2009-07-25 20:25 ` daney at gcc dot gnu dot org
2009-07-26  5:05 ` daney 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).