diff options
Diffstat (limited to 'gcc/testsuite')
85 files changed, 675 insertions, 817 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6ad847d..3923bb7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,183 @@ +2025-07-07 Qing Zhao <qing.zhao@oracle.com> + + Revert: + 2025-07-07 Qing Zhao <qing.zhao@oracle.com> + + * gcc.dg/flex-array-counted-by.c: Update test. + * gcc.dg/pointer-counted-by-1.c: New test. + * gcc.dg/pointer-counted-by-2.c: New test. + * gcc.dg/pointer-counted-by-3.c: New test. + * gcc.dg/pointer-counted-by.c: New test. + +2025-07-07 Qing Zhao <qing.zhao@oracle.com> + + Revert: + 2025-07-07 Qing Zhao <qing.zhao@oracle.com> + + * gcc.dg/pointer-counted-by-4-char.c: New test. + * gcc.dg/pointer-counted-by-4-float.c: New test. + * gcc.dg/pointer-counted-by-4-struct.c: New test. + * gcc.dg/pointer-counted-by-4-union.c: New test. + * gcc.dg/pointer-counted-by-4.c: New test. + * gcc.dg/pointer-counted-by-5.c: New test. + * gcc.dg/pointer-counted-by-6.c: New test. + * gcc.dg/pointer-counted-by-7.c: New test. + +2025-07-07 Qing Zhao <qing.zhao@oracle.com> + + Revert: + 2025-07-07 Qing Zhao <qing.zhao@oracle.com> + + * gcc.dg/ubsan/pointer-counted-by-bounds-2.c: New test. + * gcc.dg/ubsan/pointer-counted-by-bounds-3.c: New test. + * gcc.dg/ubsan/pointer-counted-by-bounds-4.c: New test. + * gcc.dg/ubsan/pointer-counted-by-bounds-5.c: New test. + * gcc.dg/ubsan/pointer-counted-by-bounds.c: New test. + +2025-07-07 H.J. Lu <hjl.tools@gmail.com> + + PR testsuite/120881 + * lib/scanasm.exp (check-function-bodies): Allow "^[0-9]+:". + +2025-07-07 H.J. Lu <hjl.tools@gmail.com> + + PR target/120888 + * gcc.target/xtensa/pr120888-1.c: New test. + * gcc.target/xtensa/pr120888-2.c: Likewise. + +2025-07-07 Juergen Christ <jchrist@linux.ibm.com> + + * gcc.target/s390/fminmax-1.c: New test. + * gcc.target/s390/fminmax-2.c: New test. + +2025-07-07 Tamar Christina <tamar.christina@arm.com> + + PR tree-optimization/120817 + * gcc.dg/vect/pr120817.c: Add SVE HW check. + +2025-07-07 Alfie Richards <alfie.richards@arm.com> + + PR c++/119498 + * g++.target/aarch64/pr119498.C: New test. + +2025-07-07 Jason Merrill <jason@redhat.com> + + PR c++/120917 + * g++.dg/concepts/auto7a.C: Add diagnostic. + * g++.dg/concepts/auto7b.C: New test. + * g++.dg/concepts/auto7c.C: New test. + * g++.dg/cpp1y/pr85076.C: Expect 'auto' error. + * g++.dg/concepts/pr67249.C: Likewise. + * g++.dg/cpp1y/lambda-generic-variadic.C: Likewise. + * g++.dg/cpp2a/concepts-pr67210.C: Likewise. + * g++.dg/concepts/pr67249a.C: New test. + * g++.dg/cpp1y/lambda-generic-variadic-a.C: New test. + * g++.dg/cpp2a/concepts-pr67210a.C: New test. + +2025-07-07 Kyrylo Tkachov <ktkachov@nvidia.com> + + * gcc.target/aarch64/popcnt9.c: Add +nosve to target pragma. + * gcc.target/aarch64/popcnt13.c: New test. + +2025-07-07 Richard Biener <rguenther@suse.de> + + PR tree-optimization/120817 + * gcc.dg/vect/pr120817.c: New testcase. + +2025-07-07 Pan Li <pan2.li@intel.com> + + * gcc.target/riscv/sat/sat_arith.h: Add test helper macros. + * gcc.target/riscv/sat/sat_arith_data.h: Add test data for + run test. + * gcc.target/riscv/sat/sat_u_mul-1-u16-from-u128.c: New test. + * gcc.target/riscv/sat/sat_u_mul-1-u32-from-u128.c: New test. + * gcc.target/riscv/sat/sat_u_mul-1-u64-from-u128.c: New test. + * gcc.target/riscv/sat/sat_u_mul-1-u8-from-u128.c: New test. + * gcc.target/riscv/sat/sat_u_mul-run-1-u16-from-u128.c: New test. + * gcc.target/riscv/sat/sat_u_mul-run-1-u32-from-u128.c: New test. + * gcc.target/riscv/sat/sat_u_mul-run-1-u64-from-u128.c: New test. + * gcc.target/riscv/sat/sat_u_mul-run-1-u8-from-u128.c: New test. + +2025-07-07 Eric Botcazou <ebotcazou@adacore.com> + + * ada/acats-3/tests/c9/c94001c.ada: Tweak delay statements. + * ada/acats-4/tests/c9/c94001c.ada: Likewise. + * ada/acats-4/tests/c9/c94006a.ada: Likewise. + * ada/acats-4/tests/c9/c94008c.ada: Likewise. + * ada/acats-4/tests/c9/c951002.a: Likewise. + * ada/acats-4/tests/c9/c954a01.a: Likewise. + * ada/acats-4/tests/c9/c940005.a: Tweak duration constants. + * ada/acats-4/tests/c9/c940007.a: Likewise. + * ada/acats-4/tests/c9/c96001a.ada: Likewise. + +2025-07-07 Juergen Christ <jchrist@linux.ibm.com> + + * gcc.target/s390/vector/pattern-avg-1.c: New test. + * gcc.target/s390/vector/pattern-mulh-1.c: New test. + +2025-07-07 Spencer Abson <spencer.abson@arm.com> + + * gcc.target/aarch64/sve/unpacked_fcm_1.c: New test. + * gcc.target/aarch64/sve/unpacked_fcm_2.c: Likewise. + +2025-07-07 H.J. Lu <hjl.tools@gmail.com> + + PR target/120670 + PR target/120683 + * gcc.target/i386/auto-init-padding-9.c: Updated. + * gcc.target/i386/memcpy-strategy-12.c: Likewise. + * gcc.target/i386/memset-strategy-25.c: Likewise. + * gcc.target/i386/memset-strategy-29.c: Likewise. + * gcc.target/i386/memset-strategy-30.c: Likewise. + * gcc.target/i386/memset-strategy-31.c: Likewise. + * gcc.target/i386/memcpy-pr120683-1.c: New test. + * gcc.target/i386/memcpy-pr120683-2.c: Likewise. + * gcc.target/i386/memcpy-pr120683-3.c: Likewise. + * gcc.target/i386/memcpy-pr120683-4.c: Likewise. + * gcc.target/i386/memcpy-pr120683-5.c: Likewise. + * gcc.target/i386/memcpy-pr120683-6.c: Likewise. + * gcc.target/i386/memcpy-pr120683-7.c: Likewise. + * gcc.target/i386/memset-pr120683-1.c: Likewise. + * gcc.target/i386/memset-pr120683-2.c: Likewise. + * gcc.target/i386/memset-pr120683-3.c: Likewise. + * gcc.target/i386/memset-pr120683-4.c: Likewise. + * gcc.target/i386/memset-pr120683-5.c: Likewise. + * gcc.target/i386/memset-pr120683-6.c: Likewise. + * gcc.target/i386/memset-pr120683-7.c: Likewise. + * gcc.target/i386/memset-pr120683-8.c: Likewise. + * gcc.target/i386/memset-pr120683-9.c: Likewise. + * gcc.target/i386/memset-pr120683-10.c: Likewise. + * gcc.target/i386/memset-pr120683-11.c: Likewise. + * gcc.target/i386/memset-pr120683-12.c: Likewise. + * gcc.target/i386/memset-pr120683-13.c: Likewise. + * gcc.target/i386/memset-pr120683-14.c: Likewise. + * gcc.target/i386/memset-pr120683-15.c: Likewise. + * gcc.target/i386/memset-pr120683-16.c: Likewise. + * gcc.target/i386/memset-pr120683-17.c: Likewise. + * gcc.target/i386/memset-pr120683-18.c: Likewise. + * gcc.target/i386/memset-pr120683-19.c: Likewise. + * gcc.target/i386/memset-pr120683-20.c: Likewise. + * gcc.target/i386/memset-pr120683-21.c: Likewise. + * gcc.target/i386/memset-pr120683-22.c: Likewise. + * gcc.target/i386/memset-pr120683-23.c: Likewise. + +2025-07-07 Jakub Jelinek <jakub@redhat.com> + + PR c++/84009 + * g++.dg/cpp0x/range-for40.C: New test. + * g++.dg/cpp0x/range-for41.C: New test. + * g++.dg/cpp0x/range-for42.C: New test. + * g++.dg/cpp0x/range-for43.C: New test. + +2025-07-07 Mikael Morin <mikael@gcc.gnu.org> + + * gfortran.dg/move_alloc_20.f03: New test. + +2025-07-07 Andrew Pinski <quic_apinski@quicinc.com> + + PR middle-end/120709 + * gcc.dg/crc-non-cst-poly-1.c: New test. + 2025-07-06 Andrew Pinski <quic_apinski@quicinc.com> PR tree-optimization/120951 diff --git a/gcc/testsuite/g++.dg/concepts/auto7a.C b/gcc/testsuite/g++.dg/concepts/auto7a.C index 88868f4..f36038d 100644 --- a/gcc/testsuite/g++.dg/concepts/auto7a.C +++ b/gcc/testsuite/g++.dg/concepts/auto7a.C @@ -2,6 +2,7 @@ template <class T> struct A { }; void f(A<auto> a) { } // { dg-error "auto. in template argument" } +// { dg-message "in parameter declaration" "" { target c++17_down } .-1 } int main() { f(A<int>()); diff --git a/gcc/testsuite/g++.dg/concepts/auto7b.C b/gcc/testsuite/g++.dg/concepts/auto7b.C new file mode 100644 index 0000000..874192c --- /dev/null +++ b/gcc/testsuite/g++.dg/concepts/auto7b.C @@ -0,0 +1,10 @@ +// PR c++/120917 +// { dg-do compile { target c++14 } } +// { dg-additional-options "-fconcepts -Wno-abbreviated-auto-in-template-arg" } + +template <class T> struct A { }; +void f(A<auto> a) { } +int main() +{ + f(A<int>()); +} diff --git a/gcc/testsuite/g++.dg/concepts/auto7c.C b/gcc/testsuite/g++.dg/concepts/auto7c.C new file mode 100644 index 0000000..5b16027 --- /dev/null +++ b/gcc/testsuite/g++.dg/concepts/auto7c.C @@ -0,0 +1,12 @@ +// { dg-do compile { target c++17 } } +// { dg-additional-options -fconcepts } + +template <class T> +concept True = true; + +template <class T> struct A { }; +void f(A<True auto> a) { } // { dg-error "use of .auto. in template argument" } +int main() +{ + f(A<int>()); +} diff --git a/gcc/testsuite/g++.dg/concepts/pr67249.C b/gcc/testsuite/g++.dg/concepts/pr67249.C index e0f8d5a..e97183d 100644 --- a/gcc/testsuite/g++.dg/concepts/pr67249.C +++ b/gcc/testsuite/g++.dg/concepts/pr67249.C @@ -4,4 +4,4 @@ template<class T> concept C1 = true; template<class A, class B> struct Pair {}; // We used to test "Pair<auto, C1 >". -void f(Pair<C1 auto, C1 auto>); +void f(Pair<C1 auto, C1 auto>); // { dg-error "auto" } diff --git a/gcc/testsuite/g++.dg/concepts/pr67249a.C b/gcc/testsuite/g++.dg/concepts/pr67249a.C new file mode 100644 index 0000000..cb5d90e --- /dev/null +++ b/gcc/testsuite/g++.dg/concepts/pr67249a.C @@ -0,0 +1,7 @@ +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts -Wno-abbreviated-auto-in-template-arg" } + +template<class T> concept C1 = true; +template<class A, class B> struct Pair {}; +// We used to test "Pair<auto, C1 >". +void f(Pair<C1 auto, C1 auto>); diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic-a.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic-a.C new file mode 100644 index 0000000..557ecb9 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic-a.C @@ -0,0 +1,15 @@ +// Basic generic lambda test +// { dg-do run { target c++14 } } +// { dg-additional-options -Wno-abbreviated-auto-in-template-arg } + +template <typename T, typename U> struct pair {}; +template <typename... T> struct tuple {}; + +int main() +{ + auto a = [] (auto, pair<auto,auto> v) { return sizeof (v); }; + auto b = [] (auto, pair<pair<auto,auto>,auto>... v) { return sizeof... (v); }; + + a(1, pair<int, float>()); + b(2, pair<pair<short,char>, double>(), pair<pair<float,long>, int>()); +} diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic.C index 6d2d250..6ef8652 100644 --- a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic.C +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic.C @@ -1,13 +1,13 @@ // Basic generic lambda test -// { dg-do run { target c++14 } } +// { dg-do compile { target c++14 } } template <typename T, typename U> struct pair {}; template <typename... T> struct tuple {}; int main() { - auto a = [] (auto, pair<auto,auto> v) { return sizeof (v); }; - auto b = [] (auto, pair<pair<auto,auto>,auto>... v) { return sizeof... (v); }; + auto a = [] (auto, pair<auto,auto> v) { return sizeof (v); }; // { dg-error "auto" } + auto b = [] (auto, pair<pair<auto,auto>,auto>... v) { return sizeof... (v); }; // { dg-error "auto" } a(1, pair<int, float>()); b(2, pair<pair<short,char>, double>(), pair<pair<float,long>, int>()); diff --git a/gcc/testsuite/g++.dg/cpp1y/pr85076.C b/gcc/testsuite/g++.dg/cpp1y/pr85076.C index 6d54dea..b68143b 100644 --- a/gcc/testsuite/g++.dg/cpp1y/pr85076.C +++ b/gcc/testsuite/g++.dg/cpp1y/pr85076.C @@ -3,4 +3,4 @@ template<typename> struct A*; // { dg-error "expected unqualified-id before" } -auto a = [](A<auto>) {}; // { dg-error "is not a template|has incomplete type" } +auto a = [](A<auto>) {}; // { dg-error "is not a template|has incomplete type|auto" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C index a31750e..baddc1c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C @@ -7,4 +7,4 @@ concept C = true; template <class T> struct A {}; -void f(A<C<int> auto >) {} +void f(A<C<int> auto >) {} // { dg-error "auto" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210a.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210a.C new file mode 100644 index 0000000..1d63a84 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210a.C @@ -0,0 +1,11 @@ +// PR c++/67210 +// { dg-do compile { target c++20 } } +// { dg-additional-options -Wno-abbreviated-auto-in-template-arg } + +template <class T, class U> +concept C = true; + +template <class T> +struct A {}; + +void f(A<C<int> auto >) {} diff --git a/gcc/testsuite/g++.target/aarch64/pr119498.C b/gcc/testsuite/g++.target/aarch64/pr119498.C new file mode 100644 index 0000000..03f1659 --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/pr119498.C @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__ ((target_version ("default"))) int +foo (); + +__attribute__ ((target_version ("default"))) int +foo () { return 1; } /* { dg-message "old declaration" } */ + +__attribute__ ((target_version ("dotprod"))) float +foo () { return 3; } /* { dg-error "ambiguating new declaration" } */ + +__attribute__ ((target_version ("sve"))) int +foo2 () { return 1; } /* { dg-message "old declaration" } */ + +__attribute__ ((target_version ("dotprod"))) float +foo2 () { return 3; } /* { dg-error "ambiguating new declaration of" } */ diff --git a/gcc/testsuite/gcc.dg/flex-array-counted-by.c b/gcc/testsuite/gcc.dg/flex-array-counted-by.c index 4fa91ff..16eb2c6 100644 --- a/gcc/testsuite/gcc.dg/flex-array-counted-by.c +++ b/gcc/testsuite/gcc.dg/flex-array-counted-by.c @@ -10,7 +10,7 @@ int x __attribute ((counted_by (size))); /* { dg-error "attribute is not allowed struct trailing { int count; - int field __attribute ((counted_by (count))); /* { dg-error "attribute is not allowed for a non-array or non-pointer field" } */ + int field __attribute ((counted_by (count))); /* { dg-error "attribute is not allowed for a non-array field" } */ }; struct trailing_1 { diff --git a/gcc/testsuite/gcc.dg/guality/guality.h b/gcc/testsuite/gcc.dg/guality/guality.h index d41327c..48b59d2e 100644 --- a/gcc/testsuite/gcc.dg/guality/guality.h +++ b/gcc/testsuite/gcc.dg/guality/guality.h @@ -204,9 +204,10 @@ int volatile guality_attached; of this wrapping, guality_main may not have an empty argument list. */ -extern int guality_main (int argc, char *argv[]); +extern int __attribute__((noipa)) +guality_main (int argc, char *argv[]); -static void __attribute__((noinline)) +static void __attribute__((noipa)) guality_check (const char *name, gualchk_t value, int unknown_ok); /* Set things up, run guality_main, then print a summary and quit. */ diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-1.c b/gcc/testsuite/gcc.dg/pointer-counted-by-1.c deleted file mode 100644 index 395af34..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by-1.c +++ /dev/null @@ -1,34 +0,0 @@ -/* More testing the correct usage of attribute counted_by for pointer field. */ -/* { dg-do compile } */ -/* { dg-options "-O0" } */ - -typedef struct item1 Item1; -typedef union item2 Item2; - -struct pointer_array { - int count1; - Item1 *array_1 __attribute__ ((counted_by (count1))); - Item2 *array_2 __attribute__ ((counted_by (count2))); - int count2; -} *pointer_data; - -struct item1 { - int a; - float b[]; -}; - -union item2 { - int c; - float d[]; -}; - -void foo () -{ - pointer_data - = (struct pointer_array *) __builtin_malloc (sizeof (struct pointer_array)); - pointer_data->array_1 /* { dg-error "attribute is not allowed for a pointer to structure or union with flexible array member" } */ - = (Item1 *) __builtin_malloc (sizeof (Item1) + 3 * sizeof (float)); - pointer_data->array_2 /* { dg-error "attribute is not allowed for a pointer to structure or union with flexible array member" } */ - = (Item2 *) __builtin_malloc (sizeof (Item2) + 3 * sizeof (float)); - return; -} diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-2.c b/gcc/testsuite/gcc.dg/pointer-counted-by-2.c deleted file mode 100644 index 1f4a278..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by-2.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Testing the correct usage of attribute counted_by for pointer: _BitInt */ -/* { dg-do compile { target bitint } } */ -/* { dg-options "-O2 -std=c23" } */ - -struct pointer_array { - _BitInt(24) count; - int *array __attribute__ ((counted_by (count))); - int *array1 __attribute__ ((counted_by (count1))); - _BitInt(24) count1; -}; diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-3.c b/gcc/testsuite/gcc.dg/pointer-counted-by-3.c deleted file mode 100644 index 7005609..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by-3.c +++ /dev/null @@ -1,127 +0,0 @@ - /* Testing the correct usage of attribute counted_by for pointer in c23, - multiple definitions of the same tag in same or different scopes. - { dg-do compile } - { dg-options "-std=c23" } - */ - -/* Allowed redefinitions of the same struct in the same scope, with the - same counted_by attribute. */ -struct f { - int b; - int c; - int *a __attribute__ ((counted_by (b))); }; -struct f { - int b; - int c; - int *a __attribute__ ((counted_by (b))); }; -struct f { - int b; - int c; - int *a; }; /* { dg-error "redefinition of struct or union" } */ - -/* Error when the counted_by attribute is defined differently. */ -struct f { - int b; - int c; - int *a __attribute__ ((counted_by (c))); }; /* { dg-error "redefinition of struct or union" } */ - -struct h { - int b; - int c; - int *a __attribute__ ((counted_by (b))); } p; - -void test (void) -{ - struct h { - int b; - int c; - int *a __attribute__ ((counted_by (b))); } x; - - p = x; -} - -void test1 (void) -{ - struct h { - int b; - int c; - int *a __attribute__ ((counted_by (c))); } y; - - p = y; /* { dg-error "incompatible types when assigning to type" } */ -} - -struct nested_f { - struct { - union { - int b; - float f; - }; - int n; - }; - char *c __attribute__ ((counted_by (b))); -}; - -struct nested_f { - struct { - union { - int b; - float f; - }; - int n; - }; - char *c __attribute__ ((counted_by (b))); -}; - -struct nested_f { - struct { - union { - int b; - float f; - }; - int n; - }; - char *c __attribute__ ((counted_by (n))); -}; /* { dg-error "redefinition of struct or union" } */ - -struct nested_h { - struct { - union { - int b; - float f; - }; - int n; - }; - char *c __attribute__ ((counted_by (b))); -} nested_p; - -void test_2 (void) -{ -struct nested_h { - struct { - union { - int b; - float f; - }; - int n; - }; - char *c __attribute__ ((counted_by (b))); -} nested_x; - - nested_p = nested_x; -} - -void test_3 (void) -{ -struct nested_h { - struct { - union { - int b; - float f; - }; - int n; - }; - char *c __attribute__ ((counted_by (n))); -} nested_y; - - nested_p = nested_y; /* { dg-error "incompatible types when assigning to type" } */ -} diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-4-char.c b/gcc/testsuite/gcc.dg/pointer-counted-by-4-char.c deleted file mode 100644 index c404e5b..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by-4-char.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Test the attribute counted_by for pointer field and its usage in - * __builtin_dynamic_object_size. */ -/* { dg-do run } */ -/* { dg-options "-O2" } */ -#define PTR_TYPE char -#include "pointer-counted-by-4.c" diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-4-float.c b/gcc/testsuite/gcc.dg/pointer-counted-by-4-float.c deleted file mode 100644 index 383d8fb..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by-4-float.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Test the attribute counted_by for pointer field and its usage in - * __builtin_dynamic_object_size. */ -/* { dg-do run } */ -/* { dg-options "-O2" } */ -#define PTR_TYPE float -#include "pointer-counted-by-4.c" diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-4-struct.c b/gcc/testsuite/gcc.dg/pointer-counted-by-4-struct.c deleted file mode 100644 index 50246d2..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by-4-struct.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Test the attribute counted_by for pointer field and its usage in - * __builtin_dynamic_object_size. */ -/* { dg-do run } */ -/* { dg-options "-O2" } */ -struct A { - int a; - char *b; -}; -#define PTR_TYPE struct A -#include "pointer-counted-by-4.c" diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-4-union.c b/gcc/testsuite/gcc.dg/pointer-counted-by-4-union.c deleted file mode 100644 index e786d99..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by-4-union.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Test the attribute counted_by for pointer field and its usage in - * __builtin_dynamic_object_size. */ -/* { dg-do run } */ -/* { dg-options "-O2" } */ -union A { - int a; - float b; -}; -#define PTR_TYPE union A -#include "pointer-counted-by-4.c" diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-4.c b/gcc/testsuite/gcc.dg/pointer-counted-by-4.c deleted file mode 100644 index c4b3631..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by-4.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Test the attribute counted_by for pointer field and its usage in - * __builtin_dynamic_object_size. */ -/* { dg-do run } */ -/* { dg-options "-O2" } */ - -#include "builtin-object-size-common.h" -#ifndef PTR_TYPE -#define PTR_TYPE int -#endif -struct pointer_array { - int b; - PTR_TYPE *c; -} *p_array; - -struct annotated { - PTR_TYPE *c __attribute__ ((counted_by (b))); - int b; -} *p_array_annotated; - -struct nested_annotated { - PTR_TYPE *c __attribute__ ((counted_by (b))); - struct { - union { - int b; - float f; - }; - int n; - }; -} *p_array_nested_annotated; - -void __attribute__((__noinline__)) setup (int normal_count, int attr_count) -{ - p_array - = (struct pointer_array *) malloc (sizeof (struct pointer_array)); - p_array->c = (PTR_TYPE *) malloc (sizeof (PTR_TYPE) * normal_count); - p_array->b = normal_count; - - p_array_annotated - = (struct annotated *) malloc (sizeof (struct annotated)); - p_array_annotated->c = (PTR_TYPE *) malloc (sizeof (PTR_TYPE) * attr_count); - p_array_annotated->b = attr_count; - - p_array_nested_annotated - = (struct nested_annotated *) malloc (sizeof (struct nested_annotated)); - p_array_nested_annotated->c = (PTR_TYPE *) malloc (sizeof (PTR_TYPE) * attr_count); - p_array_nested_annotated->b = attr_count; - - return; -} - -void __attribute__((__noinline__)) test () -{ - EXPECT(__builtin_dynamic_object_size(p_array->c, 1), -1); - EXPECT(__builtin_dynamic_object_size(p_array_annotated->c, 1), - p_array_annotated->b * sizeof (PTR_TYPE)); - EXPECT(__builtin_dynamic_object_size(p_array_nested_annotated->c, 1), - p_array_nested_annotated->b * sizeof (PTR_TYPE)); -} - -void cleanup () -{ - free (p_array->c); - free (p_array); - free (p_array_annotated->c); - free (p_array_annotated); - free (p_array_nested_annotated->c); - free (p_array_nested_annotated); -} - -int main(int argc, char *argv[]) -{ - setup (10,10); - test (); - DONE (); - cleanup (); - return 0; -} diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-5.c b/gcc/testsuite/gcc.dg/pointer-counted-by-5.c deleted file mode 100644 index b43ffdf..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by-5.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Test the attribute counted_by for pointer fields and its usage in - * __builtin_dynamic_object_size: when the counted_by field is negative. */ -/* { dg-do run } */ -/* { dg-options "-O2" } */ - -#include "builtin-object-size-common.h" - -struct annotated { - int b; - int *c __attribute__ ((counted_by (b))); -} *array_annotated; - -struct nested_annotated { - int *c __attribute__ ((counted_by (b))); - struct { - union { - int b; - float f; - }; - int n; - }; -} *array_nested_annotated; - -void __attribute__((__noinline__)) setup (int attr_count) -{ - array_annotated - = (struct annotated *)malloc (sizeof (struct annotated)); - array_annotated->b = attr_count; - - array_nested_annotated - = (struct nested_annotated *)malloc (sizeof (struct nested_annotated)); - array_nested_annotated->b = attr_count - 1; - - return; -} - -void __attribute__((__noinline__)) test () -{ - EXPECT(__builtin_dynamic_object_size(array_annotated->c, 1), 0); - EXPECT(__builtin_dynamic_object_size(array_nested_annotated->c, 1), 0); -} - -void cleanup () -{ - free (array_annotated); - free (array_nested_annotated); -} - -int main(int argc, char *argv[]) -{ - setup (-10); - test (); - DONE (); - cleanup (); - return 0; -} diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-6.c b/gcc/testsuite/gcc.dg/pointer-counted-by-6.c deleted file mode 100644 index 355558c..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by-6.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Test the attribute counted_by for pointer fields and its usage in - * __builtin_dynamic_object_size: when the type of the pointer - * is casting to another type. */ -/* { dg-do run } */ -/* { dg-options "-O2" } */ - -#include "builtin-object-size-common.h" - -typedef unsigned short u16; - -struct info { - u16 data_len; - char *data __attribute__((counted_by(data_len))); -}; - -struct foo { - int a; - int b; -}; - -static __attribute__((__noinline__)) -struct info *setup () -{ - struct info *p; - size_t bytes = 3 * sizeof(struct foo); - - p = (struct info *) malloc (sizeof (struct info)); - p->data = (char *) malloc (bytes); - p->data_len = bytes; - - return p; -} - -static void -__attribute__((__noinline__)) report (struct info *p) -{ - struct foo *bar = (struct foo *)p->data; - EXPECT(__builtin_dynamic_object_size((char *)(bar + 1), 1), - sizeof (struct foo) * 2); - EXPECT(__builtin_dynamic_object_size((char *)(bar + 2), 1), - sizeof (struct foo)); -} - -void cleanup (struct info *p) -{ - free (p->data); - free (p); -} - -int main(int argc, char *argv[]) -{ - struct info *p = setup(); - report(p); - cleanup (p); - return 0; -} diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-7.c b/gcc/testsuite/gcc.dg/pointer-counted-by-7.c deleted file mode 100644 index af1ab27..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by-7.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Additional test of the attribute counted_by for pointer field and its usage - in __builtin_dynamic_object_size. */ -/* { dg-do run } */ -/* { dg-options "-O2" } */ - -#include "builtin-object-size-common.h" - -struct annotated { - int b; - int *c __attribute__ ((counted_by (b))); -}; - -struct annotated __attribute__((__noinline__)) setup (int attr_count) -{ - struct annotated p_array_annotated; - p_array_annotated.c = (int *) malloc (sizeof (int) * attr_count); - p_array_annotated.b = attr_count; - - return p_array_annotated; -} - -int main(int argc, char *argv[]) -{ - struct annotated x = setup (10); - int *p = x.c; - x = setup (20); - EXPECT(__builtin_dynamic_object_size (p, 1), 10 * sizeof (int)); - EXPECT(__builtin_dynamic_object_size (x.c, 1), 20 * sizeof (int)); - free (p); - free (x.c); - DONE (); -} diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by.c b/gcc/testsuite/gcc.dg/pointer-counted-by.c deleted file mode 100644 index 0f18828..0000000 --- a/gcc/testsuite/gcc.dg/pointer-counted-by.c +++ /dev/null @@ -1,111 +0,0 @@ -/* Testing the correct usage of attribute counted_by for pointer field. - and also mixed pointer field and FMA field in the same structure. */ -/* { dg-do compile } */ -/* { dg-options "-O0" } */ - -int size; -int *x __attribute__ ((counted_by (size))); /* { dg-error "attribute is not allowed for a non-field declaration" } */ - -struct pointer_array_0 { - int count; - int array __attribute__ ((counted_by (count))); /* { dg-error "attribute is not allowed for a non-array or non-pointer field" } */ - int other; -}; - -int count; -struct pointer_array_1 { - int other; - int *array_1 __attribute__ ((counted_by (count))); /* { dg-error "attribute is not a field declaration in the same structure as" } */ - int array_fam[] __attribute__ ((counted_by (count))); /* { dg-error "attribute is not a field declaration in the same structure as" } */ -}; - -struct pointer_array_2 { - float count1; - float count2; - int *array_2 __attribute__ ((counted_by (count1))); /* { dg-error "attribute is not a field declaration with an integer type" } */ - int array_fam[] __attribute__ ((counted_by (count2))); /* { dg-error "attribute is not a field declaration with an integer type" } */ -}; - -struct pointer_array_3 { - int count; - int *array_3 __attribute__ ((counted_by (count))) __attribute__ ((counted_by (count))); -}; - -struct pointer_array_4 { - int count1; - int count2; - int *array_4 __attribute__ ((counted_by (count1))) __attribute__ ((counted_by (count2))); /* { dg-error "conflicts with previous declaration" } */ - float array_fam[] __attribute__ ((counted_by (count2))) __attribute__ ((counted_by (count1))); /* { dg-error "conflicts with previous declaration" } */ -}; - -struct pointer_array_5 { - _Bool count; - int *array_5 __attribute__ ((counted_by (count))); -}; - -enum week {Mon, Tue, Wed}; -struct pointer_array_6 { - enum week days; - int *array_6 __attribute__ ((counted_by (days))); -}; - -struct pointer_array_7 { - int count; - void *array_7 __attribute__ ((counted_by (count))); /* { dg-error "attribute is not allowed for a pointer to void" } */ -}; - -struct pointer_array_8 { - int count; - int (*fpr)(int,int) __attribute__ ((counted_by (count))); /* { dg-error "attribute is not allowed for a pointer to function" } */ -}; - -struct item1 { - int a; - float b; -}; - -union item2 { - char *a; - int *b; -}; - -typedef struct item3 Item3; -typedef union item4 Item4; - -struct item5 { - int a; - float b[]; -}; - -/* Incomplete structure and union are allowed. */ -struct pointer_array_9 { - int count1; - int count2; - int count3; - struct item1 *array_1 __attribute__ ((counted_by (count1))); - union item2 *array_2 __attribute__ ((counted_by (count2))); - Item3 *array_3 __attribute__ ((counted_by (count3))); - Item4 *array_4 __attribute__ ((counted_by (count4))); - int count4; - int count5; - /* structure with flexible array member is not allowed. */ - struct item5 *array_5 __attribute__ ((counted_by (count5))); /* { dg-error "attribute is not allowed for a pointer to structure or union with flexible array member" } */ -}; - -struct mixed_array { - int count1; - float *array_1 __attribute__ ((counted_by (count1))); - float *array_2 __attribute__ ((counted_by (count1))); - int count2; - long *array_3 __attribute__ ((counted_by (count2))); - long array_4[] __attribute__ ((counted_by (count2))); -}; - -struct mixed_array_2 { - float *array_1 __attribute__ ((counted_by (count1))); - int count1; - float *array_2 __attribute__ ((counted_by (count1))); - long *array_3 __attribute__ ((counted_by (count2))); - int count2; - long array_4[] __attribute__ ((counted_by (count2))); -}; diff --git a/gcc/testsuite/gcc.dg/torture/pr120654.c b/gcc/testsuite/gcc.dg/torture/pr120654.c index 3819b78..aacfeea 100644 --- a/gcc/testsuite/gcc.dg/torture/pr120654.c +++ b/gcc/testsuite/gcc.dg/torture/pr120654.c @@ -2,8 +2,6 @@ int a, c, e, f, h, j; long g, k; -void *malloc(long); -void free(void *); int b(int m) { if (m || a) return 1; @@ -16,9 +14,9 @@ int i() { } void n() { long o; - int *p = malloc(sizeof(int)); + int *p = __builtin_malloc(sizeof(int)); k = 1 % j; for (; i() + f + h; o++) if (p[d(j + 6, (int)k + 1992695866) + h + f + j + (int)k - 1 + o]) - free(p); + __builtin_free(p); } diff --git a/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-2.c b/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-2.c deleted file mode 100644 index 0653ecc..0000000 --- a/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-2.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Test the attribute counted_by for pointer fields and its usage in - bounds sanitizer combined with VLA. */ -/* { dg-do run } */ -/* { dg-options "-fsanitize=bounds" } */ -/* { dg-output "index 11 out of bounds for type 'int \\\[\\\*\\\]\\\[\\\*\\\]'\[^\n\r]*(\n|\r\n|\r)" } */ -/* { dg-output "\[^\n\r]*index 20 out of bounds for type 'int \\\[\\\*\\\]\\\[\\\*\\\]\\\[\\\*\\\]'\[^\n\r]*(\n|\r\n|\r)" } */ -/* { dg-output "\[^\n\r]*index 11 out of bounds for type 'int \\\[\\\*\\\]\\\[\\\*\\\]'\[^\n\r]*(\n|\r\n|\r)" } */ -/* { dg-output "\[^\n\r]*index 10 out of bounds for type 'int \\\[\\\*\\\]'\[^\n\r]*(\n|\r\n|\r)" } */ - - -#include <stdlib.h> - -void __attribute__((__noinline__)) setup_and_test_vla (int n, int m) -{ - struct foo { - int n; - int (*p)[n] __attribute__((counted_by(n))); - } *f; - - f = (struct foo *) malloc (sizeof (struct foo)); - f->p = (int (*)[n]) malloc (m * sizeof (int[n])); - f->n = m; - f->p[m][n-1] = 1; - free (f->p); - free (f); - return; -} - -void __attribute__((__noinline__)) setup_and_test_vla_1 (int n1, int n2, int m) -{ - struct foo { - int n; - int (*p)[n2][n1] __attribute__((counted_by(n))); - } *f; - - f = (struct foo *) malloc (sizeof(struct foo)); - f->p = (int (*)[n2][n1]) malloc (m * sizeof (int[n2][n1])); - f->n = m; - f->p[m][n2][n1] = 1; - free (f->p); - free (f); - return; -} - -int main(int argc, char *argv[]) -{ - setup_and_test_vla (10, 11); - setup_and_test_vla_1 (10, 11, 20); - return 0; -} - diff --git a/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-3.c b/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-3.c deleted file mode 100644 index 731422d..0000000 --- a/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-3.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Test the attribute counted_by for pointer fields and its usage in bounds - sanitizer. when counted_by field is negative value. */ -/* { dg-do run } */ -/* { dg-options "-fsanitize=bounds" } */ - -#include <stdlib.h> - -struct annotated { - int b; - int *c __attribute__ ((counted_by (b))); -} *array_annotated; - -void __attribute__((__noinline__)) setup (int annotated_count) -{ - array_annotated - = (struct annotated *)malloc (sizeof (struct annotated)); - array_annotated->c = (int *) malloc (sizeof (int) * 10); - array_annotated->b = annotated_count; - - return; -} - -void __attribute__((__noinline__)) test (int annotated_index) -{ - array_annotated->c[annotated_index] = 2; -} - -void cleanup () -{ - free (array_annotated->c); - free (array_annotated); -} - -int main(int argc, char *argv[]) -{ - setup (-3); - test (2); - cleanup (); - return 0; -} - -/* { dg-output "25:21: runtime error: index 2 out of bounds for type" } */ diff --git a/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-4.c b/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-4.c deleted file mode 100644 index 52f202f..0000000 --- a/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-4.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Test the attribute counted_by for pointer fields and its usage in bounds - sanitizer. when counted_by field is zero value. */ -/* { dg-do run } */ -/* { dg-options "-fsanitize=bounds" } */ - -#include <stdlib.h> - -struct annotated { - int b; - int *c __attribute__ ((counted_by (b))); -} *array_annotated; - -void __attribute__((__noinline__)) setup (int annotated_count) -{ - array_annotated - = (struct annotated *)malloc (sizeof (struct annotated)); - array_annotated->c = (int *)malloc (sizeof (int) * 10); - array_annotated->b = annotated_count; - - return; -} - -void __attribute__((__noinline__)) test (int annotated_index) -{ - array_annotated->c[annotated_index] = 2; -} - -void cleanup () -{ - free (array_annotated->c); - free (array_annotated); -} - -int main(int argc, char *argv[]) -{ - setup (0); - test (1); - cleanup (); - return 0; -} - -/* { dg-output "25:21: runtime error: index 1 out of bounds for type" } */ diff --git a/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-5.c b/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-5.c deleted file mode 100644 index 8ad7572..0000000 --- a/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-5.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Test the attribute counted_by for pointer fields and its usage in - bounds sanitizer. */ -/* { dg-do run } */ -/* { dg-options "-fsanitize=bounds" } */ - -#include <stdlib.h> - -struct annotated { - int b; - int *c __attribute__ ((counted_by (b))); -} *p_array_annotated; - -void __attribute__((__noinline__)) setup (int annotated_count) -{ - p_array_annotated - = (struct annotated *)malloc (sizeof (struct annotated)); - p_array_annotated->c = (int *) malloc (annotated_count * sizeof (int)); - p_array_annotated->b = annotated_count; - - return; -} - -void cleanup () -{ - free (p_array_annotated->c); - free (p_array_annotated); -} - -int main(int argc, char *argv[]) -{ - int i; - setup (10); - for (i = 0; i < 11; i++) - p_array_annotated->c[i] = 2; // goes boom at i == 10 - cleanup (); - return 0; -} - - -/* { dg-output "34:25: runtime error: index 10 out of bounds for type" } */ diff --git a/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds.c b/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds.c deleted file mode 100644 index c5a1ac5..0000000 --- a/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Test the attribute counted_by for pointer fields and its usage in - bounds sanitizer. */ -/* { dg-do run } */ -/* { dg-options "-fsanitize=bounds" } */ - -#include <stdlib.h> - -struct pointer_array { - int b; - int *c; -} *p_array; - -struct annotated { - int b; - int *c __attribute__ ((counted_by (b))); -} *p_array_annotated; - -void __attribute__((__noinline__)) setup (int normal_count, int annotated_count) -{ - p_array - = (struct pointer_array *) malloc (sizeof (struct pointer_array)); - p_array->c = (int *) malloc (normal_count * sizeof (int)); - p_array->b = normal_count; - - p_array_annotated - = (struct annotated *) malloc (sizeof (struct annotated)); - p_array_annotated->c = (int *) malloc (annotated_count * sizeof (int)); - p_array_annotated->b = annotated_count; - - return; -} - -void __attribute__((__noinline__)) test (int normal_index, int annotated_index) -{ - p_array->c[normal_index] = 1; - p_array_annotated->c[annotated_index] = 2; -} - -int main(int argc, char *argv[]) -{ - setup (10, 10); - test (10, 10); - return 0; -} - -/* { dg-output "36:23: runtime error: index 10 out of bounds for type" } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr120817.c b/gcc/testsuite/gcc.dg/vect/pr120817.c index d8f55c9..199189a 100644 --- a/gcc/testsuite/gcc.dg/vect/pr120817.c +++ b/gcc/testsuite/gcc.dg/vect/pr120817.c @@ -1,5 +1,6 @@ /* { dg-additional-options "-O1" } */ -/* { dg-additional-options "-mcpu=neoverse-n2" { target aarch64*-*-* } } */ +/* { dg-require-effective-target aarch64_sve_hw { target aarch64*-*-* } } */ +/* { dg-additional-options "-march=armv8-a+sve -mtune=neoverse-n2" { target aarch64*-*-* } } */ #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.target/aarch64/popcnt13.c b/gcc/testsuite/gcc.target/aarch64/popcnt13.c new file mode 100644 index 0000000..2a30e98 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/popcnt13.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-final { check-function-bodies "**" "" } } */ + +#pragma GCC target "+nocssc+sve" + +/* +** h128: +** ldr q([0-9]+), \[x0\] +** ptrue p([0-9]+).b, vl16 +** cnt z([0-9]+).d, p\2/m, z\1.d +** addp d([0-9]+), v\3.2d +** fmov x0, d\4 +** ret +*/ + +unsigned h128 (const unsigned __int128 *a) { + return __builtin_popcountg (a[0]); +} + +/* There should be only one POPCOUNT. */ +/* { dg-final { scan-tree-dump-times "POPCOUNT " 1 "optimized" } } */ +/* { dg-final { scan-tree-dump-not " __builtin_popcount" "optimized" } } */ + diff --git a/gcc/testsuite/gcc.target/aarch64/popcnt9.c b/gcc/testsuite/gcc.target/aarch64/popcnt9.c index c778fc7..cfed8c5 100644 --- a/gcc/testsuite/gcc.target/aarch64/popcnt9.c +++ b/gcc/testsuite/gcc.target/aarch64/popcnt9.c @@ -3,7 +3,7 @@ /* { dg-final { check-function-bodies "**" "" } } */ /* PR target/113042 */ -#pragma GCC target "+nocssc" +#pragma GCC target "+nocssc+nosve" /* ** h128: diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-1.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-1.c index 753238e..b1f6678 100644 --- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-1.c +++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-sse -mmemcpy-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mno-sse -mmemcpy-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c index 9b0fb06..0d0e348 100644 --- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c +++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c index 600459b..e5aca32 100644 --- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c +++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c index 14833ff..27f7bed 100644 --- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c +++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v3 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c index 15ffed9..34a7408 100644 --- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c +++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v3 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c index d57dcc1..aa5d90d 100644 --- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c +++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v4 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c index d9eb77d..63d8a15 100644 --- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c +++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v4 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memcpy-strategy-12.c b/gcc/testsuite/gcc.target/i386/memcpy-strategy-12.c index 4716086..c60cef0 100644 --- a/gcc/testsuite/gcc.target/i386/memcpy-strategy-12.c +++ b/gcc/testsuite/gcc.target/i386/memcpy-strategy-12.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mtune=generic -mno-sse" } */ +/* { dg-options "-O2 -mtune=generic -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-1.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-1.c index 90e544d..06e3892 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-1.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-10.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-10.c index 6d3d9e7..36a924d 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-10.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-10.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-sse -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-11.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-11.c index 30b0cad..4868e56 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-11.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-11.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-sse -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-12.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-12.c index 15987a6..9112897 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-12.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-12.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-sse -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c index 3da6ca7..69ec6c6 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-14.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-14.c index 7ec9b3f..209cd67 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-14.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-14.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-15.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-15.c index e754405..d19188f 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-15.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-15.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v3 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ +/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-16.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-16.c index c519bf3..539714c 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-16.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-16.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v4 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ +/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c index 744184c..f58cb28 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c index 32f8981..a127028 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c index 04f9171..8dd5ae6 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-2.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-2.c index f7834c0..3b84b29 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-2.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v3 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-20.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-20.c index edece12..b8b9cb7 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-20.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-20.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-21.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-21.c index a88e109..3c7bb7c 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-21.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-21.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c index f2bd698..96a21c8 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { ! ia32 } } } */ -/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=rep_8byte:8192:align,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=rep_8byte:8192:align,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c index 784f8dc..f3f5d80 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -minline-all-stringops -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -minline-all-stringops -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-3.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-3.c index 621baf7..faa47ca 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-3.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v4 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ +/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-4.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-4.c index 712404b..dc3aa57b 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-4.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-4.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-5.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-5.c index f597395..a324f8e 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-5.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-5.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v3 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ +/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-6.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-6.c index 7ba1b742..64e7589 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-6.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-6.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v4 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ +/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-7.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-7.c index 62f61c5..022f6f9 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-7.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-7.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ +/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-8.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-8.c index d12ab15..5254e21 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-8.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-8.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v3 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ +/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-9.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-9.c index 1a0abe6..1719de6 100644 --- a/gcc/testsuite/gcc.target/i386/memset-pr120683-9.c +++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-9.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64-v4 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ +/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/vect-epilogues-3.c b/gcc/testsuite/gcc.target/i386/vect-epilogues-3.c index 0ee610f..e88ab30 100644 --- a/gcc/testsuite/gcc.target/i386/vect-epilogues-3.c +++ b/gcc/testsuite/gcc.target/i386/vect-epilogues-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -mavx512bw -mtune=znver4 -fdump-tree-vect-optimized" } */ +/* { dg-options "-O3 -mavx512bw -mtune=znver4 --param vect-partial-vector-usage=0 -fdump-tree-vect-optimized" } */ int test (signed char *data, int n) { diff --git a/gcc/testsuite/gcc.target/i386/vect-mask-epilogue-1.c b/gcc/testsuite/gcc.target/i386/vect-mask-epilogue-1.c new file mode 100644 index 0000000..55519aa --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/vect-mask-epilogue-1.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -march=znver5 -fdump-tree-vect-optimized" } */ + +void bar (double *a, double *b, double c, int n, int m) +{ + for (int j = 0; j < m; ++j) + for (int i = 0; i < n; ++i) + a[j*n + i] = b[j*n + i] + c; +} + +/* { dg-final { scan-tree-dump "epilogue loop vectorized using masked 64 byte vectors" "vect" } } */ diff --git a/gcc/testsuite/gcc.target/i386/vect-mask-epilogue-2.c b/gcc/testsuite/gcc.target/i386/vect-mask-epilogue-2.c new file mode 100644 index 0000000..3dc28b3 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/vect-mask-epilogue-2.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -march=znver5 -fdump-tree-vect-optimized" } */ + +void foo (double *a, double b, double c, int n, int m) +{ + for (int j = 0; j < m; ++j) + for (int i = 0; i < n; ++i) + a[j*n + i] = a[j*n + i] * b + c; +} + +/* We do not want to use a masked epilogue for the inner loop as the next + outer iteration will possibly immediately read from elements masked of + the previous inner loop epilogue and that never forwards. */ +/* { dg-final { scan-tree-dump "epilogue loop vectorized using 32 byte vectors" "vect" } } */ diff --git a/gcc/testsuite/gcc.target/riscv/amo/zabha-zacas-atomic-cas.c b/gcc/testsuite/gcc.target/riscv/amo/zabha-zacas-atomic-cas.c new file mode 100644 index 0000000..d3d84fd --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/amo/zabha-zacas-atomic-cas.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* PR target/120995 ICE unrecognized subword atomic cas */ +/* { dg-options "-O" } */ +/* { dg-add-options riscv_zacas } */ +/* { dg-add-options riscv_zabha } */ + +_Bool b; +void atomic_bool_cmpxchg() +{ + __sync_bool_compare_and_swap(&b, 1, 0); +} diff --git a/gcc/testsuite/gcc.target/riscv/amo/zalrsc-rvwmo-amo-add-int.c b/gcc/testsuite/gcc.target/riscv/amo/zalrsc-rvwmo-amo-add-int.c index 4cf617d..0dfe816 100644 --- a/gcc/testsuite/gcc.target/riscv/amo/zalrsc-rvwmo-amo-add-int.c +++ b/gcc/testsuite/gcc.target/riscv/amo/zalrsc-rvwmo-amo-add-int.c @@ -9,7 +9,7 @@ /* ** atomic_add_fetch_int_relaxed: -** 1: +**... ** lr.w\t[atx][0-9]+, 0\(a0\) ** add\t[atx][0-9]+, [atx][0-9]+, a1 ** sc.w\t[atx][0-9]+, [atx][0-9]+, 0\(a0\) @@ -23,7 +23,7 @@ void atomic_add_fetch_int_relaxed (int* bar, int baz) /* ** atomic_add_fetch_int_acquire: -** 1: +**... ** lr.w.aq\t[atx][0-9]+, 0\(a0\) ** add\t[atx][0-9]+, [atx][0-9]+, a1 ** sc.w\t[atx][0-9]+, [atx][0-9]+, 0\(a0\) @@ -37,7 +37,7 @@ void atomic_add_fetch_int_acquire (int* bar, int baz) /* ** atomic_add_fetch_int_release: -** 1: +**... ** lr.w\t[atx][0-9]+, 0\(a0\) ** add\t[atx][0-9]+, [atx][0-9]+, a1 ** sc.w.rl\t[atx][0-9]+, [atx][0-9]+, 0\(a0\) @@ -51,7 +51,7 @@ void atomic_add_fetch_int_release (int* bar, int baz) /* ** atomic_add_fetch_int_acq_rel: -** 1: +**... ** lr.w.aq\t[atx][0-9]+, 0\(a0\) ** add\t[atx][0-9]+, [atx][0-9]+, a1 ** sc.w.rl\t[atx][0-9]+, [atx][0-9]+, 0\(a0\) @@ -65,7 +65,7 @@ void atomic_add_fetch_int_acq_rel (int* bar, int baz) /* ** atomic_add_fetch_int_seq_cst: -** 1: +**... ** lr.w.aqrl\t[atx][0-9]+, 0\(a0\) ** add\t[atx][0-9]+, [atx][0-9]+, a1 ** sc.w.rl\t[atx][0-9]+, [atx][0-9]+, 0\(a0\) diff --git a/gcc/testsuite/gcc.target/riscv/amo/zalrsc-ztso-amo-add-int.c b/gcc/testsuite/gcc.target/riscv/amo/zalrsc-ztso-amo-add-int.c index 3fb16c0..658b040 100644 --- a/gcc/testsuite/gcc.target/riscv/amo/zalrsc-ztso-amo-add-int.c +++ b/gcc/testsuite/gcc.target/riscv/amo/zalrsc-ztso-amo-add-int.c @@ -9,7 +9,7 @@ /* ** atomic_add_fetch_int_relaxed: -** 1: +**... ** lr.w\t[atx][0-9]+, 0\(a0\) ** add\t[atx][0-9]+, [atx][0-9]+, a1 ** sc.w\t[atx][0-9]+, [atx][0-9]+, 0\(a0\) @@ -23,7 +23,7 @@ void atomic_add_fetch_int_relaxed (int* bar, int baz) /* ** atomic_add_fetch_int_acquire: -** 1: +**... ** lr.w\t[atx][0-9]+, 0\(a0\) ** add\t[atx][0-9]+, [atx][0-9]+, a1 ** sc.w\t[atx][0-9]+, [atx][0-9]+, 0\(a0\) @@ -37,7 +37,7 @@ void atomic_add_fetch_int_acquire (int* bar, int baz) /* ** atomic_add_fetch_int_release: -** 1: +**... ** lr.w\t[atx][0-9]+, 0\(a0\) ** add\t[atx][0-9]+, [atx][0-9]+, a1 ** sc.w\t[atx][0-9]+, [atx][0-9]+, 0\(a0\) @@ -51,7 +51,7 @@ void atomic_add_fetch_int_release (int* bar, int baz) /* ** atomic_add_fetch_int_acq_rel: -** 1: +**... ** lr.w\t[atx][0-9]+, 0\(a0\) ** add\t[atx][0-9]+, [atx][0-9]+, a1 ** sc.w\t[atx][0-9]+, [atx][0-9]+, 0\(a0\) @@ -65,7 +65,7 @@ void atomic_add_fetch_int_acq_rel (int* bar, int baz) /* ** atomic_add_fetch_int_seq_cst: -** 1: +**... ** lr.w.aqrl\t[atx][0-9]+, 0\(a0\) ** add\t[atx][0-9]+, [atx][0-9]+, a1 ** sc.w.rl\t[atx][0-9]+, [atx][0-9]+, 0\(a0\) diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/pr113829.c b/gcc/testsuite/gcc.target/riscv/rvv/base/pr113829.c new file mode 100644 index 0000000..48c291a --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/pr113829.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=rv64gcv -mabi=lp64d" } */ + +#pragma riscv intrinsic "vector" +void +foo (void) +{ + __riscv_vfredosum_tu (X); /* { dg-error "undeclared" } */ + /* { dg-error "too many arguments" "" { target *-*-* } .-1 } */ +} diff --git a/gcc/testsuite/gcc.target/riscv/rvv/xtheadvector/pr120461.c b/gcc/testsuite/gcc.target/riscv/rvv/xtheadvector/pr120461.c new file mode 100644 index 0000000..6939157 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/xtheadvector/pr120461.c @@ -0,0 +1,6 @@ +/* { dg-do compile } */ +/* { dg-options "-mcpu=xt-c920 -mrvv-vector-bits=zvl -fzero-call-used-regs=all" */ + +void +foo () +{} diff --git a/gcc/testsuite/gcc.target/s390/fminmax-1.c b/gcc/testsuite/gcc.target/s390/fminmax-1.c new file mode 100644 index 0000000..df10905 --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/fminmax-1.c @@ -0,0 +1,77 @@ +/* Check fmin/fmax expanders for scalars on VXE targets. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -march=z14 -mzarch" } */ +/* { dg-final { check-function-bodies "**" "" } } */ + +/* +** dofmaxl: +** vl (%v.),0\(%r3\),3 +** vl (%v.),0\(%r4\),3 +** wfmaxxb (%v.),\1,\2,4 +** vst \3,0\(%r2\),3 +** br %r14 +*/ +long double +dofmaxl (long double d1, long double d2) +{ + return __builtin_fmaxl (d1, d2); +} + +/* +** dofminl: +** vl (%v.),0\(%r3\),3 +** vl (%v.),0\(%r4\),3 +** wfminxb (%v.),\1,\2,4 +** vst \3,0\(%r2\),3 +** br %r14 +*/ +long double +dofminl (long double d1, long double d2) +{ + return __builtin_fminl (d1, d2); +} + +/* +** dofmax: +** wfmaxdb %v0,%v0,%v2,4 +** br %r14 +*/ +double +dofmax (double d1, double d2) +{ + return __builtin_fmax (d1, d2); +} + +/* +** dofmin: +** wfmindb %v0,%v0,%v2,4 +** br %r14 +*/ +double +dofmin (double d1, double d2) +{ + return __builtin_fmin (d1, d2); +} + +/* +** dofmaxf: +** wfmaxsb %v0,%v0,%v2,4 +** br %r14 +*/ +float +dofmaxf (float f1, float f2) +{ + return __builtin_fmaxf (f1, f2); +} + +/* +** dofminf: +** wfminsb %v0,%v0,%v2,4 +** br %r14 +*/ +float +dofminf (float f1, float f2) +{ + return __builtin_fminf (f1, f2); +} diff --git a/gcc/testsuite/gcc.target/s390/fminmax-2.c b/gcc/testsuite/gcc.target/s390/fminmax-2.c new file mode 100644 index 0000000..ea37a0a --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/fminmax-2.c @@ -0,0 +1,29 @@ +/* Check fmin/fmax expanders for scalars on non-VXE targets. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -march=z13 -mzarch" } */ +/* { dg-final { scan-assembler-times "jg" 4 } } */ + +double +dofmax (double d1, double d2) +{ + return __builtin_fmax (d1, d2); +} + +double +dofmin (double d1, double d2) +{ + return __builtin_fmin (d1, d2); +} + +float +dofmaxf (float f1, float f2) +{ + return __builtin_fmaxf (f1, f2); +} + +float +dofminf (float f1, float f2) +{ + return __builtin_fminf (f1, f2); +} diff --git a/gcc/testsuite/gcc.target/s390/stack-protector-guard-tls-1.c b/gcc/testsuite/gcc.target/s390/stack-protector-guard-tls-1.c new file mode 100644 index 0000000..1efd245 --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/stack-protector-guard-tls-1.c @@ -0,0 +1,39 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fstack-protector-all" } */ +/* { dg-final { scan-assembler-times {\tear\t%r[0-9]+,%a[01]} 8 { target lp64 } } } */ +/* { dg-final { scan-assembler-times {\tsllg\t%r[0-9]+,%r[0-9]+,32} 4 { target lp64 } } } */ +/* { dg-final { scan-assembler-times {\tear\t%r[0-9]+,%a[01]} 3 { target { ! lp64 } } } } */ +/* { dg-final { scan-assembler-times {\tmvc\t160\(8,%r15\),40\(%r[0-9]+\)} 2 { target lp64 } } } */ +/* { dg-final { scan-assembler-times {\tmvc\t100\(4,%r15\),20\(%r[0-9]+\)} 2 { target { ! lp64 } } } } */ +/* { dg-final { scan-assembler-times {\tclc\t160\(8,%r15\),40\(%r[0-9]+\)} 2 { target lp64 } } } */ +/* { dg-final { scan-assembler-times {\tclc\t100\(4,%r15\),20\(%r[0-9]+\)} 2 { target { ! lp64 } } } } */ + +/* Computing the address of the thread pointer on s390 involves multiple + instructions and therefore bears the risk that the address of the canary or + intermediate values of it are spilled and reloaded. Therefore, as a + precaution compute the address always twice, i.e., one time for the prologue + and one time for the epilogue. */ + +void test_0 (void) { } + +void test_1 (void) +{ + __asm__ __volatile ("" ::: + "r0", + "r1", + "r2", + "r3", + "r4", + "r5", + "r6", + "r7", + "r8", + "r9", + "r10", + "r11", +#ifndef __PIC__ + "r12", +#endif + "r13", + "r14"); +} diff --git a/gcc/testsuite/gcc.target/s390/vector/pattern-avg-1.c b/gcc/testsuite/gcc.target/s390/vector/pattern-avg-1.c index a15301a..30c6ed4 100644 --- a/gcc/testsuite/gcc.target/s390/vector/pattern-avg-1.c +++ b/gcc/testsuite/gcc.target/s390/vector/pattern-avg-1.c @@ -21,6 +21,5 @@ TEST(char,short,16) TEST(short,int,8) TEST(int,long,4) -TEST(long,__int128,2) -/* { dg-final { scan-tree-dump-times "\.AVG_CEIL" 8 "optimized" } } */ +/* { dg-final { scan-tree-dump-times "\.AVG_CEIL" 6 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/s390/vector/pattern-avg-2.c b/gcc/testsuite/gcc.target/s390/vector/pattern-avg-2.c new file mode 100644 index 0000000..1cc614e --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/vector/pattern-avg-2.c @@ -0,0 +1,23 @@ +/* { dg-do compile { target int128 } } */ +/* { dg-options "-O3 -mzarch -march=z16 -ftree-vectorize -fdump-tree-optimized" } */ + +#define TEST(T1,T2,N) \ + void \ + avg##T1 (signed T1 *__restrict res, signed T1 *__restrict a, \ + signed T1 *__restrict b) \ + { \ + for (int i = 0; i < N; ++i) \ + res[i] = ((signed T2)a[i] + b[i] + 1) >> 1; \ + } \ + \ + void \ + uavg##T1 (unsigned T1 *__restrict res, unsigned T1 *__restrict a, \ + unsigned T1 *__restrict b) \ + { \ + for (int i = 0; i < N; ++i) \ + res[i] = ((unsigned T2)a[i] + b[i] + 1) >> 1; \ + } + +TEST(long,__int128,2) + +/* { dg-final { scan-tree-dump-times "\.AVG_CEIL" 2 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-1.c b/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-1.c index cd8e4e7d..f71ef06 100644 --- a/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-1.c +++ b/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-1.c @@ -24,6 +24,5 @@ TEST(char,short,16,8) TEST(short,int,8,16) TEST(int,long,4,32) -TEST(long,__int128,2,64) -/* { dg-final { scan-tree-dump-times "\.MULH" 8 "optimized" } } */ +/* { dg-final { scan-tree-dump-times "\.MULH" 6 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-2.c b/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-2.c new file mode 100644 index 0000000..6ac6855 --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/vector/pattern-mulh-2.c @@ -0,0 +1,26 @@ +/* { dg-do compile { target int128 } } */ +/* { dg-options "-O3 -mzarch -march=arch15 -ftree-vectorize -fdump-tree-optimized" } */ + +#define TEST(T1,T2,N,S) \ + void \ + mulh##T1 (signed T1 *__restrict res, \ + signed T1 *__restrict l, \ + signed T1 *__restrict r) \ + { \ + for (int i = 0; i < N; ++i) \ + res[i] = (signed T1) (((signed T2)l[i] * (signed T2)r[i]) >> S); \ + } \ + \ + void \ + umulh##T1 (unsigned T1 *__restrict res, \ + unsigned T1 *__restrict l, \ + unsigned T1 *__restrict r) \ + { \ + for (int i = 0; i < N; ++i) \ + res[i] = (unsigned T1) \ + (((unsigned T2)l[i] * (unsigned T2)r[i]) >> S); \ + } + +TEST(long,__int128,2,64) + +/* { dg-final { scan-tree-dump-times "\.MULH" 2 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/xtensa/pr120888-1.c b/gcc/testsuite/gcc.target/xtensa/pr120888-1.c new file mode 100644 index 0000000..f438e4c --- /dev/null +++ b/gcc/testsuite/gcc.target/xtensa/pr120888-1.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-rtl-expand" } */ + +void u8(unsigned char c); +void cu8(unsigned char *p) +{ + u8(*p); +} + +/* { dg-final { scan-rtl-dump "zero_extend" "expand" } } */ +/* { dg-final { scan-rtl-dump-not "sign_extend" "expand" } } */ diff --git a/gcc/testsuite/gcc.target/xtensa/pr120888-2.c b/gcc/testsuite/gcc.target/xtensa/pr120888-2.c new file mode 100644 index 0000000..9b5caad --- /dev/null +++ b/gcc/testsuite/gcc.target/xtensa/pr120888-2.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-rtl-expand" } */ + +void s8(signed char c); +void cs8(signed char *p) +{ + s8(*p); +} + +/* { dg-final { scan-rtl-dump "sign_extend" "expand" } } */ +/* { dg-final { scan-rtl-dump-not "zero_extend" "expand" } } */ diff --git a/gcc/testsuite/gfortran.dg/asan/finalize_1.f90 b/gcc/testsuite/gfortran.dg/asan/finalize_1.f90 new file mode 100644 index 0000000..ab53a9e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/asan/finalize_1.f90 @@ -0,0 +1,67 @@ +!{ dg-do run } + +! PR fortran/120637 + +! Contributed by Antony Lewis <antony@cosmologist.info> +! The unused module is needed to trigger the issue of not freeing the +! memory of second module. + + module MiscUtils + implicit none + + contains + + logical function isFloat0(R) + class(*), intent(in) :: R + + select type(R) + type is (real) + isFloat0 = .true. + end select + end function isFloat0 + + end module MiscUtils + + module results3 + implicit none + public + + Type ClTransferData2 + real, dimension(:,:,:), allocatable :: Delta_p_l_k + end type ClTransferData2 + + type TCLdata2 + Type(ClTransferData2) :: CTransScal, CTransTens, CTransVec + end type TCLdata2 + + type :: CAMBdata2 + Type(TClData2) :: CLdata2 + end type + + end module results3 + +program driver + use results3 + integer i + do i=1, 2 + call test() + end do + + contains + + subroutine test + implicit none + class(CAMBdata2), pointer :: Data + + allocate(CAMBdata2::Data) + + allocate(Data%ClData2%CTransScal%Delta_p_l_k(3, 1000, 1000)) + allocate(Data%ClData2%CTransVec%Delta_p_l_k(3, 1000, 1000)) + deallocate(Data) + + end subroutine test + + end program driver + +!{ dg-final { cleanup-modules "miscutils results3" } } + diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp index 97935cb..a2311de 100644 --- a/gcc/testsuite/lib/scanasm.exp +++ b/gcc/testsuite/lib/scanasm.exp @@ -1109,6 +1109,8 @@ proc check-function-bodies { args } { append function_regexp ".*" } elseif { [regexp {^\.L} $line] } { append function_regexp $line "\n" + } elseif { [regexp {^[0-9]+:} $line] } { + append function_regexp $line "\n" } else { append function_regexp $config(line_prefix) $line "\n" } |