public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32302]  New: gfortran - incorrect result with -O3
@ 2007-06-12 13:40 dir at lanl dot gov
  2007-06-12 15:04 ` [Bug middle-end/32302] [4.2, 4.3 Regression] Incorrect result with -O2 burnus at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: dir at lanl dot gov @ 2007-06-12 13:40 UTC (permalink / raw)
  To: gcc-bugs

The output of this program is correct when using -g, but incorrect with -O3 -


[dranta:~/junk] dir% cp dyna3dTest01.F Test01.F
[dranta:~/junk] dir% gfortran -g -O3 -std=legacy -DSGI -DWKSTN -DUNIX
-DVECLEN=32 -DDP -fcray-pointer -fno-automatic -o Test01 Test01.F
Test01.F:47.19:

      common/aux32/a17(lnv),a28(lnv),dett(lnv),                         
                  1
Warning: Named COMMON block 'aux32' at (1) shall be of the same size
Test01.F:53.19:

      common/aux33/ix1(lnv),ix2(lnv),ix3(lnv),ix4(lnv),ix5(lnv),        
                  1
Warning: Named COMMON block 'aux33' at (1) shall be of the same size
/usr/bin/ld: warning can't open dynamic library: /libgcc_s.1.dylib referenced
from:
/usr/local/gfortran/lib/gcc/powerpc-apple-darwin8.9.0/4.3.0/../../../libgfortran.dylib
(checking for undefined symbols may be affected) (No such file or directory,
errno = 2)
[dranta:~/junk] dir% Test01
  0.250000000000000       0.250000000000000     
[dranta:~/junk] dir% gfortran -g -std=legacy -DSGI -DWKSTN -DUNIX -DVECLEN=32
-DDP -fcray-pointer -fno-automatic -o Test01 Test01.F
Test01.F:47.19:

      common/aux32/a17(lnv),a28(lnv),dett(lnv),                         
                  1
Warning: Named COMMON block 'aux32' at (1) shall be of the same size
Test01.F:53.19:

      common/aux33/ix1(lnv),ix2(lnv),ix3(lnv),ix4(lnv),ix5(lnv),        
                  1
Warning: Named COMMON block 'aux33' at (1) shall be of the same size
/usr/bin/ld: warning can't open dynamic library: /libgcc_s.1.dylib referenced
from:
/usr/local/gfortran/lib/gcc/powerpc-apple-darwin8.9.0/4.3.0/../../../libgfortran.dylib
(checking for undefined symbols may be affected) (No such file or directory,
errno = 2)
[dranta:~/junk] dir% Test01
   1.00000000000000        1.00000000000000     
[dranta:~/junk] dir% cat Test01.F
       subroutine unpki(ixp,nwcon,nmel)
      parameter(lnv=VECLEN)
#ifdef DP
      implicit double precision (a-h,o-z)                                    dp
#endif
c
c     unpack connection data
c
      common/aux32/kka(lnv),kkb(lnv),kkc(lnv),
     1 kk1(lnv),kk2(lnv),kk3(lnv),dxy(lnv),
     2 dyx(lnv),dyz(lnv),dzy(lnv),dzx(lnv),
     3 dxz(lnv),vx17(lnv),vx28(lnv),vx35(lnv),
     4 vx46(lnv),vy17(lnv),vy28(lnv),
     5 vy35(lnv),vy46(lnv),vz17(lnv),vz28(lnv),vz35(lnv),vz46(lnv)
      common/aux33/ix1(lnv),ix2(lnv),ix3(lnv),ix4(lnv),ix5(lnv),
     1             ix6(lnv),ix7(lnv),ix8(lnv),mxt(lnv)
      dimension ixp(nwcon,*)
c
      return
      end
      subroutine prtal
      parameter(lnv=VECLEN)
#ifdef DP
      implicit double precision (a-h,o-z)                                    dp
#endif
      common/aux8/
     & x1(lnv),x2(lnv),x3(lnv),x4(lnv),
     & x5(lnv),x6(lnv),x7(lnv),x8(lnv),
     & y1(lnv),y2(lnv),y3(lnv),y4(lnv),
     & y5(lnv),y6(lnv),y7(lnv),y8(lnv),
     & z1(lnv),z2(lnv),z3(lnv),z4(lnv),
     & z5(lnv),z6(lnv),z7(lnv),z8(lnv)
      common/aux9/vlrho(lnv),det(lnv)
      common/aux10/
     1 px1(lnv),px2(lnv),px3(lnv),px4(lnv),
     & px5(lnv),px6(lnv),px7(lnv),px8(lnv),
     2 py1(lnv),py2(lnv),py3(lnv),py4(lnv),
     & py5(lnv),py6(lnv),py7(lnv),py8(lnv),
     3 pz1(lnv),pz2(lnv),pz3(lnv),pz4(lnv),
     & pz5(lnv),pz6(lnv),pz7(lnv),pz8(lnv),
     4 vx1(lnv),vx2(lnv),vx3(lnv),vx4(lnv),
     5 vx5(lnv),vx6(lnv),vx7(lnv),vx8(lnv),
     6 vy1(lnv),vy2(lnv),vy3(lnv),vy4(lnv),
     7 vy5(lnv),vy6(lnv),vy7(lnv),vy8(lnv),
     8 vz1(lnv),vz2(lnv),vz3(lnv),vz4(lnv),
     9 vz5(lnv),vz6(lnv),vz7(lnv),vz8(lnv)
      common/aux32/a17(lnv),a28(lnv),dett(lnv),
     1 aj1(lnv),aj2(lnv),aj3(lnv),aj4(lnv),
     2 aj5(lnv),aj6(lnv),aj7(lnv),aj8(lnv),
     3 aj9(lnv),x17(lnv),x28(lnv),x35(lnv),
     4 x46(lnv),y17(lnv),y28(lnv),y35(lnv),
     5 y46(lnv),z17(lnv),z28(lnv),z35(lnv),z46(lnv)
      common/aux33/ix1(lnv),ix2(lnv),ix3(lnv),ix4(lnv),ix5(lnv),
     1             ix6(lnv),ix7(lnv),ix8(lnv),mxt(lnv),nmel
      common/aux36/lft,llt
      common/failu/sieu(lnv),failu(lnv)
      common/sand1/ihf,ibemf,ishlf,itshf
      dimension aj5968(lnv),aj6749(lnv),aj4857(lnv),aji1(lnv),aji2(lnv),
     1          aji3(lnv),aji4(lnv),aji5(lnv),
     1          aji6(lnv),aji7(lnv),aji8(lnv),aji9(lnv),aj12(lnv),
     2          aj45(lnv),aj78(lnv),b17(lnv),b28(lnv),c17(lnv),c28(lnv)
c
      equivalence (x17,aj5968),(x28,aj6749),(x35,aj4857),(x46,aji1),
     1 (y17,aji2),(y28,aji3),(y35,aji4),(y46,aji5),(z17,aji6),
     2 (z28,aji7),(z35,aji8),(z46,aji9),(aj1,aj12),(aj2,aj45),
     3 (aj3,aj78),(px1,b17),(px2,b28),(px3,c17),(px4,c28)
      data o64th/0.0156250/
c
c     jacobian matrix
c
      do 10 i=lft,llt
      x17(i)=x7(i)-x1(i)
      x28(i)=x8(i)-x2(i)
      x35(i)=x5(i)-x3(i)
      x46(i)=x6(i)-x4(i)
      y17(i)=y7(i)-y1(i)
      y28(i)=y8(i)-y2(i)
      y35(i)=y5(i)-y3(i)
      y46(i)=y6(i)-y4(i)
      z17(i)=z7(i)-z1(i)
      z28(i)=z8(i)-z2(i)
      z35(i)=z5(i)-z3(i)
   10 z46(i)=z6(i)-z4(i)
      do 20 i=lft,llt
      aj1(i)=x17(i)+x28(i)-x35(i)-x46(i)
      aj2(i)=y17(i)+y28(i)-y35(i)-y46(i)
      aj3(i)=z17(i)+z28(i)-z35(i)-z46(i)
      a17(i)=x17(i)+x46(i)
      a28(i)=x28(i)+x35(i)
      b17(i)=y17(i)+y46(i)
      b28(i)=y28(i)+y35(i)
      c17(i)=z17(i)+z46(i)
   20 c28(i)=z28(i)+z35(i)
      do 30 i=lft,llt
      aj4(i)=a17(i)+a28(i)
      aj5(i)=b17(i)+b28(i)
      aj6(i)=c17(i)+c28(i)
      aj7(i)=a17(i)-a28(i)
      aj8(i)=b17(i)-b28(i)
   30 aj9(i)=c17(i)-c28(i)
c
c     jacobian
c
      do 40 i=lft,llt
      aj5968(i)=aj5(i)*aj9(i)-aj6(i)*aj8(i)
      aj6749(i)=aj6(i)*aj7(i)-aj4(i)*aj9(i)
   40 aj4857(i)=aj4(i)*aj8(i)-aj5(i)*aj7(i)
      if (ihf.ne.1) then
      do 50 i=lft,llt
   50 det(i)=o64th*(aj1(i)*aj5968(i)+aj2(i)*aj6749(i)+aj3(i)*aj4857(i))
      else
      do 55 i=lft,llt
      det(i)=o64th*(aj1(i)*aj5968(i)+aj2(i)*aj6749(i)+aj3(i)*aj4857(i))
     1       *failu(i) + (1. - failu(i))
   55 continue
      endif
      do 60 i=lft,llt
   60 dett(i)=o64th/det(i)

      write(6,*)det(lft),det(llt)

      return
c
      end
      program main
      parameter(lnv=VECLEN)
#ifdef DP
      implicit double precision (a-h,o-z)                                    dp
#endif
      common/aux8/
     & x1(lnv),x2(lnv),x3(lnv),x4(lnv),
     & x5(lnv),x6(lnv),x7(lnv),x8(lnv),
     & y1(lnv),y2(lnv),y3(lnv),y4(lnv),
     & y5(lnv),y6(lnv),y7(lnv),y8(lnv),
     & z1(lnv),z2(lnv),z3(lnv),z4(lnv),
     & z5(lnv),z6(lnv),z7(lnv),z8(lnv)
      common/aux36/lft,llt
      common/sand1/ihf,ibemf,ishlf,itshf
      lft=1
      llt=1
      x1(1)=0
      x2(1)=1
      x3(1)=1
      x4(1)=0
      x5(1)=0
      x6(1)=1
      x7(1)=1
      x8(1)=0

      y1(1)=0
      y2(1)=0
      y3(1)=1
      y4(1)=1
      y5(1)=0
      y6(1)=0
      y7(1)=1
      y8(1)=1

      z1(1)=0
      z2(1)=0
      z3(1)=0
      z4(1)=0
      z5(1)=1
      z6(1)=1
      z7(1)=1
      z8(1)=1
      call prtal
      stop
      end


[dranta:~/junk] dir% gfortran --v
Using built-in specs.
Target: powerpc-apple-darwin8.9.0
Configured with: ../gcc/configure --disable-multilib
--prefix=/usr/local/gfortran --enable-languages=c,fortran
Thread model: posix
gcc version 4.3.0 20070611 (experimental)


-- 
           Summary: gfortran - incorrect result with -O3
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dir at lanl dot gov
  GCC host triplet: powerpc-apple-darwin8.9.0


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


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

* [Bug middle-end/32302] [4.2,  4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
@ 2007-06-12 15:04 ` burnus at gcc dot gnu dot org
  2007-06-12 15:09 ` [Bug fortran/32302] [4.2/4.3 " pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-12 15:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2007-06-12 15:03 -------
Works with 4.1.3 20070521.
Fails with 4.2.1 20070604.
Fails with 4.3.0 20070612. (On x86_64 Linux)

Result is ok ("1.0 1.0") for real(4), but not for real(8) ("0.25 0.25").
-O1 is also ok, but not -O2.

I used  gfortran -DVECLEN=1 -DDP -O2
(and also  without -DDP and with -O1.)

Presumably a middle-end problem.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|fortran                     |middle-end
     Ever Confirmed|0                           |1
   GCC host triplet|powerpc-apple-darwin8.9.0   |
           Keywords|                            |wrong-code
      Known to fail|                            |4.2.0 4.3.0
      Known to work|                            |4.1.3
   Last reconfirmed|0000-00-00 00:00:00         |2007-06-12 15:03:55
               date|                            |
            Summary|gfortran - incorrect result |[4.2,  4.3 Regression]
                   |with -O3                    |Incorrect result with -O2
   Target Milestone|---                         |4.3.0


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


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

* [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
  2007-06-12 15:04 ` [Bug middle-end/32302] [4.2, 4.3 Regression] Incorrect result with -O2 burnus at gcc dot gnu dot org
