User account creation filtered due to spam.

Bug 34035 - [4.3 Regression] ICE in calc_dfs_tree with -O2 -fnon-call-exceptions -ffast-math -fno-gcse
Summary: [4.3 Regression] ICE in calc_dfs_tree with -O2 -fnon-call-exceptions -ffast-m...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Eric Botcazou
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2007-11-08 21:49 UTC by Janis Johnson
Modified: 2007-11-12 21:55 UTC (History)
2 users (show)

See Also:
Host:
Target: powerpc*-linux
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-11-09 10:20:16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Johnson 2007-11-08 21:49:47 UTC
Test eon from SPEC CPU2000 fails to build on powerpc64-linux with both -m32 and -m64 and "-fnon-call-exceptions -ffast-math -fno-gcse " with an ICE in calc_dfs_tree at dominance.c:393

Minimized test case:

class One {
public:
    One () { e[0] = e[1] = 0.0; }
    double e[2];
};

template <class T>
class Two {
public:
    Two();
private:
    T *data;
    int arraySize;
};

template <class T>
Two<T>::Two() {
   data = new T[arraySize];
}

class Three {
protected:
  Two<One> data;
};

class Four : public Three {
public:
  Four ();
  void Foo (int n);
};

Four :: Four (){
   Foo (1);
}

The ICE starts with:

    http://gcc.gnu.org/viewcvs?view=rev&rev=123084

    r123084 | bonzini | 2007-03-20 08:31:13 +0000 (Tue, 20 Mar 2007)
Comment 1 Eric Botcazou 2007-11-09 09:55:47 UTC
Interesting combination of options (-O2 is missing though).
Comment 2 Eric Botcazou 2007-11-09 10:20:16 UTC
Investigating.
Comment 3 Janis Johnson 2007-11-09 17:23:32 UTC
The option list should have included -O2.  This is one of the failures found by compiling SPEC CPU2000 with lots of sets of options and running with the test input, as described in http://gcc.gnu.org/ml/gcc/2007-09/msg00496.html.
Comment 4 Eric Botcazou 2007-11-12 15:25:18 UTC
> The option list should have included -O2.  This is one of the failures found
> compiling SPEC CPU2000 with lots of sets of options and running with the test
> input, as described in http://gcc.gnu.org/ml/gcc/2007-09/msg00496.html.

OK, thanks for explaining again. :-)
Comment 5 Eric Botcazou 2007-11-12 21:21:45 UTC
Subject: Bug 34035

Author: ebotcazou
Date: Mon Nov 12 21:21:37 2007
New Revision: 130122

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130122
Log:
	PR rtl-optimization/34035
	* cse.c (cse_cfg_altered): New global variable.
	(cse_jumps_altered): Make boolean.
	(recorded_label_ref): Likewise.
	(cse_insn): Adjust for above changes.
	(cse_extended_basic_block): Likewise.  Set cse_cfg_altered
	if dead edges have been purged.
	(cse_main): Change return value specification and adjust code.
	(rest_of_handle_cse): Adjust for above change.
	(rest_of_handle_cse2): Likewise.
	* gcse.c (rest_of_handle_gcse): Likewise.


Added:
    trunk/gcc/testsuite/g++.dg/opt/cfg5.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cse.c
    trunk/gcc/gcse.c
    trunk/gcc/testsuite/ChangeLog

Comment 6 Eric Botcazou 2007-11-12 21:24:15 UTC
This should work now.
Comment 7 Steven Bosscher 2007-11-12 21:28:42 UTC
The fix increases compile time, please reconsider.
Comment 8 Eric Botcazou 2007-11-12 21:55:11 UTC
The bug is nevertheless fixed.