[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-16 Thread rth at gcc dot gnu dot org
--- Additional Comments From rth at gcc dot gnu dot org 2005-05-16 23:16 --- Fixed. -- What|Removed |Added Status|ASSIGNED|RESOLVED

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-16 Thread cvs-commit at gcc dot gnu dot org
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-16 23:14 --- Subject: Bug 21399 CVSROOT:/cvs/gcc Module name:gcc Changes by: [EMAIL PROTECTED] 2005-05-16 23:14:02 Modified files: gcc: ChangeLog tree-eh.c tree-flow.h tree-

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-16 Thread rth at gcc dot gnu dot org
-- What|Removed |Added AssignedTo|unassigned at gcc dot gnu |rth at gcc dot gnu dot org |dot org | Status|NEW

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-15 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-16 01:23 --- Neither patches are fully complete and here is why, even though fold creates a new CALL_EXPR, we still need to copy the eh_region the function can throw so Steven's patch is not complete, we don't check fo

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-15 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-16 00:44 --- This patch works for me on this testcase, I have not done a full bootstrap/test yet: Index: tree-ssa-propagate.c === RCS file: /cvs/gcc/gcc/g

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-15 Thread steven at gcc dot gnu dot org
--- Additional Comments From steven at gcc dot gnu dot org 2005-05-16 00:42 --- We probably need something like, bool maybe_clean_eh_after_replacing_stmt (tree old_stmt, tree new_stmt) { if (!tree_could_throw_p (new_stmt)) if (remove_stmt_from_eh_region (old_stmt)) re

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-15 Thread steven at gcc dot gnu dot org
--- Additional Comments From steven at gcc dot gnu dot org 2005-05-16 00:40 --- The same problem is in tree-ssa-dom.c:2975: /* Try to fold the statement making sure that STMT is kept up to date. */ if (fold_stmt (bsi_stmt_ptr (si))) { stm

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-15 Thread steven at gcc dot gnu dot org
--- Additional Comments From steven at gcc dot gnu dot org 2005-05-16 00:26 --- We have this code in tree-ssa-propagate.c:1052-1065: if (did_replace) { fold_stmt (bsi_stmt_ptr (i)); stmt = bsi_stmt(i); /* If we fold

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-15 Thread steven at gcc dot gnu dot org
--- Additional Comments From steven at gcc dot gnu dot org 2005-05-16 00:16 --- For CCP there is code to remove EH edges in tree-ssa-propagate.c, but it does not trigger: Breakpoint 3, substitute_and_fold (prop_value=0xf3e3a0) at tree-ssa-propagate.c:1063 1063 if (

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-15 Thread steven at gcc dot gnu dot org
--- Additional Comments From steven at gcc dot gnu dot org 2005-05-16 00:13 --- At the point of the ICE, I have this (from gdb's "p dump_tree_cfg(0)"): void f(FILE*) (fileD.2015) { const char * str; # BLOCK 0 # PRED: ENTRY (fallthru,exec) str_1 = &"a"[0]; __builtin_fpu

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-15 Thread steven at gcc dot gnu dot org
--- Additional Comments From steven at gcc dot gnu dot org 2005-05-16 00:10 --- this fails for me with -O in CCP. In .t18.copyrename1 we have: ;; Function void f(FILE*) (_Z1fP6__FILE) Partition map void f(FILE*) (fileD.2015) Eh tree: 1 allowed_exceptions tree_label: {

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-05 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-05 15:01 --- A slightly more reduced testcase: typedef struct __FILE FILE; extern "C" int fputs(const char *, FILE *); void f(FILE* file) throw() { const char* str = "a"; fputs(str, file); } The problem is somehow c

[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE

2005-05-05 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-05 14:55 --- Confirmed, reduced testcase: typedef struct __FILE FILE; extern "C" int fputs(const char *, FILE *); struct a { ~a(); }; void f(FILE* file) { a b; const char* str = "a"; fputs(str, file); } --