public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/43959]  New: FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
@ 2010-05-02  0:23 danglin at gcc dot gnu dot org
  2010-05-02 15:26 ` [Bug testsuite/43959] [4.6 Regression] " rguenth at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: danglin at gcc dot gnu dot org @ 2010-05-02  0:23 UTC (permalink / raw)
  To: gcc-bugs

Executing on host: /test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/
/te
st/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c   -O1    -lm   -o 
builtin-cproj-1.exe    (timeout = 300)
/usr/ccs/bin/ld: Unsatisfied symbols:
   link_error (first referenced in /var/tmp//ccKBsQ1R.o) (code)
   cprojl (first referenced in /var/tmp//ccKBsQ1R.o) (code)
   cproj (first referenced in /var/tmp//ccKBsQ1R.o) (code)
collect2: ld returned 1 exit status
compiler exited with status 1


-- 
           Summary: FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for
                    excess errors)
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa2.0w-hp-hpux11.11
  GCC host triplet: hppa2.0w-hp-hpux11.11
GCC target triplet: hppa2.0w-hp-hpux11.11


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


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

* [Bug testsuite/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
@ 2010-05-02 15:26 ` rguenth at gcc dot gnu dot org
  2010-09-02 10:46 ` rguenth at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-02 15:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2010-05-02 15:26 -------
They are C99 but the testcase does not require c99-targts.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ghazi at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
          Component|middle-end                  |testsuite
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-05-02 15:26:05
               date|                            |
            Summary|FAIL:                       |[4.6 Regression] FAIL:
                   |gcc.dg/torture/builtin-     |gcc.dg/torture/builtin-
                   |cproj-1.c  -O1  (test for   |cproj-1.c  -O1  (test for
                   |excess errors)              |excess errors)
   Target Milestone|---                         |4.6.0


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


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

* [Bug testsuite/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
  2010-05-02 15:26 ` [Bug testsuite/43959] [4.6 Regression] " rguenth at gcc dot gnu dot org
@ 2010-09-02 10:46 ` rguenth at gcc dot gnu dot org
  2010-09-02 15:25 ` ghazi at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-09-02 10:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-09-02 10:46 -------
Please check whether

Index: gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c      (revision 163766)
+++ gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c      (working copy)
@@ -7,6 +7,8 @@

 /* { dg-do link } */
 /* { dg-add-options ieee } */
+/* { dg-add-options c99_runtime } */
+/* { dg-require-effective-target c99_runtime } */

 /* All references to link_error should go away at compile-time.  The
    argument is the __LINE__ number.  It appears in the tree dump file

fixes this (and commit it then).  But I think the foldings should succeed
anyway, so please investigate.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


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


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

* [Bug testsuite/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
  2010-05-02 15:26 ` [Bug testsuite/43959] [4.6 Regression] " rguenth at gcc dot gnu dot org
  2010-09-02 10:46 ` rguenth at gcc dot gnu dot org
@ 2010-09-02 15:25 ` ghazi at gcc dot gnu dot org
  2010-09-02 16:28 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2010-09-02 15:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ghazi at gcc dot gnu dot org  2010-09-02 15:24 -------
> Please check whether
> +/* { dg-add-options c99_runtime } */
> +/* { dg-require-effective-target c99_runtime } */

You're right that these foldings should succeed anyway, the c99_runtime should
not be necessary.  If requiring a c99 effective target eliminates the error,
it's only because the test doesn't run anymore.

The subject indicates the test fails at -O1, but I assume not -O0 or -O2.  This
leads me to guess that the failing line(s) are in the #ifdef __OPTIMIZE__
section.  These bits rely on some generic optimizations to fully fold away the
relevant code, which may not be happening here at -O1.

I don't have access to a test infrastructure ATM.  So if David could please
narrow down which line is failing to fold, it would help.  Each test line here
calls link_error(__LINE__) so if you add -fdump-tree-* you should be able to
see which one(s) aren't folding, and hopefully why.

I suspect it's something more than the c99 complex stuff.


-- 


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


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

