public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
@ 2011-05-23 13:29 hjl.tools at gmail dot com
  2011-05-23 13:34 ` [Bug lto/49123] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2011-05-23 13:29 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] FAIL:
                    gcc.c-torture/execute/pr48973-[12].c
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com


On Linux/x86, revision 174063 gave:

FAIL: gcc.c-torture/execute/pr48973-1.c execution,  -O2 -flto
FAIL: gcc.c-torture/execute/pr48973-1.c execution,  -O2 -flto
FAIL: gcc.c-torture/execute/pr48973-1.c execution,  -O2 -flto
-flto-partition=none
FAIL: gcc.c-torture/execute/pr48973-1.c execution,  -O2 -flto
-flto-partition=none
FAIL: gcc.c-torture/execute/pr48973-2.c execution,  -O2 -flto
FAIL: gcc.c-torture/execute/pr48973-2.c execution,  -O2 -flto
FAIL: gcc.c-torture/execute/pr48973-2.c execution,  -O2 -flto
-flto-partition=none
FAIL: gcc.c-torture/execute/pr48973-2.c execution,  -O2 -flto
-flto-partition=none

revision 174054 is OK.


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

* [Bug lto/49123] [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
  2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
@ 2011-05-23 13:34 ` rguenth at gcc dot gnu.org
  2011-05-23 13:44 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-23 13:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-23 13:14:58 UTC ---
Also aborts w/o LTO but with -fwhole-program.


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

