public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/41658]  New: Execution testsuite fails with -O2 -fwhopr
@ 2009-10-10 16:00 danglin at gcc dot gnu dot org
  2009-10-10 17:09 ` [Bug lto/41658] " rguenth at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: danglin at gcc dot gnu dot org @ 2009-10-10 16:00 UTC (permalink / raw)
  To: gcc-bugs

FAIL: gcc.c-torture/execute/builtins/sprintf-chk.c execution,  -O2 -fwhopr
FAIL: gcc.c-torture/execute/builtins/stpcpy-chk.c execution,  -O2 -fwhopr
FAIL: gcc.c-torture/execute/builtins/strcpy-chk.c execution,  -O2 -fwhopr


-- 
           Summary: Execution testsuite fails with -O2 -fwhopr
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa-unknown-linux-gnu
  GCC host triplet: hppa-unknown-linux-gnu
GCC target triplet: hppa-unknown-linux-gnu


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


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

* [Bug lto/41658] Execution testsuite fails with -O2 -fwhopr
  2009-10-10 16:00 [Bug lto/41658] New: Execution testsuite fails with -O2 -fwhopr danglin at gcc dot gnu dot org
@ 2009-10-10 17:09 ` rguenth at gcc dot gnu dot org
  2009-12-11 14:25 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-10 17:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-10-10 17:08 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-10-10 17:08:53
               date|                            |


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


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

* [Bug lto/41658] Execution testsuite fails with -O2 -fwhopr
  2009-10-10 16:00 [Bug lto/41658] New: Execution testsuite fails with -O2 -fwhopr danglin at gcc dot gnu dot org
  2009-10-10 17:09 ` [Bug lto/41658] " rguenth at gcc dot gnu dot org
@ 2009-12-11 14:25 ` rguenth at gcc dot gnu dot org
  2009-12-11 14:33 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-11 14:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-12-11 14:25 -------
The issue with strcpy-chk.c is that with WHOPR we end up streaming

const char s1[] = "123";

as DECL_WEAK which causes string_constant () to not look at DECL_INITIAL
and thus the test fails.  Likely the other two are similar.

We do that here:

make_decl_one_only (decl=0xb77d0000, comdat_group=0xb77c8a64)
    at /home/richard/src/trunk/gcc/varasm.c:5765
5762    #ifdef MAKE_DECL_ONE_ONLY
5763          MAKE_DECL_ONE_ONLY (decl);
5764    #endif

which sets DECL_WEAK on elfos.  Called from

#0  make_decl_one_only (decl=0xb77d0000, comdat_group=0xb77c8a64)
    at /home/richard/src/trunk/gcc/varasm.c:5765
#1  0x083cbd8e in write_global_stream (ob=0x8dd8478, encoder=0x8d9a18c)
    at /home/richard/src/trunk/gcc/lto-streamer-out.c:2174

                  if (pointer_set_insert (decls_already_emitted, t))
                    make_decl_one_only (t, DECL_ASSEMBLER_NAME (t));

rather than making the decl one-only we should emit true external references
here (or for this particular case localize the variable if we know its
address is not refered to).  We could maybe also resort to TREE_ASM_WRITTEN
(that's the only thing that "fixes" this testcase).

This bug isn't particularly bad but the testsuite FAILs are annoying at least.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dnovillo at gcc dot gnu dot
                   |                            |org
  GCC build triplet|hppa-unknown-linux-gnu      |
   GCC host triplet|hppa-unknown-linux-gnu      |
 GCC target triplet|hppa-unknown-linux-gnu      |
           Keywords|                            |lto, missed-optimization


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


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

* [Bug lto/41658] Execution testsuite fails with -O2 -fwhopr
  2009-10-10 16:00 [Bug lto/41658] New: Execution testsuite fails with -O2 -fwhopr danglin at gcc dot gnu dot org
  2009-10-10 17:09 ` [Bug lto/41658] " rguenth at gcc dot gnu dot org
  2009-12-11 14:25 ` rguenth at gcc dot gnu dot org
@ 2009-12-11 14:33 ` rguenth at gcc dot gnu dot org
  2009-12-11 18:01 ` rguenth at gcc dot gnu dot org
  2009-12-11 18:01 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-11 14:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-12-11 14:33 -------
I'm going to test the TREE_ASM_WRITTEN variant.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-10-10 17:08:53         |2009-12-11 14:33:43
               date|                            |


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


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

* [Bug lto/41658] Execution testsuite fails with -O2 -fwhopr
  2009-10-10 16:00 [Bug lto/41658] New: Execution testsuite fails with -O2 -fwhopr danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-12-11 18:01 ` rguenth at gcc dot gnu dot org
@ 2009-12-11 18:01 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-11 18:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2009-12-11 18:00 -------
Subject: Bug 41658

Author: rguenth
Date: Fri Dec 11 18:00:24 2009
New Revision: 155174

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155174
Log:
2009-12-11  Richard Guenther  <rguenther@suse.de>

        PR lto/41658
        PR lto/41657
        * lto-streamer-out.c (write_global_stream): Do not make decls
        weak but resort to TREE_ASM_WRITTEN to avoid multiple definitions.
        Make sure to mark all decls that we have written.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lto-streamer-out.c


-- 


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


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

* [Bug lto/41658] Execution testsuite fails with -O2 -fwhopr
  2009-10-10 16:00 [Bug lto/41658] New: Execution testsuite fails with -O2 -fwhopr danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-12-11 14:33 ` rguenth at gcc dot gnu dot org
@ 2009-12-11 18:01 ` rguenth at gcc dot gnu dot org
  2009-12-11 18:01 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-11 18:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-12-11 18:00 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2009-12-11 18:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-10 16:00 [Bug lto/41658] New: Execution testsuite fails with -O2 -fwhopr danglin at gcc dot gnu dot org
2009-10-10 17:09 ` [Bug lto/41658] " rguenth at gcc dot gnu dot org
2009-12-11 14:25 ` rguenth at gcc dot gnu dot org
2009-12-11 14:33 ` rguenth at gcc dot gnu dot org
2009-12-11 18:01 ` rguenth at gcc dot gnu dot org
2009-12-11 18:01 ` rguenth at gcc dot gnu dot 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).