Use __asm__ rather than asm in gold testsuite
authorAlan Modra <amodra@gmail.com>
Tue, 16 Jun 2020 11:55:18 +0000 (21:25 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 16 Jun 2020 12:42:39 +0000 (22:12 +0930)
discard_locals_test.c:28:6: error: expected declaration specifiers or
‘...’ before string constant
 asm (".Lshould_be_discarded:");
      ^

* testsuite/discard_locals_test.c: Replace uses of asm with __asm__.
* testsuite/discard_locals_relocatable_test.c: Likewise.

gold/ChangeLog
gold/testsuite/discard_locals_relocatable_test.c
gold/testsuite/discard_locals_test.c

index 0b4532a32bfef950ef52daed7b107b16da92207b..d429e9debb3d7c695802a633c2e4ea29df3c8de1 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-16  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/discard_locals_test.c: Replace uses of asm with __asm__.
+       * testsuite/discard_locals_relocatable_test.c: Likewise.
+
 2020-06-16  Alan Modra  <amodra@gmail.com>
 
        * testsuite/Makefile.am (export_dynamic_plugin.o): Use CXXCOMPILE.
index 54f689af0c6cb9142b0fa2b7912292886869cf01..543b99757de8a41b317a7a733f3c89c32c064f4d 100644 (file)
 /* Local symbol format for generic ELF target. 
    Use GCC -Wa,-L option to preserve this local symbol
    in the output object file. */
-asm (".Lshould_be_discarded:");
+__asm__ (".Lshould_be_discarded:");
 
 #ifdef __powerpc__
 /* Test wants to keep one local.  Satisfy it.  */
 #ifdef __powerpc64__
-asm (".reloc 0,R_PPC64_NONE,.LC0");
+__asm__ (".reloc 0,R_PPC64_NONE,.LC0");
 #else
-asm (".reloc 0,R_PPC_NONE,.LC0");
+__asm__ (".reloc 0,R_PPC_NONE,.LC0");
 #endif
 #endif
 
index c27ea35e91ac7d853f01e4e57be4e58d3c8ca2f5..96c56511569cd14e0741599b52ae2f38d760ec5f 100644 (file)
    main program should override the shared library symbol.  */
 
 /* Local symbol format for generic ELF target. */
-asm (".Lshould_be_discarded:");
+__asm__ (".Lshould_be_discarded:");
 
 #ifdef __i386__
 /* Additional local symbol format for the i386 target. */
-asm (".Xshould_be_discarded:");
+__asm__ (".Xshould_be_discarded:");
 #endif
 
 int
@@ -37,4 +37,3 @@ main (void)
 {
   return 0;
 }
-