[Bug fortran/45495] ICE: For character function with length specifier dependent on non-present arg
--- Comment #6 from kargl at gcc dot gnu dot org 2010-09-09 19:02 --- Fixed in trunk. No plans for back port to 4.5.x branch. I'll open a bug report about intent(out) issues with dummy arguments. -- kargl at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45495
[Bug fortran/45495] ICE: For character function with length specifier dependent on non-present arg
--- Comment #5 from kargl at gcc dot gnu dot org 2010-09-02 21:46 --- http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00190.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45495
[Bug fortran/45495] ICE: For character function with length specifier dependent on non-present arg
--- Comment #4 from kargl at gcc dot gnu dot org 2010-09-02 20:12 --- I may have a patch for this one. -- kargl at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |kargl at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2010-09-02 11:32:28 |2010-09-02 20:13:00 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45495
[Bug fortran/45495] ICE: For character function with length specifier dependent on non-present arg
--- Comment #3 from kargl at gcc dot gnu dot org 2010-09-02 14:17 --- (In reply to comment #2) > Confirm: It compiles with g95 and NAG f95, but ICEs with gfortran (4.1 to 4.6) > and a couple of other compilers. > > My feeling is that the program is invalid - at least in case the actual > argument is not present. Yes, the code is invalid. See restrictions on specification expression. C710 and 3 lines down to item (2). PS: I'm willing to bet that you can get g95 (and may be Nag) to die on the code by replacing "jack = ''" in the subroutine with a sufficiently long string on the RHS. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45495
[Bug fortran/45495] ICE: For character function with length specifier dependent on non-present arg
--- Comment #2 from burnus at gcc dot gnu dot org 2010-09-02 11:32 --- Confirm: It compiles with g95 and NAG f95, but ICEs with gfortran (4.1 to 4.6) and a couple of other compilers. My feeling is that the program is invalid - at least in case the actual argument is not present. The program compiles (and runs) if one passes an actual argument - thus the problem only occurs very late during folding. The best probably would be to add a warning (default on?) and some conditions around the expression such that it remains valid for folding even if the argument is not present. Due to the complexity of fixing it for invalid programs - without having a chance to print an error message at compile time, I have reduced the priority to minor. Valgrind shows: ==5725== Invalid read of size 8 ==5725==at 0x896636: get_frame_type (tree-nested.c:223) ==5725==by 0x896BFF: get_chain_decl (tree-nested.c:330) ==5725==by 0x899ED5: get_nonlocal_debug_decl (tree-nested.c:842) ==5725==by 0x89A7C1: convert_nonlocal_reference_op (tree-nested.c:920) ==5725==by 0x9D0B66: walk_tree_1 (tree.c:10174) ==5725==by 0x70F96B: walk_gimple_op (gimple.c:1356) -- burnus at gcc dot gnu dot org changed: What|Removed |Added Severity|critical|minor Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||ice-on-invalid-code Known to fail||4.2.1 4.1.2 4.3.4 4.4.0 ||4.5.1 4.6.0 Last reconfirmed|-00-00 00:00:00 |2010-09-02 11:32:28 date|| Summary|ICE: For character function |ICE: For character function |with length specifier |with length specifier |dependent on non-present|dependent on non-present arg |arg.| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45495
[Bug fortran/45495] ICE: For character function with length specifier dependent on non-present arg.
--- Comment #1 from pmason at ricardo dot com 2010-09-02 10:42 --- Created an attachment (id=21654) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21654&action=view) Small testcase that causes ICE. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45495