This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/11646] New: [3.3 regression] ICE with -fnon-call-exceptions -fgcse -O


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

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

           Summary: [3.3 regression] ICE with -fnon-call-exceptions -fgcse -
                    O
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nick at ilm dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

The following code ICE's the 3.3.1 prerelease with -fnon-call-exceptions
and -fgcse.  Disabling either of the two flags results in successful
compilation.  This compiles succeffully with the 3.2.3 release.

---------------
#include <vector>
using std::vector;

struct A {
  float l() const;
  A operator - (const A &) const;
  const A & operator = (float) const;
};

struct B {
  float d();
};

struct C {
    int i;
};

float
f(const A& a, B& b)
{
    vector<C> vc;
    int index = vc[0].i;
    A aa;
    float d = (aa - a).l();
    if (d > b.d()) aa = 0;
    return b.d();
}
------------------

> /dept/rnd/vendor/gcc-3.3.1-20030720/bin/g++ -fnon-call-exceptions -fgcse -O -c
fnce-gcse.C
fnce-gcse.C: In function `float f(const A&, B&)':
fnce-gcse.C:27: internal compiler error: in split_edge, at cfgrtl.c:1326
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]