* [Bug testsuite/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-09-02 15:25 ` ghazi at gcc dot gnu dot org
@ 2010-09-02 16:28 ` dave at hiauly1 dot hia dot nrc dot ca
  2010-09-07 23:23 ` danglin at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2010-09-02 16:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dave at hiauly1 dot hia dot nrc dot ca  2010-09-02 16:27 -------
Subject: Re:  [4.6 Regression] FAIL:
        gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)

On Thu, 02 Sep 2010, ghazi at gcc dot gnu dot org wrote:

> 
> 
> ------- Comment #3 from ghazi at gcc dot gnu dot org  2010-09-02 15:24 -------
> > Please check whether
> > +/* { dg-add-options c99_runtime } */
> > +/* { dg-require-effective-target c99_runtime } */
> 
> You're right that these foldings should succeed anyway, the c99_runtime should
> not be necessary.  If requiring a c99 effective target eliminates the error,
> it's only because the test doesn't run anymore.
> 
> The subject indicates the test fails at -O1, but I assume not -O0 or -O2.  This
> leads me to guess that the failing line(s) are in the #ifdef __OPTIMIZE__
> section.  These bits rely on some generic optimizations to fully fold away the
> relevant code, which may not be happening here at -O1.
> 
> I don't have access to a test infrastructure ATM.  So if David could please
> narrow down which line is failing to fold, it would help.  Each test line here
> calls link_error(__LINE__) so if you add -fdump-tree-* you should be able to
> see which one(s) aren't folding, and hopefully why.
> 
> I suspect it's something more than the c99 complex stuff.

The test also fails at -O1 on hppa-unknown-linux-gnu.  This is a c99
target.  It doesn't fail at -O0 or at -O2.

Attached builtin-cproj-1.c.149t.optimized.


------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca  2010-09-02 16:27 -------
Created an attachment (id=21671)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21671&action=view)


-- 


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


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

* [Bug testsuite/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2010-09-02 16:28 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2010-09-07 23:23 ` danglin at gcc dot gnu dot org
  2010-09-07 23:44 ` ghazi at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: danglin at gcc dot gnu dot org @ 2010-09-07 23:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from danglin at gcc dot gnu dot org  2010-09-07 23:23 -------
Subject: Bug 43959

Author: danglin
Date: Tue Sep  7 23:23:30 2010
New Revision: 163979

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163979
Log:
        PR testsuite/43959
        * gcc.dg/torture/builtin-cproj-1.c: Require c99 runtime.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c


-- 


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


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

* [Bug testsuite/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2010-09-07 23:23 ` danglin at gcc dot gnu dot org
@ 2010-09-07 23:44 ` ghazi at gcc dot gnu dot org
  2010-09-08  0:16 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2010-09-07 23:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ghazi at gcc dot gnu dot org  2010-09-07 23:43 -------
(In reply to comment #6)
> Subject: Bug 43959
> Author: danglin
> Date: Tue Sep  7 23:23:30 2010
> New Revision: 163979
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163979
> Log:
>         PR testsuite/43959
>         * gcc.dg/torture/builtin-cproj-1.c: Require c99 runtime.
> Modified:
>     trunk/gcc/testsuite/ChangeLog
>     trunk/gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c

This change isn't necessary or correct, the test should (and does) fold away
all references to cproj on non-c99 platforms.  The bug on hppa at -O1 will
still occur on hppa-linux.


-- 


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


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

* [Bug testsuite/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2010-09-07 23:44 ` ghazi at gcc dot gnu dot org
@ 2010-09-08  0:16 ` dave at hiauly1 dot hia dot nrc dot ca
  2010-09-08  0:25 ` danglin at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2010-09-08  0:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dave at hiauly1 dot hia dot nrc dot ca  2010-09-08 00:15 -------
Subject: Re:  [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1 
(test for excess errors)

> This change isn't necessary or correct, the test should (and does) fold away
> all references to cproj on non-c99 platforms.  The bug on hppa at -O1 will
> still occur on hppa-linux.

I will revert and look at xfailing on hppa.

All references to cproj are not folded away, possibly because of return
slot optimization.  See attachment.

Either the test is wrong or there is a tree optimization problem.  If
the latter is true, the component should be changed.

Dave


-- 


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


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

* [Bug testsuite/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2010-09-08  0:16 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2010-09-08  0:25 ` danglin at gcc dot gnu dot org
  2010-09-12 15:38 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: danglin at gcc dot gnu dot org @ 2010-09-08  0:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from danglin at gcc dot gnu dot org  2010-09-08 00:24 -------
Subject: Bug 43959

Author: danglin
Date: Wed Sep  8 00:24:44 2010
New Revision: 163985

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163985
Log:
        Revert
        PR testsuite/43959
        * gcc.dg/torture/builtin-cproj-1.c: Require c99 runtime.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c


-- 


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


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

* [Bug testsuite/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2010-09-08  0:25 ` danglin at gcc dot gnu dot org
@ 2010-09-12 15:38 ` dave at hiauly1 dot hia dot nrc dot ca
  2010-09-18 18:10 ` [Bug tree-optimization/43959] " danglin at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2010-09-12 15:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from dave at hiauly1 dot hia dot nrc dot ca  2010-09-12 15:38 -------
Subject: Re:  [4.6 Regression] FAIL:
        gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)

I have simplified the testcase to include just the two failing portions
from line 160.  Some other lines also have failing portions.

I have attached the simplified testcase, 080t.cplxlower, and the
generated .s at -O1.  I'm not sure things go wrong in 080t.cplxlower
but it differs substantially from what I see on x86.

Dave


------- Comment #11 from dave at hiauly1 dot hia dot nrc dot ca  2010-09-12 15:38 -------
Created an attachment (id=21778)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21778&action=view)


------- Comment #12 from dave at hiauly1 dot hia dot nrc dot ca  2010-09-12 15:38 -------
Created an attachment (id=21779)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21779&action=view)


