[Bug testsuite/48055] FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c compilation, -O2 -flto

2011-03-10 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48055

Uros Bizjak  changed:

   What|Removed |Added

  Component|lto |testsuite

--- Comment #2 from Uros Bizjak  2011-03-10 11:08:00 
UTC ---
(In reply to comment #1)
> This looks like a linker issue.  I remember seeing similar errors when
> using GNU ld and not gold.
> 
> And I don't think GCC produces intermediate files named ccc3QsSw.o.ironly.

Indeed. The new warning is generated due to the upgrade to binutils-2.21.

Following testsuite patch fixes the problem:

Index: gcc.c-torture/execute/builtins/memcpy-chk.c
===
--- gcc.c-torture/execute/builtins/memcpy-chk.c(revision 170823)
+++ gcc.c-torture/execute/builtins/memcpy-chk.c(working copy)
@@ -78,10 +78,10 @@
 abort ();
 }

-long buf1[64];
+static long buf1[64];
 char *buf2 = (char *) (buf1 + 32);
-long buf5[20];
-char buf7[20];
+static long buf5[20];
+static char buf7[20];

 void
 __attribute__((noinline))
Index: gcc.c-torture/execute/builtins/memmove-chk.c
===
--- gcc.c-torture/execute/builtins/memmove-chk.c(revision 170823)
+++ gcc.c-torture/execute/builtins/memmove-chk.c(working copy)
@@ -81,10 +81,10 @@
 abort ();
 }

-long buf1[64];
+static long buf1[64];
 char *buf2 = (char *) (buf1 + 32);
-long buf5[20];
-char buf7[20];
+static long buf5[20];
+static char buf7[20];

 void
 __attribute__((noinline))
Index: gcc.c-torture/execute/builtins/mempcpy-chk.c
===
--- gcc.c-torture/execute/builtins/mempcpy-chk.c(revision 170823)
+++ gcc.c-torture/execute/builtins/mempcpy-chk.c(working copy)
@@ -84,10 +84,10 @@
   mempcpy_disallowed = 0;
 }

-long buf1[64];
+static long buf1[64];
 char *buf2 = (char *) (buf1 + 32);
-long buf5[20];
-char buf7[20];
+static long buf5[20];
+static char buf7[20];

 void
 __attribute__((noinline))


[Bug testsuite/48055] FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c compilation, -O2 -flto

2011-03-10 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48055

--- Comment #3 from Richard Guenther  2011-03-10 
11:14:41 UTC ---
Are there conflicting definitions somewhere?  Then it would indeed be a
testsuite bug.


[Bug testsuite/48055] FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c compilation, -O2 -flto

2011-03-10 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48055

--- Comment #4 from Uros Bizjak  2011-03-10 12:09:50 
UTC ---
(In reply to comment #3)
> Are there conflicting definitions somewhere?  Then it would indeed be a
> testsuite bug.

No, these are the only definitions for the particular testcase.


[Bug testsuite/48055] FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c compilation, -O2 -flto

2011-03-10 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48055

--- Comment #5 from Jan Hubicka  2011-03-10 12:56:56 UTC 
---
> No, these are the only definitions for the particular testcase.
Hmm, in every case it is GNU ld bug - the GNU ld internal ironly section should
not be leaking
to user warnings. Please fill in GNU ld PR.

Honza


[Bug testsuite/48055] FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c compilation, -O2 -flto

2011-03-10 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48055

--- Comment #6 from Uros Bizjak  2011-03-10 14:39:57 
UTC ---
(In reply to comment #5)
> > No, these are the only definitions for the particular testcase.
> Hmm, in every case it is GNU ld bug - the GNU ld internal ironly section 
> should
> not be leaking
> to user warnings. Please fill in GNU ld PR.

Submitted as binutils PR 12564.

Anyway, should the patch be committed to gcc testsuite, since it doesn't change
the test and avoids the linker bug at the same time?

[1] http://sourceware.org/bugzilla/show_bug.cgi?id=12564


[Bug testsuite/48055] FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c compilation, -O2 -flto

2011-03-10 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48055

Uros Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #7 from Uros Bizjak  2011-03-10 16:51:35 
UTC ---
Linker bug, see also [1].

[1] http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00521.html


Re: [Bug testsuite/48055] FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c compilation, -O2 -flto

2011-03-10 Thread Jan Hubicka
> No, these are the only definitions for the particular testcase.
Hmm, in every case it is GNU ld bug - the GNU ld internal ironly section should 
not be leaking
to user warnings. Please fill in GNU ld PR.

Honza