]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR middle-end/36282 (Spurious warning "asm declaration ignored due to...
authorJakub Jelinek <jakub@redhat.com>
Thu, 10 Apr 2014 07:47:55 +0000 (09:47 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 10 Apr 2014 07:47:55 +0000 (09:47 +0200)
commite6fbd3c42e4bfed02d24249bdd5ee304f07797ae
treee071b2d56d69157203bf4f079c1653fcc59cd70a
parent03251c6ad572d52b06a7560337ae906752badea2
backport: re PR middle-end/36282 (Spurious warning "asm declaration ignored due to conflict with previous rename")

Backport from mainline
2014-03-13  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/36282
* c-pragma.c (apply_pragma_weak): Only look at
TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
DECL_ASSEMBLER_NAME_SET_P (decl).
(maybe_apply_pending_pragma_weaks): Exit early if
vec_safe_is_empty (pending_weaks) rather than only when
!pending_weaks.
(maybe_apply_pragma_weak): Likewise.  If !DECL_ASSEMBLER_NAME_SET_P,
set assembler name back to NULL afterwards.

* c-c++-common/pr36282-1.c: New test.
* c-c++-common/pr36282-2.c: New test.
* c-c++-common/pr36282-3.c: New test.
* c-c++-common/pr36282-4.c: New test.

From-SVN: r209263
gcc/c-family/ChangeLog
gcc/c-family/c-pragma.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/pr36282-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/pr36282-2.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/pr36282-3.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/pr36282-4.c [new file with mode: 0644]