public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/11083] New: [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions
@ 2003-06-04  1:08 nick@ilm.com
  2003-06-04  1:11 ` [Bug optimization/11083] " nick@ilm.com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: nick@ilm.com @ 2003-06-04  1:08 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [3.3 regression] ICE in commit_one_edge_insertion, at
                    cfgrtl.c:1438 with -O2 -fnon-call-exceptions
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: nick@ilm.com
                CC: gcc-bugs@gcc.gnu.org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

With -O2 -fnon-call-exceptions, the following code causes an ICE
in g++ 3.3:

#include <vector>
class B { public: B (const std::vector<int> &a); std::vector<int> _a; };
B::B(const std::vector<int> &a) { _a = a; }

adding -fno-gcse causes the ICE to disappear.  This code snippet works
in gcc-3.2.3 gcc-3.0.4 and gcc-3.4 (cvs head)

preprocessed source from gcc-3.3 will be attached to the PR

-nick


> /dept/rnd/vendor/gcc-3.3/bin/g++ -v -O2 -fnon-call-exceptions ~/gcse-non-call.C
Reading specs from /dept/rnd/vendor/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure --prefix=/dept/rnd/vendor/gcc-3.3
--enable-threads --enable-languages=c,c++
Thread model: posix
gcc version 3.3
 /dept/rnd/vendor/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/cc1plus -quiet -v
-D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -D_GNU_SOURCE
/home/nick/gcse-non-call.C -D__GNUG__=3 -quiet -dumpbase gcse-non-call.C
-auxbase gcse-non-call -O2 -version -fnon-call-exceptions -o /usr/tmp/ccaMSo6V.s
GNU C++ version 3.3 (i686-pc-linux-gnu)
        compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.1 2.96-98).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/dept/rnd/vendor/gcc-3.3/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /dept/rnd/vendor/gcc-3.3/include/c++/3.3
 /dept/rnd/vendor/gcc-3.3/include/c++/3.3/i686-pc-linux-gnu
 /dept/rnd/vendor/gcc-3.3/include/c++/3.3/backward
 /usr/local/include
 /dept/rnd/vendor/gcc-3.3/include
 /dept/rnd/vendor/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/include
 /usr/include
End of search list.
/dept/rnd/vendor/gcc-3.3/include/c++/3.3/bits/vector.tcc: In member function `
   std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const 
   std::vector<_Tp, _Alloc>&) [with _Tp = int, _Alloc = std::allocator<int>]':
