public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/42558]  New: [4.5 Regression] miscompilation related to -floop-block
@ 2009-12-30 21:07 jv244 at cam dot ac dot uk
  2009-12-30 21:08 ` [Bug middle-end/42558] " jv244 at cam dot ac dot uk
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jv244 at cam dot ac dot uk @ 2009-12-30 21:07 UTC (permalink / raw)
  To: gcc-bugs

The attached testcase miscompiles as:

> gfortran -floop-block    -O2  -funroll-loops -ffast-math bug.f90
> ./a.out
   4.0000000000000000

> gfortran   -O2  -funroll-loops -ffast-math bug.f90
> ./a.out
   1.0000000000000000

> gfortran bug.f90> ./a.out
   1.0000000000000000

4.4 works fine, 4.5 miscompiles


-- 
           Summary: [4.5 Regression] miscompilation related to -floop-block
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


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


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

* [Bug middle-end/42558] [4.5 Regression] miscompilation related to -floop-block
  2009-12-30 21:07 [Bug middle-end/42558] New: [4.5 Regression] miscompilation related to -floop-block jv244 at cam dot ac dot uk
@ 2009-12-30 21:08 ` jv244 at cam dot ac dot uk
  2009-12-30 21:10 ` jv244 at cam dot ac dot uk
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jv244 at cam dot ac dot uk @ 2009-12-30 21:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jv244 at cam dot ac dot uk  2009-12-30 21:08 -------
Created an attachment (id=19426)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19426&action=view)
testcase


-- 


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


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

* [Bug middle-end/42558] [4.5 Regression] miscompilation related to -floop-block
  2009-12-30 21:07 [Bug middle-end/42558] New: [4.5 Regression] miscompilation related to -floop-block jv244 at cam dot ac dot uk
  2009-12-30 21:08 ` [Bug middle-end/42558] " jv244 at cam dot ac dot uk
@ 2009-12-30 21:10 ` jv244 at cam dot ac dot uk
  2009-12-30 21:34 ` hjl dot tools at gmail dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jv244 at cam dot ac dot uk @ 2009-12-30 21:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jv244 at cam dot ac dot uk  2009-12-30 21:10 -------
full version details:

> gfortran -v -floop-block    -O2  -funroll-loops -ffast-math bug.f90
Driving: gfortran -v -floop-block -O2 -funroll-loops -ffast-math bug.f90
-lgfortran -lm -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /data03/vondele/gcc_trunk/gcc/configure --disable-bootstrap
--prefix=/data03/vondele/gcc_trunk/build --enable-languages=c,c++,fortran
--disable-multilib --with-ppl=/data03/vondele/gcc_trunk/build/
--with-cloog=/data03/vondele/gcc_trunk/build/
--with-libelf=/data03/vondele/libelf-0.8.12/build/ --enable-gold --enable-lto
--enable-plugins
Thread model: posix
gcc version 4.5.0 20091229 (experimental) [trunk revision 155502] (GCC)
COLLECT_GCC_OPTIONS='-v' '-floop-block' '-O2' '-funroll-loops' '-ffast-math'
'-shared-libgcc' '-mtune=generic'

/data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/f951
bug.f90 -quiet -dumpbase bug.f90 -mtune=generic -auxbase bug -O2 -version
-floop-block -funroll-loops -ffast-math -fintrinsic-modules-path
/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/finclude
-o /tmp/ccVuGyWl.s
GNU Fortran (GCC) version 4.5.0 20091229 (experimental) [trunk revision 155502]
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.3.1 20080507 (prerelease) [gcc-4_3-branch
revision 135036], GMP version 4.2.4, MPFR version 2.4.1, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Fortran (GCC) version 4.5.0 20091229 (experimental) [trunk revision 155502]
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.3.1 20080507 (prerelease) [gcc-4_3-branch
revision 135036], GMP version 4.2.4, MPFR version 2.4.1, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
COLLECT_GCC_OPTIONS='-v' '-floop-block' '-O2' '-funroll-loops' '-ffast-math'
'-shared-libgcc' '-mtune=generic'
 as -V -Qy -o /tmp/cc84OG4d.o /tmp/ccVuGyWl.s
