public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/24003] New: ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
@ 2005-09-21 17:31 laurent at guerby dot net
  2005-09-21 20:11 ` [Bug ada/24003] " laurent at guerby dot net
                   ` (11 more replies)
  0 siblings, 12 replies; 18+ messages in thread
From: laurent at guerby dot net @ 2005-09-21 17:31 UTC (permalink / raw)
  To: gcc-bugs

They all fail at runtime on x86-linux only (work on x86_64-linux), it happened
between

LAST_UPDATED: Fri Sep 16 18:47:13 UTC 2005
LAST_UPDATED: Tue Sep 20 19:42:32 UTC 2005

It looks like it's all fixed point or decimal artihmetic that gets wrong code
generated. One example

,.,. C45532J ACATS 2.5 05-09-21 10:53:40
---- C45532J FIXED POINT OPERATOR "/".
   * C45532J RESULT OF "/" OUTSIDE RESULT MODEL INTERVAL WHEN USING NO
                MODEL NUMBERS.
**** C45532J FAILED ****************************.

Complete list:

c45532j c45532l c45532m c45532n c45532o
c45532p ce3806g ce3806h ce3810b cxaa008
cxf2001 cxf2002 cxf2003 cxf2004 cxf2005
cxf2a02 cxg2022

-- 
           Summary: ACATS FAIL 17 regressions on x86-linux, fixed and
                    decimal arithmetic broken
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: laurent at guerby dot net
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

* [Bug ada/24003] 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:11 ` laurent at guerby dot net
  2005-09-21 20:16 ` laurent at guerby dot net
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: laurent at guerby dot net @ 2005-09-21 20:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From laurent at guerby dot net  2005-09-21 20:11 -------
Here is a reduced Ada testcase. -gnatdg show use of 64 bits, but in original
test case it was not the case, so it might be a slightly different bug.

$ cat > p.adb
procedure P is
   type T is delta 1.0 / (2 ** 32) range -1.0 .. 1.0;
   A : T := 0.25;
   B : T := 0.75;
   C : T := A / B;
begin
   if C = 0.0 then
      raise Program_Error;
   end if;
end P;
$ gnatmake p
gcc -c p.adb
gnatbind -x p.ali
gnatlink p.ali
$ ./p
raised PROGRAM_ERROR : p.adb:8 explicit raise


-- 


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


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

* [Bug ada/24003] 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:11 ` [Bug ada/24003] " laurent at guerby dot net
@ 2005-09-21 20:16 ` laurent at guerby dot net
  2005-09-21 20:26 ` [Bug ada/24003] [4.1 Regression] " laurent at guerby dot net
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: laurent at guerby dot net @ 2005-09-21 20:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From laurent at guerby dot net  2005-09-21 20:16 -------
Created an attachment (id=9787)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9787&action=view)
-fdump-tree-all

Andrew request.

-- 


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


^ permalink raw reply	[flat|nested] 18+ 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:11 ` [Bug ada/24003] " laurent at guerby dot net
  2005-09-21 20:16 ` laurent at guerby dot net
@ 2005-09-21 20:26 ` laurent at guerby dot net
  2005-09-21 20:26 ` [Bug ada/24003] " laurent at guerby dot net
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 18+ 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] 18+ messages in thread

* [Bug ada/24003] 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-21 20:26 ` [Bug ada/24003] [4.1 Regression] " laurent at guerby dot net
@ 2005-09-21 20:26 ` laurent at guerby dot net
  2005-09-23 17:33 ` [Bug ada/24003] [4.1 Regression] " laurent at guerby dot net
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: laurent at guerby dot net @ 2005-09-21 20:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From laurent at guerby dot net  2005-09-21 20:26 -------
"but in original test case it was not the case": I missed but there's also a
call to system.arith_64.scaled_divide in the original test case, so this is the
likely miscompiled function.

-- 


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


^ permalink raw reply	[flat|nested] 18+ 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-21 20:26 ` [Bug ada/24003] " 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)
  11 siblings, 0 replies; 18+ 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] 18+ 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-23 17:33 ` [Bug ada/24003] [4.1 Regression] " 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)
  11 siblings, 0 replies; 18+ 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] 18+ 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-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)
  11 siblings, 0 replies; 18+ 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] 18+ 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-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)
  11 siblings, 0 replies; 18+ 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] 18+ 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-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)
  11 siblings, 0 replies; 18+ 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] 18+ 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
                   ` (8 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
  11 siblings, 0 replies; 18+ 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] 18+ 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
                   ` (9 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
  11 siblings, 0 replies; 18+ 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] 18+ 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
                   ` (10 preceding siblings ...)
  2005-10-01 15:46 ` hubicka at gcc dot gnu dot org
@ 2005-10-01 16:04 ` laurent at guerby dot net
  11 siblings, 0 replies; 18+ 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] 18+ 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
  4 siblings, 0 replies; 18+ 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] 18+ 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
  4 siblings, 0 replies; 18+ 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] 18+ 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 ` 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
  4 siblings, 0 replies; 18+ 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] 18+ 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 ` 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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 18+ 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] 18+ 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 ` laurent at guerby dot net
  2005-10-02 21:46 ` hubicka at ucw dot cz
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 18+ 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] 18+ messages in thread

end of thread, other threads:[~2005-10-03  3:37 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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:11 ` [Bug ada/24003] " laurent at guerby dot net
2005-09-21 20:16 ` laurent at guerby dot net
2005-09-21 20:26 ` [Bug ada/24003] [4.1 Regression] " laurent at guerby dot net
2005-09-21 20:26 ` [Bug ada/24003] " laurent at guerby dot net
2005-09-23 17:33 ` [Bug ada/24003] [4.1 Regression] " 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
     [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
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

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