public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/14514] New: -ffortran-bounds-check generate wrong-code with Windows and works correctly with Linux
@ 2004-03-10 16:31 cgerdy at wanadoo dot fr
  2004-03-10 16:35 ` [Bug fortran/14514] " cgerdy at wanadoo dot fr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: cgerdy at wanadoo dot fr @ 2004-03-10 16:31 UTC (permalink / raw)
  To: gcc-bugs

g77 -v = Thread model : win32 gcc version 3.3.1 (mingw special 20030804-1)
This short example has the bug :

subroutine fichbuf(fichier,fichhlp,buffer,numero,numerp,lligne,
     *nprio,nomlig,iundo,mligne,nomlih)
      parameter(nligne = 85)
      parameter(n2 = 72,m1 = n2 + 9)
      character buffer(0:m1,0:nligne)
      character*(m1) fichier(mligne)
      save
      mumero = numero
      do 100 i = 2,nomlig
         do j = 1,m1
            buffer(j,i) = fichier(mumero)(j:j)    ! the bug is in this line
         end do
         mumero = mumero + 1
 100 continue
      return
      end

In your Makefile put the line :

test.o:test.f
    g77 -ffortran-bounds-check -g -Wa,-alhs,-L -c test.f

In a DOS window, go to the correct directory and tape :

make test.o > test.asm

examine carefully the code line : buffer(j,i) = fichier(mumero)(j:j)
in the file test.asm and read the generated assembler lines in Windows and
in Linux
a big difference : approximately 20 lines of assembler code are suppressed
in Windows
The assembler lines of windows cannot work and automatically generate a
segmentation fault if you execute this code
There is only 3 call _s_rnge to test 2 arrays with 2 indice each.

-- 
           Summary: -ffortran-bounds-check generate wrong-code with Windows
                    and works correctly with Linux
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cgerdy at wanadoo dot fr
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/14514] -ffortran-bounds-check generate wrong-code with Windows and works correctly with Linux
  2004-03-10 16:31 [Bug fortran/14514] New: -ffortran-bounds-check generate wrong-code with Windows and works correctly with Linux cgerdy at wanadoo dot fr
@ 2004-03-10 16:35 ` cgerdy at wanadoo dot fr
  2004-03-10 16:53 ` [Bug target/14514] [g77] " pinskia at gcc dot gnu dot org
  2004-06-09  1:02 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: cgerdy at wanadoo dot fr @ 2004-03-10 16:35 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/14514] [g77] -ffortran-bounds-check generate wrong-code with Windows and works correctly with Linux
  2004-03-10 16:31 [Bug fortran/14514] New: -ffortran-bounds-check generate wrong-code with Windows and works correctly with Linux cgerdy at wanadoo dot fr
  2004-03-10 16:35 ` [Bug fortran/14514] " cgerdy at wanadoo dot fr
@ 2004-03-10 16:53 ` pinskia at gcc dot gnu dot org
  2004-06-09  1:02 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-10 16:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-10 16:53 -------
Can you try a later version of gcc, say like 3.3.3 as the one you are using is one not from the FSF and 
two looks to be a based on a prerelease.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
             Status|UNCONFIRMED                 |WAITING
          Component|fortran                     |target
            Summary|-ffortran-bounds-check      |[g77] -ffortran-bounds-check
                   |generate wrong-code with    |generate wrong-code with
                   |Windows and works correctly |Windows and works correctly
                   |with Linux                  |with Linux


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/14514] [g77] -ffortran-bounds-check generate wrong-code with Windows and works correctly with Linux
  2004-03-10 16:31 [Bug fortran/14514] New: -ffortran-bounds-check generate wrong-code with Windows and works correctly with Linux cgerdy at wanadoo dot fr
  2004-03-10 16:35 ` [Bug fortran/14514] " cgerdy at wanadoo dot fr
  2004-03-10 16:53 ` [Bug target/14514] [g77] " pinskia at gcc dot gnu dot org
@ 2004-06-09  1:02 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-09  1:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-09 01:02 -------
no feedback in 3 months (T-2 days).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-06-09  1:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-10 16:31 [Bug fortran/14514] New: -ffortran-bounds-check generate wrong-code with Windows and works correctly with Linux cgerdy at wanadoo dot fr
2004-03-10 16:35 ` [Bug fortran/14514] " cgerdy at wanadoo dot fr
2004-03-10 16:53 ` [Bug target/14514] [g77] " pinskia at gcc dot gnu dot org
2004-06-09  1:02 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).