------- Comment #5 from jpr at csc dot fi 2007-09-11 12:49 ------- Subject: Re: Fortran SELECT statement miscompiles
Yes, this seems to do the trick. Thanx, Juha > > > ------- Comment #4 from fxcoudert at gcc dot gnu dot org 2007-09-11 10:48 > ------- >> Adding a default case gets rid of the problems, also for my real application >> code. > > If you're in a position to build the compiler yourself, could you try the > following patch? I think it should fix the problem (thanks Andrew for spotting > the initialized variable). > > > Index: libgfortran/runtime/select.c > =================================================================== > --- libgfortran/runtime/select.c (revision 127830) > +++ libgfortran/runtime/select.c (working copy) > @@ -53,7 +53,7 @@ select_string (select_struct *table, int > { > select_struct *t; > int i, low, high, mid; > - int default_jump; > + int default_jump = -1; > > if (table_len == 0) > return -1; > > > -- > > fxcoudert at gcc dot gnu dot org changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Keywords| |patch > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33386 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33386