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/49659] If-and-condition not obeyed using the g77-compiler (Windows 7, 64-bit).


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.07.06 11:00:29
            Version|unknown                     |4.6.1
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-06 11:00:29 UTC ---
Confirmed.

       PROGRAM TEST
       INTEGER C
       LOGICAL M
       C=55
       M=.FALSE.
       IF (C.eq.4.and.M.eqv..FALSE.) THEN
       PRINT*, 'yes'
       ELSE
       PRINT*, 'no'
       END IF
       END

has in .original:

  c = 55;
  m = 0;
  if (c != 4 || !m)
    {
      {
        struct __st_parameter_dt dt_parm.0;

        dt_parm.0.common.filename = &"t.f"[1]{lb: 1 sz: 1};
        dt_parm.0.common.line = 7;
        dt_parm.0.common.flags = 128;
        dt_parm.0.common.unit = 6;
        _gfortran_st_write (&dt_parm.0);
        _gfortran_transfer_character_write (&dt_parm.0, &"yes"[1]{lb: 1 sz: 1},
3);
        _gfortran_st_write_done (&dt_parm.0);
      }
    }

somehow the condition is inverted but the branches are not exchanged
(it's also bogously inverted).


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