Bug 19952 - ICE: tree check: expected class 'declaration', have 'statement' (label_expr) in tree_verify_flow_info, at tree-cfg.c:3709
Summary: ICE: tree check: expected class 'declaration', have 'statement' (label_expr) ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Devang Patel
URL:
Keywords: ice-on-valid-code, monitored, patch
Depends on:
Blocks:
 
Reported: 2005-02-14 13:53 UTC by Michael Cieslinski
Modified: 2005-02-23 10:00 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-02-17 12:45:49


Attachments
preprocessed source (79.03 KB, text/plain)
2005-02-14 13:55 UTC, Michael Cieslinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Cieslinski 2005-02-14 13:53:41 UTC
When I compile ACE5.4.2 with the latest snapshot (20050213) I get an ICE.

Michael Cieslinski


g++ -O3 -ftree-vectorize -c -o Hash_Map.o Hash_Map.ii
Hash_Map.cpp: In function 'int main(int, ACE_TCHAR**)':
Hash_Map.cpp:113: internal compiler error: tree check: expected 
class 'declaration', have 'statement' (label_expr) in tree_verify_flow_info, at 
tree-cfg.c:3709
Please submit a full bug report, with preprocessed source if appropriate.


g++ -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc40/configure --prefix=/usr/local/gcc40d --program-
suffix=40d --with-arch=opteron --enable-languages=c,c++ --enable-checking
Thread model: posix
gcc version 4.0.0 20050213 (experimental)
Comment 1 Michael Cieslinski 2005-02-14 13:55:05 UTC
Created attachment 8193 [details]
preprocessed source
Comment 2 Andrew Pinski 2005-02-14 15:47:15 UTC
I should note this is an ICE right before trying to print out another ICE.
Comment 3 Dorit Naishlos 2005-02-15 08:44:29 UTC
This happens during tree-if-conversion pass (before vectorization) (tree-if-
conversion is enabled by -ftree-vectorize)
Comment 4 Giovanni Bajo 2005-02-17 12:45:49 UTC
Confirmed then.
Comment 5 Volker Reichelt 2005-02-18 11:04:21 UTC
Reduced testcase (just compile with "-O -ftree-vectorize"):

==============================
int i;

struct A
{
    ~A() { ++i; }
};

struct B
{
    A a;
};

void foo()
{
    for (int i=0; i<2; ++i)
    {
        B *p;
        if (p) p->~B();
    }
}
==============================
Comment 6 Volker Reichelt 2005-02-18 11:07:48 UTC
: Search converges between 2004-09-02-trunk (#532) and 2004-09-04-trunk (#533).
Comment 7 Volker Reichelt 2005-02-18 11:43:48 UTC
Devang, the regression was introduced with the introduction of
the if-conversion for the vectorizer by your patch
http://gcc.gnu.org/ml/gcc-cvs/2004-09/msg00207.html

Could you please have a look?
Comment 8 Devang Patel 2005-02-18 19:02:30 UTC
Subject: Re:  ICE: tree check: expected class 'declaration', have 'statement' (label_expr) in tree_verify_flow_info, at tree-cfg.c:3709


ok
-
Devang

Comment 9 Volker Reichelt 2005-02-22 01:51:35 UTC
Patch here:
http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01283.html

Devang, you got the wrong PR number in the name of the testcase
and in the ChangeLog entry!
Comment 10 GCC Commits 2005-02-23 01:11:03 UTC
Subject: Bug 19952

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	dpatel@gcc.gnu.org	2005-02-23 01:10:40

Modified files:
	gcc            : ChangeLog tree-if-conv.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/tree-ssa: pr19952.C 

Log message:
	PR 19952
	* tree-if-conv.c (process_phi_nodes): Use bsi_after_labels and skip
	all labels
	* g++.dg/tree-ssa/pr19952.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7563&r2=2.7564
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-if-conv.c.diff?cvsroot=gcc&r1=2.27&r2=2.28
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5068&r2=1.5069
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/tree-ssa/pr19952.C.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 11 Volker Reichelt 2005-02-23 10:00:46 UTC
Fixed.