public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/25795]  New: Proccessing the attribute externally_visible too early
@ 2006-01-15 16:45 pinskia at gcc dot gnu dot org
  2006-01-28  4:09 ` [Bug c/25795] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-15 16:45 UTC (permalink / raw)
  To: gcc-bugs

extern const char *mystr;       /* normally in a header */
const char *mystr __attribute__ ((externally_visible));
----------------------------------------
What happens is that we call cgraph_varpool_node from
handle_externally_visible_attribute
which adds the "second" decl (which will not exist soon).  And then we do a
merge with the second and first decls and get back the first decl and then we
use the first decl always.


-- 
           Summary: Proccessing the attribute externally_visible too early
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


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

* [Bug c/25795] Proccessing the attribute externally_visible too early
  2006-01-15 16:45 [Bug c/25795] New: Proccessing the attribute externally_visible too early pinskia at gcc dot gnu dot org
@ 2006-01-28  4:09 ` pinskia at gcc dot gnu dot org
  2006-07-24  0:16 ` hubicka at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-28  4:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-01-28 04:09 -------
Confirmed.


-- 

pinskia 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         |2006-01-28 04:09:43
               date|                            |


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


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

* [Bug c/25795] Proccessing the attribute externally_visible too early
  2006-01-15 16:45 [Bug c/25795] New: Proccessing the attribute externally_visible too early pinskia at gcc dot gnu dot org
  2006-01-28  4:09 ` [Bug c/25795] " pinskia at gcc dot gnu dot org
@ 2006-07-24  0:16 ` hubicka at gcc dot gnu dot org
  2006-08-15 21:08 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2006-07-24  0:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hubicka at gcc dot gnu dot org  2006-07-24 00:16 -------
Subject: Bug 25795

Author: hubicka
Date: Mon Jul 24 00:16:16 2006
New Revision: 115693

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115693
Log:
        PR c/25795
        PR c++/27369
        * cgraph.c (cgraph_varpool_nodes): Export.
        (decide_is_variable_needed): Ignored "used" attribute in
        unit-at-a-time mode.
        * cgraph.h (cgraph_varpool_nodes): Declare.
        * cgraphunit.c (decide_is_function_needed): Ignored "used" attribute in
        unit-at-a-time mode.

        * gcc.dg/pr25795.c: New test.
        * gcc.dg/pr25795-1.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/pr25795-1.c
    trunk/gcc/testsuite/gcc.dg/pr25795.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-common.c
    trunk/gcc/c-decl.c
    trunk/gcc/cgraph.c
    trunk/gcc/cgraph.h
    trunk/gcc/cgraphunit.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c/25795] Proccessing the attribute externally_visible too early
  2006-01-15 16:45 [Bug c/25795] New: Proccessing the attribute externally_visible too early pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-08-15 21:08 ` pinskia at gcc dot gnu dot org
@ 2006-08-15 21:08 ` pinskia at gcc dot gnu dot org
  2007-01-05 19:44 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-15 21:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-08-15 21:08 -------
*** Bug 28744 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dwmw2 at infradead dot org


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


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

* [Bug c/25795] Proccessing the attribute externally_visible too early
  2006-01-15 16:45 [Bug c/25795] New: Proccessing the attribute externally_visible too early pinskia at gcc dot gnu dot org
  2006-01-28  4:09 ` [Bug c/25795] " pinskia at gcc dot gnu dot org
  2006-07-24  0:16 ` hubicka at gcc dot gnu dot org
@ 2006-08-15 21:08 ` pinskia at gcc dot gnu dot org
  2006-08-15 21:08 ` pinskia at gcc dot gnu dot org
  2007-01-05 19:44 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-15 21:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-08-15 21:08 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.2.0


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


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

* [Bug c/25795] Proccessing the attribute externally_visible too early
  2006-01-15 16:45 [Bug c/25795] New: Proccessing the attribute externally_visible too early pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-08-15 21:08 ` pinskia at gcc dot gnu dot org
@ 2007-01-05 19:44 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-01-05 19:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2007-01-05 19:44 -------
Subject: Bug 25795

Author: rguenth
Date: Fri Jan  5 19:44:10 2007
New Revision: 120495

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120495
Log:
2007-01-05  Richard Guenther  <rguenther@suse.de>

        Backport from mainline:
        2006-06-24  Jan Hubicka  <jh@suse.cz>

        PR c/25795
        PR c++/27369
        * craph.c (cgraph_varpool_nodes): Export.
        (decide_is_variable_needed): Do not worry about "used" attribute.
        * cgraph.h (cgraph_varpool_nodes): Declare.
        * cgraphunit.c (decide_is_function_needed): Do not worry about "used"
        attribute.
        (process_function_and_variable_attributes): New function.
        (cgraph_finalize_compilation_unit): Call it.
        * c-decl.c (finish_decl): Do not worry about used attribute.
        * c-common.c (handle_externally_visible_attribute): Only validate.      

        * gcc.dg/pr25795.c: New testcase.
        * gcc.dg/pr25795-1.c: Likewise.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr25795-1.c
      - copied unchanged from r115693, trunk/gcc/testsuite/gcc.dg/pr25795-1.c
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr25795.c
      - copied unchanged from r115693, trunk/gcc/testsuite/gcc.dg/pr25795.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/c-common.c
    branches/gcc-4_1-branch/gcc/c-decl.c
    branches/gcc-4_1-branch/gcc/cgraph.c
    branches/gcc-4_1-branch/gcc/cgraph.h
    branches/gcc-4_1-branch/gcc/cgraphunit.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2007-01-05 19:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-15 16:45 [Bug c/25795] New: Proccessing the attribute externally_visible too early pinskia at gcc dot gnu dot org
2006-01-28  4:09 ` [Bug c/25795] " pinskia at gcc dot gnu dot org
2006-07-24  0:16 ` hubicka at gcc dot gnu dot org
2006-08-15 21:08 ` pinskia at gcc dot gnu dot org
2006-08-15 21:08 ` pinskia at gcc dot gnu dot org
2007-01-05 19:44 ` 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).