public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on
@ 2007-01-06 10:41 fxcoudert at gcc dot gnu dot org
2007-01-06 23:15 ` [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT pinskia at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-01-06 10:41 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2575 bytes --]
The following fails with today's (rev. 120520) trunk (at -O1 on both i686-linux
and x86_64-linux):
$ cat mc_coordinates.f90
SUBROUTINE check_for_overlap (cell_length)
REAL, DIMENSION(1:3), INTENT(IN), OPTIONAL :: cell_length
REAL, DIMENSION(1:3) :: abc, box_length
IF (PRESENT(cell_length)) THEN
box_length(1:3)=abc(1:3)
ENDIF
END SUBROUTINE check_for_overlap
$ gfortran -O1 -c mc_coordinates.f90
mc_coordinates.f90: In function check_for_overlap:
mc_coordinates.f90:6: internal compiler error: in operand_equal_p, at
fold-const.c:2539
The bug was originaly reported in PR29975. The gdb backtrace is:
Breakpoint 1, fancy_abort (file=0xa20a04 "../../trunk/gcc/fold-const.c",
line=2539, function=0xa20900 "operand_equal_p")
at ../../trunk/gcc/diagnostic.c:641
641 {
(gdb) back
#0 fancy_abort (file=0xa20a04 "../../trunk/gcc/fold-const.c", line=2539,
function=0xa20900 "operand_equal_p") at ../../trunk/gcc/diagnostic.c:641
#1 0x00000000005c416d in operand_equal_p (arg0=0x2a984c3e40,
arg1=0x2a983e3300, flags=0) at ../../trunk/gcc/fold-const.c:2539
#2 0x00000000005c7f5f in fold_ternary (code=COND_EXPR, type=0x2a983f30c0,
op0=0x2a983de3c0, op1=0x2a984c3e40, op2=0x2a983e3300)
at ../../trunk/gcc/fold-const.c:11657
#3 0x00000000005c9161 in fold_build3_stat (code=COND_EXPR, type=0x2a983f30c0,
op0=0x2a983de3c0, op1=0x2a984c3e40, op2=0x2a983e3300)
at ../../trunk/gcc/fold-const.c:12307
#4 0x0000000000493271 in gfc_trans_if_1 (code=0xd6af60)
at ../../trunk/gcc/fortran/trans-stmt.c:612
#5 0x0000000000464b83 in gfc_trans_code (code=0xd73b80)
at ../../trunk/gcc/fortran/trans.c:528
#6 0x0000000000477f64 in gfc_generate_function_code (ns=0xd6a710)
at ../../trunk/gcc/fortran/trans-decl.c:3232
#7 0x0000000000442bfc in gfc_parse_file ()
at ../../trunk/gcc/fortran/parse.c:3263
I don't see any suspicious change in gcc/fortran/ChangeLog, maybe it has to do
with Roger's recent array copying patch (although I don't see how). What is
sure is that it worked at least until 20070104, and is now failing. Roger,
could you give it a look?
--
Summary: [4.3 regression] ICE at -O1 on
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
OtherBugsDependingO 29975
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
@ 2007-01-06 23:15 ` pinskia at gcc dot gnu dot org
2007-01-08 23:00 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-06 23:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-01-06 23:15 -------
This is a bug exposed by Roger's memcpy patch. This bug was originally caused
by Aldy's GIMPLE_MODIFY_STMT patch.
We are trying to fold a conditional expression's whos one side is a
GIMPLE_MODIFY_STMT that came from folding of memcpy.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aldyh at gcc dot gnu dot
| |org, pinskia at gcc dot gnu
| |dot org
Status|UNCONFIRMED |NEW
Component|fortran |middle-end
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-01-06 23:15:24
date| |
Summary|[4.3 regression] ICE at -O1 |[4.3 regression] ICE at -O1
|on |with conditional expressions
| |and GIMPLE_MODIFY_STMT
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
2007-01-06 23:15 ` [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT pinskia at gcc dot gnu dot org
@ 2007-01-08 23:00 ` pinskia at gcc dot gnu dot org
2007-01-20 13:14 ` fxcoudert at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-08 23:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-01-08 23:00 -------
*** Bug 30412 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
2007-01-06 23:15 ` [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT pinskia at gcc dot gnu dot org
2007-01-08 23:00 ` pinskia at gcc dot gnu dot org
@ 2007-01-20 13:14 ` fxcoudert at gcc dot gnu dot org
2007-01-23 0:43 ` aldyh at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-01-20 13:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-01-20 13:14 -------
Aldy, can you comment on this bug? It's still present as of today, and it
prevents mainline from building a fair number of real-life Fortran codes.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2007-01-06 23:15:24 |2007-01-20 13:14:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-01-20 13:14 ` fxcoudert at gcc dot gnu dot org
@ 2007-01-23 0:43 ` aldyh at gcc dot gnu dot org
2007-02-02 0:29 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: aldyh at gcc dot gnu dot org @ 2007-01-23 0:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from aldyh at gcc dot gnu dot org 2007-01-23 00:43 -------
I'll look at this.
--
aldyh at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |aldyh at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2007-01-20 13:14:29 |2007-01-23 00:43:21
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-01-23 0:43 ` aldyh at gcc dot gnu dot org
@ 2007-02-02 0:29 ` pinskia at gcc dot gnu dot org
2007-02-05 20:12 ` jv244 at cam dot ac dot uk
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-02 0:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2007-02-02 00:28 -------
*** Bug 30672 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lgcota at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-02-02 0:29 ` pinskia at gcc dot gnu dot org
@ 2007-02-05 20:12 ` jv244 at cam dot ac dot uk
2007-02-06 17:52 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-02-05 20:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jv244 at cam dot ac dot uk 2007-02-05 20:12 -------
a patch:
http://gcc.gnu.org/ml/gcc-patches/2007-02/msg00353.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-02-05 20:12 ` jv244 at cam dot ac dot uk
@ 2007-02-06 17:52 ` pinskia at gcc dot gnu dot org
2007-02-14 0:04 ` sandra at codesourcery dot com
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-06 17:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2007-02-06 17:52 -------
*** Bug 30715 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |martin at mpa-garching dot
| |mpg dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
` (6 preceding siblings ...)
2007-02-06 17:52 ` pinskia at gcc dot gnu dot org
@ 2007-02-14 0:04 ` sandra at codesourcery dot com
2007-02-14 18:50 ` aldyh at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: sandra at codesourcery dot com @ 2007-02-14 0:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from sandra at codesourcery dot com 2007-02-14 00:04 -------
Testing of the CALL_EXPR representation patch turned up a related ICE in
tree_ssa_useless_type_conversion() while compiling
libjava/java/lang/reflect/natMethod.cc. It was failing because the expansion
of memcpy produced by fold_builtin_memory_op includes a GIMPLE_MODIFY_STMT, and
expansion of builtins happens long before the gimplifier is invoked by the C++
front end. See http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01193.html for
more discussion.
As a temporary solution, the CALL_EXPR patch includes a tweak to use
GENERIC_TREE_TYPE in tree_ssa_useless_type_conversion(). This should be
revisited as part of a general solution.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
` (7 preceding siblings ...)
2007-02-14 0:04 ` sandra at codesourcery dot com
@ 2007-02-14 18:50 ` aldyh at gcc dot gnu dot org
2007-02-16 3:38 ` sayle at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: aldyh at gcc dot gnu dot org @ 2007-02-14 18:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from aldyh at gcc dot gnu dot org 2007-02-14 18:50 -------
I believe this is addressed by Roger's patch which was approved yesterday
(http://gcc.gnu.org/ml/gcc-patches/2007-02/msg00353.html), though I don't think
the final revision has been committed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
` (8 preceding siblings ...)
2007-02-14 18:50 ` aldyh at gcc dot gnu dot org
@ 2007-02-16 3:38 ` sayle at gcc dot gnu dot org
2007-02-16 6:54 ` fxcoudert at gcc dot gnu dot org
2007-02-16 8:31 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: sayle at gcc dot gnu dot org @ 2007-02-16 3:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from sayle at gcc dot gnu dot org 2007-02-16 03:38 -------
Subject: Bug 30391
Author: sayle
Date: Fri Feb 16 03:38:22 2007
New Revision: 122030
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122030
Log:
PR middle-end/30391
* tree.c (expr_align): Handle MODIFY_EXPR. GIMPLE_MODIFY_STMT
should be unreachable.
(build2_stat): Allow construction of MODIFY_EXPR at any time.
For the time being redirect GIMPLE_MODIFY_STMT to the new
(renamed) build_gimple_modify_stmt_stat.
(build2_gimple_stat): Rename to...
(build_gimple_modify_stmt_stat): Now longer take a CODE argument.
Always build a GIMPLE_MODIFY_STMT node.
* tree.h (build2_gimple, build2_gimple_stat): Delete.
(build_gimple_modify_stmt, build_gimple_modify_stmt_stat): New
declarations.
* tree-cfg.c (factor_computed_gotos, tree_merge_blocks,
gimplify_val): Use build_gimple_modify_stmt instead of build2_gimple.
* tree-complex.c (set_component_ssa_name, expand_complex_move,
expand_complex_div_wide): Likewise.
* tree-ssa-dom.c (record_equivalences_from_stmt): Likewise.
* tree-ssa-loop-im.c (schedule_sm): Likewise.
* tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Likewise.
* tree-ssa-loop-manip.c (create_iv): Likewise.
* tree-ssa-phiopt.c (conditional_replacement, minmax_replacement,
abs_replacement): Likewise.
* tree-ssa-pre.c (create_expression_by_pieces, poolify_modify_stmt,
realify_fake_stores): Likewise.
* builtins.c (std_expand_builtin_va_start): Build a MODIFY_EXPR
node rather than a GIMPLE_MODIFY_STMT node.
(std_gimpify_va_arg_expr, expand_builtin_va_copy,
fold_builtin_memset, fold_builtin_memory_op, do_mpfr_sincos):
Likewise.
(integer_valued_real_p): Handle MODIFY_EXPR, not GIMPLE_MODIFY_STMT.
* expr.c (expand_expr_real_1): Handle both MODIFY_EXPR and
GIMPLE_MODIFY_STMT.
* gfortran.dg/pr30391-1.f90: New test case.
Added:
trunk/gcc/testsuite/gfortran.dg/pr30391-1.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/builtins.c
trunk/gcc/expr.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-cfg.c
trunk/gcc/tree-complex.c
trunk/gcc/tree-ssa-dom.c
trunk/gcc/tree-ssa-loop-im.c
trunk/gcc/tree-ssa-loop-ivopts.c
trunk/gcc/tree-ssa-loop-manip.c
trunk/gcc/tree-ssa-phiopt.c
trunk/gcc/tree-ssa-pre.c
trunk/gcc/tree.c
trunk/gcc/tree.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
` (9 preceding siblings ...)
2007-02-16 3:38 ` sayle at gcc dot gnu dot org
@ 2007-02-16 6:54 ` fxcoudert at gcc dot gnu dot org
2007-02-16 8:31 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-02-16 6:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from fxcoudert at gcc dot gnu dot org 2007-02-16 06:54 -------
*** Bug 30817 has been marked as a duplicate of this bug. ***
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
` (10 preceding siblings ...)
2007-02-16 6:54 ` fxcoudert at gcc dot gnu dot org
@ 2007-02-16 8:31 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-16 8:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pinskia at gcc dot gnu dot org 2007-02-16 08:31 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30391
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-02-16 8:31 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-06 10:41 [Bug fortran/30391] New: [4.3 regression] ICE at -O1 on fxcoudert at gcc dot gnu dot org
2007-01-06 23:15 ` [Bug middle-end/30391] [4.3 regression] ICE at -O1 with conditional expressions and GIMPLE_MODIFY_STMT pinskia at gcc dot gnu dot org
2007-01-08 23:00 ` pinskia at gcc dot gnu dot org
2007-01-20 13:14 ` fxcoudert at gcc dot gnu dot org
2007-01-23 0:43 ` aldyh at gcc dot gnu dot org
2007-02-02 0:29 ` pinskia at gcc dot gnu dot org
2007-02-05 20:12 ` jv244 at cam dot ac dot uk
2007-02-06 17:52 ` pinskia at gcc dot gnu dot org
2007-02-14 0:04 ` sandra at codesourcery dot com
2007-02-14 18:50 ` aldyh at gcc dot gnu dot org
2007-02-16 3:38 ` sayle at gcc dot gnu dot org
2007-02-16 6:54 ` fxcoudert at gcc dot gnu dot org
2007-02-16 8:31 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).