------- Comment #13 from dave at hiauly1 dot hia dot nrc dot ca  2010-09-12 15:38 -------
Created an attachment (id=21780)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21780&action=view)


-- 


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


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

* [Bug tree-optimization/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2010-09-12 15:38 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2010-09-18 18:10 ` danglin at gcc dot gnu dot org
  2010-09-18 18:25 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: danglin at gcc dot gnu dot org @ 2010-09-18 18:10 UTC (permalink / raw)
  To: gcc-bugs



-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
          Component|testsuite                   |tree-optimization
   Last reconfirmed|2010-05-02 15:26:05         |2010-09-18 18:10:02
               date|                            |


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


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

* [Bug tree-optimization/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2010-09-18 18:10 ` [Bug tree-optimization/43959] " danglin at gcc dot gnu dot org
@ 2010-09-18 18:25 ` rguenth at gcc dot gnu dot org
  2010-09-18 18:59 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-09-18 18:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from rguenth at gcc dot gnu dot org  2010-09-18 18:25 -------
You have way more non-SSA variables - possibly due to callee-copy of args
(again).

I suppose some optimizations end up being disabled for some reason by that,
but likely nobody will be interested to fixup missed optimizations for
this target :/

So - if you are interested (heh ...) I'd start comparing dumps to i?86 dumps
and see where they start to diverge badly.  Also try and see why you end up
with

  complex double cd.1;
  complex long double cld.0;

not in SSA form:

  REALPART_EXPR <cld.0> = cld$real_19;
  IMAGPART_EXPR <cld.0> = cld$imag_20;
  REALPART_EXPR <cd.1> = cd$real_10;
  IMAGPART_EXPR <cd.1> = cd$imag_11;
  REALPART_EXPR <cd.1> =  Inf;

on i?86 I never even start having partial definitions of these on the lhs ...
(but I also do not have the callee-copy, so you might check if SRA makes
those partial defs from them by trying with -fno-tree-sra).

If you're not interested I suggest to XFAIL the testcase for the failing
platforms.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


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


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

* [Bug tree-optimization/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2010-09-18 18:25 ` rguenth at gcc dot gnu dot org
@ 2010-09-18 18:59 ` dave at hiauly1 dot hia dot nrc dot ca
  2010-09-18 22:14 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2010-09-18 18:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from dave at hiauly1 dot hia dot nrc dot ca  2010-09-18 18:59 -------
Subject: Re:  [4.6 Regression] FAIL:
        gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)

On Sat, 18 Sep 2010, rguenth at gcc dot gnu dot org wrote:

> 
> 
> ------- Comment #14 from rguenth at gcc dot gnu dot org  2010-09-18 18:25 -------
> You have way more non-SSA variables - possibly due to callee-copy of args
> (again).
> 
> I suppose some optimizations end up being disabled for some reason by that,
> but likely nobody will be interested to fixup missed optimizations for
> this target :/
> 
> So - if you are interested (heh ...) I'd start comparing dumps to i?86 dumps
> and see where they start to diverge badly.  Also try and see why you end up
> with

I already did compare dumps with i?86.  cplxlower is where major differences
started to appear, although there are some differences before that.

>   complex double cd.1;
>   complex long double cld.0;
> 
> not in SSA form:
> 
>   REALPART_EXPR <cld.0> = cld$real_19;
>   IMAGPART_EXPR <cld.0> = cld$imag_20;
>   REALPART_EXPR <cd.1> = cd$real_10;
>   IMAGPART_EXPR <cd.1> = cd$imag_11;
>   REALPART_EXPR <cd.1> =  Inf;

The problem has something to do with precision.  The problem doesn't occur
for complex float.  For example, this code doesn't appear for float:

CR.11_40 = REALPART_EXPR <D.1935_9>;
CI.12_41 = IMAGPART_EXPR <D.1935_9>;
D.1966_42 = CR.11_40 > 1.79769313486231570814527423731704356798070567526e+308;
D.1967_43 = !D.1966_42;
D.1968_44 = CI.12_41 != 0.0;
D.1969_45 = D.1967_43 || D.1968_44;
if (D.1969_45 == 1)
  goto <bb 6>;
else
goto <bb 5>;

> on i?86 I never even start having partial definitions of these on the lhs ...
> (but I also do not have the callee-copy, so you might check if SRA makes
> those partial defs from them by trying with -fno-tree-sra).

Thanks for the suggestion.  I'll give it a try.

> If you're not interested I suggest to XFAIL the testcase for the failing
> platforms.

It's really a question of time.  I only have some evenings and weekends
to investigate GCC bugs.

Dave


-- 


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


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

* [Bug tree-optimization/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2010-09-18 18:59 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2010-09-18 22:14 ` dave at hiauly1 dot hia dot nrc dot ca
  2010-09-19 11:10 ` rguenth at gcc dot gnu dot org
  2010-09-19 14:53 ` dave at hiauly1 dot hia dot nrc dot ca
  14 siblings, 0 replies; 16+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2010-09-18 22:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from dave at hiauly1 dot hia dot nrc dot ca  2010-09-18 22:14 -------
Subject: Re:  [4.6 Regression] FAIL:
        gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)

