public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35330] [4.3/4.4/4.5/4.6/4.7 regression] ICE with invalid pragma weak
       [not found] <bug-35330-4@http.gcc.gnu.org/bugzilla/>
@ 2011-06-27 14:39 ` rguenth at gcc dot gnu.org
  2012-03-13 15:05 ` [Bug c/35330] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-27 14:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.6                       |4.4.7

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-27 12:14:21 UTC ---
4.3 branch is being closed, moving to 4.4.7 target.


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

* [Bug c/35330] [4.5/4.6/4.7/4.8 regression] ICE with invalid pragma weak
       [not found] <bug-35330-4@http.gcc.gnu.org/bugzilla/>
  2011-06-27 14:39 ` [Bug c/35330] [4.3/4.4/4.5/4.6/4.7 regression] ICE with invalid pragma weak rguenth at gcc dot gnu.org
@ 2012-03-13 15:05 ` jakub at gcc dot gnu.org
  2012-07-02 13:21 ` [Bug c/35330] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-13 15:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.4.7                       |4.5.4

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-13 12:47:47 UTC ---
4.4 branch is being closed, moving to 4.5.4 target.


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

* [Bug c/35330] [4.6/4.7/4.8 regression] ICE with invalid pragma weak
       [not found] <bug-35330-4@http.gcc.gnu.org/bugzilla/>
  2011-06-27 14:39 ` [Bug c/35330] [4.3/4.4/4.5/4.6/4.7 regression] ICE with invalid pragma weak rguenth at gcc dot gnu.org
  2012-03-13 15:05 ` [Bug c/35330] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org
@ 2012-07-02 13:21 ` rguenth at gcc dot gnu.org
  2013-04-12 15:18 ` [Bug c/35330] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-02 13:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.4                       |4.6.4


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

* [Bug c/35330] [4.7/4.8/4.9 regression] ICE with invalid pragma weak
       [not found] <bug-35330-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2012-07-02 13:21 ` [Bug c/35330] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
@ 2013-04-12 15:18 ` jakub at gcc dot gnu.org
  2014-06-12 13:48 ` [Bug c/35330] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 15:18 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.4                       |4.7.4

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 15:16:54 UTC ---
GCC 4.6.4 has been released and the branch has been closed.


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

* [Bug c/35330] [4.7/4.8/4.9/4.10 regression] ICE with invalid pragma weak
       [not found] <bug-35330-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2013-04-12 15:18 ` [Bug c/35330] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
@ 2014-06-12 13:48 ` rguenth at gcc dot gnu.org
  2014-12-19 13:33 ` [Bug c/35330] [4.8/4.9/5 " jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35330

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.4                       |4.8.4

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
The 4.7 branch is being closed, moving target milestone to 4.8.4.


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

* [Bug c/35330] [4.8/4.9/5 regression] ICE with invalid pragma weak
       [not found] <bug-35330-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-06-12 13:48 ` [Bug c/35330] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
@ 2014-12-19 13:33 ` jakub at gcc dot gnu.org
  2015-02-26 18:16 ` ktietz at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35330

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.4                       |4.8.5

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.


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

* [Bug c/35330] [4.8/4.9/5 regression] ICE with invalid pragma weak
       [not found] <bug-35330-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2014-12-19 13:33 ` [Bug c/35330] [4.8/4.9/5 " jakub at gcc dot gnu.org
@ 2015-02-26 18:16 ` ktietz at gcc dot gnu.org
  2015-02-26 18:22 ` ktietz at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-26 18:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35330

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |ktietz at gcc dot gnu.org

--- Comment #11 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Mine.


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

* [Bug c/35330] [4.8/4.9/5 regression] ICE with invalid pragma weak
       [not found] <bug-35330-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2015-02-26 18:16 ` ktietz at gcc dot gnu.org
@ 2015-02-26 18:22 ` ktietz at gcc dot gnu.org
  2015-02-27 11:29 ` ktietz at gcc dot gnu.org
  2015-02-27 11:33 ` ktietz at gcc dot gnu.org
  9 siblings, 0 replies; 10+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-26 18:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35330

--- Comment #12 from Kai Tietz <ktietz at gcc dot gnu.org> ---
issue seems to be that in declare_weak we don't check that DECL is actually
either a function, or a variable declaration.

Fix would be to add an error-message in declare_weak ().

Index: varasm.c
===================================================================
@@ -5398,6 +5399,12 @@ void
 declare_weak (tree decl)
 {
   gcc_assert (TREE_CODE (decl) != FUNCTION_DECL || !TREE_ASM_WRITTEN (decl));
+  if (TREE_CODE (decl) != FUNCTION_DECL && TREE_CODE (decl) != VAR_DECL)
+    {
+      error ("weak declaration of %q+D has to be either a function,"
+            " or a variable declaration", decl);
+      return;
+    }
   if (! TREE_PUBLIC (decl))
     error ("weak declaration of %q+D must be public", decl);
   else if (!TARGET_SUPPORTS_WEAK)


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

* [Bug c/35330] [4.8/4.9/5 regression] ICE with invalid pragma weak
       [not found] <bug-35330-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2015-02-26 18:22 ` ktietz at gcc dot gnu.org
@ 2015-02-27 11:29 ` ktietz at gcc dot gnu.org
  2015-02-27 11:33 ` ktietz at gcc dot gnu.org
  9 siblings, 0 replies; 10+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-27 11:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35330

--- Comment #13 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Author: ktietz
Date: Fri Feb 27 10:44:43 2015
New Revision: 221053

URL: https://gcc.gnu.org/viewcvs?rev=221053&root=gcc&view=rev
Log:
2015-02-27  Kai Tietz  <ktietz@redhat.com>

    PR c/35330
    * c-pragma.c (handle_pragma_weak): Do not try to create
    weak/alias of declarations not being function, or variable
    declarations.

2015-02-27  Kai Tietz  <ktietz@redhat.com>

    PR c/35330
    * gcc.dg/weak/weak-17.c: New file.


Added:
    trunk/gcc/testsuite/gcc.dg/weak/weak-17.c
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-pragma.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c/35330] [4.8/4.9/5 regression] ICE with invalid pragma weak
       [not found] <bug-35330-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2015-02-27 11:29 ` ktietz at gcc dot gnu.org
@ 2015-02-27 11:33 ` ktietz at gcc dot gnu.org
  9 siblings, 0 replies; 10+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-27 11:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35330

Kai Tietz <ktietz at gcc dot gnu.org> changed:

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

--- Comment #14 from Kai Tietz <ktietz at gcc dot gnu.org> ---
I don't intend to backport this change.  therefore I close as fixed.


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

end of thread, other threads:[~2015-02-27 10:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-35330-4@http.gcc.gnu.org/bugzilla/>
2011-06-27 14:39 ` [Bug c/35330] [4.3/4.4/4.5/4.6/4.7 regression] ICE with invalid pragma weak rguenth at gcc dot gnu.org
2012-03-13 15:05 ` [Bug c/35330] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org
2012-07-02 13:21 ` [Bug c/35330] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
2013-04-12 15:18 ` [Bug c/35330] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2014-06-12 13:48 ` [Bug c/35330] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:33 ` [Bug c/35330] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-02-26 18:16 ` ktietz at gcc dot gnu.org
2015-02-26 18:22 ` ktietz at gcc dot gnu.org
2015-02-27 11:29 ` ktietz at gcc dot gnu.org
2015-02-27 11:33 ` ktietz 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).