GNU assembler version 2.18.50 (x86_64-suse-linux) using BFD version (GNU
Binutils; openSUSE 11.0) 2.18.50.20080409-11.1
COMPILER_PATH=/data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/:/data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/:/data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/:/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/:/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/:/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-floop-block' '-O2' '-funroll-loops' '-ffast-math'
'-shared-libgcc' '-mtune=generic'

/data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/collect2
--eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2
/usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/crtbegin.o
-L/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0
-L/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../..
/tmp/cc84OG4d.o -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/crtfastmath.o
/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/crtend.o
/usr/lib/../lib64/crtn.o


-- 

jv244 at cam dot ac dot uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spop at gcc dot gnu dot org
           Priority|P3                          |P2
   Target Milestone|---                         |4.5.0


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


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

* [Bug middle-end/42558] [4.5 Regression] miscompilation related to -floop-block
  2009-12-30 21:07 [Bug middle-end/42558] New: [4.5 Regression] miscompilation related to -floop-block jv244 at cam dot ac dot uk
  2009-12-30 21:08 ` [Bug middle-end/42558] " jv244 at cam dot ac dot uk
  2009-12-30 21:10 ` jv244 at cam dot ac dot uk
@ 2009-12-30 21:34 ` hjl dot tools at gmail dot com
  2009-12-31 16:26 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-12-30 21:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2009-12-30 21:34 -------
It is caused by revision 155418:

http://gcc.gnu.org/ml/gcc-cvs/2009-12/msg00562.html


-- 


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


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

* [Bug middle-end/42558] [4.5 Regression] miscompilation related to -floop-block
  2009-12-30 21:07 [Bug middle-end/42558] New: [4.5 Regression] miscompilation related to -floop-block jv244 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2009-12-30 21:34 ` hjl dot tools at gmail dot com
@ 2009-12-31 16:26 ` rguenth at gcc dot gnu dot org
  2010-01-02 16:17 ` [Bug tree-optimization/42558] " rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-31 16:26 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3


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


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

* [Bug tree-optimization/42558] [4.5 Regression] miscompilation related to -floop-block
  2009-12-30 21:07 [Bug middle-end/42558] New: [4.5 Regression] miscompilation related to -floop-block jv244 at cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2009-12-31 16:26 ` rguenth at gcc dot gnu dot org
@ 2010-01-02 16:17 ` rguenth at gcc dot gnu dot org
  2010-02-06 16:44 ` [Bug tree-optimization/42558] [4.5 Regression][graphite] " spop at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-02 16:17 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |tree-optimization
           Priority|P3                          |P1


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


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

* [Bug tree-optimization/42558] [4.5 Regression][graphite] miscompilation related to -floop-block
  2009-12-30 21:07 [Bug middle-end/42558] New: [4.5 Regression] miscompilation related to -floop-block jv244 at cam dot ac dot uk
                   ` (4 preceding siblings ...)
  2010-01-02 16:17 ` [Bug tree-optimization/42558] " rguenth at gcc dot gnu dot org
@ 2010-02-06 16:44 ` spop at gcc dot gnu dot org
  2010-02-06 18:08 ` dominiq at lps dot ens dot fr
  2010-02-06 19:42 ` sebpop at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-02-06 16:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from spop at gcc dot gnu dot org  2010-02-06 16:44 -------
This problem is fixed by the patch for PR42637 as installed in the Graphite
branch.
I would like to include the testcase from this PR in the Graphite testsuite.

Could somebody more fluent in Fortran rewrite the testcase under the same
format as the testcase of PR42637 with a condition like this:

      if (res.ne.1.0d0) then
        call abort()
      end if

Thanks,
Sebastian

*** This bug has been marked as a duplicate of 42637 ***


