From: Andreas Krebbel Date: Fri, 13 Apr 2018 09:14:32 +0000 (+0000) Subject: IBM Z: Get rid of target specific C++ testcase X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f2131a9b63ff3727980caf6131d77c5d632d2fd;p=gcc.git IBM Z: Get rid of target specific C++ testcase gcc/testsuite/ChangeLog: 2018-04-13 Andreas Krebbel PR testsuite/85326 * gcc.target/s390/pr77822-1.C: Rename to ... * gcc.target/s390/pr77822-1.c: ... this. Add asm scan check. * gcc.target/s390/pr77822-2.c: Add asm scan check. * gcc.target/s390/s390.exp: Remove C from testcase regexps. From-SVN: r259369 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 20b3d2c13f7..7ab5274d295 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2018-04-13 Andreas Krebbel + + PR testsuite/85326 + * gcc.target/s390/pr77822-1.C: Rename to ... + * gcc.target/s390/pr77822-1.c: ... this. Add asm scan check. + * gcc.target/s390/pr77822-2.c: Add asm scan check. + * gcc.target/s390/s390.exp: Remove C from testcase regexps. + 2018-04-13 Jan Hubicka PR lto/71991 diff --git a/gcc/testsuite/gcc.target/s390/pr77822-1.C b/gcc/testsuite/gcc.target/s390/pr77822-1.C deleted file mode 100644 index bd5a9b4abd8..00000000000 --- a/gcc/testsuite/gcc.target/s390/pr77822-1.C +++ /dev/null @@ -1,21 +0,0 @@ -/* Regression test for PR/77822. */ - -/* { dg-do compile } */ -/* { dg-options "-O3 -march=zEC12" } */ - -class A { - void m_fn1(); - char m_datawidth; - char m_subunits; - int m_subunit_infos[]; -}; -int a; -long b; -void A::m_fn1() { - int c = 32, d = m_datawidth / c; - for (int e = 0; e < d; e++) { - int f = e * 32; - if (b >> f & 1) - m_subunit_infos[m_subunits] = a; - } -} diff --git a/gcc/testsuite/gcc.target/s390/pr77822-1.c b/gcc/testsuite/gcc.target/s390/pr77822-1.c new file mode 100644 index 00000000000..9bf7bf4638b --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/pr77822-1.c @@ -0,0 +1,23 @@ +/* Regression test for PR/77822. */ + +/* { dg-do compile } */ +/* { dg-options "-O3 -march=zEC12" } */ + +void m_fn1(); + +char m_datawidth; +char m_subunits; +int m_subunit_infos[1]; + +int a; +long b; +void m_fn1() { + int c = 32, d = m_datawidth / c; + for (int e = 0; e < d; e++) { + int f = e * 32; + if (b >> f & 1) + m_subunit_infos[m_subunits] = a; + } +} + +/* { dg-final { scan-assembler-not "risbg.*-\[0-9\]+\\\+1\n" } } */ diff --git a/gcc/testsuite/gcc.target/s390/pr77822-2.c b/gcc/testsuite/gcc.target/s390/pr77822-2.c index 6789152e30c..9a0fad224fe 100644 --- a/gcc/testsuite/gcc.target/s390/pr77822-2.c +++ b/gcc/testsuite/gcc.target/s390/pr77822-2.c @@ -305,3 +305,5 @@ void sizepos_c_13 (signed char b) if (b >> 13 & 1) g = b; } + +/* { dg-final { scan-assembler-not "risbg.*-\[0-9\]+\\\+1\n" } } */ diff --git a/gcc/testsuite/gcc.target/s390/s390.exp b/gcc/testsuite/gcc.target/s390/s390.exp index bb13bfd33d2..93c570af2a6 100644 --- a/gcc/testsuite/gcc.target/s390/s390.exp +++ b/gcc/testsuite/gcc.target/s390/s390.exp @@ -199,23 +199,26 @@ dg-init set md_tests $srcdir/$subdir/md/*.c +# C++ tests belong into g++.dg with a target check. Do NOT add C to +# these regexps! + # Main loop. -dg-runtest [lsort [prune [glob -nocomplain $srcdir/$subdir/*.{c,S,C}] \ +dg-runtest [lsort [prune [glob -nocomplain $srcdir/$subdir/*.{c,S}] \ $md_tests]] "" $DEFAULT_CFLAGS -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*vector*/*.{c,S,C}]] \ +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*vector*/*.{c,S}]] \ "" $DEFAULT_CFLAGS -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/target-attribute/*.{c,S,C}]] \ +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/target-attribute/*.{c,S}]] \ "" $DEFAULT_CFLAGS -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/arch12/*.{c,S,C}]] \ +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/arch12/*.{c,S}]] \ "" "-O3 -march=arch12 -mzarch" dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vxe/*.{c,S}]] \ "" "-O3 -march=arch12 -mzarch" -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/md/*.{c,S,C}]] \ +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/md/*.{c,S}]] \ "" $DEFAULT_CFLAGS # Additional hotpatch torture tests.