[Bug fortran/45744] [4.6 Regression] ICE with -O1 in gfc_conv_expr_op, at fortran/trans-expr.c:1366
--- Comment #10 from dominiq at lps dot ens dot fr 2010-09-23 15:27 --- This should be better: It is;-) it fixes this PR without regression. Does it answer also the question in comment #7? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45744
[Bug fortran/45744] [4.6 Regression] ICE with -O1 in gfc_conv_expr_op, at fortran/trans-expr.c:1366
--- Comment #4 from burnus at gcc dot gnu dot org 2010-09-22 07:45 --- (In reply to comment #3) Confirmed as a regression: The assert is in gfc_conv_expr_op: gcc_assert (expr-value.op.op1-ts.type == expr-value.op.op2-ts.type); For mask = (rnd(parsize) popcross) the OP is INTRINSIC_LT and both op1 and op2 are BT_REAL; however, with -O1, op1 is BT_LOGICAL. If one disables frontend-passes.c by adding a return to gfc_run_passes, it works. -- burnus at gcc dot gnu dot org changed: What|Removed |Added CC||tkoenig at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||ice-on-valid-code Known to fail||4.6.0 Known to work||4.5.0 Last reconfirmed|-00-00 00:00:00 |2010-09-22 07:45:44 date|| Summary|internal compiler error: in |[4.6 Regression] ICE with - |gfc_conv_expr_op, at|O1 in gfc_conv_expr_op, at |fortran/trans-expr.c:1366 |fortran/trans-expr.c:1366 Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45744
[Bug fortran/45744] [4.6 Regression] ICE with -O1 in gfc_conv_expr_op, at fortran/trans-expr.c:1366
--- Comment #5 from tkoenig at gcc dot gnu dot org 2010-09-22 17:43 --- I see what's wrong, should be easy enough to fix. -- tkoenig at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |tkoenig at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2010-09-22 07:45:44 |2010-09-22 17:43:23 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45744
[Bug fortran/45744] [4.6 Regression] ICE with -O1 in gfc_conv_expr_op, at fortran/trans-expr.c:1366
--- Comment #6 from tkoenig at gcc dot gnu dot org 2010-09-22 17:57 --- Tentative patch: Index: frontend-passes.c === --- frontend-passes.c (Revision 164404) +++ frontend-passes.c (Arbeitskopie) @@ -122,8 +122,11 @@ else if (seen_op e-expr_type == EXPR_FUNCTION e-rank 0 ! (e-value.function.esym (e-value.function.esym-attr.elemental -|| e-value.function.esym-attr.allocatable)) - ! (e-value.function.isym e-value.function.isym-elemental)) +|| e-value.function.esym-attr.allocatable +|| e-value.function.esym-ts.type != c-expr1-ts.type)) + ! (e-value.function.isym + (e-value.function.isym-elemental +|| e-value.function.isym-ts.type != c-expr1-ts.type))) { gfc_code *n; Don't know if I will have the time to submit tonight. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45744
[Bug fortran/45744] [4.6 Regression] ICE with -O1 in gfc_conv_expr_op, at fortran/trans-expr.c:1366
--- Comment #7 from mikael at gcc dot gnu dot org 2010-09-22 18:54 --- (In reply to comment #6) Tentative patch: Index: frontend-passes.c === --- frontend-passes.c (Revision 164404) +++ frontend-passes.c (Arbeitskopie) @@ -122,8 +122,11 @@ else if (seen_op e-expr_type == EXPR_FUNCTION e-rank 0 ! (e-value.function.esym (e-value.function.esym-attr.elemental -|| e-value.function.esym-attr.allocatable)) - ! (e-value.function.isym e-value.function.isym-elemental)) +|| e-value.function.esym-attr.allocatable +|| e-value.function.esym-ts.type != c-expr1-ts.type)) + ! (e-value.function.isym + (e-value.function.isym-elemental +|| e-value.function.isym-ts.type != c-expr1-ts.type))) { gfc_code *n; I think the type comparison should take kinds into account too (REAL(4) vs REAL(8) for example). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45744
[Bug fortran/45744] [4.6 Regression] ICE with -O1 in gfc_conv_expr_op, at fortran/trans-expr.c:1366
--- Comment #8 from dominiq at lps dot ens dot fr 2010-09-22 21:39 --- The patch in comment #6 fixes this PR, but gfortran.dg/dependency_35.f90 fails: ... output is: /opt/gcc/work/gcc/testsuite/gfortran.dg/dependency_35.f90:19.6: a = matmul(b,c) + d 1 Warning: Creating array temporary at (1) /opt/gcc/work/gcc/testsuite/gfortran.dg/dependency_35.f90:22.6: e = sum(b,1) + 3 1 Warning: Creating array temporary at (1) FAIL: gfortran.dg/dependency_35.f90 -O (test for excess errors) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45744
[Bug fortran/45744] [4.6 Regression] ICE with -O1 in gfc_conv_expr_op, at fortran/trans-expr.c:1366
--- Comment #9 from tkoenig at gcc dot gnu dot org 2010-09-22 21:59 --- This should be better: Index: frontend-passes.c === --- frontend-passes.c (Revision 164404) +++ frontend-passes.c (Arbeitskopie) @@ -122,8 +122,13 @@ else if (seen_op e-expr_type == EXPR_FUNCTION e-rank 0 ! (e-value.function.esym (e-value.function.esym-attr.elemental -|| e-value.function.esym-attr.allocatable)) - ! (e-value.function.isym e-value.function.isym-elemental)) +|| e-value.function.esym-attr.allocatable +|| e-value.function.esym-ts.type != c-expr1-ts.type +|| e-value.function.esym-ts.kind != c-expr1-ts.kind)) + ! (e-value.function.isym + (e-value.function.isym-elemental +|| e-ts.type != c-expr1-ts.type +|| e-ts.kind != c-expr1-ts.kind))) { gfc_code *n; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45744