OSDN Git Service

gcc/
authorcarlos <carlos@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 Jan 2006 22:12:10 +0000 (22:12 +0000)
committercarlos <carlos@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 Jan 2006 22:12:10 +0000 (22:12 +0000)
2006-01-27  Carlos O'Donell  <carlos@codesourcery.com>

* c-pragma.c (init_pragma) : Call c_register_pragma_with_expansion
for pragma redefine_extname.

gcc/testsuite/

2006-01-27  Carlos O'Donell  <carlos@codesourcery.com>

* gcc.dg/pragma-re-4.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110308 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-pragma.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pragma-re-4.c [new file with mode: 0644]

index 7d4e319..b5cbc45 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-27  Carlos O'Donell  <carlos@codesourcery.com>
+
+       * c-pragma.c (init_pragma) : Call c_register_pragma_with_expansion
+       for pragma redefine_extname.
+
 2006-01-27  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/25864
index 5256758..39c4595 100644 (file)
@@ -817,7 +817,7 @@ init_pragma (void)
 
   c_register_pragma ("GCC", "diagnostic", handle_pragma_diagnostic);
 
-  c_register_pragma (0, "redefine_extname", handle_pragma_redefine_extname);
+  c_register_pragma_with_expansion (0, "redefine_extname", handle_pragma_redefine_extname);
   c_register_pragma (0, "extern_prefix", handle_pragma_extern_prefix);
 
 #ifdef REGISTER_TARGET_PRAGMAS
index ff4f007..50cc323 100644 (file)
@@ -1,3 +1,7 @@
+2006-01-27  Carlos O'Donell  <carlos@codesourcery.com>
+
+       * gcc.dg/pragma-re-4.c: New test.
+
 2005-01-27  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/25964
diff --git a/gcc/testsuite/gcc.dg/pragma-re-4.c b/gcc/testsuite/gcc.dg/pragma-re-4.c
new file mode 100644 (file)
index 0000000..9b5a26d
--- /dev/null
@@ -0,0 +1,18 @@
+/* Copyright (C) 2006 Free Software Foundation, Inc. */
+/* Contributed by Carlos O'Donell on 2006-01-27 */
+
+/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
+/* { dg-do compile { target *-*-solaris* } } */
+/* { dg-final { scan-assembler "_foo" } } */
+/* { dg-final { scan-assembler-not "_foo64" } } */
+
+#define foo     _foo
+#define foo64   _foo64
+extern int foo(void);
+extern int foo64(void);
+#pragma redefine_extname foo64 foo
+int
+bar()
+{
+        return (foo64());
+}