@ 2007-06-12 15:09 ` pinskia at gcc dot gnu dot org
  2007-06-13  4:58 ` pault at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-12 15:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-06-12 15:09 -------
Until I know for sure, i am moving this back to the fortran component, it might
be a front end issuse still.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
          Component|middle-end                  |fortran
            Summary|[4.2,  4.3 Regression]      |[4.2/4.3 Regression]
                   |Incorrect result with -O2   |Incorrect result with -O2


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


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

* [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
  2007-06-12 15:04 ` [Bug middle-end/32302] [4.2, 4.3 Regression] Incorrect result with -O2 burnus at gcc dot gnu dot org
  2007-06-12 15:09 ` [Bug fortran/32302] [4.2/4.3 " pinskia at gcc dot gnu dot org
@ 2007-06-13  4:58 ` pault at gcc dot gnu dot org
  2007-06-13  5:09 ` kargl at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-13  4:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2007-06-13 04:58 -------
(In reply to comment #2)
> Until I know for sure, i am moving this back to the fortran component, it might
> be a front end issuse still.
> 
Andrew,

I think that you are probably right - it looks like my patch for PR29786 is to
blame, since it is the only thing to touch trans-common.c for a long time.  I
am restricted to Cygwin and the moment and, with this dataflow problem, I
cannot tell what is going on. In fact, the compiler will not even handle fixed
form, for reasons that I do not see. 

Paul


-- 


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


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

* [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (2 preceding siblings ...)
  2007-06-13  4:58 ` pault at gcc dot gnu dot org
@ 2007-06-13  5:09 ` kargl at gcc dot gnu dot org
  2007-06-13  9:02 ` pault at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-06-13  5:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from kargl at gcc dot gnu dot org  2007-06-13 05:09 -------
(In reply to comment #3)
> (In reply to comment #2)
> > Until I know for sure, i am moving this back to the fortran component, it might
> > be a front end issuse still.
> > 
> Andrew,
> 
> I think that you are probably right - it looks like my patch for PR29786 is to
> blame, since it is the only thing to touch trans-common.c for a long time.  I
> am restricted to Cygwin and the moment and, with this dataflow problem, I
> cannot tell what is going on. In fact, the compiler will not even handle fixed
> form, for reasons that I do not see. 
> 
> Paul
> 

Paul,

If you access to a system, I can give you access to troutmask.
Send me your ssh public key, and you can play around on 
sgk@troutmask.  Yeah, it's trans-atlantic.


-- 


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


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

* [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (3 preceding siblings ...)
  2007-06-13  5:09 ` kargl at gcc dot gnu dot org
@ 2007-06-13  9:02 ` pault at gcc dot gnu dot org
  2007-06-13  9:05 ` pault at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-13  9:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2007-06-13 09:01 -------
Dear All,

> > I think that you are probably right - it looks like my patch for PR29786 is to
> > blame, since it is the only thing to touch trans-common.c for a long time.

This is incorrect - it goes back at least as far as gcc-4.2 20061221.  It has
nothing, therefore, to do with my recent patch.  

> If you access to a system, I can give you access to troutmask.
> Send me your ssh public key, and you can play around on 
> sgk@troutmask.  Yeah, it's trans-atlantic.

Thanks but it's not necessary - I am trying to ignore gfortran during the day
(unsuccessfully, I might say...) and normally have an x86_ia64/FC5 to play with
in the evenings.  This latter is unavailable until tomorrow because its mains
protection was blown up by one of last weeeks storms:(

The error creeps in at any level of optimization.  I am trying to reduce the
testcase but I am rather sure that this is not in the front end.

Paul 


-- 


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


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

* [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (4 preceding siblings ...)
  2007-06-13  9:02 ` pault at gcc dot gnu dot org
@ 2007-06-13  9:05 ` pault at gcc dot gnu dot org
  2007-06-13  9:31 ` pault at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-13  9:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2007-06-13 09:04 -------
PS - It also explains a failure by gfortran to produce a working version of the
PROTEUS tokamak equilibrium code.  I just tried, for the first time, to compile
it with no optimization.  It is SLOOOOOW but it goes.  It is peppered with
double precisions and equivalences.

Paul


-- 


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


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

* [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (5 preceding siblings ...)
  2007-06-13  9:05 ` pault at gcc dot gnu dot org
@ 2007-06-13  9:31 ` pault at gcc dot gnu dot org
  2007-06-13 12:26 ` pault at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-13  9:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2007-06-13 09:30 -------
The problem lies with the common block aux32, which is declared in subroutine
unpki with 6 integer(4) arrays at the beginning and, elsewhere, is declared
with default reals.  Apparently, this makes a mess of the laying up of the
common block with any level of optimization.

There are three workarounds:
(i) With -DPP, use -fdefault-integer-8
(ii) Put subroutine unpki later in the source file
(iii) Change to
       subroutine unpki(ixp,nwcon,nmel)
#ifdef DP
      implicit double precision (a-h,o-z)                                    dp
      implicit integer(8) (i-n)
#endif
      parameter(lnv=VECLEN)
c
c     unpack connection data
c


Paul


-- 


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


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

* [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (6 preceding siblings ...)
  2007-06-13  9:31 ` pault at gcc dot gnu dot org
@ 2007-06-13 12:26 ` pault at gcc dot gnu dot org
  2007-06-13 13:39 ` dir at lanl dot gov
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-13 12:26 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1377 bytes --]



------- Comment #8 from pault at gcc dot gnu dot org  2007-06-13 12:26 -------
This fixes it but is, as yet unregtested.  I'll do the business tonight and
will commit as 'obvious', if all is well.

Thanks, Dale!

Paul

Index: gcc/fortran/trans-common.c
===================================================================
--- gcc/fortran/trans-common.c  (révision 125645)
+++ gcc/fortran/trans-common.c  (copie de travail)
@@ -366,7 +366,8 @@ build_common_decl (gfc_common_head *com,
           if (strcmp (com->name, BLANK_COMMON_NAME))
            gfc_warning ("Named COMMON block '%s' at %L shall be of the "
                         "same size", com->name, &com->where);
-          DECL_SIZE_UNIT (decl) = size;
+         /*The declaration must be laid out once more and resized.  */
+         relayout_decl (decl);
         }
      }


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-06-12 15:03:55         |2007-06-13 12:26:43
               date|                            |


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


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

* [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (7 preceding siblings ...)
  2007-06-13 12:26 ` pault at gcc dot gnu dot org
@ 2007-06-13 13:39 ` dir at lanl dot gov
  2007-06-13 15:00 ` pault at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dir at lanl dot gov @ 2007-06-13 13:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dir at lanl dot gov  2007-06-13 13:39 -------
   Your Welcome Paul,

  With a little luck, the fix for this will cure the remaining problems that I
have been having with my programs when optimization is turned on.


-- 


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


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

* [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (8 preceding siblings ...)
  2007-06-13 13:39 ` dir at lanl dot gov
@ 2007-06-13 15:00 ` pault at gcc dot gnu dot org
  2007-06-14 12:00 ` patchapp at dberlin dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-13 15:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pault at gcc dot gnu dot org  2007-06-13 15:00 -------
I goofed - the previous does not fix it at all.

I hope that I am not too late to stop folk from building with this patch.

Cheers

Paul

PS Compiling the subroutines separately or padding out the first aux32 both fix
the problem, so I think that the patch is touching the right place.  That is,
the union type that is joined to the top level has some information missing
about its size, when a resize occurs.  I just need to figure out what it is:)


-- 


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


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

* [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (9 preceding siblings ...)
  2007-06-13 15:00 ` pault at gcc dot gnu dot org
@ 2007-06-14 12:00 ` patchapp at dberlin dot org
  2007-06-14 13:04 ` pault at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: patchapp at dberlin dot org @ 2007-06-14 12:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from patchapp at dberlin dot org  2007-06-14 12:00 -------
Subject: Bug number PR32302

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-06/msg00954.html


-- 


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


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

* [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (10 preceding siblings ...)
  2007-06-14 12:00 ` patchapp at dberlin dot org
@ 2007-06-14 13:04 ` pault at gcc dot gnu dot org
  2007-06-14 13:05 ` [Bug fortran/32302] [4.2 " pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-14 13:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pault at gcc dot gnu dot org  2007-06-14 13:04 -------
Subject: Bug 32302

Author: pault
Date: Thu Jun 14 13:04:05 2007
New Revision: 125708

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125708
Log:
2007-06-14  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/32302
        * trans-common.c (build_common_decl): If resizing of common
        decl is needed, update the TREE_TYPE.

2007-06-14  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/32302
        * gfortran.dg/common_resize_1.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/common_resize_1.f
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-common.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/32302] [4.2 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (11 preceding siblings ...)
  2007-06-14 13:04 ` pault at gcc dot gnu dot org
@ 2007-06-14 13:05 ` pault at gcc dot gnu dot org
  2007-06-20  5:03 ` pault at gcc dot gnu dot org
  2007-06-20  5:03 ` pault at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-14 13:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from pault at gcc dot gnu dot org  2007-06-14 13:05 -------
Fixed on trunk.

Thanks, Dale

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2/4.3 Regression]        |[4.2 Regression] Incorrect
                   |Incorrect result with -O2   |result with -O2


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


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

* [Bug fortran/32302] [4.2 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (12 preceding siblings ...)
  2007-06-14 13:05 ` [Bug fortran/32302] [4.2 " pault at gcc dot gnu dot org
@ 2007-06-20  5:03 ` pault at gcc dot gnu dot org
  2007-06-20  5:03 ` pault at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-20  5:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from pault at gcc dot gnu dot org  2007-06-20 05:03 -------
Fixed on trunk and 4.2

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug fortran/32302] [4.2 Regression] Incorrect result with -O2
  2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
                   ` (13 preceding siblings ...)
  2007-06-20  5:03 ` pault at gcc dot gnu dot org
@ 2007-06-20  5:03 ` pault at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-20  5:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from pault at gcc dot gnu dot org  2007-06-20 05:02 -------
Subject: Bug 32302

Author: pault
Date: Wed Jun 20 05:02:39 2007
New Revision: 125870

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125870
Log:
2007-06-20  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/32302
        * trans-common.c (build_common_decl): If resizing of common
        decl is needed, update the TREE_TYPE.

2007-06-20  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/32302
        * gfortran.dg/common_resize_1.f90: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/common_resize_1.f
Modified:
    branches/gcc-4_2-branch/gcc/fortran/ChangeLog
    branches/gcc-4_2-branch/gcc/fortran/trans-common.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2007-06-20  5:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-12 13:40 [Bug fortran/32302] New: gfortran - incorrect result with -O3 dir at lanl dot gov
2007-06-12 15:04 ` [Bug middle-end/32302] [4.2, 4.3 Regression] Incorrect result with -O2 burnus at gcc dot gnu dot org
2007-06-12 15:09 ` [Bug fortran/32302] [4.2/4.3 " pinskia at gcc dot gnu dot org
2007-06-13  4:58 ` pault at gcc dot gnu dot org
2007-06-13  5:09 ` kargl at gcc dot gnu dot org
2007-06-13  9:02 ` pault at gcc dot gnu dot org
2007-06-13  9:05 ` pault at gcc dot gnu dot org
2007-06-13  9:31 ` pault at gcc dot gnu dot org
2007-06-13 12:26 ` pault at gcc dot gnu dot org
2007-06-13 13:39 ` dir at lanl dot gov
2007-06-13 15:00 ` pault at gcc dot gnu dot org
2007-06-14 12:00 ` patchapp at dberlin dot org
2007-06-14 13:04 ` pault at gcc dot gnu dot org
2007-06-14 13:05 ` [Bug fortran/32302] [4.2 " pault at gcc dot gnu dot org
2007-06-20  5:03 ` pault at gcc dot gnu dot org
2007-06-20  5:03 ` pault 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).