Bug 34878 - fast-math-pr33299.f90 failure with illegal instruction due to -ffast-math.
Summary: fast-math-pr33299.f90 failure with illegal instruction due to -ffast-math.
Status: RESOLVED DUPLICATE of bug 34168
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 34987 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-20 02:16 UTC by kargls
Modified: 2008-03-19 09:31 UTC (History)
5 users (show)

See Also:
Host:
Target: i386-unknown-freebsd8.
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-02-26 17:53:52


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kargls 2008-01-20 02:16:53 UTC
Bootstrap of revision 131654.  Testsuite has one failure.


Executing on host: /home/kargl/gcc/obj4x/gcc/testsuite/gfortran/../../gfortran -B/home/kargl/gcc/obj4x/
gcc/testsuite/gfortran/../../ /home/kargl/gcc/gcc4x/gcc/testsuite/gfortran.dg/vect/fast-math-pr33299.f9
0   -O2 -ftree-vectorize -fno-vect-cost-model -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats -msse2
 -ffast-math  -L/home/kargl/gcc/obj4x/i386-unknown-freebsd8.0/./libgfortran/.libs -L/home/kargl/gcc/obj
4x/i386-unknown-freebsd8.0/./libgfortran/.libs -L/home/kargl/gcc/obj4x/i386-unknown-freebsd8.0/./libibe
rty  -lm   -o ./fast-math-pr33299.exe    (timeout = 300)
PASS: gfortran.dg/vect/fast-math-pr33299.f90 (test for excess errors)
Setting LD_LIBRARY_PATH to .:/home/kargl/gcc/obj4x/i386-unknown-freebsd8.0/./libgfortran/.libs:/home/ka
rgl/gcc/obj4x/i386-unknown-freebsd8.0/./libgfortran/.libs:/home/kargl/gcc/obj4x/gcc:.:/home/kargl/gcc/o
bj4x/i386-unknown-freebsd8.0/./libgfortran/.libs:/home/kargl/gcc/obj4x/i386-unknown-freebsd8.0/./libgfo
rtran/.libs:/home/kargl/gcc/obj4x/gcc
FAIL: gfortran.dg/vect/fast-math-pr33299.f90 execution test


This is a -ffast-math issue as illustrated by 2 command lines.  I copied the guilty program into tmp/

kargl[205] gfc4x -o z -O2 -ftree-vectorize -fno-vect-cost-model -ftree-vectorize
r-verbose=4 -fdump-tree-vect-stats -fdump-tree-vect-stats -msse2 fast-math-pr332
99.f90
kargl[206] ./z
kargl[207] gfc4x -o z -O2 -ftree-vectorize -fno-vect-cost-model -ftree-vectorize
r-verbose=4 -fdump-tree-vect-stats -fdump-tree-vect-stats -msse2  -ffast-math fa
st-math-pr33299.f90
kargl[208] ./z
Illegal instruction (core dumped)
Comment 1 Andrew Pinski 2008-01-20 04:09:18 UTC
What instructions is causing the crash?

Are you testing on a machine which has SSE2 ?
Comment 2 Steve Kargl 2008-01-20 04:17:28 UTC
Subject: Re:  fast-math-pr33299.f90 failure with illegal instruction due to -ffast-math.

On Sun, Jan 20, 2008 at 04:09:19AM -0000, pinskia at gcc dot gnu dot org wrote:
> 
> What instructions is causing the crash?
> 
> Are you testing on a machine which has SSE2 ?
> 

Nope.  From FreeBSD's dmesg:

CPU: AMD Athlon(tm) Processor (1208.75-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x642  Stepping = 2
  Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR>
  AMD Features=0xc0440800<SYSCALL,<b18>,MMX+,3DNow!+,3DNow!>

SSE2 isn't one of the listed features.

Comment 3 Andrew Pinski 2008-01-20 04:19:57 UTC
There is the issue, the testcase should be not run on your computer as it is using SSE2.  So this is a testsuite issue.
Comment 4 Uroš Bizjak 2008-01-20 15:34:11 UTC
(In reply to comment #3)
> There is the issue, the testcase should be not run on your computer as it is
> using SSE2.  So this is a testsuite issue.

Please look at gcc.dg/vect/ how this should be done. There is a check_vect () call before each runtime test (check_vect is in tree-vect.h). I think that fortran vectorizer tests should call this test too - perhaps via C bindings?
Comment 5 Andrew Pinski 2008-01-26 22:58:26 UTC
*** Bug 34987 has been marked as a duplicate of this bug. ***
Comment 6 Kaveh Ghazi 2008-02-26 17:53:52 UTC
Isn't this a dup of 34168?
Comment 7 Steve Kargl 2008-02-26 18:00:26 UTC
Subject: Re:  fast-math-pr33299.f90 failure with illegal instruction due to -ffast-math.

On Tue, Feb 26, 2008 at 05:53:52PM -0000, ghazi at gcc dot gnu dot org wrote:
> 
> ------- Comment #6 from ghazi at gcc dot gnu dot org  2008-02-26 17:53 -------
> Isn't this a dup of 34168?
> 

It appears to be.

Comment 8 Kaveh Ghazi 2008-02-26 18:29:01 UTC
(In reply to comment #7)
> > Isn't this a dup of 34168?
> > 
> It appears to be.

Can you implement Uros' suggestion?

Comment 9 victork 2008-03-19 09:31:32 UTC

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