[Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609

2013-01-07 Thread burnus at gcc dot gnu.org


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=gccview=revrev=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 ***


[Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609

2012-11-29 Thread jakub at gcc dot gnu.org


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


[Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609

2012-11-25 Thread rguenth at gcc dot gnu.org


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


[Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609

2012-10-17 Thread janus at gcc dot gnu.org


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.


[Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609

2012-10-16 Thread dominiq at lps dot ens.fr


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  0x0001009f2336 in fancy_abort (file=value optimized out, line=4611,

function=0x100b33690 gfc_build_intrinsic_call)

at ../../_clean/gcc/diagnostic.c:1120

#9  0x00010003b475 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 0x0001000a7927 in gfc_simplify_size (array=0x141814110, dim=value

optimized out, kind=value optimized out)

at ../../_clean/gcc/fortran/simplify.c:5586

#11 0x000100043a22 in do_simplify (specific=0x142022ff8, e=0x141813d60) at

../../_clean/gcc/fortran/intrinsic.c:3809

#12 0x000100050b21 in gfc_intrinsic_func_interface (expr=0x141813d60,

error_flag=1) at ../../_clean/gcc/fortran/intrinsic.c:4152

#13 0x000100090f33 in gfc_resolve_expr (e=value optimized out) at

../../_clean/gcc/fortran/resolve.c:2600

#14 0x0001e962 in resolve_array_bound (e=0x141813d60, check_constant=0)

at ../../_clean/gcc/fortran/array.c:310

#15 0x0001f515 in gfc_resolve_array_spec (as=0x141813ba0,

check_constant=0) at ../../_clean/gcc/fortran/array.c:348

#16 0x00010008abee in resolve_symbol (sym=value optimized out) at

../../_clean/gcc/fortran/resolve.c:13108

#17 0x0001000acfec 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 0x000100096fa2 in resolve_types (ns=value optimized out) at

../../_clean/gcc/fortran/resolve.c:14259

#19 0x000100089e70 in gfc_resolve (ns=value optimized out) at

../../_clean/gcc/fortran/resolve.c:14359

#20 0x00010007f241 in gfc_parse_file () at

../../_clean/gcc/fortran/parse.c:4607

#21 0x0001000bef36 in gfc_be_parse_file () at

../../_clean/gcc/fortran/f95-lang.c:191

#22 0x000100710fdf in compile_file () at ../../_clean/gcc/toplev.c:546

#23 0x000100712e7c in toplev_main (argc=value optimized out, argv=value

optimized out) at ../../_clean/gcc/toplev.c:1866

#24 0x0001a254 in start (pc=value optimized out, bases=0x0) at

../../../_clean/libgcc/unwind-dw2-fde.c:1055