* [Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609
2012-10-16 21:40 [Bug fortran/54940] New: ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609 slayoo at staszic dot waw.pl
@ 2012-10-16 22:08 ` dominiq at lps dot ens.fr
2012-10-17 19:22 ` janus at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-16 22:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54940
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-10-16
CC| |burnus at gcc dot gnu.org
Summary|ICE in |[4.6/4.7/4.8 Regression]
|gfc_build_intrinsic_call, |ICE in
|at fortran/expr.c:4609 |gfc_build_intrinsic_call,
| |at fortran/expr.c:4609
Ever Confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-16 22:07:45 UTC ---
4.4.6, 4.5.3, and 4.6.2 (r179116) gives
pr54940.f90:4.30:
integer :: j(:), bug(size(j-1))
1
Error: Variable 'j' cannot appear in the expression at (1)
pr54940.f90:4.19:
integer :: j(:), bug(size(j-1))
1
Error: Array 'j' at (1) cannot have a deferred shape
The ICE starts with 4.6.3. The ICE occurs at
gcc_assert (result->symtree
&& (result->symtree->n.sym->attr.flavor == FL_PROCEDURE
|| result->symtree->n.sym->attr.flavor == FL_UNKNOWN));
introduced by r183314 and the backtrace is
#8 0x00000001009f2336 in fancy_abort (file=<value optimized out>, line=4611,
function=0x100b33690 "gfc_build_intrinsic_call")
at ../../_clean/gcc/diagnostic.c:1120
#9 0x000000010003b475 in gfc_build_intrinsic_call (name=0x100ab5a50 "size",
where=DWARF-2 expression error: DW_OP_GNU_uninit must always be the very last
op.
) at ../../_clean/gcc/fortran/expr.c:4609
#10 0x00000001000a7927 in gfc_simplify_size (array=0x141814110, dim=<value
optimized out>, kind=<value optimized out>)
at ../../_clean/gcc/fortran/simplify.c:5586
#11 0x0000000100043a22 in do_simplify (specific=0x142022ff8, e=0x141813d60) at
../../_clean/gcc/fortran/intrinsic.c:3809
#12 0x0000000100050b21 in gfc_intrinsic_func_interface (expr=0x141813d60,
error_flag=1) at ../../_clean/gcc/fortran/intrinsic.c:4152
#13 0x0000000100090f33 in gfc_resolve_expr (e=<value optimized out>) at
../../_clean/gcc/fortran/resolve.c:2600
#14 0x000000010000e962 in resolve_array_bound (e=0x141813d60, check_constant=0)
at ../../_clean/gcc/fortran/array.c:310
#15 0x000000010000f515 in gfc_resolve_array_spec (as=0x141813ba0,
check_constant=0) at ../../_clean/gcc/fortran/array.c:348
#16 0x000000010008abee in resolve_symbol (sym=<value optimized out>) at
../../_clean/gcc/fortran/resolve.c:13108
#17 0x00000001000acfec in do_traverse_symtree (st=<value optimized out>,
st_func=0, sym_func=0x10008a5d0 <resolve_symbol(gfc_symbol*)>)
at ../../_clean/gcc/fortran/symbol.c:3448
#18 0x0000000100096fa2 in resolve_types (ns=<value optimized out>) at
../../_clean/gcc/fortran/resolve.c:14259
#19 0x0000000100089e70 in gfc_resolve (ns=<value optimized out>) at
../../_clean/gcc/fortran/resolve.c:14359
#20 0x000000010007f241 in gfc_parse_file () at
../../_clean/gcc/fortran/parse.c:4607
#21 0x00000001000bef36 in gfc_be_parse_file () at
../../_clean/gcc/fortran/f95-lang.c:191
#22 0x0000000100710fdf in compile_file () at ../../_clean/gcc/toplev.c:546
#23 0x0000000100712e7c in toplev_main (argc=<value optimized out>, argv=<value
optimized out>) at ../../_clean/gcc/toplev.c:1866
#24 0x000000010000a254 in start (pc=<value optimized out>, bases=0x0) at
../../../_clean/libgcc/unwind-dw2-fde.c:1055
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609
2012-10-16 21:40 [Bug fortran/54940] New: ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609 slayoo at staszic dot waw.pl
2012-10-16 22:08 ` [Bug fortran/54940] [4.6/4.7/4.8 Regression] " dominiq at lps dot ens.fr
@ 2012-10-17 19:22 ` janus at gcc dot gnu.org
2012-11-25 15:58 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2012-10-17 19:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54940
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janus at gcc dot gnu.org
--- Comment #2 from janus at gcc dot gnu.org 2012-10-17 19:22:34 UTC ---
(In reply to comment #1)
> The ICE starts with 4.6.3. The ICE occurs at
>
> gcc_assert (result->symtree
> && (result->symtree->n.sym->attr.flavor == FL_PROCEDURE
> || result->symtree->n.sym->attr.flavor == FL_UNKNOWN));
>
> introduced by r183314
... which was Tobias' fix for PR 51904. I think the most straightforward thing
would be to just remove the assert again:
Index: gcc/fortran/expr.c
===================================================================
--- gcc/fortran/expr.c (revision 192392)
+++ gcc/fortran/expr.c (working copy)
@@ -4606,9 +4606,6 @@ gfc_build_intrinsic_call (const char* name, locus
result->value.function.isym = isym;
result->symtree = gfc_find_symtree (gfc_current_ns->sym_root, name);
- gcc_assert (result->symtree
- && (result->symtree->n.sym->attr.flavor == FL_PROCEDURE
- || result->symtree->n.sym->attr.flavor == FL_UNKNOWN));
va_start (ap, numarg);
atail = NULL;
In a valid-code context the assert surely makes sense, but here it seems to
choke on the fallout of the two errors.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609
2012-10-16 21:40 [Bug fortran/54940] New: ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609 slayoo at staszic dot waw.pl
2012-10-16 22:08 ` [Bug fortran/54940] [4.6/4.7/4.8 Regression] " dominiq at lps dot ens.fr
2012-10-17 19:22 ` janus at gcc dot gnu.org
@ 2012-11-25 15:58 ` rguenth at gcc dot gnu.org
2012-11-29 8:42 ` jakub at gcc dot gnu.org
2013-01-07 15:24 ` burnus at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-11-25 15:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54940
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609
2012-10-16 21:40 [Bug fortran/54940] New: ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609 slayoo at staszic dot waw.pl
` (2 preceding siblings ...)
2012-11-25 15:58 ` rguenth at gcc dot gnu.org
@ 2012-11-29 8:42 ` jakub at gcc dot gnu.org
2013-01-07 15:24 ` burnus at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-29 8:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54940
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
CC| |jakub at gcc dot gnu.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609
2012-10-16 21:40 [Bug fortran/54940] New: ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609 slayoo at staszic dot waw.pl
` (3 preceding siblings ...)
2012-11-29 8:42 ` jakub at gcc dot gnu.org
@ 2013-01-07 15:24 ` burnus at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-01-07 15:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54940
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-01-07 15:23:51 UTC ---
I believe this bug is fixed by the just committed patch for PR 55852, which
restores the error message of comment 1. The commit is:
Date: Mon Jan 7 11:10:53 2013
New Revision: 194966
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194966
Thus, I mark this PR as duplicate.
Thanks for the report and sorry for the breakage.
*** This bug has been marked as a duplicate of bug 55852 ***
^ permalink raw reply [flat|nested] 6+ messages in thread