* [Bug fortran/19551] LAPACK routine claic1.f bug
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
@ 2005-01-21 3:15 ` bdavis at gcc dot gnu dot org
2005-01-21 3:18 ` [Bug target/19551] " pinskia at gcc dot gnu dot org
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2005-01-21 3:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bdavis at gcc dot gnu dot org 2005-01-21 03:15 -------
works OK on AMD-64
fails on i686
--bud
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-01-21 03:15:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/19551] LAPACK routine claic1.f bug
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
2005-01-21 3:15 ` [Bug fortran/19551] " bdavis at gcc dot gnu dot org
@ 2005-01-21 3:18 ` pinskia at gcc dot gnu dot org
2005-01-21 3:47 ` david dot billinghurst at comalco dot riotinto dot com dot au
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-21 3:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-21 03:17 -------
Hmm, sounds like an extensive precision problem.
Is there any way for a self contained example.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|fortran |target
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/19551] LAPACK routine claic1.f bug
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
2005-01-21 3:15 ` [Bug fortran/19551] " bdavis at gcc dot gnu dot org
2005-01-21 3:18 ` [Bug target/19551] " pinskia at gcc dot gnu dot org
@ 2005-01-21 3:47 ` david dot billinghurst at comalco dot riotinto dot com dot au
2005-01-21 4:15 ` [Bug middle-end/19551] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: david dot billinghurst at comalco dot riotinto dot com dot au @ 2005-01-21 3:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From david dot billinghurst at comalco dot riotinto dot com dot au 2005-01-21 03:46 -------
Subject: RE: LAPACK routine claic1.f bug
Pardon? It is a self contained example. Took me several hours to reduce it.
I doubt it is an excess precision problem as the numbers involved are all O(1)
and there is no possibility of cancellation.
David
NOTICE
This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
This notice should not be removed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] LAPACK routine claic1.f bug
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-01-21 3:47 ` david dot billinghurst at comalco dot riotinto dot com dot au
@ 2005-01-21 4:15 ` pinskia at gcc dot gnu dot org
2005-01-21 4:17 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-21 4:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-21 04:15 -------
Hmm (sorry about that), never mind about not being a self contained or excess precision problem
because it can be reproduced on 32bit powerpc also. The problem comes from .16.life so this is not a
fortran related problem.
This can also reproduced with the following C code (but only at -O1 and above) (the fortran example
can be reproduce with -O0):
_Complex float csqrtf(_Complex float);
float claic1 (float *tmp)
{
_Complex float D435;
_Complex float D433;
__imag D433 = 0.0;
__real D433 = 5.31108379364013671875e+0;
D435 = csqrtf (D433);
*tmp = __real D435;
}
And that is at least a regression from 3.3.2.
On x86, it also fails with 3.4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Component|target |middle-end
GCC build triplet|i686-pc-cygwin |
GCC host triplet|i686-pc-cygwin |
GCC target triplet|i686-pc-cygwin |i686-pc-cygwin, powerpc-
| |darwin
Keywords| |wrong-code
Known to fail| |4.0.0
Known to work| |3.3.2
Priority|P2 |P1
Summary|LAPACK routine claic1.f bug |[3.4/4.0 Regression] LAPACK
| |routine claic1.f bug
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] LAPACK routine claic1.f bug
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-01-21 4:15 ` [Bug middle-end/19551] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-01-21 4:17 ` pinskia at gcc dot gnu dot org
2005-01-21 8:15 ` Thomas dot Koenig at online dot de
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-21 4:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-21 04:17 -------
Note the full C self contained example is:
_Complex float csqrtf(_Complex float);
float claic1 (float *tmp);
void abort (void);
int main (void)
{
float x;
float x1;
x = 10000.0;
claic1 (&x);
x1 =x- 2.3045787811279296875;
x1 = x1>0?x1:-x1;
if (x1 > 9.99999974737875163555145263671875e-5)
abort ();
return 0;
}
float claic1 (float *tmp)
{
_Complex float D435;
_Complex float D433;
__imag D433 = 0.0;
__real D433 = 5.31108379364013671875e+0;
D435 = csqrtf (D433);
*tmp = __real D435;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] LAPACK routine claic1.f bug
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-01-21 4:17 ` pinskia at gcc dot gnu dot org
@ 2005-01-21 8:15 ` Thomas dot Koenig at online dot de
2005-01-21 14:32 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-21 8:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2005-01-21 08:14 -------
The test cases from the original description
and from commen #5 work correctly at -O0, -O1,
-O2 and -O3 on ia64-unknown-linux-gnu with the
20050116 snapshot.
Thomas
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] LAPACK routine claic1.f bug
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-01-21 8:15 ` Thomas dot Koenig at online dot de
@ 2005-01-21 14:32 ` pinskia at gcc dot gnu dot org
2005-01-21 15:46 ` jakub at gcc dot gnu dot org
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-21 14:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-21 14:32 -------
Hmm, adding -fno-builtin "fixes" the failure, maybe this is libcall problem then.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] LAPACK routine claic1.f bug
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-01-21 14:32 ` pinskia at gcc dot gnu dot org
@ 2005-01-21 15:46 ` jakub at gcc dot gnu dot org
2005-01-21 16:15 ` jakub at gcc dot gnu dot org
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-01-21 15:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2005-01-21 15:46 -------
-fno-builtin only matters in not adding pure attribute to csqrtf.
If you start the #5 testcase with
_Complex float csqrtf(_Complex float) __attribute__((pure));
instead, it fails even with -fno-builtin.
Reproduced on i386-redhat-linux, looking into it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] LAPACK routine claic1.f bug
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-01-21 15:46 ` jakub at gcc dot gnu dot org
@ 2005-01-21 16:15 ` jakub at gcc dot gnu dot org
2005-01-21 18:11 ` jakub at gcc dot gnu dot org
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-01-21 16:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2005-01-21 16:13 -------
Simplified testcase:
extern void abort ();
__attribute__((pure)) _Complex float
foo (int x)
{
_Complex float r;
__real r = x + 1;
__imag r = x - 1;
return r;
}
void
bar (float *f)
{
*f = foo (5);
}
int
main (void)
{
float f;
bar (&f);
if (f != 6.0)
abort ();
return 0;
}
Likely the culprit is in libcall_dead_p.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] LAPACK routine claic1.f bug
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-01-21 16:15 ` jakub at gcc dot gnu dot org
@ 2005-01-21 18:11 ` jakub at gcc dot gnu dot org
2005-01-21 21:37 ` [Bug middle-end/19551] [3.4/4.0 Regression] pure (complex types) function call removed as dead (LAPACK routine claic1.f bug) pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-01-21 18:11 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2005-01-21 03:15:27 |2005-01-21 18:11:43
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] pure (complex types) function call removed as dead (LAPACK routine claic1.f bug)
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-01-21 18:11 ` jakub at gcc dot gnu dot org
@ 2005-01-21 21:37 ` pinskia at gcc dot gnu dot org
2005-01-24 8:55 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-21 21:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-21 21:37 -------
Jakub you are a life saver some times. Thanks for looking into this.
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01529.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Summary|[3.4/4.0 Regression] pure |[3.4/4.0 Regression] pure
|function call removed as |(complex types) function
|dead (LAPACK routine |call removed as dead (LAPACK
|claic1.f bug) |routine claic1.f bug)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] pure (complex types) function call removed as dead (LAPACK routine claic1.f bug)
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (10 preceding siblings ...)
2005-01-21 21:37 ` [Bug middle-end/19551] [3.4/4.0 Regression] pure (complex types) function call removed as dead (LAPACK routine claic1.f bug) pinskia at gcc dot gnu dot org
@ 2005-01-24 8:55 ` cvs-commit at gcc dot gnu dot org
2005-01-24 9:11 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-24 8:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-24 08:55 -------
Subject: Bug 19551
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jakub@gcc.gnu.org 2005-01-24 08:54:26
Modified files:
gcc : ChangeLog flow.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.c-torture/execute: 20050121-1.c
gcc/testsuite/gcc.dg: 20050121-2.c
Log message:
* flow.c (propagate_one_insn): Formatting.
PR middle-end/19551
* flow.c (libcall_dead_p): Be more conservative if unsure.
If there are any instructions between insn and call, see if they are
all dead before saying the libcall is dead.
* gcc.c-torture/execute/20050121-1.c: New test.
* gcc.dg/20050121-2.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7255&r2=2.7256
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&r1=1.614&r2=1.615
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4928&r2=1.4929
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20050121-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20050121-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] pure (complex types) function call removed as dead (LAPACK routine claic1.f bug)
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (11 preceding siblings ...)
2005-01-24 8:55 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-24 9:11 ` cvs-commit at gcc dot gnu dot org
2005-01-24 9:12 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-24 9:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-24 09:11 -------
Subject: Bug 19551
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: jakub@gcc.gnu.org 2005-01-24 09:10:53
Modified files:
gcc : ChangeLog flow.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.c-torture/execute: 20050121-1.c
Log message:
* flow.c (propagate_one_insn): Formatting.
PR middle-end/19551
* flow.c (libcall_dead_p): Be more conservative if unsure.
If there are any instructions between insn and call, see if they are
all dead before saying the libcall is dead.
* gcc.c-torture/execute/20050121-1.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.780&r2=2.2326.2.781
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.572.4.3&r2=1.572.4.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.351&r2=1.3389.2.352
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20050121-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] pure (complex types) function call removed as dead (LAPACK routine claic1.f bug)
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (12 preceding siblings ...)
2005-01-24 9:11 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-24 9:12 ` jakub at gcc dot gnu dot org
2005-01-24 22:18 ` billingd at gcc dot gnu dot org
2005-08-04 0:58 ` jkj at sco dot com
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-01-24 9:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2005-01-24 09:12 -------
Should be fixed in CVS.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] pure (complex types) function call removed as dead (LAPACK routine claic1.f bug)
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (13 preceding siblings ...)
2005-01-24 9:12 ` jakub at gcc dot gnu dot org
@ 2005-01-24 22:18 ` billingd at gcc dot gnu dot org
2005-08-04 0:58 ` jkj at sco dot com
15 siblings, 0 replies; 17+ messages in thread
From: billingd at gcc dot gnu dot org @ 2005-01-24 22:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From billingd at gcc dot gnu dot org 2005-01-24 22:18 -------
I can confirm that the original problem is fixed in CVS. All the LAPACK CLS
Driver tests now pass on i686-pc-cygwin.
Thanks you Jakub for the quick fix.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/19551] [3.4/4.0 Regression] pure (complex types) function call removed as dead (LAPACK routine claic1.f bug)
2005-01-20 22:22 [Bug fortran/19551] New: LAPACK routine claic1.f bug billingd at gcc dot gnu dot org
` (14 preceding siblings ...)
2005-01-24 22:18 ` billingd at gcc dot gnu dot org
@ 2005-08-04 0:58 ` jkj at sco dot com
15 siblings, 0 replies; 17+ messages in thread
From: jkj at sco dot com @ 2005-08-04 0:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jkj at sco dot com 2005-08-04 00:57 -------
Just FYI, this still fails for me, from 3.4.4 all teh way up to the mainline,
when using -fPIC. Platform is UnixWare, but thats not significantly different
from the test point of view to any other x86 target. I dont have others I can
test it on. Any ideas why PIC may be causing a problem (other than the obvious
that an extra register is being used by the PIC stuff)?
If it will help I can include -S output from PIC and non-PIC compiles, or any
other debug info required. Any help greatly appreciated.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551
^ permalink raw reply [flat|nested] 17+ messages in thread