mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 03:50:26 +08:00
re PR c++/14962 (g++ ignores #pragma redefine_extname)
PR c++/14962 * c-pragma.c (handle_pragma_redefine_extname): Only change the assembler name of FUNCTION_DECLs and VAR_DECLs. From-SVN: r81610
This commit is contained in:
parent
3c4392aa5f
commit
92ff0c419a
@ -1,3 +1,9 @@
|
||||
2004-05-07 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
PR c++/14962
|
||||
* c-pragma.c (handle_pragma_redefine_extname): Only change
|
||||
the assembler name of FUNCTION_DECLs and VAR_DECLs.
|
||||
|
||||
2004-05-07 Uros Bizjak <uros@kss-loka.si>
|
||||
|
||||
* optabs.h (enum optab_index): Add new OTI_log1p.
|
||||
|
@ -377,7 +377,8 @@ handle_pragma_redefine_extname (cpp_reader *dummy ATTRIBUTE_UNUSED)
|
||||
warning ("junk at end of #pragma redefine_extname");
|
||||
|
||||
decl = identifier_global_value (oldname);
|
||||
if (decl && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd')
|
||||
if (decl && (TREE_CODE (decl) == FUNCTION_DECL
|
||||
|| TREE_CODE (decl) == VAR_DECL))
|
||||
{
|
||||
if (DECL_ASSEMBLER_NAME_SET_P (decl)
|
||||
&& DECL_ASSEMBLER_NAME (decl) != newname)
|
||||
|
@ -1,3 +1,7 @@
|
||||
2004-05-07 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* g++.dg/other/pragma-re-2.C: New test.
|
||||
|
||||
2004-05-07 Uros Bizjak <uros@kss-loka.si>
|
||||
|
||||
* gcc.dg/i386-387-1.c: Add new test for __builtin_fmod.
|
||||
|
25
gcc/testsuite/g++.dg/other/pragma-re-2.C
Normal file
25
gcc/testsuite/g++.dg/other/pragma-re-2.C
Normal file
@ -0,0 +1,25 @@
|
||||
/* PR c++/14962 */
|
||||
/* Originator: <phil@fsel.com> */
|
||||
|
||||
/* { dg-do compile { target *-*-solaris* } } */
|
||||
/* { dg-final { scan-assembler "new_name" } } */
|
||||
/* { dg-final { scan-assembler-not "old_name" } } */
|
||||
|
||||
#ifndef __PRAGMA_REDEFINE_EXTNAME
|
||||
#error
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
|
||||
struct old_name { int i; };
|
||||
|
||||
#pragma redefine_extname old_name new_name
|
||||
|
||||
int old_name(void);
|
||||
|
||||
}
|
||||
|
||||
int foo(void)
|
||||
{
|
||||
return old_name();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user