On Sat, 18 Sep 2010, rguenth at gcc dot gnu dot org wrote:

> ------- Comment #14 from rguenth at gcc dot gnu dot org  2010-09-18 18:25 -------
> You have way more non-SSA variables - possibly due to callee-copy of args
> (again).

I think you are correct about this being a callee-copy problem.  Complex
float is passed by value, so a copy is not made.  In the 087t.dce2 pass,
the float code is simplified to

  if (x_32(D) != 0)
    goto <bb 4>;
  else
    goto <bb 3>;

<bb 3>:

<bb 4>:
Invalid sum of incoming frequencies 10000, should be 5000
  # cf$imag_13 = PHI <4.0e+0(2), 5.0e+0(3)>
  cf_36 = COMPLEX_EXPR < Inf, cf$imag_13>;  D.2130_37 = __builtin_cprojf
(cf_36);
  D.2133_152 = IMAGPART_EXPR <D.2130_37>;
  D.2134_41 = __builtin_copysignf (1.0e+0, D.2133_152);
  if (D.2134_41 != 1.0e+0)
    goto <bb 5>;
  else
    goto <bb 6>;

<bb 5>:
Invalid sum of incoming frequencies 2500, should be 6450
  link_error (160);

whereas for double we still have

<bb 6>:
Invalid sum of incoming frequencies 8950, should be 10000
  REALPART_EXPR <cd.1> =  Inf;
  if (x_32(D) != 0)
    goto <bb 8>;
  else
    goto <bb 7>;

<bb 7>:

