https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82920

            Bug ID: 82920
           Summary: cet test failures on darwin
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dominiq at lps dot ens.fr
                CC: hjl at gcc dot gnu.org, iains at gcc dot gnu.org
  Target Milestone: ---

The following tests are failing on x86_64-apple-darwin16 with both -m32 and
-m64:

FAIL: g++.dg/cet-notrack-1.C  -std=gnu++11  scan-assembler-times \\tcall[
\\t]+puts 2 (found 0 times)
FAIL: g++.dg/cet-notrack-1.C  -std=gnu++14  scan-assembler-times \\tcall[
\\t]+puts 2 (found 0 times)
FAIL: g++.dg/cet-notrack-1.C  -std=gnu++98  scan-assembler-times \\tcall[
\\t]+puts 2 (found 0 times)
FAIL: gcc.target/i386/cet-notrack-icf-1.c scan-assembler set[ \\t]+fn2,fn1
FAIL: gcc.target/i386/cet-notrack-icf-1.c scan-assembler set[ \\t]+fn3,fn1
FAIL: gcc.target/i386/cet-notrack-icf-2.c scan-assembler set[ \\t]+fn2,fn1
FAIL: gcc.target/i386/cet-notrack-icf-3.c scan-assembler set[ \\t]+fn2,fn1
FAIL: gcc.target/i386/cet-notrack-icf-3.c scan-assembler set[ \\t]+fn3,fn1
FAIL: gcc.target/i386/cet-notrack-icf-4.c scan-assembler set[ \\t]+fn3,fn1
FAIL: gcc.target/i386/cet-sjlj-3.c scan-assembler-times call\\tlongjmp 1 (found
0 times)
FAIL: gcc.target/i386/cet-sjlj-5.c scan-assembler-times call\\tlongjmp 1 (found
0 times)

In addition the following tests fail with -m32:

FAIL: gcc.target/i386/cet-notrack-5a.c scan-assembler-not \\tcall[ \\t]+
FAIL: gcc.target/i386/cet-notrack-5b.c scan-assembler-times \\tcall[ \\t]+ 1
(found 2 times)
FAIL: gcc.target/i386/cet-notrack-6b.c scan-assembler-not \\tcall[ \\t]+

The following patch fixes the corresponding tests, but I have no idea about
what to do with the others:

--- ../_clean/gcc/testsuite/g++.dg/cet-notrack-1.C      2017-10-26
07:16:20.000000000 +0200
+++ gcc/testsuite/g++.dg/cet-notrack-1.C        2017-11-08 23:51:55.000000000
+0100
@@ -1,7 +1,7 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
 /* { dg-options "-fcf-protection -mcet" } */
 /* { dg-final { scan-assembler "endbr32|endbr64" } } */
-/* { dg-final { scan-assembler-times "\tcall\[ \t]+puts" 2 } } */
+/* { dg-final { scan-assembler-times "\tcall\[ \t]+_?puts" 2 } } */
 /* { dg-final { scan-assembler-times "notrack call\[ \t]+" 1 } } */
 #include <stdio.h>
--- ../_clean/gcc/testsuite/gcc.target/i386/cet-sjlj-3.c        2017-10-26
07:16:18.000000000 +0200
+++ gcc/testsuite/gcc.target/i386/cet-sjlj-3.c  2017-11-08 23:55:15.000000000
+0100
@@ -3,7 +3,7 @@
 /* { dg-final { scan-assembler-times "endbr32" 4 { target ia32 } } } */
 /* { dg-final { scan-assembler-times "endbr64" 4 { target { ! ia32 } } } } */
 /* { dg-final { scan-assembler-times "call     _?setjmp" 1 } } */
-/* { dg-final { scan-assembler-times "call     longjmp" 1 } } */
+/* { dg-final { scan-assembler-times "call     _?longjmp" 1 } } */

 #include <stdio.h>
 #include <setjmp.h>
--- ../_clean/gcc/testsuite/gcc.target/i386/cet-sjlj-5.c        2017-10-26
07:16:18.000000000 +0200
+++ gcc/testsuite/gcc.target/i386/cet-sjlj-5.c  2017-11-08 23:55:30.000000000
+0100
@@ -3,7 +3,7 @@
 /* { dg-final { scan-assembler-times "endbr32" 2 { target ia32 } } } */
 /* { dg-final { scan-assembler-times "endbr64" 2 { target { ! ia32 } } } } */
 /* { dg-final { scan-assembler-times "call     _?setjmp" 1 } } */
-/* { dg-final { scan-assembler-times "call     longjmp" 1 } } */
+/* { dg-final { scan-assembler-times "call     _?longjmp" 1 } } */

 #include <stdio.h>
 #include <setjmp.h>

Reply via email to