public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
@ 2005-10-02 16:20 ` laurent at guerby dot net
  2005-10-02 21:46 ` hubicka at ucw dot cz
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: laurent at guerby dot net @ 2005-10-02 16:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from laurent at guerby dot net  2005-10-02 16:20 -------
It looks like it is indeed a codegen bug in s-arit64.adb, in Scaled_Divide the
following line is miscompiled at -O1 and above (works at -O0):

            T2 := Lo (T1 rem Zlo) & D (4);

In my p.adb testcase, the compiler with Jan patch calls Lo with argument = 0
whereas (T1 rem Zlo) returned (1073741824 rem 3221225472) = 1073741824 so
stack/argument handling must be confused at some point. 

The bug is volatile, ie replacing the line above by:

            S3 := Lo (T1 rem Zlo);
            if S3 = 0 then
               T2 := Uns64 (D (4));
            else
               T2 := S3 & D (4);
            end if;

Makes it go away.

Laurent


-- 


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
  2005-10-02 16:20 ` [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
@ 2005-10-02 21:46 ` hubicka at ucw dot cz
  2005-10-02 21:55 ` ebotcazou at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: hubicka at ucw dot cz @ 2005-10-02 21:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from hubicka at ucw dot cz  2005-10-02 21:46 -------
Subject: Re:  [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed
and decimal arithmetic broken

> 
> 
> ------- Comment #10 from laurent at guerby dot net  2005-10-02 16:20 -------
> It looks like it is indeed a codegen bug in s-arit64.adb, in Scaled_Divide the
> following line is miscompiled at -O1 and above (works at -O0):
> 
>             T2 := Lo (T1 rem Zlo) & D (4);
> 
> In my p.adb testcase, the compiler with Jan patch calls Lo with argument = 0
> whereas (T1 rem Zlo) returned (1073741824 rem 3221225472) = 1073741824 so
> stack/argument handling must be confused at some point. 
> 
> The bug is volatile, ie replacing the line above by:
> 
>             S3 := Lo (T1 rem Zlo);
>             if S3 = 0 then
>                T2 := Uns64 (D (4));
>             else
>                T2 := S3 & D (4);
>             end if;
> 
> Makes it go away.
Can you please check if -fno-tree-ter makes the bug go away?  We've
chatted recently with Jakub concerning bug in argument saving in nested
call and -maccumulate-outgoing-args.  I was under impression that we
should no longer produce the nested calls out of ter but aparently it is
still being done (that results in inferrior code quality too as we can't
generated nested calls very sanely)

Also can you also, please, point me closer to place in .optimized dump
where the misscompilation happens?  THere seems to be couple of lo calls
around.  I will be mostly offline tomorrow but should be able to fix it
day after that.

Thanks a lot!
Honza


-- 


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
  2005-10-02 16:20 ` [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
  2005-10-02 21:46 ` hubicka at ucw dot cz
@ 2005-10-02 21:55 ` ebotcazou at gcc dot gnu dot org
  2005-10-02 22:30 ` hubicka at ucw dot cz
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-10-02 21:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from ebotcazou at gcc dot gnu dot org  2005-10-02 21:55 -------
> Can you please check if -fno-tree-ter makes the bug go away?  We've
> chatted recently with Jakub concerning bug in argument saving in nested
> call and -maccumulate-outgoing-args.  I was under impression that we
> should no longer produce the nested calls out of ter but aparently it is
> still being done (that results in inferrior code quality too as we can't
> generated nested calls very sanely)

To back up your hypothesis, I can say that I'm *not* seeing the failures on
i586.


-- 

ebotcazou at gcc dot gnu dot org changed:

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


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2005-10-02 21:55 ` ebotcazou at gcc dot gnu dot org
@ 2005-10-02 22:30 ` hubicka at ucw dot cz
  2005-10-03  3:37 ` laurent at guerby dot net
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: hubicka at ucw dot cz @ 2005-10-02 22:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from hubicka at ucw dot cz  2005-10-02 22:30 -------
Subject: Re:  [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed
and decimal arithmetic broken

> 
> 
> ------- Comment #12 from ebotcazou at gcc dot gnu dot org  2005-10-02 21:55 -------
> > Can you please check if -fno-tree-ter makes the bug go away?  We've
> > chatted recently with Jakub concerning bug in argument saving in nested
> > call and -maccumulate-outgoing-args.  I was under impression that we
> > should no longer produce the nested calls out of ter but aparently it is
> > still being done (that results in inferrior code quality too as we can't
> > generated nested calls very sanely)
> 
> To back up your hypothesis, I can say that I'm *not* seeing the failures on
> i586.
That seems consistent.  i586 defaults to -mno-accumulate-outgoing-args.
const int x86_accumulate_outgoing_args = m_ATHLON_K8 | m_PENT4 | m_NOCONA |
m_PPRO;


Honza
> 
> 
> -- 
> 
> ebotcazou at gcc dot gnu dot org changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |ebotcazou at gcc dot gnu dot
>                    |                            |org
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24003
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.


-- 


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2005-10-02 22:30 ` hubicka at ucw dot cz
@ 2005-10-03  3:37 ` laurent at guerby dot net
  2005-10-05 20:08 ` [Bug middle-end/24003] " laurent at guerby dot net
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: laurent at guerby dot net @ 2005-10-03  3:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from laurent at guerby dot net  2005-10-03 03:37 -------
I confirm that on p.adb no-tree-ter does make the problem disappear, p.adb
works when I compile s-arit64 as follows:

gcc -c -O2 -gnatpg -fno-tree-ter s-arit64.adb

(I'll be away from email until wednesday).


-- 


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


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

* [Bug middle-end/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2005-10-03  3:37 ` laurent at guerby dot net
@ 2005-10-05 20:08 ` laurent at guerby dot net
  2005-10-22 21:58 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: laurent at guerby dot net @ 2005-10-05 20:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from laurent at guerby dot net  2005-10-05 20:08 -------
Created an attachment (id=9897)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9897&action=view)
-fdump-rtl-expand-details

s-arit64.adb.00.expand-normal : -O2 -gnatpg
s-arit64.adb.00.expand-no-tree-ter : -O2 -gnatpg -fno-tree-ter

Limited to function Scaled_Divide.


-- 


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


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

* [Bug middle-end/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2005-10-05 20:08 ` [Bug middle-end/24003] " laurent at guerby dot net
@ 2005-10-22 21:58 ` pinskia at gcc dot gnu dot org
  2005-10-24 16:33 ` ebotcazou at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-22 21:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from pinskia at gcc dot gnu dot org  2005-10-22 21:58 -------
This most likely can be produced using C code, just has not found a testcase
yet.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
   Target Milestone|---                         |4.1.0


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


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

* [Bug middle-end/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2005-10-22 21:58 ` pinskia at gcc dot gnu dot org
@ 2005-10-24 16:33 ` ebotcazou at gcc dot gnu dot org
  2005-10-24 19:37 ` laurent at guerby dot net
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-10-24 16:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from ebotcazou at gcc dot gnu dot org  2005-10-24 16:33 -------
Ouch! I cannot reproduce with a i586-suse-linux compiler configured with full
checking and gccflags="-O2 -march=i686".


-- 


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


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

* [Bug middle-end/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2005-10-24 16:33 ` ebotcazou at gcc dot gnu dot org
@ 2005-10-24 19:37 ` laurent at guerby dot net
  2005-10-24 21:05 ` ebotcazou at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: laurent at guerby dot net @ 2005-10-24 19:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from laurent at guerby dot net  2005-10-24 19:37 -------
Still seeing the failures on SuSE 9.3 i686 machine with
"-enable-languages=ada,c --enable-__cxa_atexit --disable-nls
--enable-threads=posix --disable-multilib" --enable-checking as of:

LAST_UPDATED: Mon Oct 24 17:22:09 UTC 2005

I have some patches from Richard Kenner in my tree though. Eric, did you manage
to reproduce the problem at all? 


-- 


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


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

* [Bug middle-end/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2005-10-24 19:37 ` laurent at guerby dot net
@ 2005-10-24 21:05 ` ebotcazou at gcc dot gnu dot org
  2005-10-24 21:31 ` laurent at guerby dot net
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-10-24 21:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from ebotcazou at gcc dot gnu dot org  2005-10-24 21:05 -------
> I have some patches from Richard Kenner in my tree though. Eric, did you manage
> to reproduce the problem at all? 

Nein. :-)  But I'll try a bit harder tomorrow and on various machines.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|ebotcazou at gcc dot gnu dot|
                   |org                         |
         AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-24 21:05:07
               date|                            |


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


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

* [Bug middle-end/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2005-10-24 21:05 ` ebotcazou at gcc dot gnu dot org
@ 2005-10-24 21:31 ` laurent at guerby dot net
  2005-10-25  9:26 ` ebotcazou at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: laurent at guerby dot net @ 2005-10-24 21:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from laurent at guerby dot net  2005-10-24 21:31 -------
Jan Hubicka told me on IRC that Jakub Jelinek is working on PR23775 which might
be related (or the same issue) as this one.


-- 


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


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

* [Bug middle-end/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2005-10-24 21:31 ` laurent at guerby dot net
@ 2005-10-25  9:26 ` ebotcazou at gcc dot gnu dot org
  2005-10-25 15:33 ` ebotcazou at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-10-25  9:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from ebotcazou at gcc dot gnu dot org  2005-10-25 09:26 -------
OK, confirmed with a pristine tree on i686.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2005-10-24 21:05:07         |2005-10-25 09:26:23
               date|                            |


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


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

* [Bug middle-end/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2005-10-25  9:26 ` ebotcazou at gcc dot gnu dot org
@ 2005-10-25 15:33 ` ebotcazou at gcc dot gnu dot org
  2005-10-31  5:52 ` [Bug middle-end/24003] [4.1 Regression] 17 ACATS regressions (fixed point or decimal artihmetic) mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-10-25 15:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from ebotcazou at gcc dot gnu dot org  2005-10-25 15:33 -------
Jan,

> Can you please check if -fno-tree-ter makes the bug go away?  We've
> chatted recently with Jakub concerning bug in argument saving in nested
> call and -maccumulate-outgoing-args.  I was under impression that we
> should no longer produce the nested calls out of ter but aparently it is
> still being done (that results in inferrior code quality too as we can't
> generated nested calls very sanely)

Would that be an acceptable fix (not rematerializing nested calls)?

> Also can you also, please, point me closer to place in .optimized dump
> where the misscompilation happens?

 <L12>:;
-  temp.456 = d[3]{lb: 1 sz: 4};
-  t1.427 = system__arith_64__Oconcat (temp.433, temp.456);
-  temp.460 = d[4]{lb: 1 sz: 4};
-  D.712 = system__arith_64__Orem (t1.427, zlo);
-  D.713 = system__arith_64__lo (D.712);
-  t2.450 = system__arith_64__Oconcat (D.713, temp.460);
-  D.715 = system__arith_64__Odivide (t2.450, zlo);
-  D.716 = system__arith_64__lo (D.715);
-  D.717 = system__arith_64__Odivide (t1.427, zlo);
-  D.718 = system__arith_64__lo (D.717);
-  qu = system__arith_64__Oconcat (D.718, D.716);
+  t1.427 = system__arith_64__Oconcat (temp.433, d[3]{lb: 1 sz: 4});
+  t2.450 = system__arith_64__Oconcat (system__arith_64__lo
(system__arith_64__Orem (t1.427, zlo)), d[4]{lb: 1 sz: 4});
+  qu = system__arith_64__Oconcat (system__arith_64__lo
(system__arith_64__Odivide (t1.427, zlo)), system__arith_64__lo
(system__arith_64__Odivide (t2.450, zlo)));
   ru = system__arith_64__Orem (t2.450, zlo);
   goto <bb 37> (<L50>);

-: -O1 -fno-tree-ter
+: -O1


-- 


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


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

* [Bug middle-end/24003] [4.1 Regression] 17 ACATS regressions (fixed point or decimal artihmetic)
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2005-10-25 15:33 ` ebotcazou at gcc dot gnu dot org
@ 2005-10-31  5:52 ` mmitchel at gcc dot gnu dot org
  2005-11-11  7:43 ` ebotcazou at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31  5:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from mmitchel at gcc dot gnu dot org  2005-10-31 05:52 -------
Do we have a C/C++ testcase for this problem?

I'm going to leave this as P2 for now, given that we think it's not
language-dependent, and given that we seem close to a fix.


-- 


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


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

* [Bug middle-end/24003] [4.1 Regression] 17 ACATS regressions (fixed point or decimal artihmetic)
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2005-10-31  5:52 ` [Bug middle-end/24003] [4.1 Regression] 17 ACATS regressions (fixed point or decimal artihmetic) mmitchel at gcc dot gnu dot org
@ 2005-11-11  7:43 ` ebotcazou at gcc dot gnu dot org
  2005-11-11  7:44 ` ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 27+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-11-11  7:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #24 from ebotcazou at gcc dot gnu dot org  2005-11-11 07:43 -------
> Do we have a C/C++ testcase for this problem?

Yes, we do, attached.

> I'm going to leave this as P2 for now, given that we think it's not
> language-dependent, and given that we seem close to a fix.

Pretty serious bug indeed.


-- 


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


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

* [Bug middle-end/24003] [4.1 Regression] 17 ACATS regressions (fixed point or decimal artihmetic)
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2005-11-11  7:43 ` ebotcazou at gcc dot gnu dot org
@ 2005-11-11  7:44 ` ebotcazou at gcc dot gnu dot org
  2005-11-13  9:55 ` ebotcazou at gcc dot gnu dot org
  2005-11-13  9:57 ` ebotcazou at gcc dot gnu dot org
  17 siblings, 0 replies; 27+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-11-11  7:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #25 from ebotcazou at gcc dot gnu dot org  2005-11-11 07:44 -------
Created an attachment (id=10212)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10212&action=view)
C testcase.


-- 


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


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

* [Bug middle-end/24003] [4.1 Regression] 17 ACATS regressions (fixed point or decimal artihmetic)
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2005-11-11  7:44 ` ebotcazou at gcc dot gnu dot org
@ 2005-11-13  9:55 ` ebotcazou at gcc dot gnu dot org
  2005-11-13  9:57 ` ebotcazou at gcc dot gnu dot org
  17 siblings, 0 replies; 27+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-11-13  9:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #26 from ebotcazou at gcc dot gnu dot org  2005-11-13 09:55 -------
Subject: Bug 24003

Author: ebotcazou
Date: Sun Nov 13 09:55:11 2005
New Revision: 106860

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106860
Log:
        PR middle-end/24003
        * calls.c (expand_call): If TARGET is a MEM and some part of the
        argument area has been saved, force TARGET to a register.


Added:
    trunk/gcc/testsuite/gcc.dg/nested-calls-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/calls.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug middle-end/24003] [4.1 Regression] 17 ACATS regressions (fixed point or decimal artihmetic)
       [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2005-11-13  9:55 ` ebotcazou at gcc dot gnu dot org
@ 2005-11-13  9:57 ` ebotcazou at gcc dot gnu dot org
  17 siblings, 0 replies; 27+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-11-13  9:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #27 from ebotcazou at gcc dot gnu dot org  2005-11-13 09:57 -------
See http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00807.html


-- 

ebotcazou at gcc dot gnu dot org changed:

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


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
  2005-09-21 17:31 [Bug ada/24003] New: ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
                   ` (7 preceding siblings ...)
  2005-10-01 15:46 ` hubicka at gcc dot gnu dot org
@ 2005-10-01 16:04 ` laurent at guerby dot net
  8 siblings, 0 replies; 27+ messages in thread
From: laurent at guerby dot net @ 2005-10-01 16:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From laurent at guerby dot net  2005-10-01 16:04 -------
Ok, no need to revert it right now. I'm trying to reduce it to something
standalone that doesn't call the Ada runtime.

-- 


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
  2005-09-21 17:31 [Bug ada/24003] New: ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
                   ` (6 preceding siblings ...)
  2005-09-29 21:16 ` christian dot joensson at gmail dot com
@ 2005-10-01 15:46 ` hubicka at gcc dot gnu dot org
  2005-10-01 16:04 ` laurent at guerby dot net
  8 siblings, 0 replies; 27+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2005-10-01 15:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hubicka at gcc dot gnu dot org  2005-10-01 15:45 -------
Well, if the exception is never raised, the difference in EH code generation is probably not an issue.
Reverting the patch is definitly possible (there is nothing dependent on it and except for one or two PRs exposing problems in libcall mechanizm it only results
in better code.  However this is almost definitly previously latent bug (we just disable RTL level optimizatoin), I would like to have some understanding to what is going wrong.

Honza

-- 


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
  2005-09-21 17:31 [Bug ada/24003] New: ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
                   ` (5 preceding siblings ...)
  2005-09-29 21:08 ` laurent at guerby dot net
@ 2005-09-29 21:16 ` christian dot joensson at gmail dot com
  2005-10-01 15:46 ` hubicka at gcc dot gnu dot org
  2005-10-01 16:04 ` laurent at guerby dot net
  8 siblings, 0 replies; 27+ messages in thread
From: christian dot joensson at gmail dot com @ 2005-09-29 21:16 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |christian dot joensson at
                   |                            |gmail dot com


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
  2005-09-21 17:31 [Bug ada/24003] New: ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
                   ` (4 preceding siblings ...)
  2005-09-27 22:22 ` hubicka at ucw dot cz
@ 2005-09-29 21:08 ` laurent at guerby dot net
  2005-09-29 21:16 ` christian dot joensson at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: laurent at guerby dot net @ 2005-09-29 21:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From laurent at guerby dot net  2005-09-29 21:08 -------
A priori no exception is ever raised in this test. Who could help on this one?
Is reverting this patch an option?

Laurent

-- 


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
  2005-09-21 17:31 [Bug ada/24003] New: ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
                   ` (3 preceding siblings ...)
  2005-09-23 19:46 ` laurent at guerby dot net
@ 2005-09-27 22:22 ` hubicka at ucw dot cz
  2005-09-29 21:08 ` laurent at guerby dot net
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: hubicka at ucw dot cz @ 2005-09-27 22:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hubicka at ucw dot cz  2005-09-27 22:22 -------
Subject: Re:  [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken

> 
> ------- Additional Comments From laurent at guerby dot net  2005-09-23 19:46 -------
> Beginning of the -fdump-tree-all diff before and after patch.
> 
> -- before/s-arit64.adb.00.expand       2005-09-23 20:01:11.000000000 +0200
> +++ after/s-arit64.adb.00.expand        2005-09-23 19:41:23.000000000 +0200
> @@ -2795,143 +2795,119 @@
>  (call_insn/u 18 17 19 (set (reg:SI 0 ax)
>          (call (mem:QI (symbol_ref:SI ("system__arith_64__hi") [flags 0x3]
> <function_decl 0x40196d80 system__arith_64__hi>) [0 S1 A8])
>              (const_int 8 [0x8]))) -1 (nil)
> -    (nil)
> +    (expr_list:REG_EH_REGION (const_int 0 [0x0])
> +        (nil))

While trying to track down this problem I got lost in the handling of EH
and libcall blocks.  It looks like emit_libcall can detect possibly
trapping libcalls but elliminates the the EH_REGION note when
-fnon-call-exceptions is set.  When it is not the EH_REGION notes are
set to -1, while for non-trapping calls in calls.c the region 0 is used.
I am somwhat lost in this code and it seems to me that the failures
might come from different EH delivery.

Honza


-- 


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
  2005-09-21 17:31 [Bug ada/24003] New: ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
                   ` (2 preceding siblings ...)
  2005-09-23 19:44 ` pinskia at gcc dot gnu dot org
@ 2005-09-23 19:46 ` laurent at guerby dot net
  2005-09-27 22:22 ` hubicka at ucw dot cz
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: laurent at guerby dot net @ 2005-09-23 19:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From laurent at guerby dot net  2005-09-23 19:46 -------
Beginning of the -fdump-tree-all diff before and after patch.

-- before/s-arit64.adb.00.expand       2005-09-23 20:01:11.000000000 +0200
+++ after/s-arit64.adb.00.expand        2005-09-23 19:41:23.000000000 +0200
@@ -2795,143 +2795,119 @@
 (call_insn/u 18 17 19 (set (reg:SI 0 ax)
         (call (mem:QI (symbol_ref:SI ("system__arith_64__hi") [flags 0x3]
<function_decl 0x40196d80 system__arith_64__hi>) [0 S1 A8])
             (const_int 8 [0x8]))) -1 (nil)
-    (nil)
+    (expr_list:REG_EH_REGION (const_int 0 [0x0])
+        (nil))
     (expr_list:REG_DEP_TRUE (use (mem/i:DI (reg/f:SI 56 virtual-outgoing-args)
[0 S8 A32]))
         (nil)))

-(insn 19 18 20 (set (reg:SI 73)
+(insn 19 18 0 (set (reg/v:SI 66 [ xhi ])
         (reg:SI 0 ax)) -1 (nil)
-    (expr_list:REG_EQUAL (expr_list:REG_DEP_TRUE (symbol_ref:SI
("system__arith_64__hi") [flags 0x3] <function_decl 0x40196d80
system__arith_64__hi>)
-            (expr_list:REG_DEP_TRUE (reg/v:DI 67 [ xu ])
-                (nil)))
-        (nil)))
-
-(insn 20 19 0 (set (reg/v:SI 66 [ xhi ])
-        (reg:SI 73)) -1 (nil)
     (nil))

 ;; xlo = system__arith_64__lo (xu)
-(insn 22 20 23 (set (mem:DI (reg/f:SI 56 virtual-outgoing-args) [0 S8 A32])
+(insn 21 19 22 (set (mem:DI (reg/f:SI 56 virtual-outgoing-args) [0 S8 A32])
         (reg/v:DI 67 [ xu ])) -1 (nil)
     (nil))

-(call_insn/u 23 22 24 (set (reg:SI 0 ax)
+(call_insn/u 22 21 23 (set (reg:SI 0 ax)
         (call (mem:QI (symbol_ref:SI ("system__arith_64__lo") [flags 0x3]
<function_decl 0x40196d00 system__arith_64__lo>) [0 S1 A8])
             (const_int 8 [0x8]))) -1 (nil)
-    (nil)
+    (expr_list:REG_EH_REGION (const_int 0 [0x0])
+        (nil))
     (expr_list:REG_DEP_TRUE (use (mem/i:DI (reg/f:SI 56 virtual-outgoing-args)
[0 S8 A32]))
         (nil)))
...

-- 


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
  2005-09-21 17:31 [Bug ada/24003] New: ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
  2005-09-21 20:26 ` [Bug ada/24003] [4.1 Regression] " laurent at guerby dot net
  2005-09-23 17:33 ` laurent at guerby dot net
@ 2005-09-23 19:44 ` pinskia at gcc dot gnu dot org
  2005-09-23 19:46 ` laurent at guerby dot net
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-23 19:44 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|                            |i686-pc-linux-gnu


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
  2005-09-21 17:31 [Bug ada/24003] New: ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
  2005-09-21 20:26 ` [Bug ada/24003] [4.1 Regression] " laurent at guerby dot net
@ 2005-09-23 17:33 ` laurent at guerby dot net
  2005-09-23 19:44 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: laurent at guerby dot net @ 2005-09-23 17:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From laurent at guerby dot net  2005-09-23 17:33 -------
The 17 x86 only regressions were introduced by this patch, Jan asked me to look
for generated libcalls, more info soon.

2005-09-18  Jan Hubicka  <jh@suse.cz>

	* calls.c (flags_from_decl_or_type): Do not set ECF_LIBCALL_BLOCK.

Index: calls.c
===================================================================
RCS file: /opt/gcc/rsync/gcc-cvs/gcc/gcc/calls.c,v
retrieving revision 1.400
retrieving revision 1.401
diff -u -r1.400 -r1.401
--- calls.c     31 Aug 2005 03:33:23 -0000      1.400
+++ calls.c     18 Sep 2005 17:14:24 -0000      1.401
@@ -582,7 +582,7 @@

       /* The function exp may have the `pure' attribute.  */
       if (DECL_IS_PURE (exp))
-       flags |= ECF_PURE | ECF_LIBCALL_BLOCK;
+       flags |= ECF_PURE;

       if (DECL_IS_NOVOPS (exp))
        flags |= ECF_NOVOPS;
@@ -591,7 +591,7 @@
        flags |= ECF_NOTHROW;

       if (TREE_READONLY (exp) && ! TREE_THIS_VOLATILE (exp))
-       flags |= ECF_LIBCALL_BLOCK | ECF_CONST;
+       flags |= ECF_CONST;

       flags = special_function_p (exp, flags);
     }
@@ -606,7 +606,7 @@
   if (TREE_CODE (type) == FUNCTION_TYPE && TYPE_RETURNS_STACK_DEPRESSED (type))
     {
       flags |= ECF_SP_DEPRESSED;
-      flags &= ~(ECF_PURE | ECF_CONST | ECF_LIBCALL_BLOCK);
+      flags &= ~(ECF_PURE | ECF_CONST);
     }

   return flags;


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


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


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

* [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
  2005-09-21 17:31 [Bug ada/24003] New: ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
@ 2005-09-21 20:26 ` laurent at guerby dot net
  2005-09-23 17:33 ` laurent at guerby dot net
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: laurent at guerby dot net @ 2005-09-21 20:26 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kenner at vlsi1 dot ultra
                   |                            |dot nyu dot edu
            Summary|ACATS FAIL 17 regressions on|[4.1 Regression] ACATS FAIL
                   |x86-linux, fixed and decimal|17 regressions on x86-linux,
                   |arithmetic broken           |fixed and decimal arithmetic
                   |                            |broken


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


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

end of thread, other threads:[~2005-11-13  9:57 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
2005-10-02 16:20 ` [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
2005-10-02 21:46 ` hubicka at ucw dot cz
2005-10-02 21:55 ` ebotcazou at gcc dot gnu dot org
2005-10-02 22:30 ` hubicka at ucw dot cz
2005-10-03  3:37 ` laurent at guerby dot net
2005-10-05 20:08 ` [Bug middle-end/24003] " laurent at guerby dot net
2005-10-22 21:58 ` pinskia at gcc dot gnu dot org
2005-10-24 16:33 ` ebotcazou at gcc dot gnu dot org
2005-10-24 19:37 ` laurent at guerby dot net
2005-10-24 21:05 ` ebotcazou at gcc dot gnu dot org
2005-10-24 21:31 ` laurent at guerby dot net
2005-10-25  9:26 ` ebotcazou at gcc dot gnu dot org
2005-10-25 15:33 ` ebotcazou at gcc dot gnu dot org
2005-10-31  5:52 ` [Bug middle-end/24003] [4.1 Regression] 17 ACATS regressions (fixed point or decimal artihmetic) mmitchel at gcc dot gnu dot org
2005-11-11  7:43 ` ebotcazou at gcc dot gnu dot org
2005-11-11  7:44 ` ebotcazou at gcc dot gnu dot org
2005-11-13  9:55 ` ebotcazou at gcc dot gnu dot org
2005-11-13  9:57 ` ebotcazou at gcc dot gnu dot org
2005-09-21 17:31 [Bug ada/24003] New: ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken laurent at guerby dot net
2005-09-21 20:26 ` [Bug ada/24003] [4.1 Regression] " laurent at guerby dot net
2005-09-23 17:33 ` laurent at guerby dot net
2005-09-23 19:44 ` pinskia at gcc dot gnu dot org
2005-09-23 19:46 ` laurent at guerby dot net
2005-09-27 22:22 ` hubicka at ucw dot cz
2005-09-29 21:08 ` laurent at guerby dot net
2005-09-29 21:16 ` christian dot joensson at gmail dot com
2005-10-01 15:46 ` hubicka at gcc dot gnu dot org
2005-10-01 16:04 ` laurent at guerby dot net

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