<bb 8>:
  # iftmp.4_14 = PHI <4.0e+0(6), 5.0e+0(7)>
  D.2321_122 = REALPART_EXPR <cd.1>;
  cd.5_44 = COMPLEX_EXPR <D.2321_122, iftmp.4_14>;
  D.2142_45 = __builtin_cproj (cd.5_44); [return slot optimization]
  CR.26_84 = REALPART_EXPR <D.2142_45>;
  D.2145_85 = IMAGPART_EXPR <D.2142_45>;
  D.2325_75 = CR.26_84 >
1.79769313486231570814527423731704356798070567526e+308;
  D.2326_76 = !D.2325_75;
  D.2327_67 = D.2145_85 != 0.0;
  D.2328_60 = D.2327_67 || D.2326_76;
  if (D.2328_60 == 1)
    goto <bb 10>;
  else
    goto <bb 9>;

<bb 9>:
  D.2146_49 = (float) D.2145_85;
  D.2147_50 = __builtin_copysignf (1.0e+0, D.2146_49);
  if (D.2147_50 != 1.0e+0)
    goto <bb 10>;
  else
    goto <bb 11>;

<bb 10>:
  link_error (160);

In the previous 086t.reassoc1 pass, we still had the non SSA stuff:

<bb 2>:
  cld$real_188 = REALPART_EXPR <cld_25(D)>;
  cld$imag_189 = IMAGPART_EXPR <cld_25(D)>;
  cd$real_177 = REALPART_EXPR <cd_26(D)>;
  cd$imag_178 = IMAGPART_EXPR <cd_26(D)>;
  cf$real_167 = REALPART_EXPR <cf_29(D)>;
  cf$imag_158 = IMAGPART_EXPR <cf_29(D)>;
  REALPART_EXPR <cld.0> = cld$real_188;
  IMAGPART_EXPR <cld.0> = cld$imag_189;
  REALPART_EXPR <cd.1> = cd$real_177;
  IMAGPART_EXPR <cd.1> = cd$imag_178;
  if (x_32(D) != 0)
    goto <bb 4>;
  else
    goto <bb 3>;

-fno-tree-sra didn't help.

080t.cplxlower makes these partial defintions:

  REALPART_EXPR <cld.0> = cld$real_188;    
  IMAGPART_EXPR <cld.0> = cld$imag_189;
  REALPART_EXPR <cd.1> = cd$real_177;
  IMAGPART_EXPR <cd.1> = cd$imag_178;  

# grep real_188 builtin-cproj-1.c.*
builtin-cproj-1.c.080t.cplxlower:  cld$real_188 = REALPART_EXPR <cld_25(D)>;
builtin-cproj-1.c.080t.cplxlower:  REALPART_EXPR <cld.0> = cld$real_188;
builtin-cproj-1.c.082t.copyrename3:  cld$real_188 = REALPART_EXPR <cld_25(D)>;
builtin-cproj-1.c.082t.copyrename3:  REALPART_EXPR <cld.0> = cld$real_188;
builtin-cproj-1.c.083t.dom1:  cld$real_188 = REALPART_EXPR <cld_25(D)>;
builtin-cproj-1.c.083t.dom1:  REALPART_EXPR <cld.0> = cld$real_188;
builtin-cproj-1.c.084t.phicprop1:  cld$real_188 = REALPART_EXPR <cld_25(D)>;
builtin-cproj-1.c.084t.phicprop1:  REALPART_EXPR <cld.0> = cld$real_188;
builtin-cproj-1.c.085t.dse1:  cld$real_188 = REALPART_EXPR <cld_25(D)>;
builtin-cproj-1.c.085t.dse1:  REALPART_EXPR <cld.0> = cld$real_188;
builtin-cproj-1.c.086t.reassoc1:  cld$real_188 = REALPART_EXPR <cld_25(D)>;
builtin-cproj-1.c.086t.reassoc1:  REALPART_EXPR <cld.0> = cld$real_188;

004t.gimple makes 

  REALPART_EXPR <cd.1> =  Inf;

