]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/54694 (internal compiler error: in dwarf2out_frame_debug_expr, at dwarf2o...
authorJakub Jelinek <jakub@redhat.com>
Thu, 16 Jan 2014 19:15:46 +0000 (20:15 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 16 Jan 2014 19:15:46 +0000 (20:15 +0100)
PR debug/54694
* gcc.target/i386/pr9771-1.c (main): Rename to...
(real_main): ... this.  Add __asm name "main".
(ASMNAME, ASMNAME2, STRING): Define.

From-SVN: r206679

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr9771-1.c

index 868593b1133997fc4630e0d1a9786825052ce137..b874c5756acb7d056c60aefe1b0391dc9573e050 100644 (file)
@@ -1,3 +1,10 @@
+2014-01-16  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/54694
+       * gcc.target/i386/pr9771-1.c (main): Rename to...
+       (real_main): ... this.  Add __asm name "main".
+       (ASMNAME, ASMNAME2, STRING): Define.
+
 2014-01-16  Nick Clifton  <nickc@redhat.com>
 
        PR middle-end/28865
index 520259c965c76014e17aefa3c3d30c4eecc936b6..9fa21ff0fa0d72b6b12c48c8ffff7c8c39eddc8a 100644 (file)
@@ -45,7 +45,17 @@ void test(void)
   exit(0);
 }
 
-int main()
+/* main usually performs dynamic realignment of the stack in case
+   _start would fail to properly align the stack, but for dynamic
+   stack realignment we need frame pointer which is incompatible
+   with -ffixed-ebp and the global register var.  So, cheat here
+   and hide from the compiler that main is really main.  */
+#define ASMNAME(cname)  ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) STRING (prefix) cname
+#define STRING(x)    #x
+int real_main() __asm (ASMNAME ("main"));
+
+int real_main()
 {
   test();
   return 0;