[Bug fortran/32035] 'anonymous' may be used uninitialized in this function
--- Comment #10 from fxcoudert at gcc dot gnu dot org 2007-07-27 14:28 --- Fixed on mainline. -- fxcoudert at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32035
[Bug fortran/32035] 'anonymous' may be used uninitialized in this function
--- Comment #9 from fxcoudert at gcc dot gnu dot org 2007-07-27 14:26 --- Subject: Bug 32035 Author: fxcoudert Date: Fri Jul 27 14:26:43 2007 New Revision: 126978 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=126978 Log: PR fortran/32035 * trans-stmt.c (gfc_trans_character_select): Replace the mechanism with labels by a SWITCH_EXPR. * trans-decl.c (gfc_build_builtin_function_decls): Change return type for select_string. * runtime/select.c (select_string): Adjust prototype and function so that the return value is an integer, not a pointer. * gfortran.dg/select_char_1.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/select_char_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-decl.c trunk/gcc/fortran/trans-stmt.c trunk/gcc/testsuite/ChangeLog trunk/libgfortran/ChangeLog trunk/libgfortran/runtime/select.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32035
[Bug fortran/32035] 'anonymous' may be used uninitialized in this function
--- Comment #7 from steven at gcc dot gnu dot org 2007-07-11 21:42 --- The proposed patch (http://gcc.gnu.org/ml/gcc-patches/2007-07/msg01098.html) breaks library compatibility. Is this intentional? -- steven at gcc dot gnu dot org changed: What|Removed |Added CC||steven at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32035
[Bug fortran/32035] 'anonymous' may be used uninitialized in this function
--- Comment #8 from fxcoudert at gcc dot gnu dot org 2007-07-11 21:54 --- I think it was decided that until 4.3 is released, we don't care about libgfortran ABI stability (http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00927.html) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32035
[Bug fortran/32035] 'anonymous' may be used uninitialized in this function
-- fxcoudert at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2007-05-22 11:15:35 |2007-07-04 07:34:44 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32035
[Bug fortran/32035] 'anonymous' may be used uninitialized in this function
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-05-22 16:31 --- why has the variable no name for the middle end; that is a front issue for now, it might not be complaining about Integer_1 but a different variable. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org Component|middle-end |fortran http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32035
[Bug fortran/32035] 'anonymous' may be used uninitialized in this function
--- Comment #3 from burnus at gcc dot gnu dot org 2007-05-22 18:29 --- why has the variable no name for the middle end; that is a front issue for now Hmm, why did this trick to get rid of PRs not work? ;-) Reduced test case: subroutine Test implicit none integer,volatile :: Integer_1 integer :: Integer_4 character(len=3) :: String_1 String_1 = '124' select case(String_1) case default stop end select Integer_1 = 3 do Integer_4 = 1, Integer_1 String_1 = '098' select case(String_1) case default stop end select end do end subroutine Test Gives two bogus warnings: warning: 'integer_4' may be used uninitialized in this function warning: 'anonymous' may be used uninitialized in this function The integer_4 warning is completely surprising: int4 integer_4; [...] integer_4 = 1; if (integer_4 = D.1366) [...] D.1373 = integer_4 == D.1366; integer_4 = integer_4 + 1; I fail to see why it could be seen as undefined. For anonymous I don't see what goes wrong. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32035
[Bug fortran/32035] 'anonymous' may be used uninitialized in this function
--- Comment #4 from pinskia at gcc dot gnu dot org 2007-05-22 18:32 --- It might have to do with stop not being marked as noreturn. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32035
[Bug fortran/32035] 'anonymous' may be used uninitialized in this function
--- Comment #5 from burnus at gcc dot gnu dot org 2007-05-22 20:14 --- It might have to do with stop not being marked as noreturn. How to mark as noreturn? I mean differently from what is alreay done in trans-decl.c: gfor_fndecl_stop_numeric = gfc_build_library_function_decl (get_identifier (PREFIX(stop_numeric)), void_type_node, 1, gfc_int4_type_node); /* Stop doesn't return. */ TREE_THIS_VOLATILE (gfor_fndecl_stop_numeric) = 1; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32035
[Bug fortran/32035] 'anonymous' may be used uninitialized in this function
--- Comment #6 from pinskia at gcc dot gnu dot org 2007-05-23 03:18 --- Ok, what is going on here has to deal with how select/case works for strings. What the front-end produces confuses the crazy out of the middle-end and the middle-end does not know where the jumps can go so it assumes it can go to either place. After the first select, the middle thinks it can reach where the second select is supposed to reach. So what should happen here is the front-end respentation of select/case for strings need to be improved. Maybe instead of using labels, it can use a constant value and then a normal switch statement. This will also improve code gen and less confuse the middle-end. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32035