# grep "REALPART_EXPR <cd.1>" builtin-cproj-1.c.*
builtin-cproj-1.c.004t.gimple:  REALPART_EXPR <cd.1> =  Inf;
builtin-cproj-1.c.004t.gimple:  REALPART_EXPR <cd.1> =  -Inf;
builtin-cproj-1.c.004t.gimple:    REALPART_EXPR <cd.1> =  Inf;
builtin-cproj-1.c.004t.gimple:    REALPART_EXPR <cd.1> =  -Inf;
builtin-cproj-1.c.009t.omplower:  REALPART_EXPR <cd.1> =  Inf;
builtin-cproj-1.c.009t.omplower:  REALPART_EXPR <cd.1> =  -Inf;
builtin-cproj-1.c.009t.omplower:    REALPART_EXPR <cd.1> =  Inf;
builtin-cproj-1.c.009t.omplower:    REALPART_EXPR <cd.1> =  -Inf;
...


-- 


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


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

* [Bug tree-optimization/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2010-09-18 22:14 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2010-09-19 11:10 ` rguenth at gcc dot gnu dot org
  2010-09-19 14:53 ` dave at hiauly1 dot hia dot nrc dot ca
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-09-19 11:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from rguenth at gcc dot gnu dot org  2010-09-19 11:10 -------
Ah.  The following fixes it for me on a cross.  Can you bootstrap & regtest and
install it?  It's pre-approved if it works for you.

Thanks.

Index: gcc/function.c
===================================================================
--- gcc/function.c      (revision 164396)
+++ gcc/function.c      (working copy)
@@ -3578,7 +3578,7 @@ gimplify_parameters (void)
                       && compare_tree_int (DECL_SIZE_UNIT (parm),
                                            STACK_CHECK_MAX_VAR_SIZE) > 0))
                {
-                 local = create_tmp_var (type, get_name (parm));
+                 local = create_tmp_reg (type, get_name (parm));
                  DECL_IGNORED_P (local) = 0;
                  /* If PARM was addressable, move that flag over
                     to the local copy, as its address will be taken,
@@ -3592,7 +3592,7 @@ gimplify_parameters (void)
                  tree ptr_type, addr;

                  ptr_type = build_pointer_type (type);
-                 addr = create_tmp_var (ptr_type, get_name (parm));
+                 addr = create_tmp_reg (ptr_type, get_name (parm));
                  DECL_IGNORED_P (addr) = 0;
                  local = build_fold_indirect_ref (addr);



-- 


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


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

* [Bug tree-optimization/43959] [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1  (test for excess errors)
  2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2010-09-19 11:10 ` rguenth at gcc dot gnu dot org
@ 2010-09-19 14:53 ` dave at hiauly1 dot hia dot nrc dot ca
  14 siblings, 0 replies; 16+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2010-09-19 14:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from dave at hiauly1 dot hia dot nrc dot ca  2010-09-19 14:53 -------
Subject: Re:  [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c  -O1 
(test for excess errors)

> Ah.  The following fixes it for me on a cross.  Can you bootstrap & regtest and
> install it?  It's pre-approved if it works for you.

Will test and install if successful.

Dave


-- 


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


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

end of thread, other threads:[~2010-09-19 14:53 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-02  0:23 [Bug middle-end/43959] New: FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors) danglin at gcc dot gnu dot org
2010-05-02 15:26 ` [Bug testsuite/43959] [4.6 Regression] " rguenth at gcc dot gnu dot org
2010-09-02 10:46 ` rguenth at gcc dot gnu dot org
2010-09-02 15:25 ` ghazi at gcc dot gnu dot org
2010-09-02 16:28 ` dave at hiauly1 dot hia dot nrc dot ca
2010-09-07 23:23 ` danglin at gcc dot gnu dot org
2010-09-07 23:44 ` ghazi at gcc dot gnu dot org
2010-09-08  0:16 ` dave at hiauly1 dot hia dot nrc dot ca
2010-09-08  0:25 ` danglin at gcc dot gnu dot org
2010-09-12 15:38 ` dave at hiauly1 dot hia dot nrc dot ca
2010-09-18 18:10 ` [Bug tree-optimization/43959] " danglin at gcc dot gnu dot org
2010-09-18 18:25 ` rguenth at gcc dot gnu dot org
2010-09-18 18:59 ` dave at hiauly1 dot hia dot nrc dot ca
2010-09-18 22:14 ` dave at hiauly1 dot hia dot nrc dot ca
2010-09-19 11:10 ` rguenth at gcc dot gnu dot org
2010-09-19 14:53 ` dave at hiauly1 dot hia dot nrc dot ca

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