diff options
Diffstat (limited to 'gcc/testsuite')
80 files changed, 3235 insertions, 270 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4cd50cdef13..1ac009f2613 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,143 @@ +2015-11-10 Ilya Enkovich <enkovich.gnu@gmail.com> + + * gcc.target/i386/avx2-vec-mask-bit-not.c: New test. + +2015-11-10 Ilya Enkovich <enkovich.gnu@gmail.com> + + * gcc.dg/vect/slp-cond-5.c: New test. + +2015-11-10 Richard Biener <rguenther@suse.de> + + PR tree-optimization/68240 + * gcc.dg/torture/pr68240.c: New testcase. + +2015-11-10 Richard Biener <rguenther@suse.de> + + PR tree-optimization/56118 + * gcc.target/i386/pr56118.c: New testcase. + +2015-11-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + * gcc.target/aarch64/cond_op_imm_1.c: New test. + +2015-11-10 Eric Botcazou <ebotcazou@adacore.com> + + * gfortran.dg/pr68251.f90: New test. + +2015-11-09 Cesar Philippidis <cesar@codesourcery.com> + + * c-c++-common/goacc/routine-5.c: Enable c++ tests. + +2015-11-09 Martin Sebor <msebor@redhat.com> + + * init/new45.C: New test to verify that operator new is invoked + with or without overhead for a cookie. + + PR c++/67927 + * init/new44.C: New test for placement new expressions for arrays + with excessive number of elements. + + PR c++/67913 + * init/new43.C: New test for placement new expressions for arrays + with negative number of elements. + + * other/new-size-type.C: Expect array new expression with + an excessive number of elements to be rejected. + +2015-11-09 Nathan Sidwell <nathan@codesourcery.com> + + * c-c++-common/goacc/routine-1.c: New. + * c-c++-common/goacc/routine-2.c: New. + * c-c++-common/goacc/routine-3.c: New. + * c-c++-common/goacc/routine-4.c: New. + * c-c++-common/goacc/routine-5.c: New. + +2015-11-09 Eric Botcazou <ebotcazou@adacore.com> + + * gcc.target/sparc/sparc-ret.c: Rename to... + * gcc.target/sparc/sparc-ret-1.c: ...this. + * gcc.target/sparc/sparc-ret-2.c: New test. + +2015-11-09 Michael Meissner <meissner@linux.vnet.ibm.com> + + * lib/target-supports.exp (check_p8vector_hw_available): Split + long line. + (check_vsx_hw_available): Likewise. + (check_p9vector_hw_available): Add new checks for ISA 3.0 hardware + support and for PowerPC float128 support. + (check_p9modulo_hw_available): Likewise. + (check_ppc_float128_sw_available): Likewise. + (check_ppc_float128_hw_available): Likewise. + (check_effective_target_powerpc_p9vector_ok): Likewise. + (check_effective_target_powerpc_p9modulo_ok): Likewise. + (check_effective_target_powerpc_float128_sw_ok): Likewise. + (check_effective_target_powerpc_float128_hw_ok): Likewise. + (is-effective-target): Add new PowerPc targets. + (is-effective-target-keyword): Likewise. + (check_vect_support_and_set_flags): If we have ISA 3.0 vector + instructions, use it. + + * gcc.target/powerpc/mod-1.c: New test for ISA 3.0 instructions. + * gcc.target/powerpc/mod-2.c: Likewise. + * gcc.target/powerpc/ctz-1.c: Likewise. + * gcc.target/powerpc/ctz-2.c: Likewise. + * gcc.target/powerpc/extswsli-1.c: Likewise. + * gcc.target/powerpc/extswsli-2.c: Likewise. + * gcc.target/powerpc/extswsli-3.c: Likewise. + + * gcc.target/powerpc/fusion.c (fusion_vector): Move to fusion2.c + and allow the test on PowerPC LE. + * gcc.target/powerpc/fusion2.c (fusion_vector): Likewise. + * gcc.target/powerpc/fusion3.c: New file, test power9 fusion. + + * gcc.target/powerpc/float128-call.c: Use powerpc_float128_sw_ok + check instead of powerpc_vsx_ok. + * gcc.target/powerpc/float128-mix.c: Likewise. + +2015-11-09 Eric Botcazou <ebotcazou@adacore.com> + + * gcc.dg/sso/*.c: Robustify dg-output directives. + +2015-11-09 Eric Botcazou <ebotcazou@adacore.com> + + * g++.dg/ubsan/pr68259.C: New test. + +2015-11-09 Uros Bizjak <ubizjak@gmail.com> + + * g++.dg/cilk-plus/CK/pr66326.cc: Do not include cilk.h. + (main): Use _Cilk_spawn instead of cilk_spawn. + +2015-11-09 Thomas Schwinge <thomas@codesourcery.com> + + * gcc.target/i386/addr-space-3.c: Fix quoting in dg-final + scan-assembler directive. + +2015-11-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + PR target/68129 + * gcc.dg/pr68129_1.c: New test. + +2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com> + + PR debug/67192 + * gcc.dg/guality/pr67192.c (f3, f4): New functions. + (main): Invoke them. + +2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com> + + PR debug/67192 + * gcc.dg/guality/pr67192.c: New test. + +2015-11-09 Richard Biener <rguenther@suse.de> + + PR tree-optimization/68248 + * gcc.dg/torture/pr68248.c: New testcase. + +2015-11-09 Richard Biener <rguenther@suse.de> + + PR tree-optimization/56118 + * gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c: Adjust. + 2015-11-09 Thomas Preud'homme <thomas.preudhomme@arm.com> * gcc.target/arm/thumb2-slow-flash-data.c: Add missing typespec for diff --git a/gcc/testsuite/c-c++-common/goacc/routine-1.c b/gcc/testsuite/c-c++-common/goacc/routine-1.c new file mode 100644 index 00000000000..a5e0d696f7c --- /dev/null +++ b/gcc/testsuite/c-c++-common/goacc/routine-1.c @@ -0,0 +1,34 @@ + +#pragma acc routine gang +void gang (void) +{ +} + +#pragma acc routine worker +void worker (void) +{ +} + +#pragma acc routine vector +void vector (void) +{ +} + +#pragma acc routine seq +void seq (void) +{ +} + +int main () +{ + +#pragma acc parallel num_gangs (32) num_workers (32) vector_length (32) + { + gang (); + worker (); + vector (); + seq (); + } + + return 0; +} diff --git a/gcc/testsuite/c-c++-common/goacc/routine-2.c b/gcc/testsuite/c-c++-common/goacc/routine-2.c new file mode 100644 index 00000000000..fc5eb11bb54 --- /dev/null +++ b/gcc/testsuite/c-c++-common/goacc/routine-2.c @@ -0,0 +1,21 @@ +#pragma acc routine gang worker /* { dg-error "multiple loop axes" } */ +void gang (void) +{ +} + +#pragma acc routine worker vector /* { dg-error "multiple loop axes" } */ +void worker (void) +{ +} + +#pragma acc routine vector seq /* { dg-error "multiple loop axes" } */ +void vector (void) +{ +} + +#pragma acc routine seq gang /* { dg-error "multiple loop axes" } */ +void seq (void) +{ +} + +#pragma acc routine (nothing) gang /* { dg-error "not been declared" } */ diff --git a/gcc/testsuite/c-c++-common/goacc/routine-3.c b/gcc/testsuite/c-c++-common/goacc/routine-3.c new file mode 100644 index 00000000000..e6f83bd151a --- /dev/null +++ b/gcc/testsuite/c-c++-common/goacc/routine-3.c @@ -0,0 +1,53 @@ +#pragma acc routine gang +void gang (void) /* { dg-message "declared here" 3 } */ +{ +} + +#pragma acc routine worker +void worker (void) /* { dg-message "declared here" 2 } */ +{ +} + +#pragma acc routine vector +void vector (void) /* { dg-message "declared here" 1 } */ +{ +} + +#pragma acc routine seq +void seq (void) +{ +} + +int main () +{ + +#pragma acc parallel num_gangs (32) num_workers (32) vector_length (32) + { + #pragma acc loop gang /* { dg-message "loop here" 1 } */ + for (int i = 0; i < 10; i++) + { + gang (); /* { dg-error "routine call uses same" } */ + worker (); + vector (); + seq (); + } + #pragma acc loop worker /* { dg-message "loop here" 2 } */ + for (int i = 0; i < 10; i++) + { + gang (); /* { dg-error "routine call uses same" } */ + worker (); /* { dg-error "routine call uses same" } */ + vector (); + seq (); + } + #pragma acc loop vector /* { dg-message "loop here" 3 } */ + for (int i = 0; i < 10; i++) + { + gang (); /* { dg-error "routine call uses same" } */ + worker (); /* { dg-error "routine call uses same" } */ + vector (); /* { dg-error "routine call uses same" } */ + seq (); + } + } + + return 0; +} diff --git a/gcc/testsuite/c-c++-common/goacc/routine-4.c b/gcc/testsuite/c-c++-common/goacc/routine-4.c new file mode 100644 index 00000000000..004d7132bf6 --- /dev/null +++ b/gcc/testsuite/c-c++-common/goacc/routine-4.c @@ -0,0 +1,41 @@ + +void gang (void); +void worker (void); +void vector (void); + +#pragma acc routine (gang) gang +#pragma acc routine (worker) worker +#pragma acc routine (vector) vector + +#pragma acc routine seq +void seq (void) +{ + gang (); /* { dg-error "routine call uses" } */ + worker (); /* { dg-error "routine call uses" } */ + vector (); /* { dg-error "routine call uses" } */ + seq (); +} + +void vector (void) /* { dg-message "declared here" 1 } */ +{ + gang (); /* { dg-error "routine call uses" } */ + worker (); /* { dg-error "routine call uses" } */ + vector (); + seq (); +} + +void worker (void) /* { dg-message "declared here" 2 } */ +{ + gang (); /* { dg-error "routine call uses" } */ + worker (); + vector (); + seq (); +} + +void gang (void) /* { dg-message "declared here" 3 } */ +{ + gang (); + worker (); + vector (); + seq (); +} diff --git a/gcc/testsuite/c-c++-common/goacc/routine-5.c b/gcc/testsuite/c-c++-common/goacc/routine-5.c new file mode 100644 index 00000000000..ccda0976a04 --- /dev/null +++ b/gcc/testsuite/c-c++-common/goacc/routine-5.c @@ -0,0 +1,47 @@ +/* { dg-do compile } */ + +#pragma acc routine /* { dg-error "not followed by" } */ +int a; + +#pragma acc routine /* { dg-error "not followed by" } */ +void fn1 (void), fn1b (void); + +#pragma acc routine /* { dg-error "not followed by" } */ +int b, fn2 (void); + +#pragma acc routine /* { dg-error "not followed by" } */ +int fn3 (void), b2; + +#pragma acc routine /* { dg-error "not followed by" } */ +typedef struct c c; + +#pragma acc routine /* { dg-error "not followed by" } */ +struct d {} d; + +#pragma acc routine /* { dg-error "not followed by" } */ +#pragma acc routine +int fn4 (void); + +int fn5a (void); + +#pragma acc routine /* { dg-error "not followed by" } */ +#pragma acc routine (fn5a) +int fn5 (void); + +#ifdef __cplusplus + +#pragma acc routine /* { dg-error "not followed by" "" { target c++ } } */ +namespace f {} + +namespace g {} + +#pragma acc routine /* { dg-error "not followed by" "" { target c++ } } */ +using namespace g; + +#pragma acc routine (g) /* { dg-error "does not refer to" "" { target c++ } } */ + +#endif + +#pragma acc routine (a) /* { dg-error "does not refer to" } */ + +#pragma acc routine (c) /* { dg-error "does not refer to" } */ diff --git a/gcc/testsuite/g++.dg/cilk-plus/CK/pr66326.cc b/gcc/testsuite/g++.dg/cilk-plus/CK/pr66326.cc index 1114ebdda82..057a9ced283 100644 --- a/gcc/testsuite/g++.dg/cilk-plus/CK/pr66326.cc +++ b/gcc/testsuite/g++.dg/cilk-plus/CK/pr66326.cc @@ -2,7 +2,6 @@ /* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* } } } */ -#include <cilk/cilk.h> #include <vector> #include <random> @@ -23,8 +22,8 @@ auto compute() { int main() { std::vector<double> v1, v2, v3; - cilk_spawn [&] { v1 = compute(); }(); - cilk_spawn [&] { v2 = compute(); }(); + _Cilk_spawn [&] { v1 = compute(); }(); + _Cilk_spawn [&] { v2 = compute(); }(); v3 = compute(); do_not_optimize_away(v1.data()); do_not_optimize_away(v2.data()); diff --git a/gcc/testsuite/g++.dg/init/new43.C b/gcc/testsuite/g++.dg/init/new43.C new file mode 100644 index 00000000000..9b0866720fe --- /dev/null +++ b/gcc/testsuite/g++.dg/init/new43.C @@ -0,0 +1,164 @@ +/* { dg-do compile } */ + +// Test for PR c++/67913 - new expression with negative size not diagnosed. +typedef __typeof__ (sizeof 0) size_t; + +void* operator new (size_t, void*); +void* operator new[] (size_t, void*); + +struct A { + int a [4]; +}; + +struct B { + int a [4]; + + void* operator new (size_t, void*); + void* operator new[] (size_t, void*); +}; + +void* operator new (size_t, B*); +void* operator new[] (size_t, B*); + +void *p; + +void test_literal () +{ + char c; + (void)c; + + B b; + + // Verify integer literal. + p = new char [-1]; // { dg-error "size of array is negative" } + p = new char [2][-3]; // { dg-error "size of array is negative" } + p = new char [-4][5]; // { dg-error "size of array is negative" } + p = new char [-6][-7]; // { dg-error "size of array is negative" } + + p = new (p) char [-1]; // { dg-error "size of array is negative" } + p = new (p) char [2][-3]; // { dg-error "size of array is negative" } + p = new (p) char [-4][5]; // { dg-error "size of array is negative" } + p = new (p) char [-6][-7]; // { dg-error "size of array is negative" } + + p = new (p) A [-1]; // { dg-error "size of array is negative" } + p = new (p) A [2][-3]; // { dg-error "size of array is negative" } + p = new (p) A [-4][5]; // { dg-error "size of array is negative" } + p = new (p) A [-6][-7]; // { dg-error "size of array is negative" } + + p = new (p) B [-1]; // { dg-error "size of array is negative" } + p = new (p) B [2][-3]; // { dg-error "size of array is negative" } + p = new (p) B [-4][5]; // { dg-error "size of array is negative" } + p = new (p) B [-6][-7]; // { dg-error "size of array is negative" } + + p = new (&b) B [-1]; // { dg-error "size of array is negative" } + p = new (&b) B [2][-3]; // { dg-error "size of array is negative" } + p = new (&b) B [-4][5]; // { dg-error "size of array is negative" } + p = new (&b) B [-6][-7]; // { dg-error "size of array is negative" } + + p = new char [1 - 2]; // { dg-error "size of array is negative" } + p = new (p) char [2 - 3]; // { dg-error "size of array is negative" } + p = new A [2 < 1 ? -1 : -2]; // { dg-error "size of array is negative" } + p = new (p) B [2 - 3 * 2]; // { dg-error "size of array is negative" } + p = new (&b) B [1][2 - 3 * 2];// { dg-error "size of array is negative" } +} + +void test_constant_expression () +{ + char c; + (void)c; + + B b; + + static const signed char i1 = -1; + static const signed short i2 = -2; + static const signed int i3 = -3; + static const signed long i4 = -4; + static const signed long long i5 = -5; + static const int i6 = -6; + static const int i7 = -7; + + // Verify constant expression. + p = new char [i1]; // { dg-error "size of array is negative" } + p = new char [2][i3]; // { dg-error "size of array is negative" } + p = new char [i4][5]; // { dg-error "size of array is negative" } + p = new char [i6][i7]; // { dg-error "size of array is negative" } + + p = new (p) char [i1]; // { dg-error "size of array is negative" } + p = new (p) char [2][i3]; // { dg-error "size of array is negative" } + p = new (p) char [i4][5]; // { dg-error "size of array is negative" } + p = new (p) char [i6][i7]; // { dg-error "size of array is negative" } + + p = new (p) A [i1]; // { dg-error "size of array is negative" } + p = new (p) A [2][i3]; // { dg-error "size of array is negative" } + p = new (p) A [i4][5]; // { dg-error "size of array is negative" } + p = new (p) A [i6][i7]; // { dg-error "size of array is negative" } + + p = new (p) B [i1]; // { dg-error "size of array is negative" } + p = new (p) B [2][i3]; // { dg-error "size of array is negative" } + p = new (p) B [i4][5]; // { dg-error "size of array is negative" } + p = new (p) B [i6][i7]; // { dg-error "size of array is negative" } + + p = new (&b) B [i1]; // { dg-error "size of array is negative" } + p = new (&b) B [2][i3]; // { dg-error "size of array is negative" } + p = new (&b) B [i4][5]; // { dg-error "size of array is negative" } + p = new (&b) B [i6][i7]; // { dg-error "size of array is negative" } + + p = new short [i1 - 2]; // { dg-error "size of array is negative" } + p = new (p) bool [i2 - 3]; // { dg-error "size of array is negative" } + p = new A [2 < 1 ? i1 : i2]; // { dg-error "size of array is negative" } + p = new (p) B [2 + i3 * 2]; // { dg-error "size of array is negative" } + p = new (&b) B [1][i1 - 3 * 2];// { dg-error "size of array is negative" } +} + +void test_constexpr () +{ + B b; + +#if __cplusplus >= 201103L + + // Verify that a constant expression that is "a prvalue core constant + // expression whose value is an object where, for that object and its + // subobjects each non-static data member of reference type refers to + // an object with static storage duration." + static constexpr struct S { + int i_; + constexpr S (int i): i_ (i) { } + constexpr operator int () const { return i_; } + } s1 (-1), s2 (-2), s3 (-3), s4 (-4), s5 (-5), s6 (-6), s7 (-7); +#else + // C++ 11 constexpr is not available, fall back on plain ole enum. + enum { s1 = -1, s2 = -2, s3 = -3, s4 = -4, s5 = -5, s6 = -6, s7 = -7 }; +#endif + + // Verify constant expression. + p = new char [s1]; // { dg-error "size of array is negative" } + p = new char [2][s3]; // { dg-error "size of array is negative" } + p = new char [s4][5]; // { dg-error "size of array is negative" } + p = new char [s6][s7]; // { dg-error "size of array is negative" } + + p = new (p) char [s1]; // { dg-error "size of array is negative" } + p = new (p) char [2][s3]; // { dg-error "size of array is negative" } + p = new (p) char [s4][5]; // { dg-error "size of array is negative" } + p = new (p) char [s6][s7]; // { dg-error "size of array is negative" } + + p = new (p) A [s1]; // { dg-error "size of array is negative" } + p = new (p) A [2][s3]; // { dg-error "size of array is negative" } + p = new (p) A [s4][5]; // { dg-error "size of array is negative" } + p = new (p) A [s6][s7]; // { dg-error "size of array is negative" } + + p = new (p) B [s1]; // { dg-error "size of array is negative" } + p = new (p) B [2][s3]; // { dg-error "size of array is negative" } + p = new (p) B [s4][5]; // { dg-error "size of array is negative" } + p = new (p) B [s6][s7]; // { dg-error "size of array is negative" } + + p = new (&b) B [s1]; // { dg-error "size of array is negative" } + p = new (&b) B [2][s3]; // { dg-error "size of array is negative" } + p = new (&b) B [s4][5]; // { dg-error "size of array is negative" } + p = new (&b) B [s6][s7]; // { dg-error "size of array is negative" } + + p = new int [s1 + s2]; // { dg-error "size of array is negative" } + p = new (p) long [2 * s3]; // { dg-error "size of array is negative" } + p = new A [s2 < s1 ? s1 : s2]; // { dg-error "size of array is negative" } + p = new (p) B [s7 - s2 * 2]; // { dg-error "size of array is negative" } + p = new (&b) B [9][s4 - s1 * 2]; // { dg-error "size of array is negative" } +} diff --git a/gcc/testsuite/g++.dg/init/new44.C b/gcc/testsuite/g++.dg/init/new44.C new file mode 100644 index 00000000000..d6ff86a16c7 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/new44.C @@ -0,0 +1,532 @@ +// { dg-do compile } + +// Test for PR c++/67927 - array new expression with excessive number +// of elements not diagnosed. + +// GCC uses a different maximum value at compile time and at runtime: +// 1) The compile-time maximum, MAX, is SIZE_MAX / 2 minus the size +// of a cookie (sizeof (size_t)). Exceeding the compile-time +// maximum is ill-formed and diagnosed. This test verifies this +// diagnostic. +// 2) The runtime runtime maximum is the most significant 7 bits, +// starting with the first most significant non-zero bit, of +// the dividend of the compile-time constant MAX and the product +// of the constant array dimensions and the element size, minus +// the size of the "cookie." This is also roughly (though not +// exactly) SIZE_MAX / 2. Exceeding the runtime maximum is +// diagnosed at runtime by throwing a bad_array_new_length +// exception. +// The cookie is the number of elements in the array, and is +// only added for non-POD types, but the its size factors into +// the maximum size formula regardless. + +// See also PR c++/19351 - integer overflow in operator new[]. + +// For convenience. +#define MAX __SIZE_MAX__ + +typedef __typeof__ (sizeof 0) size_t; + +void* operator new (size_t, void*); +void* operator new[] (size_t, void*); + +void *p; + +// Exercise new expression with one-dimensional arrays of char. +static void __attribute__ ((used)) +test_one_dim_char_array () +{ + p = new char [MAX]; // { dg-error "size of array" } + p = new char [MAX - 1]; // { dg-error "size of array" } + p = new char [MAX - 2]; // { dg-error "size of array" } + p = new char [MAX - 99]; // { dg-error "size of array" } + p = new char [MAX / 2]; // { dg-error "size of array" } + p = new char [MAX / 2 - 1]; // { dg-error "size of array" } + p = new char [MAX / 2 - 2]; // { dg-error "size of array" } + + // Avoid testing the expressions below since whether or not they + // are accepted depends on the precision of size_t (which also + // determines the size of the cookie). + // p = new char [MAX / 2 - 3]; + // p = new char [MAX / 2 - 4]; + // p = new char [MAX / 2 - 5]; + // p = new char [MAX / 2 - 6]; + + // The following expressions are accepted on ILP32 as well LP64 + // (they will be diagnosed on LP128 if there ever is such a data + // model). + p = new char [MAX / 2 - 7]; // okay + p = new char [MAX / 2 - 8]; // okay +} + +static void __attribute__ ((used)) +test_one_dim_short_array () +{ + p = new short [MAX]; // { dg-error "size of array" } + p = new short [MAX - 1]; // { dg-error "size of array" } + p = new short [MAX - 2]; // { dg-error "size of array" } + p = new short [MAX - 99]; // { dg-error "size of array" } + p = new short [MAX / 2]; // { dg-error "size of array" } + p = new short [MAX / 2 - 1]; // { dg-error "size of array" } + p = new short [MAX / 2 - 2]; // { dg-error "size of array" } + p = new short [MAX / 2 - 3]; // { dg-error "size of array" } + p = new short [MAX / 2 - 4]; // { dg-error "size of array" } + p = new short [MAX / 2 - 5]; // { dg-error "size of array" } + p = new short [MAX / 2 - 6]; // { dg-error "size of array" } + p = new short [MAX / 2 - 7]; // { dg-error "size of array" } + p = new short [MAX / 2 - 8]; // { dg-error "size of array" } + p = new short [MAX / 4]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new short [MAX / 4 - 1]; + + p = new short [MAX / 4 - 4]; // okay +} + +// Exercise new expression with two-dimensional arrays or char. +static void __attribute__ ((used)) +test_two_dim_char_array () +{ + p = new char [1][MAX]; // { dg-error "size of array" } + p = new char [1][MAX - 1]; // { dg-error "size of array" } + p = new char [1][MAX - 2]; // { dg-error "size of array" } + p = new char [1][MAX - 99]; // { dg-error "size of array" } + p = new char [1][MAX / 2]; // { dg-error "size of array" } + p = new char [1][MAX / 2 - 1]; // { dg-error "size of array" } + p = new char [1][MAX / 2 - 2]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new char [1][MAX / 2 - 3]; + // p = new char [1][MAX / 2 - 4]; + // p = new char [1][MAX / 2 - 5]; + // p = new char [1][MAX / 2 - 6]; + + p = new char [1][MAX / 2 - 7]; // okay + p = new char [1][MAX / 2 - 8]; // okay + + p = new char [2][MAX]; // { dg-error "size of array" } + p = new char [2][MAX - 1]; // { dg-error "size of array" } + p = new char [2][MAX - 2]; // { dg-error "size of array" } + p = new char [2][MAX / 2]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 1]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 2]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 7]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 8]; // { dg-error "size of array" } + + p = new char [MAX][MAX]; // { dg-error "size of array" } + p = new char [MAX][MAX - 1]; // { dg-error "size of array" } + p = new char [MAX][MAX - 2]; // { dg-error "size of array" } + p = new char [MAX][MAX / 2]; // { dg-error "size of array" } + p = new char [MAX][MAX / 2 - 1]; // { dg-error "size of array" } + p = new char [MAX][MAX / 2 - 2]; // { dg-error "size of array" } + p = new char [MAX][MAX / 2 - 7]; // { dg-error "size of array" } + p = new char [MAX][MAX / 2 - 8]; // { dg-error "size of array" } + p = new char [MAX][2]; // { dg-error "size of array" } + p = new char [MAX][1]; // { dg-error "size of array" } + p = new char [MAX / 2][1]; // { dg-error "size of array" } + p = new char [MAX / 2 - 1][1]; // { dg-error "size of array" } + p = new char [MAX / 2 - 2][1]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new char [MAX / 2 - 3][1]; + // p = new char [MAX / 2 - 4][1]; + // p = new char [MAX / 2 - 5][1]; + // p = new char [MAX / 2 - 6][1]; + + p = new char [MAX / 2 - 7][1]; // okay + p = new char [MAX / 2 - 8][1]; // okay +} + + +// Exercise new expression with three-dimensional arrays. +static __attribute__ ((used)) void +test_three_dim_char_array () +{ + p = new char [1][1][MAX]; // { dg-error "size of array" } + p = new char [1][1][MAX - 1]; // { dg-error "size of array" } + p = new char [1][1][MAX - 2]; // { dg-error "size of array" } + p = new char [1][1][MAX - 99]; // { dg-error "size of array" } + p = new char [1][1][MAX / 2]; // { dg-error "size of array" } + p = new char [1][1][MAX / 2 - 1]; // { dg-error "size of array" } + p = new char [1][1][MAX / 2 - 2]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new char [1][1][MAX / 2 - 3]; + // p = new char [1][1][MAX / 2 - 4]; + // p = new char [1][1][MAX / 2 - 5]; + // p = new char [1][1][MAX / 2 - 6]; + + p = new char [1][1][MAX / 2 - 7]; // okay + p = new char [1][1][MAX / 2 - 8]; // okay + + p = new char [1][2][MAX]; // { dg-error "size of array" } + p = new char [1][2][MAX - 1]; // { dg-error "size of array" } + p = new char [1][2][MAX - 2]; // { dg-error "size of array" } + p = new char [1][2][MAX - 99]; // { dg-error "size of array" } + p = new char [1][2][MAX / 2]; // { dg-error "size of array" } + p = new char [1][2][MAX / 2 - 1]; // { dg-error "size of array" } + p = new char [1][2][MAX / 2 - 2]; // { dg-error "size of array" } + p = new char [1][2][MAX / 2 - 3]; // { dg-error "size of array" } + p = new char [1][2][MAX / 2 - 4]; // { dg-error "size of array" } + p = new char [1][2][MAX / 2 - 5]; // { dg-error "size of array" } + p = new char [1][2][MAX / 2 - 6]; // { dg-error "size of array" } + p = new char [1][2][MAX / 2 - 7]; // { dg-error "size of array" } + p = new char [1][2][MAX / 2 - 8]; // { dg-error "size of array" } + p = new char [1][2][MAX / 4]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new char [1][2][MAX / 4 - 1]; + // p = new char [1][2][MAX / 4 - 2]; + + p = new char [1][2][MAX / 4 - 3]; // okay + p = new char [1][2][MAX / 4 - 4]; // okay + + p = new char [2][1][MAX]; // { dg-error "size of array" } + p = new char [2][1][MAX - 1]; // { dg-error "size of array" } + p = new char [2][1][MAX - 2]; // { dg-error "size of array" } + p = new char [2][1][MAX - 99]; // { dg-error "size of array" } + p = new char [2][1][MAX / 2]; // { dg-error "size of array" } + p = new char [2][1][MAX / 2 - 1]; // { dg-error "size of array" } + p = new char [2][1][MAX / 2 - 2]; // { dg-error "size of array" } + p = new char [2][1][MAX / 2 - 3]; // { dg-error "size of array" } + p = new char [2][1][MAX / 2 - 4]; // { dg-error "size of array" } + p = new char [2][1][MAX / 2 - 5]; // { dg-error "size of array" } + p = new char [2][1][MAX / 2 - 6]; // { dg-error "size of array" } + p = new char [2][1][MAX / 2 - 7]; // { dg-error "size of array" } + p = new char [2][1][MAX / 2 - 8]; // { dg-error "size of array" } + p = new char [2][1][MAX / 4]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new char [2][1][MAX / 4 - 1]; + // p = new char [2][1][MAX / 4 - 2]; + + p = new char [2][1][MAX / 4 - 3]; // okay + p = new char [2][1][MAX / 4 - 4]; // okay + + p = new char [2][2][MAX]; // { dg-error "size of array" } + p = new char [2][2][MAX - 1]; // { dg-error "size of array" } + p = new char [2][2][MAX - 2]; // { dg-error "size of array" } + p = new char [2][2][MAX - 99]; // { dg-error "size of array" } + p = new char [2][2][MAX / 2]; // { dg-error "size of array" } + p = new char [2][2][MAX / 2 - 1]; // { dg-error "size of array" } + p = new char [2][2][MAX / 2 - 2]; // { dg-error "size of array" } + p = new char [2][2][MAX / 2 - 3]; // { dg-error "size of array" } + p = new char [2][2][MAX / 2 - 4]; // { dg-error "size of array" } + p = new char [2][2][MAX / 2 - 5]; // { dg-error "size of array" } + p = new char [2][2][MAX / 2 - 6]; // { dg-error "size of array" } + p = new char [2][2][MAX / 2 - 7]; // { dg-error "size of array" } + p = new char [2][2][MAX / 2 - 8]; // { dg-error "size of array" } + p = new char [2][2][MAX / 4]; // { dg-error "size of array" } + p = new char [2][2][MAX / 4 - 1]; // { dg-error "size of array" } + p = new char [2][2][MAX / 4 - 2]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new char [2][2][MAX / 8]; + // p = new char [2][2][MAX / 8 - 1]; + + p = new char [2][2][MAX / 8 - 2]; + p = new char [2][2][MAX / 8 - 3]; + + p = new char [2][MAX][2]; // { dg-error "size of array" } + p = new char [2][MAX - 1][2]; // { dg-error "size of array" } + p = new char [2][MAX - 2][2]; // { dg-error "size of array" } + p = new char [2][MAX - 99][2]; // { dg-error "size of array" } + p = new char [2][MAX / 2][2]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 1][2]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 2][2]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 3][2]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 4][2]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 5][2]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 6][2]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 7][2]; // { dg-error "size of array" } + p = new char [2][MAX / 2 - 8][2]; // { dg-error "size of array" } + p = new char [2][MAX / 4][2]; // { dg-error "size of array" } + p = new char [2][MAX / 4 - 1][2]; // { dg-error "size of array" } + p = new char [2][MAX / 4 - 2][2]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new char [2][MAX / 8][2]; + // p = new char [2][MAX / 8 - 1][2]; + + p = new char [2][MAX / 8 - 2][2]; + p = new char [2][MAX / 8 - 3][2]; + + p = new char [MAX][2][2]; // { dg-error "size of array" } + p = new char [MAX - 1][2][2]; // { dg-error "size of array" } + p = new char [MAX - 2][2][2]; // { dg-error "size of array" } + p = new char [MAX - 99][2][2]; // { dg-error "size of array" } + p = new char [MAX / 2][2][2]; // { dg-error "size of array" } + p = new char [MAX / 2 - 1][2][2]; // { dg-error "size of array" } + p = new char [MAX / 2 - 2][2][2]; // { dg-error "size of array" } + p = new char [MAX / 2 - 3][2][2]; // { dg-error "size of array" } + p = new char [MAX / 2 - 4][2][2]; // { dg-error "size of array" } + p = new char [MAX / 2 - 5][2][2]; // { dg-error "size of array" } + p = new char [MAX / 2 - 6][2][2]; // { dg-error "size of array" } + p = new char [MAX / 2 - 7][2][2]; // { dg-error "size of array" } + p = new char [MAX / 2 - 8][2][2]; // { dg-error "size of array" } + p = new char [MAX / 4][2][2]; // { dg-error "size of array" } + p = new char [MAX / 4 - 1][2][2]; // { dg-error "size of array" } + p = new char [MAX / 4 - 2][2][2]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new char [MAX / 8][2][2]; + // p = new char [MAX / 8 - 1][2][2]; + + p = new char [MAX / 8 - 2][2][2]; + p = new char [MAX / 8 - 3][2][2]; + + p = new char [MAX][MAX][MAX]; // { dg-error "size of array" } + p = new char [MAX][MAX][MAX / 2]; // { dg-error "size of array" } + p = new char [MAX][MAX / 2][MAX]; // { dg-error "size of array" } + p = new char [MAX][MAX / 2][MAX / 2]; // { dg-error "size of array" } + p = new char [MAX / 2][MAX / 2][MAX / 2]; // { dg-error "size of array" } +} + +// Exercise new expression with N-dimensional arrays where N is +// sizeof(size_t). +static __attribute__ ((used)) void +test_N_dim_char_array () +{ +#if __SIZEOF_SIZE_T__ == 8 + enum { N = 256 }; +#else + enum { N = 16 }; +#endif + + p = new char [N][N][N][N][N][N][N]; + p = new char [N / 2][2][N][N][N][N][N][N]; + p = new char [N - 1][N / 2][N][N][N][N][N][N]; + p = new char [N / 2][N][N][N][N][N][N][N]; // { dg-error "size of array" } + p = new char [N - 1][N][N][N][N][N][N][N]; // { dg-error "size of array" } + p = new char [N] [N][N][N][N][N][N][N]; // { dg-error "size of array" } +} + +typedef struct Byte { + char c; + + void* operator new (size_t, void*); + void* operator new[] (size_t, void*); +} B; + +void* operator new (size_t, B*); +void* operator new[] (size_t, B*); + +// Exercise placement new expression with one-dimensional arrays of a struct. +static void __attribute__ ((used)) +test_one_dim_byte_array (void *p) +{ + p = new (p) B [MAX]; // { dg-error "size of array" } + p = new (p) B [MAX - 1]; // { dg-error "size of array" } + p = new (p) B [MAX - 2]; // { dg-error "size of array" } + p = new (p) B [MAX - 99]; // { dg-error "size of array" } + p = new (p) B [MAX / 2]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 1]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 2]; // { dg-error "size of array" } + + // Avoid testing the expressions below since whether or not they + // are accepted depends on the precision of size_t (which determines + // the size of the cookie). + // p = new (p) B [MAX / 2 - 3]; + // p = new (p) B [MAX / 2 - 4]; + // p = new (p) B [MAX / 2 - 5]; + // p = new (p) B [MAX / 2 - 6]; + + // The following expressions are accepted on ILP32 as well LP64 + // (they will be diagnosed on LP128 if there ever is such a data + // model). + p = new (p) B [MAX / 2 - 7]; // okay + p = new (p) B [MAX / 2 - 8]; // okay +} + +// Exercise placement new expression with two-dimensional arrays. +static void __attribute__ ((used)) +test_placement_two_dim_byte_struct_array (void *p) +{ + p = new (p) B [1][MAX]; // { dg-error "size of array" } + p = new (p) B [1][MAX - 1]; // { dg-error "size of array" } + p = new (p) B [1][MAX - 2]; // { dg-error "size of array" } + p = new (p) B [1][MAX - 99]; // { dg-error "size of array" } + p = new (p) B [1][MAX / 2]; // { dg-error "size of array" } + p = new (p) B [1][MAX / 2 - 1]; // { dg-error "size of array" } + p = new (p) B [1][MAX / 2 - 2]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new (p) B [1][MAX / 2 - 3]; + // p = new (p) B [1][MAX / 2 - 4]; + // p = new (p) B [1][MAX / 2 - 5]; + // p = new (p) B [1][MAX / 2 - 6]; + + p = new (p) B [1][MAX / 2 - 7]; // okay + p = new (p) B [1][MAX / 2 - 8]; // okay + + p = new (p) B [2][MAX]; // { dg-error "size of array" } + p = new (p) B [2][MAX - 1]; // { dg-error "size of array" } + p = new (p) B [2][MAX - 2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 1]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 7]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 8]; // { dg-error "size of array" } + + p = new (p) B [MAX][MAX]; // { dg-error "size of array" } + p = new (p) B [MAX][MAX - 1]; // { dg-error "size of array" } + p = new (p) B [MAX][MAX - 2]; // { dg-error "size of array" } + p = new (p) B [MAX][MAX / 2]; // { dg-error "size of array" } + p = new (p) B [MAX][MAX / 2 - 1]; // { dg-error "size of array" } + p = new (p) B [MAX][MAX / 2 - 2]; // { dg-error "size of array" } + p = new (p) B [MAX][MAX / 2 - 7]; // { dg-error "size of array" } + p = new (p) B [MAX][MAX / 2 - 8]; // { dg-error "size of array" } + p = new (p) B [MAX][2]; // { dg-error "size of array" } + p = new (p) B [MAX][1]; // { dg-error "size of array" } + p = new (p) B [MAX / 2][1]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 1][1]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 2][1]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new (p) B [MAX / 2 - 3][1]; + // p = new (p) B [MAX / 2 - 4][1]; + // p = new (p) B [MAX / 2 - 5][1]; + // p = new (p) B [MAX / 2 - 6][1]; + + p = new (p) B [MAX / 2 - 7][1]; // okay + p = new (p) B [MAX / 2 - 8][1]; // okay +} + + +// Exercise placement new expression with three-dimensional arrays. +static __attribute__ ((used)) void +test_placement_three_dim_byte_struct_array (void *p) +{ + p = new (p) B [1][1][MAX]; // { dg-error "size of array" } + p = new (p) B [1][1][MAX - 1]; // { dg-error "size of array" } + p = new (p) B [1][1][MAX - 2]; // { dg-error "size of array" } + p = new (p) B [1][1][MAX - 99]; // { dg-error "size of array" } + p = new (p) B [1][1][MAX / 2]; // { dg-error "size of array" } + p = new (p) B [1][1][MAX / 2 - 1]; // { dg-error "size of array" } + p = new (p) B [1][1][MAX / 2 - 2]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new (p) B [1][1][MAX / 2 - 3]; + // p = new (p) B [1][1][MAX / 2 - 4]; + // p = new (p) B [1][1][MAX / 2 - 5]; + // p = new (p) B [1][1][MAX / 2 - 6]; + + p = new (p) B [1][1][MAX / 2 - 7]; // okay + p = new (p) B [1][1][MAX / 2 - 8]; // okay + + p = new (p) B [1][2][MAX]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX - 1]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX - 2]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX - 99]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX / 2]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX / 2 - 1]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX / 2 - 2]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX / 2 - 3]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX / 2 - 4]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX / 2 - 5]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX / 2 - 6]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX / 2 - 7]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX / 2 - 8]; // { dg-error "size of array" } + p = new (p) B [1][2][MAX / 4]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new (p) B [1][2][MAX / 4 - 1]; + // p = new (p) B [1][2][MAX / 4 - 2]; + + p = new (p) B [1][2][MAX / 4 - 3]; // okay + p = new (p) B [1][2][MAX / 4 - 4]; // okay + + p = new (p) B [2][1][MAX]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX - 1]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX - 2]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX - 99]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX / 2]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX / 2 - 1]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX / 2 - 2]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX / 2 - 3]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX / 2 - 4]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX / 2 - 5]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX / 2 - 6]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX / 2 - 7]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX / 2 - 8]; // { dg-error "size of array" } + p = new (p) B [2][1][MAX / 4]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new (p) B [2][1][MAX / 4 - 1]; + // p = new (p) B [2][1][MAX / 4 - 2]; + + p = new (p) B [2][1][MAX / 4 - 3]; // okay + p = new (p) B [2][1][MAX / 4 - 4]; // okay + + p = new (p) B [2][2][MAX]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX - 1]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX - 2]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX - 99]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 2]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 2 - 1]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 2 - 2]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 2 - 3]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 2 - 4]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 2 - 5]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 2 - 6]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 2 - 7]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 2 - 8]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 4]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 4 - 1]; // { dg-error "size of array" } + p = new (p) B [2][2][MAX / 4 - 2]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new (p) B [2][2][MAX / 8]; + // p = new (p) B [2][2][MAX / 8 - 1]; + + p = new (p) B [2][2][MAX / 8 - 2]; + p = new (p) B [2][2][MAX / 8 - 3]; + + p = new (p) B [2][MAX][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX - 1][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX - 2][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX - 99][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 1][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 2][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 3][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 4][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 5][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 6][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 7][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 2 - 8][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 4][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 4 - 1][2]; // { dg-error "size of array" } + p = new (p) B [2][MAX / 4 - 2][2]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new (p) B [2][MAX / 8][2]; + // p = new (p) B [2][MAX / 8 - 1][2]; + + p = new (p) B [2][MAX / 8 - 2][2]; + p = new (p) B [2][MAX / 8 - 3][2]; + + p = new (p) B [MAX][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX - 1][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX - 2][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX - 99][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 2][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 1][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 2][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 3][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 4][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 5][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 6][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 7][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 2 - 8][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 4][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 4 - 1][2][2]; // { dg-error "size of array" } + p = new (p) B [MAX / 4 - 2][2][2]; // { dg-error "size of array" } + + // Avoid exercising data model-dependent expressions. + // p = new (p) B [MAX / 8][2][2]; + // p = new (p) B [MAX / 8 - 1][2][2]; + + p = new (p) B [MAX / 8 - 2][2][2]; + p = new (p) B [MAX / 8 - 3][2][2]; +} diff --git a/gcc/testsuite/g++.dg/init/new45.C b/gcc/testsuite/g++.dg/init/new45.C new file mode 100644 index 00000000000..92dac18a32e --- /dev/null +++ b/gcc/testsuite/g++.dg/init/new45.C @@ -0,0 +1,106 @@ +// { dg-do compile } +// { dg-options "-O1" } +// { dg-final { scan-assembler-not "abort" } } + +typedef __SIZE_TYPE__ size_t; + +extern "C" { + void abort (); + void* malloc (size_t); +} + +struct UDClass { + static int n; + UDClass () { ++n; } + virtual ~UDClass () { --n; } +}; + +int UDClass::n; + +struct POD { + char buf [sizeof (UDClass)]; +}; + +enum { N = 123 }; + +inline __attribute__ ((always_inline)) +void* operator new[] (size_t n) +{ + // Verify that array new is invoked with an argument large enough + // for the array and a size_t cookie to store the number of elements. + // (This holds for classes with user-defined types but not POD types). + if (n != N * sizeof (UDClass) + sizeof n) abort (); + return malloc (n); +} + +inline __attribute__ ((always_inline)) +void* operator new[] (size_t n, void *p) +{ + // Verify that the default placement array new is invoked with + // an argument just large enough for the array (and no cookie), + // regardless of whether the type is a POD or class with a user + // defined ctor. + if (n != N * sizeof (UDClass)) abort (); + return p; +} + +inline __attribute__ ((always_inline)) +void* operator new[] (size_t n, POD *p) +{ + // Verify that placement array new overload for a POD type is + // invoked with an argument large enough for the array and + // a cookie. + if (n != N * sizeof (POD)) abort (); + return p; +} + +inline __attribute__ ((always_inline)) +void* operator new[] (size_t n, UDClass *p) +{ + // Verify that placement array new overload for a class type with + // a user-defined ctor and dtor is invoked with an argument large + // enough for the array and a cookie. + if (n != N * sizeof (UDClass) + sizeof n) abort (); + return p; +} + +// UDClassllocate a sufficiently large buffer to construct arrays into. +static unsigned char buf [N * N]; + +POD* test_new_POD () +{ + // Avoid testing PODs since for those, the global new is invoked + // without the overhead of a cookie. + // return new POD [N]; + return 0; +} + +POD* test_default_placement_new_POD () +{ + // Vefify that no overhead is allocated. + return new (buf) POD [N]; +} + +POD* test_overloaded_placement_new_POD () +{ + // Vefify that no overhead is allocated. + return new ((POD*)buf) POD [N]; +} + +UDClass* test_new_UDClass () +{ + // Vefify that space for a cookie is allocated. + return new UDClass [N]; +} + +UDClass* test_default_placement_new_UDClass () +{ + // Vefify that no overhead is allocated. + return new (buf) UDClass [N]; +} + +UDClass* test_overloaded_placement_new_UDClass () +{ + // Vefify that space for a cookie is allocated. + return new ((UDClass*)buf) UDClass [N]; +} diff --git a/gcc/testsuite/g++.dg/other/new-size-type.C b/gcc/testsuite/g++.dg/other/new-size-type.C index 04933fd4a2c..ad4dc102c3b 100644 --- a/gcc/testsuite/g++.dg/other/new-size-type.C +++ b/gcc/testsuite/g++.dg/other/new-size-type.C @@ -5,6 +5,5 @@ const char* foo() { - return new char[~static_cast<size_t>(0)];// { dg-bogus "large" } + return new char[~static_cast<size_t>(0)];// { dg-error "size of array" } } - diff --git a/gcc/testsuite/g++.dg/ubsan/pr68259.C b/gcc/testsuite/g++.dg/ubsan/pr68259.C new file mode 100644 index 00000000000..5137edd1f8b --- /dev/null +++ b/gcc/testsuite/g++.dg/ubsan/pr68259.C @@ -0,0 +1,54 @@ +// PR middle-end/68259
+
+// { dg-do compile }
+// { dg-options "-fsanitize=undefined -w" }
+
+namespace std {
+ template < typename _Tp > class allocator { };
+ template < typename _Tp, typename _Alloc
+= std::allocator < _Tp >
+>class vector {
+ public:
+typedef _Tp value_type;
+ void push_back (const value_type & __x) { }
+ };
+}
+class Foo;
+class FooBar {
+public:
+Foo * primitive_context;
+ FooBar () { }
+ FooBar (const FooBar & pnhp);
+};
+template < class KEY, class CONTENT > class AVLTreeNode { };
+template < class KEY, class CONTENT > class FooTree final
+{
+ FooBar insertPrimitive ();
+public:
+AVLTreeNode < KEY, CONTENT > *seek_no_lock (const KEY & key) { }
+ void primitive_patterns ( std::vector < FooBar > &patterns);
+};
+template < class KEY, class CONTENT > void FooTree < KEY,
+ CONTENT >::primitive_patterns ( std::vector <FooBar > &patterns)
+{
+ patterns.push_back (insertPrimitive());
+}
+template < class KEY, class CONTENT >
+FooBar FooTree < KEY, CONTENT >::insertPrimitive ()
+{
+ FooBar place;
+ seek_no_lock (place.primitive_context);
+ return place;
+}
+class ManuverResults { };
+class opc_info_t
+{
+public:
+FooTree < Foo *, ManuverResults > *primitivecache;
+};
+static void
+do_optical_prox_corr_tsafe (opc_info_t * opc_info)
+{
+ std::vector < FooBar > patterns;
+ opc_info->primitivecache->primitive_patterns (patterns);
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr67192.c b/gcc/testsuite/gcc.dg/guality/pr67192.c new file mode 100644 index 00000000000..946e68f8faa --- /dev/null +++ b/gcc/testsuite/gcc.dg/guality/pr67192.c @@ -0,0 +1,79 @@ +/* PR debug/67192 */ +/* { dg-do run } */ +/* { dg-options "-g -Wmisleading-indentation" } */ + +volatile int cnt = 0; + +__attribute__((noinline, noclone)) static int +last (void) +{ + return ++cnt % 5 == 0; +} + +__attribute__((noinline, noclone)) static void +do_it (void) +{ + asm volatile ("" : : "r" (&cnt) : "memory"); +} + +__attribute__((noinline, noclone)) static void +f1 (void) +{ + for (;; do_it()) + { + if (last ()) + break; + } + do_it (); /* { dg-final { gdb-test 27 "cnt" "5" } } */ +} + +__attribute__((noinline, noclone)) static void +f2 (void) +{ + while (1) + { + if (last ()) + break; + do_it (); + } + do_it (); /* { dg-final { gdb-test 39 "cnt" "10" } } */ +} + +__attribute__((noinline, noclone)) static void +f3 (void) +{ + for (;; do_it()) + if (last ()) + break; + do_it (); /* { dg-final { gdb-test 48 "cnt" "15" } } */ +} + +__attribute__((noinline, noclone)) static void +f4 (void) +{ + while (1) /* { dg-final { gdb-test 54 "cnt" "15" } } */ + if (last ()) + break; + else + do_it (); + do_it (); /* { dg-final { gdb-test 59 "cnt" "20" } } */ +} + +void (*volatile fnp1) (void) = f1; +void (*volatile fnp2) (void) = f2; +void (*volatile fnp3) (void) = f3; +void (*volatile fnp4) (void) = f4; + +int +main () +{ + asm volatile ("" : : "r" (&fnp1) : "memory"); + asm volatile ("" : : "r" (&fnp2) : "memory"); + asm volatile ("" : : "r" (&fnp3) : "memory"); + asm volatile ("" : : "r" (&fnp4) : "memory"); + fnp1 (); + fnp2 (); + fnp3 (); + fnp4 (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/pr68129_1.c b/gcc/testsuite/gcc.dg/pr68129_1.c new file mode 100644 index 00000000000..112331e665d --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr68129_1.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fno-split-wide-types" } */ + +typedef int V __attribute__ ((vector_size (8 * sizeof (int)))); + +void +foo (V *p, V *q) +{ + *p = (*p == *q); +} diff --git a/gcc/testsuite/gcc.dg/sso/p1.c b/gcc/testsuite/gcc.dg/sso/p1.c index ab6ac5ae4b2..bf14ffe9502 100644 --- a/gcc/testsuite/gcc.dg/sso/p1.c +++ b/gcc/testsuite/gcc.dg/sso/p1.c @@ -13,52 +13,52 @@ int main (void) put ("My_R1 :"); dump (&My_R1, sizeof (struct R1)); new_line (); - /* { dg-output "My_R1 : 78 56 34 12\n" } */ + /* { dg-output "My_R1 : 78 56 34 12.*\n" } */ put ("My_R2 :"); dump (&My_R2, sizeof (struct R2)); new_line (); - /* { dg-output "My_R2 : 12 34 56 78\n" } */ + /* { dg-output "My_R2 : 12 34 56 78.*\n" } */ Local_R1 = My_R1; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12.*\n" } */ Local_R2 = My_R2; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78.*\n" } */ Local_R1.I = 0x12345678; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12.*\n" } */ Local_R2.I = 0x12345678; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78.*\n" } */ Local_R1.I = Local_R2.I; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12.*\n" } */ Local_R2.I = Local_R1.I; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/p13.c b/gcc/testsuite/gcc.dg/sso/p13.c index 08ecf292e44..fa1af6939fb 100644 --- a/gcc/testsuite/gcc.dg/sso/p13.c +++ b/gcc/testsuite/gcc.dg/sso/p13.c @@ -13,52 +13,52 @@ int main (void) put ("My_R1 :"); dump (&My_R1, sizeof (struct R1)); new_line (); - /* { dg-output "My_R1 : db 0f 49 40 db 0f 49 c0\n" } */ + /* { dg-output "My_R1 : db 0f 49 40 db 0f 49 c0.*\n" } */ put ("My_R2 :"); dump (&My_R2, sizeof (struct R2)); new_line (); - /* { dg-output "My_R2 : 40 49 0f db c0 49 0f db\n" } */ + /* { dg-output "My_R2 : 40 49 0f db c0 49 0f db.*\n" } */ Local_R1 = My_R1; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : db 0f 49 40 db 0f 49 c0\n" } */ + /* { dg-output "Local_R1 : db 0f 49 40 db 0f 49 c0.*\n" } */ Local_R2 = My_R2; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 49 0f db c0 49 0f db\n" } */ + /* { dg-output "Local_R2 : 40 49 0f db c0 49 0f db.*\n" } */ Local_R1.F = Pi - Pi * I; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : db 0f 49 40 db 0f 49 c0\n" } */ + /* { dg-output "Local_R1 : db 0f 49 40 db 0f 49 c0.*\n" } */ Local_R2.F = Pi - Pi * I; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 49 0f db c0 49 0f db\n" } */ + /* { dg-output "Local_R2 : 40 49 0f db c0 49 0f db.*\n" } */ Local_R1.F = Local_R2.F; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : db 0f 49 40 db 0f 49 c0\n" } */ + /* { dg-output "Local_R1 : db 0f 49 40 db 0f 49 c0.*\n" } */ Local_R2.F = Local_R1.F; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 49 0f db c0 49 0f db\n" } */ + /* { dg-output "Local_R2 : 40 49 0f db c0 49 0f db.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/p2.c b/gcc/testsuite/gcc.dg/sso/p2.c index 6d605379c15..2d929469252 100644 --- a/gcc/testsuite/gcc.dg/sso/p2.c +++ b/gcc/testsuite/gcc.dg/sso/p2.c @@ -13,24 +13,24 @@ int main (void) put ("My_R1 :"); dump (&My_R1, sizeof (struct R1)); new_line (); - /* { dg-output "My_R1 : e2 59 d1 48 b4 aa d9 bb\n" } */ + /* { dg-output "My_R1 : e2 59 d1 48 b4 aa d9 bb.*\n" } */ put ("My_R2 :"); dump (&My_R2, sizeof (struct R2)); new_line (); - /* { dg-output "My_R2 : 84 8d 15 9e 15 5b 35 df\n" } */ + /* { dg-output "My_R2 : 84 8d 15 9e 15 5b 35 df.*\n" } */ Local_R1 = My_R1; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : e2 59 d1 48 b4 aa d9 bb\n" } */ + /* { dg-output "Local_R1 : e2 59 d1 48 b4 aa d9 bb.*\n" } */ Local_R2 = My_R2; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 84 8d 15 9e 15 5b 35 df\n" } */ + /* { dg-output "Local_R2 : 84 8d 15 9e 15 5b 35 df.*\n" } */ Local_R1.S1 = 2; Local_R1.I = 0x12345678; @@ -43,7 +43,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : e2 59 d1 48 b4 aa d9 bb\n" } */ + /* { dg-output "Local_R1 : e2 59 d1 48 b4 aa d9 bb.*\n" } */ Local_R2.S1 = 2; Local_R2.I = 0x12345678; @@ -56,7 +56,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 84 8d 15 9e 15 5b 35 df\n" } */ + /* { dg-output "Local_R2 : 84 8d 15 9e 15 5b 35 df.*\n" } */ Local_R1.S1 = Local_R2.S1; Local_R1.I = Local_R2.I; @@ -69,7 +69,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : e2 59 d1 48 b4 aa d9 bb\n" } */ + /* { dg-output "Local_R1 : e2 59 d1 48 b4 aa d9 bb.*\n" } */ Local_R2.S1 = Local_R1.S1; Local_R2.I = Local_R1.I; @@ -82,7 +82,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 84 8d 15 9e 15 5b 35 df\n" } */ + /* { dg-output "Local_R2 : 84 8d 15 9e 15 5b 35 df.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/p3.c b/gcc/testsuite/gcc.dg/sso/p3.c index ce47dbd2443..fb715965d53 100644 --- a/gcc/testsuite/gcc.dg/sso/p3.c +++ b/gcc/testsuite/gcc.dg/sso/p3.c @@ -13,24 +13,24 @@ int main (void) put ("My_R1 :"); dump (&My_R1, sizeof (struct R1)); new_line (); - /* { dg-output "My_R1 : c2 7b f3 2a 5e 12 9a 95\n" } */ + /* { dg-output "My_R1 : c2 7b f3 2a 5e 12 9a 95.*\n" } */ put ("My_R2 :"); dump (&My_R2, sizeof (struct R2)); new_line (); - /* { dg-output "My_R2 : 09 e2 af 37 bd 24 d2 b4\n" } */ + /* { dg-output "My_R2 : 09 e2 af 37 bd 24 d2 b4.*\n" } */ Local_R1 = My_R1; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : c2 7b f3 2a 5e 12 9a 95\n" } */ + /* { dg-output "Local_R1 : c2 7b f3 2a 5e 12 9a 95.*\n" } */ Local_R2 = My_R2; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 09 e2 af 37 bd 24 d2 b4\n" } */ + /* { dg-output "Local_R2 : 09 e2 af 37 bd 24 d2 b4.*\n" } */ Local_R1.S1 = 2; Local_R1.I = 0x78ABCDEF; @@ -43,7 +43,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : c2 7b f3 2a 5e 12 9a 95\n" } */ + /* { dg-output "Local_R1 : c2 7b f3 2a 5e 12 9a 95.*\n" } */ Local_R2.S1 = 2; Local_R2.I = 0x78ABCDEF; @@ -56,7 +56,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 09 e2 af 37 bd 24 d2 b4\n" } */ + /* { dg-output "Local_R2 : 09 e2 af 37 bd 24 d2 b4.*\n" } */ Local_R1.S1 = Local_R2.S1; Local_R1.I = Local_R2.I; @@ -69,7 +69,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : c2 7b f3 2a 5e 12 9a 95\n" } */ + /* { dg-output "Local_R1 : c2 7b f3 2a 5e 12 9a 95.*\n" } */ Local_R2.S1 = Local_R1.S1; Local_R2.I = Local_R1.I; @@ -82,7 +82,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 09 e2 af 37 bd 24 d2 b4\n" } */ + /* { dg-output "Local_R2 : 09 e2 af 37 bd 24 d2 b4.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/p4.c b/gcc/testsuite/gcc.dg/sso/p4.c index 7d7224d9b30..ba0775fc84c 100644 --- a/gcc/testsuite/gcc.dg/sso/p4.c +++ b/gcc/testsuite/gcc.dg/sso/p4.c @@ -13,52 +13,52 @@ int main (void) put ("My_R1 :"); dump (&My_R1, sizeof (struct R1)); new_line (); - /* { dg-output "My_R1 : db 0f 49 40\n" } */ + /* { dg-output "My_R1 : db 0f 49 40.*\n" } */ put ("My_R2 :"); dump (&My_R2, sizeof (struct R2)); new_line (); - /* { dg-output "My_R2 : 40 49 0f db\n" } */ + /* { dg-output "My_R2 : 40 49 0f db.*\n" } */ Local_R1 = My_R1; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : db 0f 49 40\n" } */ + /* { dg-output "Local_R1 : db 0f 49 40.*\n" } */ Local_R2 = My_R2; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 49 0f db\n" } */ + /* { dg-output "Local_R2 : 40 49 0f db.*\n" } */ Local_R1.F = Pi; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : db 0f 49 40\n" } */ + /* { dg-output "Local_R1 : db 0f 49 40.*\n" } */ Local_R2.F = Pi; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 49 0f db\n" } */ + /* { dg-output "Local_R2 : 40 49 0f db.*\n" } */ Local_R1.F = Local_R2.F; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : db 0f 49 40\n" } */ + /* { dg-output "Local_R1 : db 0f 49 40.*\n" } */ Local_R2.F = Local_R1.F; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 49 0f db\n" } */ + /* { dg-output "Local_R2 : 40 49 0f db.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/p5.c b/gcc/testsuite/gcc.dg/sso/p5.c index 91bd6ba0a48..fc8b7e18d03 100644 --- a/gcc/testsuite/gcc.dg/sso/p5.c +++ b/gcc/testsuite/gcc.dg/sso/p5.c @@ -13,24 +13,24 @@ int main (void) put ("My_R1 :"); dump (&My_R1, sizeof (struct R1)); new_line (); - /* { dg-output "My_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "My_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("My_R2 :"); dump (&My_R2, sizeof (struct R2)); new_line (); - /* { dg-output "My_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "My_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R1 = My_R1; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R2 = My_R2; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R1.I = 0x12345678; Local_R1.A[0] = 0xAB0012; @@ -39,7 +39,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R2.I = 0x12345678; Local_R2.A[0] = 0xAB0012; @@ -48,7 +48,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R1.I = Local_R2.I; Local_R1.A[0] = Local_R2.A[0]; @@ -58,7 +58,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R2.I = Local_R1.I; Local_R2.A[0] = Local_R1.A[0]; @@ -68,7 +68,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/p6.c b/gcc/testsuite/gcc.dg/sso/p6.c index 8681c303c40..90805a7a698 100644 --- a/gcc/testsuite/gcc.dg/sso/p6.c +++ b/gcc/testsuite/gcc.dg/sso/p6.c @@ -13,24 +13,24 @@ int main (void) put ("My_R1 :"); dump (&My_R1, sizeof (struct R1)); new_line (); - /* { dg-output "My_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "My_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("My_R2 :"); dump (&My_R2, sizeof (struct R2)); new_line (); - /* { dg-output "My_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "My_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R1 = My_R1; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R2 = My_R2; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R1.I = 0x12345678; Local_R1.N.A[0] = 0xAB0012; @@ -39,7 +39,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R2.I = 0x12345678; Local_R2.N.A[0] = 0xAB0012; @@ -48,7 +48,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R1.I = Local_R2.I; Local_R1.N.A[0] = Local_R2.N.A[0]; @@ -58,7 +58,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R2.I = Local_R1.I; Local_R2.N.A[0] = Local_R1.N.A[0]; @@ -68,7 +68,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/p7.c b/gcc/testsuite/gcc.dg/sso/p7.c index e6bfa136574..e347ecf7c4d 100644 --- a/gcc/testsuite/gcc.dg/sso/p7.c +++ b/gcc/testsuite/gcc.dg/sso/p7.c @@ -13,24 +13,24 @@ int main (void) put ("My_R1 :"); dump (&My_R1, sizeof (struct R1)); new_line (); - /* { dg-output "My_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "My_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("My_R2 :"); dump (&My_R2, sizeof (struct R2)); new_line (); - /* { dg-output "My_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "My_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R1 = My_R1; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R2 = My_R2; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R1.I = 0x12345678; Local_R1.N.C1 = 0xAB0012; @@ -39,7 +39,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R2.I = 0x12345678; Local_R2.N.C1 = 0xAB0012; @@ -48,7 +48,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R1.I = Local_R2.I; Local_R1.N.C1 = Local_R2.N.C1; @@ -58,7 +58,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R2.I = Local_R1.I; Local_R2.N.C1 = Local_R1.N.C1; @@ -68,7 +68,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/p8.c b/gcc/testsuite/gcc.dg/sso/p8.c index d2e7bd1b95d..d66c7da3fec 100644 --- a/gcc/testsuite/gcc.dg/sso/p8.c +++ b/gcc/testsuite/gcc.dg/sso/p8.c @@ -13,24 +13,24 @@ int main (void) put ("My_R1 :"); dump (&My_R1, sizeof (struct R1)); new_line (); - /* { dg-output "My_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "My_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("My_R2 :"); dump (&My_R2, sizeof (struct R2)); new_line (); - /* { dg-output "My_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "My_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R1 = My_R1; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R2 = My_R2; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R1.I = 0x12345678; Local_R1.N.C1 = 0xAB0012; @@ -39,7 +39,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R2.I = 0x12345678; Local_R2.N.C1 = 0xAB0012; @@ -48,7 +48,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R1.I = Local_R2.I; Local_R1.N.C1 = Local_R2.N.C1; @@ -58,7 +58,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R2.I = Local_R1.I; Local_R2.N.C1 = Local_R1.N.C1; @@ -68,7 +68,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/p9.c b/gcc/testsuite/gcc.dg/sso/p9.c index c3bee117cdc..ce565e9c699 100644 --- a/gcc/testsuite/gcc.dg/sso/p9.c +++ b/gcc/testsuite/gcc.dg/sso/p9.c @@ -13,52 +13,52 @@ int main (void) put ("My_R1 :"); dump (&My_R1, sizeof (struct R1)); new_line (); - /* { dg-output "My_R1 : 18 2d 44 54 fb 21 09 40\n" } */ + /* { dg-output "My_R1 : 18 2d 44 54 fb 21 09 40.*\n" } */ put ("My_R2 :"); dump (&My_R2, sizeof (struct R2)); new_line (); - /* { dg-output "My_R2 : 40 09 21 fb 54 44 2d 18\n" } */ + /* { dg-output "My_R2 : 40 09 21 fb 54 44 2d 18.*\n" } */ Local_R1 = My_R1; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 18 2d 44 54 fb 21 09 40\n" } */ + /* { dg-output "Local_R1 : 18 2d 44 54 fb 21 09 40.*\n" } */ Local_R2 = My_R2; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 09 21 fb 54 44 2d 18\n" } */ + /* { dg-output "Local_R2 : 40 09 21 fb 54 44 2d 18.*\n" } */ Local_R1.F = Pi; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 18 2d 44 54 fb 21 09 40\n" } */ + /* { dg-output "Local_R1 : 18 2d 44 54 fb 21 09 40.*\n" } */ Local_R2.F = Pi; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 09 21 fb 54 44 2d 18\n" } */ + /* { dg-output "Local_R2 : 40 09 21 fb 54 44 2d 18.*\n" } */ Local_R1.F = Local_R2.F; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 18 2d 44 54 fb 21 09 40\n" } */ + /* { dg-output "Local_R1 : 18 2d 44 54 fb 21 09 40.*\n" } */ Local_R2.F = Local_R1.F; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 09 21 fb 54 44 2d 18\n" } */ + /* { dg-output "Local_R2 : 40 09 21 fb 54 44 2d 18.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/q1.c b/gcc/testsuite/gcc.dg/sso/q1.c index 6da5a5f4533..f61398ba1f8 100644 --- a/gcc/testsuite/gcc.dg/sso/q1.c +++ b/gcc/testsuite/gcc.dg/sso/q1.c @@ -21,22 +21,22 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12\n" } */ + /* { dg-output "A1 : 78 56 34 12.*\n" } */ put ("B1 :"); dump (&B1, sizeof (struct R1)); new_line (); - /* { dg-output "B1 : 78 56 34 12\n" } */ + /* { dg-output "B1 : 78 56 34 12.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78\n" } */ + /* { dg-output "A2 : 12 34 56 78.*\n" } */ put ("B2 :"); dump (&B2, sizeof (struct R2)); new_line (); - /* { dg-output "B2 : 12 34 56 78\n" } */ + /* { dg-output "B2 : 12 34 56 78.*\n" } */ if (A1.I != B1.I) abort (); diff --git a/gcc/testsuite/gcc.dg/sso/q13.c b/gcc/testsuite/gcc.dg/sso/q13.c index ee34bb2289d..c00701dcc0e 100644 --- a/gcc/testsuite/gcc.dg/sso/q13.c +++ b/gcc/testsuite/gcc.dg/sso/q13.c @@ -21,22 +21,22 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : db 0f 49 40 db 0f 49 c0\n" } */ + /* { dg-output "A1 : db 0f 49 40 db 0f 49 c0.*\n" } */ put ("B1 :"); dump (&B1, sizeof (struct R1)); new_line (); - /* { dg-output "B1 : db 0f 49 40 db 0f 49 c0\n" } */ + /* { dg-output "B1 : db 0f 49 40 db 0f 49 c0.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 40 49 0f db c0 49 0f db\n" } */ + /* { dg-output "A2 : 40 49 0f db c0 49 0f db.*\n" } */ put ("B2 :"); dump (&B2, sizeof (struct R2)); new_line (); - /* { dg-output "B2 : 40 49 0f db c0 49 0f db\n" } */ + /* { dg-output "B2 : 40 49 0f db c0 49 0f db.*\n" } */ if (A1.F != B1.F) abort (); diff --git a/gcc/testsuite/gcc.dg/sso/q2.c b/gcc/testsuite/gcc.dg/sso/q2.c index 9e1d1d27ff3..35e2839bdd7 100644 --- a/gcc/testsuite/gcc.dg/sso/q2.c +++ b/gcc/testsuite/gcc.dg/sso/q2.c @@ -21,22 +21,22 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : e2 59 d1 48 b4 aa d9 bb\n" } */ + /* { dg-output "A1 : e2 59 d1 48 b4 aa d9 bb.*\n" } */ put ("B1 :"); dump (&B1, sizeof (struct R1)); new_line (); - /* { dg-output "B1 : e2 59 d1 48 b4 aa d9 bb\n" } */ + /* { dg-output "B1 : e2 59 d1 48 b4 aa d9 bb.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 84 8d 15 9e 15 5b 35 df\n" } */ + /* { dg-output "A2 : 84 8d 15 9e 15 5b 35 df.*\n" } */ put ("B2 :"); dump (&B2, sizeof (struct R2)); new_line (); - /* { dg-output "B2 : 84 8d 15 9e 15 5b 35 df\n" } */ + /* { dg-output "B2 : 84 8d 15 9e 15 5b 35 df.*\n" } */ if (A1.S1 != B1.S1) abort (); diff --git a/gcc/testsuite/gcc.dg/sso/q3.c b/gcc/testsuite/gcc.dg/sso/q3.c index 6e72d7efc45..31d395a37ed 100644 --- a/gcc/testsuite/gcc.dg/sso/q3.c +++ b/gcc/testsuite/gcc.dg/sso/q3.c @@ -21,22 +21,22 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : c2 7b f3 2a 5e 12 9a 95\n" } */ + /* { dg-output "A1 : c2 7b f3 2a 5e 12 9a 95.*\n" } */ put ("B1 :"); dump (&B1, sizeof (struct R1)); new_line (); - /* { dg-output "B1 : c2 7b f3 2a 5e 12 9a 95\n" } */ + /* { dg-output "B1 : c2 7b f3 2a 5e 12 9a 95.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 09 e2 af 37 bd 24 d2 b4\n" } */ + /* { dg-output "A2 : 09 e2 af 37 bd 24 d2 b4.*\n" } */ put ("B2 :"); dump (&B2, sizeof (struct R2)); new_line (); - /* { dg-output "B2 : 09 e2 af 37 bd 24 d2 b4\n" } */ + /* { dg-output "B2 : 09 e2 af 37 bd 24 d2 b4.*\n" } */ if (A1.S1 != B1.S1) abort (); diff --git a/gcc/testsuite/gcc.dg/sso/q4.c b/gcc/testsuite/gcc.dg/sso/q4.c index 6966c8f7211..72a1366ff03 100644 --- a/gcc/testsuite/gcc.dg/sso/q4.c +++ b/gcc/testsuite/gcc.dg/sso/q4.c @@ -21,22 +21,22 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : db 0f 49 40\n" } */ + /* { dg-output "A1 : db 0f 49 40.*\n" } */ put ("B1 :"); dump (&B1, sizeof (struct R1)); new_line (); - /* { dg-output "B1 : db 0f 49 40\n" } */ + /* { dg-output "B1 : db 0f 49 40.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 40 49 0f db\n" } */ + /* { dg-output "A2 : 40 49 0f db.*\n" } */ put ("B2 :"); dump (&B2, sizeof (struct R2)); new_line (); - /* { dg-output "B2 : 40 49 0f db\n" } */ + /* { dg-output "B2 : 40 49 0f db.*\n" } */ if (A1.F != B1.F) abort (); diff --git a/gcc/testsuite/gcc.dg/sso/q5.c b/gcc/testsuite/gcc.dg/sso/q5.c index 03dfdb7c35c..678c3d36be8 100644 --- a/gcc/testsuite/gcc.dg/sso/q5.c +++ b/gcc/testsuite/gcc.dg/sso/q5.c @@ -21,22 +21,22 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("B1 :"); dump (&B1, sizeof (struct R1)); new_line (); - /* { dg-output "B1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "B1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("B2 :"); dump (&B2, sizeof (struct R2)); new_line (); - /* { dg-output "B2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "B2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ if (A1.I != B1.I || A1.A[0] != B1.A[0]) abort(); diff --git a/gcc/testsuite/gcc.dg/sso/q6.c b/gcc/testsuite/gcc.dg/sso/q6.c index 1292f6af7bd..f69bad0698d 100644 --- a/gcc/testsuite/gcc.dg/sso/q6.c +++ b/gcc/testsuite/gcc.dg/sso/q6.c @@ -21,21 +21,21 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("B1 :"); dump (&B1, sizeof (struct R1)); new_line (); - /* { dg-output "B1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "B1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("B2 :"); dump (&B2, sizeof (struct R2)); new_line (); - /* { dg-output "B2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "B2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ if (A1.I != B1.I || A1.N.A[0] != B1.N.A[0]) abort(); diff --git a/gcc/testsuite/gcc.dg/sso/q7.c b/gcc/testsuite/gcc.dg/sso/q7.c index c088f05a0c7..0c3dbc517d4 100644 --- a/gcc/testsuite/gcc.dg/sso/q7.c +++ b/gcc/testsuite/gcc.dg/sso/q7.c @@ -21,22 +21,22 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("B1 :"); dump (&B1, sizeof (struct R1)); new_line (); - /* { dg-output "B1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "B1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("B2 :"); dump (&B2, sizeof (struct R2)); new_line (); - /* { dg-output "B2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "B2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ if (A1.I != B1.I || A1.N.C1 != B1.N.C1) abort(); diff --git a/gcc/testsuite/gcc.dg/sso/q8.c b/gcc/testsuite/gcc.dg/sso/q8.c index 108afc1822f..3846cb14751 100644 --- a/gcc/testsuite/gcc.dg/sso/q8.c +++ b/gcc/testsuite/gcc.dg/sso/q8.c @@ -21,22 +21,22 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("B1 :"); dump (&B1, sizeof (struct R1)); new_line (); - /* { dg-output "B1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "B1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("B2 :"); dump (&B2, sizeof (struct R2)); new_line (); - /* { dg-output "B2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "B2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ if (A1.I != B1.I || A1.N.C1 != B1.N.C1) abort(); diff --git a/gcc/testsuite/gcc.dg/sso/q9.c b/gcc/testsuite/gcc.dg/sso/q9.c index ac6c8dd7f8f..aafb81c9518 100644 --- a/gcc/testsuite/gcc.dg/sso/q9.c +++ b/gcc/testsuite/gcc.dg/sso/q9.c @@ -21,22 +21,22 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 18 2d 44 54 fb 21 09 40\n" } */ + /* { dg-output "A1 : 18 2d 44 54 fb 21 09 40.*\n" } */ put ("B1 :"); dump (&B1, sizeof (struct R1)); new_line (); - /* { dg-output "B1 : 18 2d 44 54 fb 21 09 40\n" } */ + /* { dg-output "B1 : 18 2d 44 54 fb 21 09 40.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 40 09 21 fb 54 44 2d 18\n" } */ + /* { dg-output "A2 : 40 09 21 fb 54 44 2d 18.*\n" } */ put ("B2 :"); dump (&B2, sizeof (struct R2)); new_line (); - /* { dg-output "B2 : 40 09 21 fb 54 44 2d 18\n" } */ + /* { dg-output "B2 : 40 09 21 fb 54 44 2d 18.*\n" } */ if (A1.F != B1.F) abort (); diff --git a/gcc/testsuite/gcc.dg/sso/r3.c b/gcc/testsuite/gcc.dg/sso/r3.c index 82b55bda73b..b9a0cc49fa3 100644 --- a/gcc/testsuite/gcc.dg/sso/r3.c +++ b/gcc/testsuite/gcc.dg/sso/r3.c @@ -44,12 +44,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : c2 7b f3 2a 5e 12 9a 95\n" } */ + /* { dg-output "A1 : c2 7b f3 2a 5e 12 9a 95.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 09 e2 af 37 bd 24 d2 b4\n" } */ + /* { dg-output "A2 : 09 e2 af 37 bd 24 d2 b4.*\n" } */ if (Get_Elem1 (A1) != 0x78ABCDEF) abort (); diff --git a/gcc/testsuite/gcc.dg/sso/r5.c b/gcc/testsuite/gcc.dg/sso/r5.c index 6911408eb31..1323325c721 100644 --- a/gcc/testsuite/gcc.dg/sso/r5.c +++ b/gcc/testsuite/gcc.dg/sso/r5.c @@ -44,12 +44,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ if (Get_Elem1 (A1) != 0xAB0012) abort (); diff --git a/gcc/testsuite/gcc.dg/sso/r6.c b/gcc/testsuite/gcc.dg/sso/r6.c index 904dd5c0ac3..452a10670ac 100644 --- a/gcc/testsuite/gcc.dg/sso/r6.c +++ b/gcc/testsuite/gcc.dg/sso/r6.c @@ -44,12 +44,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ if (Get_Elem1 (A1) != 0xAB0012) abort (); diff --git a/gcc/testsuite/gcc.dg/sso/r7.c b/gcc/testsuite/gcc.dg/sso/r7.c index a6450eed8e3..3c46e61d1c0 100644 --- a/gcc/testsuite/gcc.dg/sso/r7.c +++ b/gcc/testsuite/gcc.dg/sso/r7.c @@ -44,12 +44,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ if (Get_Elem1 (A1) != 0xAB0012) abort (); diff --git a/gcc/testsuite/gcc.dg/sso/r8.c b/gcc/testsuite/gcc.dg/sso/r8.c index 448da504a7e..0ea3a614e59 100644 --- a/gcc/testsuite/gcc.dg/sso/r8.c +++ b/gcc/testsuite/gcc.dg/sso/r8.c @@ -44,12 +44,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ if (Get_Elem1 (A1) != 0xAB0012) abort (); diff --git a/gcc/testsuite/gcc.dg/sso/s3.c b/gcc/testsuite/gcc.dg/sso/s3.c index 33a07c169bc..6a629377cdb 100644 --- a/gcc/testsuite/gcc.dg/sso/s3.c +++ b/gcc/testsuite/gcc.dg/sso/s3.c @@ -20,12 +20,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : c2 7b f3 2a 5e 12 9a 95\n" } */ + /* { dg-output "A1 : c2 7b f3 2a 5e 12 9a 95.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 09 e2 af 37 bd 24 d2 b4\n" } */ + /* { dg-output "A2 : 09 e2 af 37 bd 24 d2 b4.*\n" } */ N1 = A1.N; C1 = N1.C1; @@ -33,13 +33,13 @@ int main (void) C3 = N1.C3; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 18\n" } */ + /* { dg-output "C1 : 18.*\n" } */ printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 52\n" } */ + /* { dg-output "C2 : 52.*\n" } */ printf ("C3 : %d\n", C3); - /* { dg-output "C3 : 86\n" } */ + /* { dg-output "C3 : 86.*\n" } */ N1.C1 = C1; N1.C2 = C2; @@ -52,13 +52,13 @@ int main (void) C3 = N2.C3; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 18\n" } */ + /* { dg-output "C1 : 18.*\n" } */ printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 52\n" } */ + /* { dg-output "C2 : 52.*\n" } */ printf ("C3 : %d\n", C3); - /* { dg-output "C3 : 86\n" } */ + /* { dg-output "C3 : 86.*\n" } */ N2.C1 = C1; N2.C2 = C2; @@ -68,12 +68,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : c2 7b f3 2a 5e 12 9a 95\n" } */ + /* { dg-output "A1 : c2 7b f3 2a 5e 12 9a 95.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 09 e2 af 37 bd 24 d2 b4\n" } */ + /* { dg-output "A2 : 09 e2 af 37 bd 24 d2 b4.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/s5.c b/gcc/testsuite/gcc.dg/sso/s5.c index f7f63befc46..f29f634e3b6 100644 --- a/gcc/testsuite/gcc.dg/sso/s5.c +++ b/gcc/testsuite/gcc.dg/sso/s5.c @@ -32,12 +32,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ __builtin_memcpy (N1.A, A1.A, sizeof (int) * 3); C1 = N1.A[0]; @@ -45,13 +45,13 @@ int main (void) C3 = N1.A[2]; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 11206674\n" } */ + /* { dg-output "C1 : 11206674.*\n" } */ printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 13434932\n" } */ + /* { dg-output "C2 : 13434932.*\n" } */ printf ("C3 : %d\n", C3); - /* { dg-output "C3 : 15663190\n" } */ + /* { dg-output "C3 : 15663190.*\n" } */ N1.A[0] = C1; N1.A[1] = C2; @@ -64,13 +64,13 @@ int main (void) C3 = N2.A[2]; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 11206674\n" } */ + /* { dg-output "C1 : 11206674.*\n" } */ printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 13434932\n" } */ + /* { dg-output "C2 : 13434932.*\n" } */ printf ("C3 : %d\n", C3); - /* { dg-output "C3 : 15663190\n" } */ + /* { dg-output "C3 : 15663190.*\n" } */ N2.A[0] = C1; N2.A[1] = C2; @@ -80,12 +80,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/s6.c b/gcc/testsuite/gcc.dg/sso/s6.c index acd8e3d0d95..a1d0494554b 100644 --- a/gcc/testsuite/gcc.dg/sso/s6.c +++ b/gcc/testsuite/gcc.dg/sso/s6.c @@ -22,12 +22,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ __builtin_memcpy (N1.A, A1.N.A, sizeof (int) * 3); C1 = N1.A[0]; @@ -35,13 +35,13 @@ int main (void) C3 = N1.A[2]; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 11206674\n" } */ + /* { dg-output "C1 : 11206674.*\n" } */ printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 13434932\n" } */ + /* { dg-output "C2 : 13434932.*\n" } */ printf ("C3 : %d\n", C3); - /* { dg-output "C3 : 15663190\n" } */ + /* { dg-output "C3 : 15663190.*\n" } */ N1.A[0] = C1; N1.A[1] = C2; @@ -54,13 +54,13 @@ int main (void) C3 = N2.A[2]; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 11206674\n" } */ + /* { dg-output "C1 : 11206674.*\n" } */ printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 13434932\n" } */ + /* { dg-output "C2 : 13434932.*\n" } */ printf ("C3 : %d\n", C3); - /* { dg-output "C3 : 15663190\n" } */ + /* { dg-output "C3 : 15663190.*\n" } */ N2.A[0] = C1; N2.A[1] = C2; @@ -70,12 +70,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/s7.c b/gcc/testsuite/gcc.dg/sso/s7.c index 88e074117da..37d07c7fed6 100644 --- a/gcc/testsuite/gcc.dg/sso/s7.c +++ b/gcc/testsuite/gcc.dg/sso/s7.c @@ -20,12 +20,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ N1 = A1.N; C1 = N1.C1; @@ -33,13 +33,13 @@ int main (void) C3 = N1.C3; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 11206674\n" } */ + /* { dg-output "C1 : 11206674.*\n" } */ printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 13434932\n" } */ + /* { dg-output "C2 : 13434932.*\n" } */ printf ("C3 : %d\n", C3); - /* { dg-output "C3 : 15663190\n" } */ + /* { dg-output "C3 : 15663190.*\n" } */ N1.C1 = C1; N1.C2 = C2; @@ -52,13 +52,13 @@ int main (void) C3 = N2.C3; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 11206674\n" } */ + /* { dg-output "C1 : 11206674.*\n" } */ printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 13434932\n" } */ + /* { dg-output "C2 : 13434932.*\n" } */ printf ("C3 : %d\n", C3); - /* { dg-output "C3 : 15663190\n" } */ + /* { dg-output "C3 : 15663190.*\n" } */ N2.C1 = C1; N2.C2 = C2; @@ -68,12 +68,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/s8.c b/gcc/testsuite/gcc.dg/sso/s8.c index 1154da3b7f4..5ff9c36ca7f 100644 --- a/gcc/testsuite/gcc.dg/sso/s8.c +++ b/gcc/testsuite/gcc.dg/sso/s8.c @@ -20,12 +20,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ N1 = A1.N; C1 = N1.C1; @@ -33,13 +33,13 @@ int main (void) C3 = N1.C3; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 11206674\n" } */ + /* { dg-output "C1 : 11206674.*\n" } */ printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 13434932\n" } */ + /* { dg-output "C2 : 13434932.*\n" } */ printf ("C3 : %d\n", C3); - /* { dg-output "C3 : 15663190\n" } */ + /* { dg-output "C3 : 15663190.*\n" } */ N1.C1 = C1; N1.C2 = C2; @@ -52,13 +52,13 @@ int main (void) C3 = N2.C3; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 11206674\n" } */ + /* { dg-output "C1 : 11206674.*\n" } */ printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 13434932\n" } */ + /* { dg-output "C2 : 13434932.*\n" } */ printf ("C3 : %d\n", C3); - /* { dg-output "C3 : 15663190\n" } */ + /* { dg-output "C3 : 15663190.*\n" } */ N2.C1 = C1; N2.C2 = C2; @@ -68,12 +68,12 @@ int main (void) put ("A1 :"); dump (&A1, sizeof (struct R1)); new_line (); - /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ put ("A2 :"); dump (&A2, sizeof (struct R2)); new_line (); - /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/t1.c b/gcc/testsuite/gcc.dg/sso/t1.c index 6f7881ee0ed..6f4a5870ba0 100644 --- a/gcc/testsuite/gcc.dg/sso/t1.c +++ b/gcc/testsuite/gcc.dg/sso/t1.c @@ -15,42 +15,42 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 79 56 34 12\n" } */ + /* { dg-output "Local_R1 : 79 56 34 12.*\n" } */ Local_R2.I = My_R2.I + 1; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 79\n" } */ + /* { dg-output "Local_R2 : 12 34 56 79.*\n" } */ Local_R1.I = 0x12345678; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12.*\n" } */ Local_R2.I = 0x12345678; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78.*\n" } */ Local_R1.I = Local_R1.I + 1; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 79 56 34 12\n" } */ + /* { dg-output "Local_R1 : 79 56 34 12.*\n" } */ Local_R2.I = Local_R2.I + 1; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 79\n" } */ + /* { dg-output "Local_R2 : 12 34 56 79.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/t13.c b/gcc/testsuite/gcc.dg/sso/t13.c index a0f43413449..077f0c90da6 100644 --- a/gcc/testsuite/gcc.dg/sso/t13.c +++ b/gcc/testsuite/gcc.dg/sso/t13.c @@ -15,42 +15,42 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : ee 87 84 40 db 0f 09 c0\n" } */ + /* { dg-output "Local_R1 : ee 87 84 40 db 0f 09 c0.*\n" } */ Local_R2.F = My_R2.F + (1.0f + 1.0f * I); put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 84 87 ee c0 09 0f db\n" } */ + /* { dg-output "Local_R2 : 40 84 87 ee c0 09 0f db.*\n" } */ Local_R1.F = Pi - Pi * I; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : db 0f 49 40 db 0f 49 c0\n" } */ + /* { dg-output "Local_R1 : db 0f 49 40 db 0f 49 c0.*\n" } */ Local_R2.F = Pi - Pi * I; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 49 0f db c0 49 0f db\n" } */ + /* { dg-output "Local_R2 : 40 49 0f db c0 49 0f db.*\n" } */ Local_R1.F = Local_R1.F + (1.0f + 1.0f * I); put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : ee 87 84 40 db 0f 09 c0\n" } */ + /* { dg-output "Local_R1 : ee 87 84 40 db 0f 09 c0.*\n" } */ Local_R2.F = Local_R2.F + (1.0f + 1.0f * I); put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 84 87 ee c0 09 0f db\n" } */ + /* { dg-output "Local_R2 : 40 84 87 ee c0 09 0f db.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/t2.c b/gcc/testsuite/gcc.dg/sso/t2.c index 816363284db..9d9d2aff537 100644 --- a/gcc/testsuite/gcc.dg/sso/t2.c +++ b/gcc/testsuite/gcc.dg/sso/t2.c @@ -21,7 +21,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : e5 59 d1 48 b0 a0 c1 03\n" } */ + /* { dg-output "Local_R1 : e5 59 d1 48 b0 a0 c1 03.*\n" } */ Local_R2.S1 = My_R2.S1 - 1; Local_R2.I = My_R2.I + 1; @@ -34,7 +34,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 44 8d 15 9e 40 58 34 1e\n" } */ + /* { dg-output "Local_R2 : 44 8d 15 9e 40 58 34 1e.*\n" } */ Local_R1.S1 = 2; Local_R1.I = 0x12345678; @@ -47,7 +47,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : e2 59 d1 48 b4 aa d9 bb\n" } */ + /* { dg-output "Local_R1 : e2 59 d1 48 b4 aa d9 bb.*\n" } */ Local_R2.S1 = 2; Local_R2.I = 0x12345678; @@ -60,7 +60,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 84 8d 15 9e 15 5b 35 df\n" } */ + /* { dg-output "Local_R2 : 84 8d 15 9e 15 5b 35 df.*\n" } */ Local_R1.S1 = Local_R1.S1 - 1; Local_R1.I = Local_R1.I + 1; @@ -73,7 +73,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : e5 59 d1 48 b0 a0 c1 03\n" } */ + /* { dg-output "Local_R1 : e5 59 d1 48 b0 a0 c1 03.*\n" } */ Local_R2.S1 = Local_R2.S1 - 1; Local_R2.I = Local_R2.I + 1; @@ -86,7 +86,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 44 8d 15 9e 40 58 34 1e\n" } */ + /* { dg-output "Local_R2 : 44 8d 15 9e 40 58 34 1e.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/t3.c b/gcc/testsuite/gcc.dg/sso/t3.c index e2f40704724..5a5a54fbd8d 100644 --- a/gcc/testsuite/gcc.dg/sso/t3.c +++ b/gcc/testsuite/gcc.dg/sso/t3.c @@ -21,7 +21,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 01 7c f3 2a 1e 02 82 01\n" } */ + /* { dg-output "Local_R1 : 01 7c f3 2a 1e 02 82 01.*\n" } */ Local_R2.S1 = My_R2.S1 - 1; Local_R2.I = My_R2.I + 1; @@ -34,7 +34,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 05 e2 af 37 c0 04 10 30\n" } */ + /* { dg-output "Local_R2 : 05 e2 af 37 c0 04 10 30.*\n" } */ Local_R1.S1 = 2; Local_R1.I = 0x78ABCDEF; @@ -47,7 +47,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : c2 7b f3 2a 5e 12 9a 95\n" } */ + /* { dg-output "Local_R1 : c2 7b f3 2a 5e 12 9a 95.*\n" } */ Local_R2.S1 = 2; Local_R2.I = 0x78ABCDEF; @@ -60,7 +60,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 09 e2 af 37 bd 24 d2 b4\n" } */ + /* { dg-output "Local_R2 : 09 e2 af 37 bd 24 d2 b4.*\n" } */ Local_R1.S1 = Local_R1.S1 - 1; Local_R1.I = Local_R1.I + 1; @@ -73,7 +73,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 01 7c f3 2a 1e 02 82 01\n" } */ + /* { dg-output "Local_R1 : 01 7c f3 2a 1e 02 82 01.*\n" } */ Local_R2.S1 = Local_R2.S1 - 1; Local_R2.I = Local_R2.I + 1; @@ -86,7 +86,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 05 e2 af 37 c0 04 10 30\n" } */ + /* { dg-output "Local_R2 : 05 e2 af 37 c0 04 10 30.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/t4.c b/gcc/testsuite/gcc.dg/sso/t4.c index f5a7eb01627..e166247519c 100644 --- a/gcc/testsuite/gcc.dg/sso/t4.c +++ b/gcc/testsuite/gcc.dg/sso/t4.c @@ -15,42 +15,42 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : ee 87 84 40\n" } */ + /* { dg-output "Local_R1 : ee 87 84 40.*\n" } */ Local_R2.F = My_R2.F + 1.0f; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 84 87 ee\n" } */ + /* { dg-output "Local_R2 : 40 84 87 ee.*\n" } */ Local_R1.F = Pi; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : db 0f 49 40\n" } */ + /* { dg-output "Local_R1 : db 0f 49 40.*\n" } */ Local_R2.F = Pi; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 49 0f db\n" } */ + /* { dg-output "Local_R2 : 40 49 0f db.*\n" } */ Local_R1.F = Local_R1.F + 1.0f; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : ee 87 84 40\n" } */ + /* { dg-output "Local_R1 : ee 87 84 40.*\n" } */ Local_R2.F = Local_R2.F + 1.0f; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 84 87 ee\n" } */ + /* { dg-output "Local_R2 : 40 84 87 ee.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/t5.c b/gcc/testsuite/gcc.dg/sso/t5.c index 7cefb203dd8..1d506db7162 100644 --- a/gcc/testsuite/gcc.dg/sso/t5.c +++ b/gcc/testsuite/gcc.dg/sso/t5.c @@ -18,7 +18,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" } */ Local_R2.I = My_R2.I + 1; Local_R2.A[0] = My_R2.A[0] + 1; @@ -28,7 +28,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57\n" } */ + /* { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" } */ Local_R1.I = 0x12345678; Local_R1.A[0] = 0xAB0012; @@ -37,7 +37,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R2.I = 0x12345678; Local_R2.A[0] = 0xAB0012; @@ -46,7 +46,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R1.I = Local_R1.I + 1; Local_R1.A[0] = Local_R1.A[0] + 1; @@ -56,7 +56,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" } */ Local_R2.I = Local_R2.I + 1; Local_R2.A[0] = Local_R2.A[0] + 1; @@ -66,7 +66,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57\n" } */ + /* { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/t6.c b/gcc/testsuite/gcc.dg/sso/t6.c index 8fb550b0ff1..018f9bda900 100644 --- a/gcc/testsuite/gcc.dg/sso/t6.c +++ b/gcc/testsuite/gcc.dg/sso/t6.c @@ -18,7 +18,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 79 56 34 12 00 ab 00 13 00 cd 00 35 00 ef 00 57\n" } */ + /* { dg-output "Local_R1 : 79 56 34 12 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" } */ Local_R2.I = My_R2.I + 1; Local_R2.N.A[0] = My_R2.N.A[0] + 1; @@ -28,7 +28,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 79 13 00 ab 00 35 00 cd 00 57 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 79 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" } */ Local_R1.I = 0x12345678; Local_R1.N.A[0] = 0xAB0012; @@ -37,7 +37,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R2.I = 0x12345678; Local_R2.N.A[0] = 0xAB0012; @@ -46,7 +46,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R1.I = Local_R1.I + 1; Local_R1.N.A[0] = Local_R1.N.A[0] + 1; @@ -56,7 +56,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 79 56 34 12 00 ab 00 13 00 cd 00 35 00 ef 00 57\n" } */ + /* { dg-output "Local_R1 : 79 56 34 12 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" } */ Local_R2.I = Local_R2.I + 1; Local_R2.N.A[0] = Local_R2.N.A[0] + 1; @@ -66,7 +66,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 79 13 00 ab 00 35 00 cd 00 57 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 79 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/t7.c b/gcc/testsuite/gcc.dg/sso/t7.c index 59df566cd80..6e6443bc7e0 100644 --- a/gcc/testsuite/gcc.dg/sso/t7.c +++ b/gcc/testsuite/gcc.dg/sso/t7.c @@ -18,7 +18,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" } */ Local_R2.I = My_R2.I + 1; Local_R2.N.C1 = My_R2.N.C1 + 1; @@ -28,7 +28,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57\n" } */ + /* { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" } */ Local_R1.I = 0x12345678; Local_R1.N.C1 = 0xAB0012; @@ -37,7 +37,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R2.I = 0x12345678; Local_R2.N.C1 = 0xAB0012; @@ -46,7 +46,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R1.I = Local_R1.I + 1; Local_R1.N.C1 = Local_R1.N.C1 + 1; @@ -56,7 +56,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" } */ Local_R2.I = Local_R2.I + 1; Local_R2.N.C1 = Local_R2.N.C1 + 1; @@ -66,7 +66,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57\n" } */ + /* { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/t8.c b/gcc/testsuite/gcc.dg/sso/t8.c index 28a0bf35640..8fbb8170adb 100644 --- a/gcc/testsuite/gcc.dg/sso/t8.c +++ b/gcc/testsuite/gcc.dg/sso/t8.c @@ -18,7 +18,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 79 56 34 12 00 ab 00 13 00 cd 00 35 00 ef 00 57\n" } */ + /* { dg-output "Local_R1 : 79 56 34 12 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" } */ Local_R2.I = My_R2.I + 1; Local_R2.N.C1 = My_R2.N.C1 + 1; @@ -28,7 +28,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 79 13 00 ab 00 35 00 cd 00 57 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 79 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" } */ Local_R1.I = 0x12345678; Local_R1.N.C1 = 0xAB0012; @@ -37,7 +37,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R2.I = 0x12345678; Local_R2.N.C1 = 0xAB0012; @@ -46,7 +46,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R1.I = Local_R1.I + 1; Local_R1.N.C1 = Local_R1.N.C1 + 1; @@ -56,7 +56,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 79 56 34 12 00 ab 00 13 00 cd 00 35 00 ef 00 57\n" } */ + /* { dg-output "Local_R1 : 79 56 34 12 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" } */ Local_R2.I = Local_R2.I + 1; Local_R2.N.C1 = Local_R2.N.C1 + 1; @@ -66,7 +66,7 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 12 34 56 79 13 00 ab 00 35 00 cd 00 57 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 12 34 56 79 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/t9.c b/gcc/testsuite/gcc.dg/sso/t9.c index 1060bb43f3c..2985bfce9e7 100644 --- a/gcc/testsuite/gcc.dg/sso/t9.c +++ b/gcc/testsuite/gcc.dg/sso/t9.c @@ -15,42 +15,42 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 8c 16 22 aa fd 90 10 40\n" } */ + /* { dg-output "Local_R1 : 8c 16 22 aa fd 90 10 40.*\n" } */ Local_R2.F = My_R2.F + 1.0; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 10 90 fd aa 22 16 8c\n" } */ + /* { dg-output "Local_R2 : 40 10 90 fd aa 22 16 8c.*\n" } */ Local_R1.F = Pi; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 18 2d 44 54 fb 21 09 40\n" } */ + /* { dg-output "Local_R1 : 18 2d 44 54 fb 21 09 40.*\n" } */ Local_R2.F = Pi; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 09 21 fb 54 44 2d 18\n" } */ + /* { dg-output "Local_R2 : 40 09 21 fb 54 44 2d 18.*\n" } */ Local_R1.F = Local_R1.F + 1.0; put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 8c 16 22 aa fd 90 10 40\n" } */ + /* { dg-output "Local_R1 : 8c 16 22 aa fd 90 10 40.*\n" } */ Local_R2.F = Local_R2.F + 1.0; put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 40 10 90 fd aa 22 16 8c\n" } */ + /* { dg-output "Local_R2 : 40 10 90 fd aa 22 16 8c.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/u5.c b/gcc/testsuite/gcc.dg/sso/u5.c index 01ca8b58f13..8b9d09719da 100644 --- a/gcc/testsuite/gcc.dg/sso/u5.c +++ b/gcc/testsuite/gcc.dg/sso/u5.c @@ -19,7 +19,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 01 00 00 00 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R1 : 01 00 00 00 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ Local_R2.I = 1; Local_R2.A[0] = 0xAB0012; @@ -28,25 +28,25 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 00 00 00 01 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R2 : 00 00 00 01 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ C1 = Local_R1.A[Local_R1.I]; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 13434932\n" } */ + /* { dg-output "C1 : 13434932.*\n" } */ Local_R1.I++; C1 = Local_R1.A[Local_R1.I]; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 15663190\n" } */ + /* { dg-output "C1 : 15663190.*\n" } */ C2 = Local_R2.A[Local_R2.I]; printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 13434932\n" } */ + /* { dg-output "C2 : 13434932.*\n" } */ Local_R2.I++; C2 = Local_R2.A[Local_R2.I]; printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 15663190\n" } */ + /* { dg-output "C2 : 15663190.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/sso/u6.c b/gcc/testsuite/gcc.dg/sso/u6.c index ae8172e1ffe..4b2ca1c9f13 100644 --- a/gcc/testsuite/gcc.dg/sso/u6.c +++ b/gcc/testsuite/gcc.dg/sso/u6.c @@ -19,7 +19,7 @@ int main (void) put ("Local_R1 :"); dump (&Local_R1, sizeof (struct R1)); new_line (); - /* { dg-output "Local_R1 : 01 00 00 00 00 ab 00 12 00 cd 00 34 00 ef 00 56\n" } */ + /* { dg-output "Local_R1 : 01 00 00 00 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */ Local_R2.I = 1; Local_R2.N.A[0] = 0xAB0012; @@ -28,25 +28,25 @@ int main (void) put ("Local_R2 :"); dump (&Local_R2, sizeof (struct R2)); new_line (); - /* { dg-output "Local_R2 : 00 00 00 01 12 00 ab 00 34 00 cd 00 56 00 ef 00\n" } */ + /* { dg-output "Local_R2 : 00 00 00 01 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */ C1 = Local_R1.N.A[Local_R1.I]; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 13434932\n" } */ + /* { dg-output "C1 : 13434932.*\n" } */ Local_R1.I++; C1 = Local_R1.N.A[Local_R1.I]; printf ("C1 : %d\n", C1); - /* { dg-output "C1 : 15663190\n" } */ + /* { dg-output "C1 : 15663190.*\n" } */ C2 = Local_R2.N.A[Local_R2.I]; printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 13434932\n" } */ + /* { dg-output "C2 : 13434932.*\n" } */ Local_R2.I++; C2 = Local_R2.N.A[Local_R2.I]; printf ("C2 : %d\n", C2); - /* { dg-output "C2 : 15663190\n" } */ + /* { dg-output "C2 : 15663190.*\n" } */ return 0; } diff --git a/gcc/testsuite/gcc.dg/torture/pr68240.c b/gcc/testsuite/gcc.dg/torture/pr68240.c new file mode 100644 index 00000000000..b6d97902300 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr68240.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ + +int a, b, f; + +void +fn1 () +{ + int c = 1, d, e = 1; + a = 1; + for (; f;) + b = (c && (d = (e && a))); +} diff --git a/gcc/testsuite/gcc.dg/torture/pr68248.c b/gcc/testsuite/gcc.dg/torture/pr68248.c new file mode 100644 index 00000000000..0e8ab4904aa --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr68248.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ + +int a, b, c, d; + +int +fn1 (int p1) +{ + return a > 0 ? p1 : p1 >> a; +} + +void +fn2 () +{ + char e; + for (; c; c++) + { + e = fn1 (!d ^ 2); + b ^= e; + } +} diff --git a/gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c b/gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c index e7328fcdd21..8fe67f45faa 100644 --- a/gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c +++ b/gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c @@ -13,4 +13,4 @@ A sum(A a,A b) return a; } -/* { dg-final { scan-tree-dump-times "not vectorized: more than one data ref in stmt" 0 "slp2" } } */ +/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-cond-5.c b/gcc/testsuite/gcc.dg/vect/slp-cond-5.c new file mode 100644 index 00000000000..5ade7d1fbad --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/slp-cond-5.c @@ -0,0 +1,81 @@ +/* { dg-require-effective-target vect_condition } */ + +#include "tree-vect.h" + +#define N 128 + +static inline int +foo (int x, int y, int a, int b) +{ + if (x >= y && a > b) + return a; + else + return b; +} + +__attribute__((noinline, noclone)) void +bar (int * __restrict__ a, int * __restrict__ b, + int * __restrict__ c, int * __restrict__ d, + int * __restrict__ e, int w) +{ + int i; + for (i = 0; i < N/16; i++, a += 16, b += 16, c += 16, d += 16, e += 16) + { + e[0] = foo (c[0], d[0], a[0] * w, b[0] * w); + e[1] = foo (c[1], d[1], a[1] * w, b[1] * w); + e[2] = foo (c[2], d[2], a[2] * w, b[2] * w); + e[3] = foo (c[3], d[3], a[3] * w, b[3] * w); + e[4] = foo (c[4], d[4], a[4] * w, b[4] * w); + e[5] = foo (c[5], d[5], a[5] * w, b[5] * w); + e[6] = foo (c[6], d[6], a[6] * w, b[6] * w); + e[7] = foo (c[7], d[7], a[7] * w, b[7] * w); + e[8] = foo (c[8], d[8], a[8] * w, b[8] * w); + e[9] = foo (c[9], d[9], a[9] * w, b[9] * w); + e[10] = foo (c[10], d[10], a[10] * w, b[10] * w); + e[11] = foo (c[11], d[11], a[11] * w, b[11] * w); + e[12] = foo (c[12], d[12], a[12] * w, b[12] * w); + e[13] = foo (c[13], d[13], a[13] * w, b[13] * w); + e[14] = foo (c[14], d[14], a[14] * w, b[14] * w); + e[15] = foo (c[15], d[15], a[15] * w, b[15] * w); + } +} + + +int a[N], b[N], c[N], d[N], e[N]; + +int main () +{ + int i; + + check_vect (); + + for (i = 0; i < N; i++) + { + a[i] = i; + b[i] = 5; + e[i] = 0; + + switch (i % 9) + { + case 0: asm (""); c[i] = i; d[i] = i + 1; break; + case 1: c[i] = 0; d[i] = 0; break; + case 2: c[i] = i + 1; d[i] = i - 1; break; + case 3: c[i] = i; d[i] = i + 7; break; + case 4: c[i] = i; d[i] = i; break; + case 5: c[i] = i + 16; d[i] = i + 3; break; + case 6: c[i] = i - 5; d[i] = i; break; + case 7: c[i] = i; d[i] = i; break; + case 8: c[i] = i; d[i] = i - 7; break; + } + } + + bar (a, b, c, d, e, 2); + for (i = 0; i < N; i++) + if (e[i] != ((i % 3) == 0 || i <= 5 ? 10 : 2 * i)) + abort (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { i?86-*-* x86_64-*-* } } } } */ + diff --git a/gcc/testsuite/gcc.target/aarch64/cond_op_imm_1.c b/gcc/testsuite/gcc.target/aarch64/cond_op_imm_1.c new file mode 100644 index 00000000000..e93a69329c3 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cond_op_imm_1.c @@ -0,0 +1,99 @@ +/* { dg-do run } */ +/* { dg-options "-save-temps -O2 -fno-inline" } */ + +extern void abort (void); + +#define N 30 +#define M 25089992 + +int +foonegsi (int a) +{ + return a ? N : -N; +} + +/* { dg-final { scan-assembler "csneg\tw\[0-9\]*.*" } } */ + + +int +fooinvsi (int a) +{ + return a ? N : ~N; +} + +/* { dg-final { scan-assembler "csinv\tw\[0-9\]*.*" } } */ + + +long long +foonegdi (long long a) +{ + return a ? N : -N; +} + +long long +largefooneg (long long a) +{ + return a ? M : -M; +} + +/* { dg-final { scan-assembler "csneg\tx\[0-9\]*.*" } } */ + +long long +fooinvdi (long long a) +{ + return a ? N : ~N; +} + +long long +largefooinv (long long a) +{ + return a ? M : ~M; +} + +/* { dg-final { scan-assembler "csinv\tx\[0-9\]*.*" } } */ + + +int +main (void) +{ + if (foonegsi (1) != N) + abort (); + + if (foonegsi (0) != -N) + abort (); + + if (fooinvsi (1) != N) + abort (); + + if (fooinvsi (0) != ~N) + abort (); + + if (foonegdi (1) != N) + abort (); + + if (foonegdi (0) != -N) + abort (); + + if (fooinvdi (1) != N) + abort (); + + if (fooinvdi (0) != ~N) + abort (); + + if (largefooinv (0) != ~M) + abort (); + + if (largefooneg (0) != -M) + abort (); + + if (largefooinv (1) != M) + abort (); + + if (largefooneg (1) != M) + abort (); + + return 0; +} + +/* { dg-final { scan-assembler-not "csel\tx\[0-9\]*.*" } } */ +/* { dg-final { scan-assembler-not "csel\tw\[0-9\]*.*" } } */ diff --git a/gcc/testsuite/gcc.target/i386/addr-space-3.c b/gcc/testsuite/gcc.target/i386/addr-space-3.c index 63f1f031a08..2b6f47eee6a 100644 --- a/gcc/testsuite/gcc.target/i386/addr-space-3.c +++ b/gcc/testsuite/gcc.target/i386/addr-space-3.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O" } */ -/* { dg-final { scan-assembler "[fg]s:0" } } */ +/* { dg-final { scan-assembler "\[fg]s:0" } } */ void test(int *y) { diff --git a/gcc/testsuite/gcc.target/i386/avx2-vec-mask-bit-not.c b/gcc/testsuite/gcc.target/i386/avx2-vec-mask-bit-not.c new file mode 100644 index 00000000000..0c946ca0eae --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx2-vec-mask-bit-not.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target avx2 } */ +/* { dg-options "-mavx2 -O3 -fopenmp-simd -fdump-tree-vect-details" } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ + +#define N 1024 + +int a[N], b[N], c[N], d[N], e[N]; + +void +test (void) +{ + int i; + #pragma omp simd + for (i = 0; i < N; i++) + if (!(a[i] > b[i] && c[i] < d[i])) + e[i] = 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr56118.c b/gcc/testsuite/gcc.target/i386/pr56118.c new file mode 100644 index 00000000000..11a543cafe8 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr56118.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -msse2" } */ + +#include <emmintrin.h> + +__m128d f() +{ + __m128d r={3,4}; + r[0]=1; + r[1]=2; + return r; +} + +/* We want to "vectorize" this to a aligned vector load from the + constant pool. */ + +/* { dg-final { scan-assembler "movapd" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/ctz-1.c b/gcc/testsuite/gcc.target/powerpc/ctz-1.c new file mode 100644 index 00000000000..9948ad7555b --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/ctz-1.c @@ -0,0 +1,13 @@ +/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ +/* { dg-require-effective-target powerpc_p9modulo_ok } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ +/* { dg-options "-mcpu=power9 -O2" } */ + +int i_trailing_zero (int a) { return __builtin_ctz (a); } +int l_trailing_zero (long a) { return __builtin_ctzl (a); } +int ll_trailing_zero (long long a) { return __builtin_ctzll (a); } + +/* { dg-final { scan-assembler "cnttzw " } } */ +/* { dg-final { scan-assembler "cnttzd " } } */ +/* { dg-final { scan-assembler-not "cntlzw " } } */ +/* { dg-final { scan-assembler-not "cntlzd " } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/ctz-2.c b/gcc/testsuite/gcc.target/powerpc/ctz-2.c new file mode 100644 index 00000000000..7ee4d46195a --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/ctz-2.c @@ -0,0 +1,9 @@ +/* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */ +/* { dg-require-effective-target powerpc_p9modulo_ok } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ +/* { dg-options "-mcpu=power9 -O2" } */ + +int i_trailing_zero (int a) { return __builtin_ctz (a); } + +/* { dg-final { scan-assembler "cnttzw " } } */ +/* { dg-final { scan-assembler-not "cntlzw " } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/extswsli-1.c b/gcc/testsuite/gcc.target/powerpc/extswsli-1.c new file mode 100644 index 00000000000..2d7aac33123 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/extswsli-1.c @@ -0,0 +1,20 @@ +/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ +/* { dg-require-effective-target powerpc_p9modulo_ok } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ +/* { dg-options "-mcpu=power9 -O2" } */ + +static int mem; +int *ptr = &mem; + +long +add (long *p, int reg) +{ + __asm__ (" #foo %0" : "+r" (reg)); + return p[reg] + p[mem]; +} + +/* { dg-final { scan-assembler-times "extswsli " 2 } } */ +/* { dg-final { scan-assembler-times "lwz " 1 } } */ +/* { dg-final { scan-assembler-not "lwa " } } */ +/* { dg-final { scan-assembler-not "sldi " } } */ +/* { dg-final { scan-assembler-not "extsw " } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/extswsli-2.c b/gcc/testsuite/gcc.target/powerpc/extswsli-2.c new file mode 100644 index 00000000000..b92a537b735 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/extswsli-2.c @@ -0,0 +1,37 @@ +/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ +/* { dg-require-effective-target powerpc_p9modulo_ok } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ +/* { dg-options "-mcpu=power9 -O2" } */ + +long +func1 (int reg, int *is_zero) +{ + long value; + + __asm__ (" #foo %0" : "+r" (reg)); + value = ((long)reg) << 4; + + if (!value) + *is_zero = 1; + + return value; +} + +long +func2 (int *ptr, int *is_zero) +{ + int reg = *ptr; + long value = ((long)reg) << 4; + + if (!value) + *is_zero = 1; + + return value; +} + +/* { dg-final { scan-assembler "extswsli\\. " } } */ +/* { dg-final { scan-assembler "lwz " } } */ +/* { dg-final { scan-assembler-not "lwa " } } */ +/* { dg-final { scan-assembler-not "sldi " } } */ +/* { dg-final { scan-assembler-not "sldi\\. " } } */ +/* { dg-final { scan-assembler-not "extsw " } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/extswsli-3.c b/gcc/testsuite/gcc.target/powerpc/extswsli-3.c new file mode 100644 index 00000000000..d7e01e13bfe --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/extswsli-3.c @@ -0,0 +1,22 @@ +/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ +/* { dg-require-effective-target powerpc_p9modulo_ok } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ +/* { dg-options "-mcpu=power9 -O2" } */ + +long +do_ext_add (int *p, long a, long b) +{ + long l = *p; + long l2 = l << 4; + return l2 + ((l2 == 0) ? a : b); +} + +long +do_ext (int *p, long a, long b) +{ + long l = *p; + long l2 = l << 4; + return ((l2 == 0) ? a : b); +} + +/* { dg-final { scan-assembler "extswsli\\. "} } */ diff --git a/gcc/testsuite/gcc.target/powerpc/float128-call.c b/gcc/testsuite/gcc.target/powerpc/float128-call.c index 382b2926e90..bcb5d24e379 100644 --- a/gcc/testsuite/gcc.target/powerpc/float128-call.c +++ b/gcc/testsuite/gcc.target/powerpc/float128-call.c @@ -1,6 +1,5 @@ /* { dg-do compile { target { powerpc*-*-linux* } } } */ -/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -/* { dg-require-effective-target powerpc_vsx_ok } */ +/* { dg-require-effective-target powerpc_float128_sw_ok } */ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ /* { dg-options "-O2 -mcpu=power7 -mfloat128 -mno-regnames" } */ diff --git a/gcc/testsuite/gcc.target/powerpc/float128-mix.c b/gcc/testsuite/gcc.target/powerpc/float128-mix.c index 466be907524..23cb9d5f3a2 100644 --- a/gcc/testsuite/gcc.target/powerpc/float128-mix.c +++ b/gcc/testsuite/gcc.target/powerpc/float128-mix.c @@ -1,6 +1,5 @@ /* { dg-do compile { target { powerpc*-*-linux* } } } */ -/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -/* { dg-require-effective-target powerpc_vsx_ok } */ +/* { dg-require-effective-target powerpc_float128_sw_ok } */ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ /* { dg-options "-O2 -mcpu=power7 -mfloat128" } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fusion.c b/gcc/testsuite/gcc.target/powerpc/fusion.c index b577a39e774..ed35006f4d8 100644 --- a/gcc/testsuite/gcc.target/powerpc/fusion.c +++ b/gcc/testsuite/gcc.target/powerpc/fusion.c @@ -1,6 +1,5 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -/* { dg-skip-if "" { powerpc*le-*-* } { "*" } { "" } } */ /* { dg-require-effective-target powerpc_p8vector_ok } */ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ /* { dg-options "-mcpu=power7 -mtune=power8 -O3" } */ @@ -14,10 +13,7 @@ int fusion_short (short *p){ return p[LARGE]; } int fusion_int (int *p){ return p[LARGE]; } unsigned fusion_uns (unsigned *p){ return p[LARGE]; } -vector double fusion_vector (vector double *p) { return p[2]; } - /* { dg-final { scan-assembler-times "gpr load fusion" 6 } } */ -/* { dg-final { scan-assembler-times "vector load fusion" 1 } } */ /* { dg-final { scan-assembler-times "lbz" 2 } } */ /* { dg-final { scan-assembler-times "extsb" 1 } } */ /* { dg-final { scan-assembler-times "lhz" 2 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fusion2.c b/gcc/testsuite/gcc.target/powerpc/fusion2.c new file mode 100644 index 00000000000..bb74f882ea1 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/fusion2.c @@ -0,0 +1,10 @@ +/* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ +/* { dg-skip-if "" { powerpc*le-*-* } { "*" } { "" } } */ +/* { dg-require-effective-target powerpc_p8vector_ok } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ +/* { dg-options "-mcpu=power7 -mtune=power8 -O3" } */ + +vector double fusion_vector (vector double *p) { return p[2]; } + +/* { dg-final { scan-assembler-times "vector load fusion" 1 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fusion3.c b/gcc/testsuite/gcc.target/powerpc/fusion3.c new file mode 100644 index 00000000000..8eca640d257 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/fusion3.c @@ -0,0 +1,18 @@ +/* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ +/* { dg-options "-mcpu=power7 -mtune=power9 -O3" } */ + +#define LARGE 0x12345 + +int fusion_float_read (float *p){ return p[LARGE]; } +int fusion_double_read (double *p){ return p[LARGE]; } + +void fusion_float_write (float *p, float f){ p[LARGE] = f; } +void fusion_double_write (double *p, double d){ p[LARGE] = d; } + +/* { dg-final { scan-assembler "load fusion, type SF" } } */ +/* { dg-final { scan-assembler "load fusion, type DF" } } */ +/* { dg-final { scan-assembler "store fusion, type SF" } } */ +/* { dg-final { scan-assembler "store fusion, type DF" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/mod-1.c b/gcc/testsuite/gcc.target/powerpc/mod-1.c new file mode 100644 index 00000000000..3954b09bdef --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/mod-1.c @@ -0,0 +1,20 @@ +/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ +/* { dg-require-effective-target powerpc_p9modulo_ok } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ +/* { dg-options "-mcpu=power9 -O2" } */ + +int ismod (int a, int b) { return a%b; } +long lsmod (long a, long b) { return a%b; } +unsigned int iumod (unsigned int a, unsigned int b) { return a%b; } +unsigned long lumod (unsigned long a, unsigned long b) { return a%b; } + +/* { dg-final { scan-assembler-times "modsw " 1 } } */ +/* { dg-final { scan-assembler-times "modsd " 1 } } */ +/* { dg-final { scan-assembler-times "moduw " 1 } } */ +/* { dg-final { scan-assembler-times "modud " 1 } } */ +/* { dg-final { scan-assembler-not "mullw " } } */ +/* { dg-final { scan-assembler-not "mulld " } } */ +/* { dg-final { scan-assembler-not "divw " } } */ +/* { dg-final { scan-assembler-not "divd " } } */ +/* { dg-final { scan-assembler-not "divwu " } } */ +/* { dg-final { scan-assembler-not "divdu " } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/mod-2.c b/gcc/testsuite/gcc.target/powerpc/mod-2.c new file mode 100644 index 00000000000..7cf6a4f8aa2 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/mod-2.c @@ -0,0 +1,13 @@ +/* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */ +/* { dg-require-effective-target powerpc_p9modulo_ok } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ +/* { dg-options "-mcpu=power9 -O2" } */ + +int ismod (int a, int b) { return a%b; } +unsigned int iumod (unsigned int a, unsigned int b) { return a%b; } + +/* { dg-final { scan-assembler-times "modsw " 1 } } */ +/* { dg-final { scan-assembler-times "moduw " 1 } } */ +/* { dg-final { scan-assembler-not "mullw " } } */ +/* { dg-final { scan-assembler-not "divw " } } */ +/* { dg-final { scan-assembler-not "divwu " } } */ diff --git a/gcc/testsuite/gcc.target/sparc/sparc-ret.c b/gcc/testsuite/gcc.target/sparc/sparc-ret-1.c index 808e8a98f0e..808e8a98f0e 100644 --- a/gcc/testsuite/gcc.target/sparc/sparc-ret.c +++ b/gcc/testsuite/gcc.target/sparc/sparc-ret-1.c diff --git a/gcc/testsuite/gcc.target/sparc/sparc-ret-2.c b/gcc/testsuite/gcc.target/sparc/sparc-ret-2.c new file mode 100644 index 00000000000..536b9b75a4c --- /dev/null +++ b/gcc/testsuite/gcc.target/sparc/sparc-ret-2.c @@ -0,0 +1,13 @@ +/* PR target/57845 */ + +/* { dg-do compile } */ +/* { dg-options "-freg-struct-return" } */ + +struct S { short int i; }; + +struct S foo (short int i) +{ + struct S s; + s.i = i; + return s; +} diff --git a/gcc/testsuite/gfortran.dg/pr68251.f90 b/gcc/testsuite/gfortran.dg/pr68251.f90 new file mode 100644 index 00000000000..590c99a8718 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr68251.f90 @@ -0,0 +1,1048 @@ +! PR middle-end/68251 +! Reduced testcase by Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch> + +! { dg-do compile } +! { dg-options "-O3" } + +MODULE hfx_contract_block + INTEGER, PARAMETER :: dp=8 +CONTAINS + SUBROUTINE contract_block(ma_max,mb_max,mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(mb_max*md_max), kbc(mb_max*mc_max), & + kad(ma_max*md_max), kac(ma_max*mc_max), pbd(mb_max*md_max), & + pbc(mb_max*mc_max), pad(ma_max*md_max), pac(ma_max*mc_max), & + prim(ma_max*mb_max*mc_max*md_max), scale + SELECT CASE(ma_max) + CASE(1) + SELECT CASE(mb_max) + CASE(1) + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + CASE(1) + CALL block_1_1_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_1_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_1_11(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + END SELECT + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + CASE(2) + CALL block_1_2_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_2_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_2_1_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_2_1_5(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_2_1_6(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_2_1_7(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_2_2_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_2_2_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_2_4_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_2_6_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + SELECT CASE(md_max) + CASE(1) + CALL block_1_2_7_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + END SELECT + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + CASE(1) + CALL block_1_3_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_3_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_3_1_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_3_1_5(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_3_1_6(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_3_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_3_2_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_3_2_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_3_2_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + SELECT CASE(md_max) + CASE(1) + CALL block_1_3_3_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_3_3_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + SELECT CASE(md_max) + CASE(1) + CALL block_1_3_5(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_3_5(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + END SELECT + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + CASE(1) + CALL block_1_4_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + SELECT CASE(md_max) + CASE(1) + CALL block_1_4_2_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_2_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_3_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_3(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_3(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_3(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_3(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_3(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_3(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_3(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_3(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_4_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_4_4(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + SELECT CASE(md_max) + CASE(1) + CALL block_1_5_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + SELECT CASE(md_max) + CASE(1) + CALL block_1_6_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_6_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_1_6_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + SELECT CASE(md_max) + CASE(1) + CALL block_1_6_2_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + END SELECT + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + END SELECT + END SELECT + END SELECT + SELECT CASE(mb_max) + CASE(1) + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + CASE(1) + CALL block_2_1_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_2_1_1_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_2_1_1_5(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_2_1_1_6(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_2_1_2_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_2_1_2_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_2_1_2_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + END SELECT + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + CASE(1) + CALL block_2_2_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_2_2_2_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_2_2_3_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + END SELECT + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + CASE(7) + CALL block_3_2_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_2_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_2_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_2_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_2_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + END SELECT + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + CASE(1) + CALL block_3_5_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + CALL block_3_6(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_6(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_6(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_6(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_6(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_6(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_6(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_6(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_6(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_3_6(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + CALL block_3_9(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + SELECT CASE(mb_max) + CASE(1) + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + CASE(1) + CALL block_4_1_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_1_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_1_1_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_1_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_1_4(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_1_4(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_1_4(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_1_4(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_1_4(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_1_4(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_1_4(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + END SELECT + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + CASE(1) + CALL block_4_2_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_2_2(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_2_2(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_2_2(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_2_2(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_2_2(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_2_2(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_2_2(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_2_2(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_2_2(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_2_2(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + SELECT CASE(md_max) + CASE(1) + CALL block_4_3_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + CALL block_4_3(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_3(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_3(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_3(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_3(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_3(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_3(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_3(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_3(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + CALL block_4_3(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + SELECT CASE(md_max) + CASE(1) + CALL block_4_4_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + END SELECT + SELECT CASE(mc_max) + CASE(1) + SELECT CASE(md_max) + END SELECT + END SELECT + END SELECT + SELECT CASE(mb_max) + CASE(1) + CALL block_15_15(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + END SELECT + END SELECT + END SUBROUTINE contract_block + SUBROUTINE block_1_1_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*1), kbc(1*1), kad(1*1), kac(1*1), pbd(1*1), & + pbc(1*1), pad(1*1), pac(1*1), prim(1*1*1*1), scale + DO md = 1,1 + DO mc = 1,1 + DO mb = 1,1 + DO ma = 1,1 + kad((md-1)*1+ma) = kad((md-1)*1+ma)-tmp*p_bc + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_1_1_1 + SUBROUTINE block_1_1_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*2), kbc(1*1), kad(1*2), kac(1*1), pbd(1*2), & + pbc(1*1), pad(1*2), pac(1*1), prim(1*1*1*2), scale + DO md = 1,2 + DO mc = 1,1 + DO mb = 1,1 + DO ma = 1,1 + kac((mc-1)*1+ma) = kac((mc-1)*1+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_1_1_2 + SUBROUTINE block_1_1_11(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*md_max), kbc(1*11), kad(1*md_max), kac(1*11), & + pbd(1*md_max), pbc(1*11), pad(1*md_max), pac(1*11), & + prim(1*1*11*md_max), scale + DO md = 1,md_max + DO mc = 1,11 + DO mb = 1,1 + kbc((mc-1)*1+mb) = kbc((mc-1)*1+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_1_11 + SUBROUTINE block_1_2_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*2), kbc(2*1), kad(1*2), kac(1*1), pbd(2*2), & + pbc(2*1), pad(1*2), pac(1*1), prim(1*2*1*2), scale + DO md = 1,2 + DO mc = 1,1 + DO mb = 1,2 + kbc((mc-1)*2+mb) = kbc((mc-1)*2+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_2_1_2 + SUBROUTINE block_1_2_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*3), kbc(2*1), kad(1*3), kac(1*1), pbd(2*3), & + pbc(2*1), pad(1*3), pac(1*1), prim(1*2*1*3), scale + DO md = 1,3 + DO mc = 1,1 + DO mb = 1,2 + kbc((mc-1)*2+mb) = kbc((mc-1)*2+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_2_1_3 + SUBROUTINE block_1_2_1_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*4), kbc(2*1), kad(1*4), kac(1*1), pbd(2*4), & + pbc(2*1), pad(1*4), pac(1*1), prim(1*2*1*4), scale + DO md = 1,4 + DO mc = 1,1 + DO mb = 1,2 + kbc((mc-1)*2+mb) = kbc((mc-1)*2+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_2_1_4 + SUBROUTINE block_1_2_1_5(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*5), kbc(2*1), kad(1*5), kac(1*1), pbd(2*5), & + pbc(2*1), pad(1*5), pac(1*1), prim(1*2*1*5), scale + DO md = 1,5 + DO mc = 1,1 + DO mb = 1,2 + kbc((mc-1)*2+mb) = kbc((mc-1)*2+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_2_1_5 + SUBROUTINE block_1_2_1_6(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*6), kbc(2*1), kad(1*6), kac(1*1), pbd(2*6), & + pbc(2*1), pad(1*6), pac(1*1), prim(1*2*1*6), scale + DO md = 1,6 + DO mc = 1,1 + DO mb = 1,2 + DO ma = 1,1 + kac((mc-1)*1+ma) = kac((mc-1)*1+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_2_1_6 + SUBROUTINE block_1_2_1_7(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*7), kbc(2*1), kad(1*7), kac(1*1), pbd(2*7), & + pbc(2*1), pad(1*7), pac(1*1), prim(1*2*1*7), scale + DO md = 1,7 + DO mc = 1,1 + DO mb = 1,2 + DO ma = 1,1 + kad((md-1)*1+ma) = kad((md-1)*1+ma)-tmp*p_bc + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_2_1_7 + SUBROUTINE block_1_2_2_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*2), kbc(2*2), kad(1*2), kac(1*2), pbd(2*2), & + pbc(2*2), pad(1*2), pac(1*2), prim(1*2*2*2), scale + DO md = 1,2 + DO mc = 1,2 + DO mb = 1,2 + kbc((mc-1)*2+mb) = kbc((mc-1)*2+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_2_2_2 + SUBROUTINE block_1_2_2_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*4), kbc(2*2), kad(1*4), kac(1*2), pbd(2*4), & + pbc(2*2), pad(1*4), pac(1*2), prim(1*2*2*4), scale + DO md = 1,4 + DO mc = 1,2 + DO mb = 1,2 + kbd((md-1)*2+mb) = kbd((md-1)*2+mb) - ks_bd + END DO + END DO + END DO + END SUBROUTINE block_1_2_2_4 + SUBROUTINE block_1_2_4_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*1), kbc(2*4), kad(1*1), kac(1*4), pbd(2*1), & + pbc(2*4), pad(1*1), pac(1*4), prim(1*2*4*1), scale + DO md = 1,1 + DO mc = 1,4 + DO mb = 1,2 + kbd((md-1)*2+mb) = kbd((md-1)*2+mb) - ks_bd + END DO + END DO + END DO + END SUBROUTINE block_1_2_4_1 + SUBROUTINE block_1_2_6_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*1), kbc(2*6), kad(1*1), kac(1*6), pbd(2*1), & + pbc(2*6), pad(1*1), pac(1*6), prim(1*2*6*1), scale + DO md = 1,1 + DO mc = 1,6 + DO mb = 1,2 + DO ma = 1,1 + kad((md-1)*1+ma) = kad((md-1)*1+ma)-tmp*p_bc + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_2_6_1 + SUBROUTINE block_1_2_7_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*1), kbc(2*7), kad(1*1), kac(1*7), pbd(2*1), & + pbc(2*7), pad(1*1), pac(1*7), prim(1*2*7*1), scale + DO md = 1,1 + DO mc = 1,7 + DO mb = 1,2 + DO ma = 1,1 + kac((mc-1)*1+ma) = kac((mc-1)*1+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_2_7_1 + SUBROUTINE block_1_3_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*1), kbc(3*1), kad(1*1), kac(1*1), pbd(3*1), & + pbc(3*1), pad(1*1), pac(1*1), prim(1*3*1*1), scale + DO md = 1,1 + DO mc = 1,1 + DO mb = 1,3 + kbc((mc-1)*3+mb) = kbc((mc-1)*3+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_3_1_1 + SUBROUTINE block_1_3_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*3), kbc(3*1), kad(1*3), kac(1*1), pbd(3*3), & + pbc(3*1), pad(1*3), pac(1*1), prim(1*3*1*3), scale + DO md = 1,3 + DO mc = 1,1 + DO mb = 1,3 + DO ma = 1,1 + kac((mc-1)*1+ma) = kac((mc-1)*1+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_3_1_3 + SUBROUTINE block_1_3_1_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*4), kbc(3*1), kad(1*4), kac(1*1), pbd(3*4), & + pbc(3*1), pad(1*4), pac(1*1), prim(1*3*1*4), scale + DO md = 1,4 + DO mc = 1,1 + DO mb = 1,3 + kbc((mc-1)*3+mb) = kbc((mc-1)*3+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_3_1_4 + SUBROUTINE block_1_3_1_5(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*5), kbc(3*1), kad(1*5), kac(1*1), pbd(3*5), & + pbc(3*1), pad(1*5), pac(1*1), prim(1*3*1*5), scale + DO md = 1,5 + DO mc = 1,1 + DO mb = 1,3 + DO ma = 1,1 + kac((mc-1)*1+ma) = kac((mc-1)*1+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_3_1_5 + SUBROUTINE block_1_3_1_6(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*6), kbc(3*1), kad(1*6), kac(1*1), pbd(3*6), & + pbc(3*1), pad(1*6), pac(1*1), prim(1*3*1*6), scale + DO md = 1,6 + DO mc = 1,1 + DO mb = 1,3 + DO ma = 1,1 + kac((mc-1)*1+ma) = kac((mc-1)*1+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_3_1_6 + SUBROUTINE block_1_3_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*md_max), kbc(3*1), kad(1*md_max), kac(1*1), & + pbd(3*md_max), pbc(3*1), pad(1*md_max), pac(1*1), prim(1*3*1*md_max), & + scale + DO md = 1,md_max + DO mc = 1,1 + DO mb = 1,3 + DO ma = 1,1 + kad((md-1)*1+ma) = kad((md-1)*1+ma)-tmp*p_bc + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_3_1 + SUBROUTINE block_1_3_2_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*1), kbc(3*2), kad(1*1), kac(1*2), pbd(3*1), & + pbc(3*2), pad(1*1), pac(1*2), prim(1*3*2*1), scale + DO md = 1,1 + DO mc = 1,2 + DO mb = 1,3 + kbc((mc-1)*3+mb) = kbc((mc-1)*3+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_3_2_1 + SUBROUTINE block_1_3_2_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*2), kbc(3*2), kad(1*2), kac(1*2), pbd(3*2), & + pbc(3*2), pad(1*2), pac(1*2), prim(1*3*2*2), scale + DO md = 1,2 + DO mc = 1,2 + DO mb = 1,3 + DO ma = 1,1 + kad((md-1)*1+ma) = kad((md-1)*1+ma)-tmp*p_bc + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_3_2_2 + SUBROUTINE block_1_3_2_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*3), kbc(3*2), kad(1*3), kac(1*2), pbd(3*3), & + pbc(3*2), pad(1*3), pac(1*2), prim(1*3*2*3), scale + kbc(1:3*2) = 0.0_dp + DO md = 1,3 + DO mc = 1,2 + DO mb = 1,3 + kbc((mc-1)*3+mb) = kbc((mc-1)*3+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_3_2_3 + SUBROUTINE block_1_3_3_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*1), kbc(3*3), kad(1*1), kac(1*3), pbd(3*1), & + pbc(3*3), pad(1*1), pac(1*3), prim(1*3*3*1), scale + DO md = 1,1 + DO mc = 1,3 + DO mb = 1,3 + kbd((md-1)*3+mb) = kbd((md-1)*3+mb) - ks_bd + END DO + END DO + END DO + END SUBROUTINE block_1_3_3_1 + SUBROUTINE block_1_3_3_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*2), kbc(3*3), kad(1*2), kac(1*3), pbd(3*2), & + pbc(3*3), pad(1*2), pac(1*3), prim(1*3*3*2), scale + DO md = 1,2 + DO mc = 1,3 + DO mb = 1,3 + kbc((mc-1)*3+mb) = kbc((mc-1)*3+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_3_3_2 + SUBROUTINE block_1_3_5(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*md_max), kbc(3*5), kad(1*md_max), kac(1*5), & + pbd(3*md_max), pbc(3*5), pad(1*md_max), pac(1*5), prim(1*3*5*md_max), & + scale + kbd(1:3*md_max) = 0.0_dp + DO md = 1,md_max + END DO + END SUBROUTINE block_1_3_5 + SUBROUTINE block_1_3_6(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + DO md = 1,md_max + END DO + END SUBROUTINE block_1_3_6 + SUBROUTINE block_1_4_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(4*1), kbc(4*1), kad(1*1), kac(1*1), pbd(4*1), & + pbc(4*1), pad(1*1), pac(1*1), prim(1*4*1*1), scale + DO md = 1,1 + DO mc = 1,1 + DO mb = 1,4 + DO ma = 1,1 + kac((mc-1)*1+ma) = kac((mc-1)*1+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_4_1_1 + SUBROUTINE block_1_4_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(4*2), kbc(4*1), kad(1*2), kac(1*1), pbd(4*2), & + pbc(4*1), pad(1*2), pac(1*1), prim(1*4*1*2), scale + DO md = 1,2 + DO mc = 1,1 + DO mb = 1,4 + kbc((mc-1)*4+mb) = kbc((mc-1)*4+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_4_1_2 + SUBROUTINE block_1_4_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(4*3), kbc(4*1), kad(1*3), kac(1*1), pbd(4*3), & + pbc(4*1), pad(1*3), pac(1*1), prim(1*4*1*3), scale + DO md = 1,3 + DO mc = 1,1 + DO mb = 1,4 + kbc((mc-1)*4+mb) = kbc((mc-1)*4+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_4_1_3 + SUBROUTINE block_1_4_2_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(4*1), kbc(4*2), kad(1*1), kac(1*2), pbd(4*1), & + pbc(4*2), pad(1*1), pac(1*2), prim(1*4*2*1), scale + DO md = 1,1 + DO mc = 1,2 + DO mb = 1,4 + kbc((mc-1)*4+mb) = kbc((mc-1)*4+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_4_2_1 + SUBROUTINE block_1_4_2_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(4*2), kbc(4*2), kad(1*2), kac(1*2), pbd(4*2), & + pbc(4*2), pad(1*2), pac(1*2), prim(1*4*2*2), scale + DO md = 1,2 + DO mc = 1,2 + DO mb = 1,4 + DO ma = 1,1 + kad((md-1)*1+ma) = kad((md-1)*1+ma)-tmp*p_bc + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_4_2_2 + SUBROUTINE block_1_4_3_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(4*1), kbc(4*3), kad(1*1), kac(1*3), pbd(4*1), & + pbc(4*3), pad(1*1), pac(1*3), prim(1*4*3*1), scale + DO md = 1,1 + DO mc = 1,3 + DO mb = 1,4 + kbc((mc-1)*4+mb) = kbc((mc-1)*4+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_4_3_1 + SUBROUTINE block_1_4_3(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(4*md_max), kbc(4*3), kad(1*md_max), kac(1*3), & + pbd(4*md_max), pbc(4*3), pad(1*md_max), pac(1*3), prim(1*4*3*md_max), & + scale + DO md = 1,md_max + DO mc = 1,3 + DO mb = 1,4 + kbc((mc-1)*4+mb) = kbc((mc-1)*4+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_4_3 + SUBROUTINE block_1_4_4_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(4*1), kbc(4*4), kad(1*1), kac(1*4), pbd(4*1), & + pbc(4*4), pad(1*1), pac(1*4), prim(1*4*4*1), scale + DO md = 1,1 + DO mc = 1,4 + DO mb = 1,4 + kbc((mc-1)*4+mb) = kbc((mc-1)*4+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_4_4_1 + SUBROUTINE block_1_4_4(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(4*md_max), kbc(4*4), kad(1*md_max), kac(1*4), & + pbd(4*md_max), pbc(4*4), pad(1*md_max), pac(1*4), prim(1*4*4*md_max), & + scale + DO md = 1,md_max + DO mc = 1,4 + DO mb = 1,4 + DO ma = 1,1 + kac((mc-1)*1+ma) = kac((mc-1)*1+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_4_4 + SUBROUTINE block_1_5_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(5*3), kbc(5*1), kad(1*3), kac(1*1), pbd(5*3), & + pbc(5*1), pad(1*3), pac(1*1), prim(1*5*1*3), scale + DO md = 1,3 + DO mc = 1,1 + DO mb = 1,5 + DO ma = 1,1 + kac((mc-1)*1+ma) = kac((mc-1)*1+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_5_1_3 + SUBROUTINE block_1_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(5*md_max), kbc(5*1), kad(1*md_max), kac(1*1), & + pbd(5*md_max), pbc(5*1), pad(1*md_max), pac(1*1), prim(1*5*1*md_max), & + scale + DO md = 1,md_max + DO mc = 1,1 + DO mb = 1,5 + kbc((mc-1)*5+mb) = kbc((mc-1)*5+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_5_1 + SUBROUTINE block_1_6_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(6*1), kbc(6*1), kad(1*1), kac(1*1), pbd(6*1), & + pbc(6*1), pad(1*1), pac(1*1), prim(1*6*1*1), scale + DO md = 1,1 + DO mc = 1,1 + DO mb = 1,6 + DO ma = 1,1 + kac((mc-1)*1+ma) = kac((mc-1)*1+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_6_1_1 + SUBROUTINE block_1_6_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(6*2), kbc(6*1), kad(1*2), kac(1*1), pbd(6*2), & + pbc(6*1), pad(1*2), pac(1*1), prim(1*6*1*2), scale + DO md = 1,2 + DO mc = 1,1 + DO mb = 1,6 + DO ma = 1,1 + kad((md-1)*1+ma) = kad((md-1)*1+ma)-tmp*p_bc + END DO + END DO + END DO + END DO + END SUBROUTINE block_1_6_1_2 + SUBROUTINE block_1_6_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(6*3), kbc(6*1), kad(1*3), kac(1*1), pbd(6*3), & + pbc(6*1), pad(1*3), pac(1*1), prim(1*6*1*3), scale + DO md = 1,3 + DO mc = 1,1 + DO mb = 1,6 + kbc((mc-1)*6+mb) = kbc((mc-1)*6+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_6_1_3 + SUBROUTINE block_1_6_2_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(6*1), kbc(6*2), kad(1*1), kac(1*2), pbd(6*1), & + pbc(6*2), pad(1*1), pac(1*2), prim(1*6*2*1), scale + DO md = 1,1 + DO mc = 1,2 + DO mb = 1,6 + kbc((mc-1)*6+mb) = kbc((mc-1)*6+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_1_6_2_1 + SUBROUTINE block_2_1_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*3), kbc(1*1), kad(2*3), kac(2*1), pbd(1*3), & + pbc(1*1), pad(2*3), pac(2*1), prim(2*1*1*3), scale + DO md = 1,3 + DO mc = 1,1 + DO mb = 1,1 + DO ma = 1,2 + kac((mc-1)*2+ma) = kac((mc-1)*2+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_2_1_1_3 + SUBROUTINE block_2_1_1_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*4), kbc(1*1), kad(2*4), kac(2*1), pbd(1*4), & + pbc(1*1), pad(2*4), pac(2*1), prim(2*1*1*4), scale + DO md = 1,4 + DO mc = 1,1 + DO mb = 1,1 + kbc((mc-1)*1+mb) = kbc((mc-1)*1+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_2_1_1_4 + SUBROUTINE block_2_1_1_5(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*5), kbc(1*1), kad(2*5), kac(2*1), pbd(1*5), & + pbc(1*1), pad(2*5), pac(2*1), prim(2*1*1*5), scale + DO md = 1,5 + DO mc = 1,1 + DO mb = 1,1 + kbc((mc-1)*1+mb) = kbc((mc-1)*1+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_2_1_1_5 + SUBROUTINE block_2_1_1_6(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*6), kbc(1*1), kad(2*6), kac(2*1), pbd(1*6), & + pbc(1*1), pad(2*6), pac(2*1), prim(2*1*1*6), scale + DO md = 1,6 + DO mc = 1,1 + DO mb = 1,1 + DO ma = 1,2 + kad((md-1)*2+ma) = kad((md-1)*2+ma)-tmp*p_bc + END DO + END DO + END DO + END DO + END SUBROUTINE block_2_1_1_6 + SUBROUTINE block_2_1_2_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*1), kbc(1*2), kad(2*1), kac(2*2), pbd(1*1), & + pbc(1*2), pad(2*1), pac(2*2), prim(2*1*2*1), scale + DO md = 1,1 + DO mc = 1,2 + DO mb = 1,1 + DO ma = 1,2 + kac((mc-1)*2+ma) = kac((mc-1)*2+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_2_1_2_1 + SUBROUTINE block_2_1_2_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*2), kbc(1*2), kad(2*2), kac(2*2), pbd(1*2), & + pbc(1*2), pad(2*2), pac(2*2), prim(2*1*2*2), scale + DO md = 1,2 + DO mc = 1,2 + DO mb = 1,1 + kbc((mc-1)*1+mb) = kbc((mc-1)*1+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_2_1_2_2 + SUBROUTINE block_2_1_2_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*4), kbc(1*2), kad(2*4), kac(2*2), pbd(1*4), & + pbc(1*2), pad(2*4), pac(2*2), prim(2*1*2*4), scale + DO md = 1,4 + DO mc = 1,2 + DO mb = 1,1 + kbc((mc-1)*1+mb) = kbc((mc-1)*1+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_2_1_2_4 + SUBROUTINE block_2_2_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*1), kbc(2*1), kad(2*1), kac(2*1), pbd(2*1), & + pbc(2*1), pad(2*1), pac(2*1), prim(2*2*1*1), scale + DO md = 1,1 + DO mc = 1,1 + DO mb = 1,2 + kbc((mc-1)*2+mb) = kbc((mc-1)*2+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_2_2_1_1 + SUBROUTINE block_2_2_2_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*1), kbc(2*2), kad(2*1), kac(2*2), pbd(2*1), & + pbc(2*2), pad(2*1), pac(2*2), prim(2*2*2*1), scale + DO md = 1,1 + DO mc = 1,2 + DO mb = 1,2 + kbd((md-1)*2+mb) = kbd((md-1)*2+mb) - ks_bd + END DO + END DO + END DO + END SUBROUTINE block_2_2_2_1 + SUBROUTINE block_2_2_3_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*1), kbc(2*3), kad(2*1), kac(2*3), pbd(2*1), & + pbc(2*3), pad(2*1), pac(2*3), prim(2*2*3*1), scale + DO md = 1,1 + DO mc = 1,3 + DO mb = 1,2 + kbc((mc-1)*2+mb) = kbc((mc-1)*2+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_2_2_3_1 + SUBROUTINE block_3_2_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*md_max), kbc(2*1), kad(3*md_max), kac(3*1), & + pbd(2*md_max), pbc(2*1), pad(3*md_max), pac(3*1), prim(3*2*1*md_max), & + scale + DO md = 1,md_max + DO mc = 1,1 + DO mb = 1,2 + kbc((mc-1)*2+mb) = kbc((mc-1)*2+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_3_2_1 + SUBROUTINE block_3_5_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(5*1), kbc(5*1), kad(3*1), kac(3*1), pbd(5*1), & + pbc(5*1), pad(3*1), pac(3*1), prim(3*5*1*1), scale + DO md = 1,1 + DO mc = 1,1 + DO mb = 1,5 + DO ma = 1,3 + kad((md-1)*3+ma) = kad((md-1)*3+ma)-tmp*p_bc + END DO + END DO + END DO + END DO + END SUBROUTINE block_3_5_1_1 + SUBROUTINE block_3_5_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(5*md_max), kbc(5*1), kad(3*md_max), kac(3*1), & + pbd(5*md_max), pbc(5*1), pad(3*md_max), pac(3*1), prim(3*5*1*md_max), & + scale + DO md = 1,md_max + DO mc = 1,1 + DO mb = 1,5 + kbc((mc-1)*5+mb) = kbc((mc-1)*5+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_3_5_1 + SUBROUTINE block_3_6(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(6*md_max), kbc(6*mc_max), kad(3*md_max), & + kac(3*mc_max), pbd(6*md_max), pbc(6*mc_max), pad(3*md_max), & + pac(3*mc_max), prim(3*6*mc_max*md_max), scale + kbd(1:6*md_max) = 0.0_dp + END SUBROUTINE block_3_6 + SUBROUTINE block_3_9(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(9*md_max), kbc(9*mc_max), kad(3*md_max), & + kac(3*mc_max), pbd(9*md_max), pbc(9*mc_max), pad(3*md_max), & + pac(3*mc_max), prim(3*9*mc_max*md_max), scale + DO md = 1,md_max + DO mc = 1,mc_max + DO mb = 1,9 + DO ma = 1,3 + kac((mc-1)*3+ma) = kac((mc-1)*3+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_3_9 + SUBROUTINE block_4_1_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*2), kbc(1*1), kad(4*2), kac(4*1), pbd(1*2), & + pbc(1*1), pad(4*2), pac(4*1), prim(4*1*1*2), scale + DO md = 1,2 + DO mc = 1,1 + DO mb = 1,1 + DO ma = 1,4 + kac((mc-1)*4+ma) = kac((mc-1)*4+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_4_1_1_2 + SUBROUTINE block_4_1_1_3(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*3), kbc(1*1), kad(4*3), kac(4*1), pbd(1*3), & + pbc(1*1), pad(4*3), pac(4*1), prim(4*1*1*3), scale + DO md = 1,3 + DO mc = 1,1 + DO mb = 1,1 + kbd((md-1)*1+mb) = kbd((md-1)*1+mb) - ks_bd + END DO + END DO + END DO + END SUBROUTINE block_4_1_1_3 + SUBROUTINE block_4_1_1_4(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*4), kbc(1*1), kad(4*4), kac(4*1), pbd(1*4), & + pbc(1*1), pad(4*4), pac(4*1), prim(4*1*1*4), scale + DO md = 1,4 + DO mc = 1,1 + DO mb = 1,1 + kbc((mc-1)*1+mb) = kbc((mc-1)*1+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_4_1_1_4 + SUBROUTINE block_4_1_1(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*md_max), kbc(1*1), kad(4*md_max), kac(4*1), & + pbd(1*md_max), pbc(1*1), pad(4*md_max), pac(4*1), prim(4*1*1*md_max), & + scale + DO md = 1,md_max + DO mc = 1,1 + DO mb = 1,1 + kbc((mc-1)*1+mb) = kbc((mc-1)*1+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_4_1_1 + SUBROUTINE block_4_1_4(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(1*md_max), kbc(1*4), kad(4*md_max), kac(4*4), & + pbd(1*md_max), pbc(1*4), pad(4*md_max), pac(4*4), prim(4*1*4*md_max), & + scale + kbd(1:1*md_max) = 0.0_dp + END SUBROUTINE block_4_1_4 + SUBROUTINE block_4_2_1_2(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*2), kbc(2*1), kad(4*2), kac(4*1), pbd(2*2), & + pbc(2*1), pad(4*2), pac(4*1), prim(4*2*1*2), scale + DO md = 1,2 + DO mc = 1,1 + DO mb = 1,2 + DO ma = 1,4 + kac((mc-1)*4+ma) = kac((mc-1)*4+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_4_2_1_2 + SUBROUTINE block_4_2_2(md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(2*md_max), kbc(2*2), kad(4*md_max), kac(4*2), & + pbd(2*md_max), pbc(2*2), pad(4*md_max), pac(4*2), prim(4*2*2*md_max), & + scale + DO md = 1,md_max + DO mc = 1,2 + DO mb = 1,2 + kbc((mc-1)*2+mb) = kbc((mc-1)*2+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_4_2_2 + SUBROUTINE block_4_3_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*1), kbc(3*1), kad(4*1), kac(4*1), pbd(3*1), & + pbc(3*1), pad(4*1), pac(4*1), prim(4*3*1*1), scale + DO md = 1,1 + DO mc = 1,1 + DO mb = 1,3 + DO ma = 1,4 + kac((mc-1)*4+ma) = kac((mc-1)*4+ma)-tmp*p_bd + END DO + END DO + END DO + END DO + END SUBROUTINE block_4_3_1_1 + SUBROUTINE block_4_3(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(3*md_max), kbc(3*mc_max), kad(4*md_max), & + kac(4*mc_max), pbd(3*md_max), pbc(3*mc_max), pad(4*md_max), & + pac(4*mc_max), prim(4*3*mc_max*md_max), scale + DO md = 1,md_max + DO mc = 1,mc_max + DO mb = 1,3 + kbc((mc-1)*3+mb) = kbc((mc-1)*3+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_4_3 + SUBROUTINE block_4_4_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(4*1), kbc(4*1), kad(4*1), kac(4*1), pbd(4*1), & + pbc(4*1), pad(4*1), pac(4*1), prim(4*4*1*1), scale + DO md = 1,1 + DO mc = 1,1 + DO mb = 1,4 + DO ma = 1,4 + kad((md-1)*4+ma) = kad((md-1)*4+ma)-tmp*p_bc + END DO + END DO + END DO + END DO + END SUBROUTINE block_4_4_1_1 + SUBROUTINE block_15_15(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) + REAL(KIND=dp) :: kbd(15*md_max), kbc(15*mc_max), kad(15*md_max), & + kac(15*mc_max), pbd(15*md_max), pbc(15*mc_max), pad(15*md_max), & + pac(15*mc_max), prim(15*15*mc_max*md_max), scale + DO md = 1,md_max + DO mc = 1,mc_max + DO mb = 1,15 + kbc((mc-1)*15+mb) = kbc((mc-1)*15+mb) - ks_bc + END DO + END DO + END DO + END SUBROUTINE block_15_15 +END MODULE hfx_contract_block diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5389350307f..e0df1d2ff04 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1592,7 +1592,9 @@ proc check_p8vector_hw_available { } { return [check_cached_effective_target p8vector_hw_available { # Some simulators are known to not support VSX/power8 instructions. # For now, disable on Darwin - if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] || [istarget *-*-darwin*]} { + if { [istarget powerpc-*-eabi] + || [istarget powerpc*-*-eabispe] + || [istarget *-*-darwin*]} { expr 0 } else { set options "-mpower8-vector" @@ -1611,6 +1613,112 @@ proc check_p8vector_hw_available { } { }] } +# Return 1 if the target supports executing power9 vector instructions, 0 +# otherwise. Cache the result. + +proc check_p9vector_hw_available { } { + return [check_cached_effective_target p9vector_hw_available { + # Some simulators are known to not support VSX/power8/power9 + # instructions. For now, disable on Darwin. + if { [istarget powerpc-*-eabi] + || [istarget powerpc*-*-eabispe] + || [istarget *-*-darwin*]} { + expr 0 + } else { + set options "-mpower9-vector" + check_runtime_nocache p9vector_hw_available { + int main() + { + long e = -1; + vector double v = (vector double) { 0.0, 0.0 }; + asm ("xsxexpdp %0,%1" : "+r" (e) : "wa" (v)); + return e; + } + } $options + } + }] +} + +# Return 1 if the target supports executing power9 modulo instructions, 0 +# otherwise. Cache the result. + +proc check_p9modulo_hw_available { } { + return [check_cached_effective_target p9modulo_hw_available { + # Some simulators are known to not support VSX/power8/power9 + # instructions. For now, disable on Darwin. + if { [istarget powerpc-*-eabi] + || [istarget powerpc*-*-eabispe] + || [istarget *-*-darwin*]} { + expr 0 + } else { + set options "-mmodulo" + check_runtime_nocache p9modulo_hw_available { + int main() + { + int i = 5, j = 3, r = -1; + asm ("modsw %0,%1,%2" : "+r" (r) : "r" (i), "r" (j)); + return (r == 2); + } + } $options + } + }] +} + +# Return 1 if the target supports executing __float128 on PowerPC via software +# emulation, 0 otherwise. Cache the result. + +proc check_ppc_float128_sw_available { } { + return [check_cached_effective_target ppc_float128_sw_available { + # Some simulators are known to not support VSX/power8/power9 + # instructions. For now, disable on Darwin. + if { [istarget powerpc-*-eabi] + || [istarget powerpc*-*-eabispe] + || [istarget *-*-darwin*]} { + expr 0 + } else { + set options "-mfloat128 -mvsx" + check_runtime_nocache ppc_float128_sw_available { + volatile __float128 x = 1.0q; + volatile __float128 y = 2.0q; + int main() + { + __float128 z = x + y; + return (z == 3.0q); + } + } $options + } + }] +} + +# Return 1 if the target supports executing __float128 on PowerPC via power9 +# hardware instructions, 0 otherwise. Cache the result. + +proc check_ppc_float128_hw_available { } { + return [check_cached_effective_target ppc_float128_hw_available { + # Some simulators are known to not support VSX/power8/power9 + # instructions. For now, disable on Darwin. + if { [istarget powerpc-*-eabi] + || [istarget powerpc*-*-eabispe] + || [istarget *-*-darwin*]} { + expr 0 + } else { + set options "-mfloat128-hardware" + check_runtime_nocache ppc_float128_hw_available { + volatile __float128 x = 1.0q; + volatile __float128 y = 2.0q; + int main() + { + __float128 z = x + y; + __float128 w = -1.0q; + + __asm__ ("xsaddqp %0,%1,%2" : "+v" (w) : "v" (x), "v" (y)); + return ((z == 3.0q) && (z == w); + } + } $options + } + }] +} + # Return 1 if the target supports executing VSX instructions, 0 # otherwise. Cache the result. @@ -1618,7 +1726,9 @@ proc check_vsx_hw_available { } { return [check_cached_effective_target vsx_hw_available { # Some simulators are known to not support VSX instructions. # For now, disable on Darwin - if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] || [istarget *-*-darwin*]} { + if { [istarget powerpc-*-eabi] + || [istarget powerpc*-*-eabispe] + || [istarget *-*-darwin*]} { expr 0 } else { set options "-mvsx" @@ -3334,6 +3444,108 @@ proc check_effective_target_powerpc_p8vector_ok { } { } } +# Return 1 if this is a PowerPC target supporting -mpower9-vector + +proc check_effective_target_powerpc_p9vector_ok { } { + if { ([istarget powerpc*-*-*] + && ![istarget powerpc-*-linux*paired*]) + || [istarget rs6000-*-*] } { + # AltiVec is not supported on AIX before 5.3. + if { [istarget powerpc*-*-aix4*] + || [istarget powerpc*-*-aix5.1*] + || [istarget powerpc*-*-aix5.2*] } { + return 0 + } + return [check_no_compiler_messages powerpc_p9vector_ok object { + int main (void) { + long e = -1; + vector double v = (vector double) { 0.0, 0.0 }; + asm ("xsxexpdp %0,%1" : "+r" (e) : "wa" (v)); + return e; + } + } "-mpower9-vector"] + } else { + return 0 + } +} + +# Return 1 if this is a PowerPC target supporting -mmodulo + +proc check_effective_target_powerpc_p9modulo_ok { } { + if { ([istarget powerpc*-*-*] + && ![istarget powerpc-*-linux*paired*]) + || [istarget rs6000-*-*] } { + # AltiVec is not supported on AIX before 5.3. + if { [istarget powerpc*-*-aix4*] + || [istarget powerpc*-*-aix5.1*] + || [istarget powerpc*-*-aix5.2*] } { + return 0 + } + return [check_no_compiler_messages powerpc_p9modulo_ok object { + int main (void) { + int i = 5, j = 3, r = -1; + asm ("modsw %0,%1,%2" : "+r" (r) : "r" (i), "r" (j)); + return (r == 2); + } + } "-mmodulo"] + } else { + return 0 + } +} + +# Return 1 if this is a PowerPC target supporting -mfloat128 via either +# software emulation on power7/power8 systems or hardware support on power9. + +proc check_effective_target_powerpc_float128_sw_ok { } { + if { ([istarget powerpc*-*-*] + && ![istarget powerpc-*-linux*paired*]) + || [istarget rs6000-*-*] } { + # AltiVec is not supported on AIX before 5.3. + if { [istarget powerpc*-*-aix4*] + || [istarget powerpc*-*-aix5.1*] + || [istarget powerpc*-*-aix5.2*] } { + return 0 + } + return [check_no_compiler_messages powerpc_float128_sw_ok object { + volatile __float128 x = 1.0q; + volatile __float128 y = 2.0q; + int main() { + __float128 z = x + y; + return (z == 3.0q); + } + } "-mfloat128 -mvsx"] + } else { + return 0 + } +} + +# Return 1 if this is a PowerPC target supporting -mfloat128 via hardware +# support on power9. + +proc check_effective_target_powerpc_float128_hw_ok { } { + if { ([istarget powerpc*-*-*] + && ![istarget powerpc-*-linux*paired*]) + || [istarget rs6000-*-*] } { + # AltiVec is not supported on AIX before 5.3. + if { [istarget powerpc*-*-aix4*] + || [istarget powerpc*-*-aix5.1*] + || [istarget powerpc*-*-aix5.2*] } { + return 0 + } + return [check_no_compiler_messages powerpc_float128_hw_ok object { + volatile __float128 x = 1.0q; + volatile __float128 y = 2.0q; + int main() { + __float128 z; + __asm__ ("xsaddqp %0,%1,%2" : "=v" (z) : "v" (x), "v" (y)); + return (z == 3.0q); + } + } "-mfloat128-hardware"] + } else { + return 0 + } +} + # Return 1 if this is a PowerPC target supporting -mvsx proc check_effective_target_powerpc_vsx_ok { } { @@ -5435,6 +5647,10 @@ proc is-effective-target { arg } { "vmx_hw" { set selected [check_vmx_hw_available] } "vsx_hw" { set selected [check_vsx_hw_available] } "p8vector_hw" { set selected [check_p8vector_hw_available] } + "p9vector_hw" { set selected [check_p9vector_hw_available] } + "p9modulo_hw" { set selected [check_p9modulo_hw_available] } + "ppc_float128_sw" { set selected [check_ppc_float128_sw_available] } + "ppc_float128_hw" { set selected [check_ppc_float128_hw_available] } "ppc_recip_hw" { set selected [check_ppc_recip_hw_available] } "dfp_hw" { set selected [check_dfp_hw_available] } "htm_hw" { set selected [check_htm_hw_available] } @@ -5459,6 +5675,10 @@ proc is-effective-target-keyword { arg } { "vmx_hw" { return 1 } "vsx_hw" { return 1 } "p8vector_hw" { return 1 } + "p9vector_hw" { return 1 } + "p9modulo_hw" { return 1 } + "ppc_float128_sw" { return 1 } + "ppc_float128_hw" { return 1 } "ppc_recip_hw" { return 1 } "dfp_hw" { return 1 } "htm_hw" { return 1 } @@ -6162,7 +6382,9 @@ proc check_vect_support_and_set_flags { } { } lappend DEFAULT_VECTCFLAGS "-maltivec" - if [check_p8vector_hw_available] { + if [check_p9vector_hw_available] { + lappend DEFAULT_VECTCFLAGS "-mpower9-vector" + } elseif [check_p8vector_hw_available] { lappend DEFAULT_VECTCFLAGS "-mpower8-vector" } elseif [check_vsx_hw_available] { lappend DEFAULT_VECTCFLAGS "-mvsx" "-mno-allow-movmisalign" |