* [Bug lto/49123] [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
  2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
  2011-05-23 13:34 ` [Bug lto/49123] " rguenth at gcc dot gnu.org
@ 2011-05-23 13:44 ` rguenth at gcc dot gnu.org
  2011-05-23 13:45 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-23 13:44 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.05.23 13:17:55
   Target Milestone|---                         |4.6.1
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-23 13:17:55 UTC ---
Confirmed.  FRE does

 <bb 2>:
   s.f = 1;
-  D.2698_4 = s.f;
-  D.2699_5 = (unsigned int) D.2698_4;
-  if (D.2699_5 != 4294967295)
-    goto <bb 3>;
-  else
-    goto <bb 4>;
-
-<bb 3>:
+  D.2698_4 = 1;
+  D.2699_5 = 1;

so it fails to properly sign-extend D.2698_4.


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

* [Bug lto/49123] [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
  2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
  2011-05-23 13:34 ` [Bug lto/49123] " rguenth at gcc dot gnu.org
  2011-05-23 13:44 ` rguenth at gcc dot gnu.org
@ 2011-05-23 13:45 ` rguenth at gcc dot gnu.org
  2011-05-23 13:46 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-23 13:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-23 13:22:12 UTC ---
The 1 is non-canonical:

(gdb) call debug_tree ($1)
 <integer_cst 0x7ffff5b25eb0 type <integer_type 0x7ffff5b29540> constant 1>
(gdb) call debug_tree (0x7ffff5b29540)
 <integer_type 0x7ffff5b29540 public QI
    size <integer_cst 0x7ffff7e734d8 type <integer_type 0x7ffff7e860a8
bit_size_type> constant 8>
    unit size <integer_cst 0x7ffff7e73500 type <integer_type 0x7ffff7e86000
long unsigned int> constant 1>
    align 8 symtab 0 alias set -1 canonical type 0x7ffff5b29540 precision 1 min
<integer_cst 0x7ffff5b25690 -1> max <integer_cst 0x7ffff5b256b8 0>>
(gdb) p $1->int_cst.
common   int_cst  
(gdb) p $1->int_cst.int_cst 
$2 = {low = 1, high = 0}

built via build_int_cst, fixed on trunk by properly making that produce
canonical constants.


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

* [Bug lto/49123] [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
  2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2011-05-23 13:45 ` rguenth at gcc dot gnu.org
@ 2011-05-23 13:46 ` jakub at gcc dot gnu.org
  2011-05-23 13:52 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-23 13:46 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-23 13:30:21 UTC ---
Wonder if I'm not seeing it because my ld doesn't support plugins...


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

* [Bug lto/49123] [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
  2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2011-05-23 13:46 ` jakub at gcc dot gnu.org
@ 2011-05-23 13:52 ` rguenth at gcc dot gnu.org
  2011-05-23 14:17 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-23 13:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-23 13:25:03 UTC ---
A less intrusive variant of the patch might be suitable for backporting
(it doesn't touch the NULL type argument path) and fixes the testcase for me.

Index: gcc/tree.c
===================================================================
--- gcc/tree.c  (revision 174066)
+++ gcc/tree.c  (working copy)
@@ -1034,9 +1034,9 @@ build_int_cst (tree type, HOST_WIDE_INT
 {
   /* Support legacy code.  */
   if (!type)
-    type = integer_type_node;
+    return build_int_cst_wide (integer_type_node, low, low < 0 ? -1 : 0);

-  return build_int_cst_wide (type, low, low < 0 ? -1 : 0);
+  return double_int_to_tree (type, shwi_to_double_int (low));
 }

 /* Create an INT_CST node with a LOW value in TYPE.  The value is sign
extended


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

* [Bug lto/49123] [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
  2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2011-05-23 13:52 ` rguenth at gcc dot gnu.org
@ 2011-05-23 14:17 ` jakub at gcc dot gnu.org
  2011-05-23 14:23 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-23 14:17 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.1                       |---

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-23 13:36:00 UTC ---
(In reply to comment #4)
> A less intrusive variant of the patch might be suitable for backporting
> (it doesn't touch the NULL type argument path) and fixes the testcase for me.
> 
> Index: gcc/tree.c
> ===================================================================
> --- gcc/tree.c  (revision 174066)
> +++ gcc/tree.c  (working copy)
> @@ -1034,9 +1034,9 @@ build_int_cst (tree type, HOST_WIDE_INT
>  {
>    /* Support legacy code.  */
>    if (!type)
> -    type = integer_type_node;
> +    return build_int_cst_wide (integer_type_node, low, low < 0 ? -1 : 0);
> 
> -  return build_int_cst_wide (type, low, low < 0 ? -1 : 0);
> +  return double_int_to_tree (type, shwi_to_double_int (low));
>  }
> 
>  /* Create an INT_CST node with a LOW value in TYPE.  The value is sign
> extended

Alternatively you could call build_int_cst_type instead of build_int_cst in the
spot where FRE? calls it.  Guess that would be even safer to backport.


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

* [Bug lto/49123] [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
  2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2011-05-23 14:17 ` jakub at gcc dot gnu.org
@ 2011-05-23 14:23 ` rguenth at gcc dot gnu.org
  2011-05-23 15:20 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-23 14:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-23 13:56:49 UTC ---
That would be

Index: gcc/fold-const.c
===================================================================
--- gcc/fold-const.c    (revision 174066)
+++ gcc/fold-const.c    (working copy)
@@ -5954,7 +5954,7 @@ constant_boolean_node (int value, tree t
   else if (type == boolean_type_node)
     return value ? boolean_true_node : boolean_false_node;
   else
-    return build_int_cst (type, value);
+    return build_int_cst_type (type, value);
 }


which works for me as well.


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

* [Bug lto/49123] [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
  2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2011-05-23 14:23 ` rguenth at gcc dot gnu.org
@ 2011-05-23 15:20 ` hjl.tools at gmail dot com
  2011-05-23 20:55 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2011-05-23 15:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> 2011-05-23 14:36:44 UTC ---
(In reply to comment #5)
> Wonder if I'm not seeing it because my ld doesn't support plugins...

That is true.


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

* [Bug lto/49123] [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
  2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
                   ` (7 preceding siblings ...)
  2011-05-23 15:20 ` hjl.tools at gmail dot com
@ 2011-05-23 20:55 ` jakub at gcc dot gnu.org
  2011-05-23 20:56 ` jakub at gcc dot gnu.org
  2011-05-23 21:02 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-23 20:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-23 20:38:19 UTC ---
Author: jakub
Date: Mon May 23 20:38:17 2011
New Revision: 174088

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174088
Log:
    PR lto/49123
    * gcc.c-torture/execute/pr49123.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr49123.c
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug lto/49123] [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
  2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
                   ` (8 preceding siblings ...)
  2011-05-23 20:55 ` jakub at gcc dot gnu.org
@ 2011-05-23 20:56 ` jakub at gcc dot gnu.org
  2011-05-23 21:02 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-23 20:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-23 20:37:22 UTC ---
Author: jakub
Date: Mon May 23 20:37:18 2011
New Revision: 174087

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174087
Log:
    PR lto/49123
    * fold-const.c (constant_boolean_node): If type is non-NULL,
    use build_int_cst_type instead of build_int_cst.

    * gcc.c-torture/execute/pr49123.c: New test.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.c-torture/execute/pr49123.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/fold-const.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


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

* [Bug lto/49123] [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c
  2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
                   ` (9 preceding siblings ...)
  2011-05-23 20:56 ` jakub at gcc dot gnu.org
@ 2011-05-23 21:02 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-23 21:02 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.6.1

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-23 20:39:27 UTC ---
Fixed.


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

end of thread, other threads:[~2011-05-23 20:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23 13:29 [Bug lto/49123] New: [4.6 Regression] FAIL: gcc.c-torture/execute/pr48973-[12].c hjl.tools at gmail dot com
2011-05-23 13:34 ` [Bug lto/49123] " rguenth at gcc dot gnu.org
2011-05-23 13:44 ` rguenth at gcc dot gnu.org
2011-05-23 13:45 ` rguenth at gcc dot gnu.org
2011-05-23 13:46 ` jakub at gcc dot gnu.org
2011-05-23 13:52 ` rguenth at gcc dot gnu.org
2011-05-23 14:17 ` jakub at gcc dot gnu.org
2011-05-23 14:23 ` rguenth at gcc dot gnu.org
2011-05-23 15:20 ` hjl.tools at gmail dot com
2011-05-23 20:55 ` jakub at gcc dot gnu.org
2011-05-23 20:56 ` jakub at gcc dot gnu.org
2011-05-23 21:02 ` jakub at gcc dot gnu.org

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