/home/nick/gcse-non-call.C:3:   instantiated from here
/dept/rnd/vendor/gcc-3.3/include/c++/3.3/bits/vector.tcc:152: internal compiler
error: in
   commit_one_edge_insertion, at cfgrtl.c:1438



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug optimization/11083] [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions
  2003-06-04  1:08 [Bug optimization/11083] New: [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions nick@ilm.com
@ 2003-06-04  1:11 ` nick@ilm.com
  2003-06-04  2:32 ` bangerth@dealii.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: nick@ilm.com @ 2003-06-04  1:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From nick@ilm.com  2003-06-04 01:11 -------
Created an attachment (id=4157)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4157&action=view)
preprocessed source which triggers the ice with gcc 3.3 (bzip2)

run with:
g++ -O2 -fnon-call-exceptions -c gcse-non-call.ii



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug optimization/11083] [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions
  2003-06-04  1:08 [Bug optimization/11083] New: [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions nick@ilm.com
  2003-06-04  1:11 ` [Bug optimization/11083] " nick@ilm.com
@ 2003-06-04  2:32 ` bangerth@dealii.org
  2003-06-23 23:11 ` janis187 at us dot ibm dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bangerth@dealii.org @ 2003-06-04  2:32 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


bangerth@dealii.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Priority|P2                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-04 02:32:28
               date|                            |
   Target Milestone|3.4                         |3.3.1


------- Additional Comments From bangerth@dealii.org  2003-06-04 02:32 -------
What a nasty bug -- only 11000 lines in the preprocessed sources and still
so hard to track down...

Here's a cut-down:
-------------------------------------------
extern void *memmove (void *, const void *, unsigned int) throw ();

struct S {
    int * q;
    S(int * i) : q(i) { }
};

struct X {
    int *p;

    void foo(S first, S last) {
      try        { memmove(0, 0, last.q - first.q); }
      catch(...) { throw; }
    }

    void bar (const X& x);
};

void X::bar (const X& x) {
  const unsigned int xlen = S(x.p).q-S(x.p).q;
  if (xlen > 0)
    foo(S(x.p).q, S(x.p).q);
}
------------------------------

g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c y.cc -O2 -fnon-call-exceptions
y.cc: In member function `void X::bar(const X&)':
y.cc:23: internal compiler error: in commit_one_edge_insertion, at cfgrtl.c:
   1438
Please submit a full bug report,
with preprocessed source if appropriate.


This works with 3.2.3 and mainline, but ICEs as above with 3.3.

W.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug optimization/11083] [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions
  2003-06-04  1:08 [Bug optimization/11083] New: [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions nick@ilm.com
  2003-06-04  1:11 ` [Bug optimization/11083] " nick@ilm.com
  2003-06-04  2:32 ` bangerth@dealii.org
@ 2003-06-23 23:11 ` janis187 at us dot ibm dot com
  2003-07-08 12:03 ` ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: janis187 at us dot ibm dot com @ 2003-06-23 23:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From janis187 at us dot ibm dot com  2003-06-23 23:02 -------
The regression in 11083 was introduced or exposed with this patch:

2002-06-13  Jeffrey Law  <law@redhat.com>

        * gcse.c (delete_null_pointer_checks_1): Inform caller if any
        null pointer checks were eliminated.  Update prototype.
        (delete_null_pointer_checks): Similarly.
        * rtl.h (delete_null_pointer_checks): Update prototype.
        * toplev.c (rest_of_compilation): Only run cleanup_cfg if
        delete_null_pointer_checks deletes one or more null
        pointer checks.  Do not run cleanup_cfg before gcse, the
        CFG is accurate and optimized at that point.

The regression hunt used the minimized test case from comment #2 on
i686-pc-linux-gnu, compiled with -O2 -fnon-call-exceptions.


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

* [Bug optimization/11083] [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions
  2003-06-04  1:08 [Bug optimization/11083] New: [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions nick@ilm.com
                   ` (2 preceding siblings ...)
  2003-06-23 23:11 ` janis187 at us dot ibm dot com
@ 2003-07-08 12:03 ` ebotcazou at gcc dot gnu dot org
  2003-07-18  6:59 ` cvs-commit at gcc dot gnu dot org
  2003-07-18  7:03 ` ebotcazou at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2003-07-08 12:03 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2003-07-08 12:03 -------
Not a specialist of the subject, but trying to fix anyway.


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

* [Bug optimization/11083] [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions
  2003-06-04  1:08 [Bug optimization/11083] New: [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions nick@ilm.com
                   ` (3 preceding siblings ...)
  2003-07-08 12:03 ` ebotcazou at gcc dot gnu dot org
@ 2003-07-18  6:59 ` cvs-commit at gcc dot gnu dot org
  2003-07-18  7:03 ` ebotcazou at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-07-18  6:59 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-07-18 06:59 -------
Subject: Bug 11083

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	ebotcazou@gcc.gnu.org	2003-07-18 06:59:24

Modified files:
	gcc            : ChangeLog toplev.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/opt: cfg1.C 

Log message:
	PR optimization/11083
	* toplev.c (rest_of_compilation): Delete unreachable blocks
	if dead edges were purged after the addressof pass.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.670&r2=1.16114.2.671
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.690.2.20&r2=1.690.2.21
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.236&r2=1.2261.2.237
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/cfg1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1


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

* [Bug optimization/11083] [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions
  2003-06-04  1:08 [Bug optimization/11083] New: [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions nick@ilm.com
                   ` (4 preceding siblings ...)
  2003-07-18  6:59 ` cvs-commit at gcc dot gnu dot org
@ 2003-07-18  7:03 ` ebotcazou at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2003-07-18  7:03 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


ebotcazou at gcc dot gnu dot org changed:

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


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2003-07-18 07:03 -------
See http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00807.html


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

end of thread, other threads:[~2003-07-18  7:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-04  1:08 [Bug optimization/11083] New: [3.3 regression] ICE in commit_one_edge_insertion, at cfgrtl.c:1438 with -O2 -fnon-call-exceptions nick@ilm.com
2003-06-04  1:11 ` [Bug optimization/11083] " nick@ilm.com
2003-06-04  2:32 ` bangerth@dealii.org
2003-06-23 23:11 ` janis187 at us dot ibm dot com
2003-07-08 12:03 ` ebotcazou at gcc dot gnu dot org
2003-07-18  6:59 ` cvs-commit at gcc dot gnu dot org
2003-07-18  7:03 ` ebotcazou 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).