This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/40206] [gfortran] Incorrect warning with -Wuninitialized



------- Comment #7 from jakub at gcc dot gnu dot org  2009-05-20 14:32 -------
For all involved strings being non-array CHAR with length 1 I fail to see why
normal SWITCH_EXPR isn't used instead (though that would just be an
optimization).

The middle-end can't know the _gfortran_select_string function will never
return numbers bigger than the size of the jump table it is called with, so the
Fortran FE should help it.  If the table contains a default label, it should
use a default: case label instead of corresponding number, and if there is no
case label, but all possible strings are covered, it can pick a random case
label as the default.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40206


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]