-- 

spop at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

* [Bug tree-optimization/42558] [4.5 Regression][graphite] miscompilation related to -floop-block
  2009-12-30 21:07 [Bug middle-end/42558] New: [4.5 Regression] miscompilation related to -floop-block jv244 at cam dot ac dot uk
                   ` (5 preceding siblings ...)
  2010-02-06 16:44 ` [Bug tree-optimization/42558] [4.5 Regression][graphite] " spop at gcc dot gnu dot org
@ 2010-02-06 18:08 ` dominiq at lps dot ens dot fr
  2010-02-06 19:42 ` sebpop at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-02-06 18:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dominiq at lps dot ens dot fr  2010-02-06 18:08 -------
> Could somebody more fluent in Fortran rewrite the testcase under the same
> format as the testcase of PR42637 with a condition like this: ...

Is

  IMPLICIT NONE
  INTEGER, PARAMETER :: dp=KIND(0.0D0)
  REAL(KIND=dp)      :: res

  res=exp_radius_very_extended(  0    ,      1   ,       0      ,    1, &
                               (/0.0D0,0.0D0,0.0D0/),&
                               (/1.0D0,0.0D0,0.0D0/),&
                               (/1.0D0,0.0D0,0.0D0/),&
                                 1.0D0,1.0D0,1.0D0,1.0D0)
  if (res.ne.1.0d0) call abort()

CONTAINS
...

what you want?

Note that the test passes at revision 156540 on x86_64-apple-darwin10, so I am
not sure that it is a duplicate of 42637.


-- 


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


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

* [Bug tree-optimization/42558] [4.5 Regression][graphite] miscompilation related to -floop-block
  2009-12-30 21:07 [Bug middle-end/42558] New: [4.5 Regression] miscompilation related to -floop-block jv244 at cam dot ac dot uk
                   ` (6 preceding siblings ...)
  2010-02-06 18:08 ` dominiq at lps dot ens dot fr
@ 2010-02-06 19:42 ` sebpop at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: sebpop at gmail dot com @ 2010-02-06 19:42 UTC (permalink / raw)
  To: gcc-bugs

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



------- Comment #6 from sebpop at gmail dot com  2010-02-06 19:42 -------
Subject: Re:  [4.5 Regression][graphite] 
        miscompilation related to -floop-block

> Is
>
>  IMPLICIT NONE
>  INTEGER, PARAMETER :: dp=KIND(0.0D0)
>  REAL(KIND=dp)      :: res
>
>  res=exp_radius_very_extended(  0    ,      1   ,       0      ,    1, &
>                               (/0.0D0,0.0D0,0.0D0/),&
>                               (/1.0D0,0.0D0,0.0D0/),&
>                               (/1.0D0,0.0D0,0.0D0/),&
>                                 1.0D0,1.0D0,1.0D0,1.0D0)
>  if (res.ne.1.0d0) call abort()
>
> CONTAINS
> ...
>
> what you want?

Yes, thanks, I will include this in the testsuite.

Sebastian


-- 


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


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

end of thread, other threads:[~2010-02-06 19:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-30 21:07 [Bug middle-end/42558] New: [4.5 Regression] miscompilation related to -floop-block jv244 at cam dot ac dot uk
2009-12-30 21:08 ` [Bug middle-end/42558] " jv244 at cam dot ac dot uk
2009-12-30 21:10 ` jv244 at cam dot ac dot uk
2009-12-30 21:34 ` hjl dot tools at gmail dot com
2009-12-31 16:26 ` rguenth at gcc dot gnu dot org
2010-01-02 16:17 ` [Bug tree-optimization/42558] " rguenth at gcc dot gnu dot org
2010-02-06 16:44 ` [Bug tree-optimization/42558] [4.5 Regression][graphite] " spop at gcc dot gnu dot org
2010-02-06 18:08 ` dominiq at lps dot ens dot fr
2010-02-06 19:42 ` sebpop at gmail dot com

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).