From 2066f7951cc4f0b23ddff5abfd2ad2ea4ee90fff Mon Sep 17 00:00:00 2001 From: Rafael Tsuha Date: Fri, 4 Oct 2019 18:34:29 +0000 Subject: match.pd (sinh (x) / cosh (x)): New simplification rule. * match.pd (sinh (x) / cosh (x)): New simplification rule. * gcc.dg/sinhovercosh-1.c: New test. From-SVN: r276595 --- gcc/ChangeLog | 4 ++++ gcc/match.pd | 5 ++++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/sinhovercosh-1.c | 45 +++++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/sinhovercosh-1.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a013d86..6da73b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-10-04 Rafael Tsuha + + * match.pd (sinh (x) / cosh (x)): New simplification rule. + 2019-10-04 Martin Jambor * tree-ssa-forwprop.c (simplify_builtin_call): Set gimple call diff --git a/gcc/match.pd b/gcc/match.pd index 23ce3768..9bd5f3e 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -4922,6 +4922,11 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (rdiv (SIN:s @0) (COS:s @0)) (TAN @0)) + /* Simplify sinh(x) / cosh(x) -> tanh(x). */ + (simplify + (rdiv (SINH:s @0) (COSH:s @0)) + (TANH @0)) + /* Simplify cos(x) / sin(x) -> 1 / tan(x). */ (simplify (rdiv (COS:s @0) (SIN:s @0)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 68ca51e..4248c81 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-10-04 Rafael Tsuha + + * gcc.dg/sinhovercosh-1.c: New test. + 2019-10-04 Joseph Myers * gcc.dg/c11-builtins-1.c, gcc.dg/c2x-builtins-1.c, diff --git a/gcc/testsuite/gcc.dg/sinhovercosh-1.c b/gcc/testsuite/gcc.dg/sinhovercosh-1.c new file mode 100644 index 0000000..7e51072 --- /dev/null +++ b/gcc/testsuite/gcc.dg/sinhovercosh-1.c @@ -0,0 +1,45 @@ +/* { dg-do compile } */ +/* { dg-options "-Ofast -fdump-tree-optimized" } */ + +extern float sinhf (float); +extern float coshf (float); +extern float tanhf (float); +extern float sqrtf (float); +extern double sinh (double); +extern double cosh (double); +extern double sqrt (double); +extern double tanh (double); +extern long double sinhl (long double); +extern long double coshl (long double); +extern long double tanhl (long double); +extern long double sqrtl (long double); + +double __attribute__ ((noinline)) +sinhovercosh_ (double x) +{ + return sinh (x) / cosh (x); +} + +float __attribute__ ((noinline)) +sinhfovercoshf_(float x) +{ + return sinhf (x) / coshf (x); +} + +long double __attribute__ ((noinline)) +sinhlovercoshl_ (long double x) +{ + return sinhl (x) / coshl (x); +} + +/* There must be no calls to sinh, cosh, or atanh */ +/* {dg-final { scan-tree-dump-not "sinh " "optimized" } } */ +/* {dg-final { scan-tree-dump-not "cosh " "optimized" } } */ +/* {dg-final { scan-tree-dump-not "sinfh " "optimized" } } */ +/* {dg-final { scan-tree-dump-not "cosfh " "optimized" } } */ +/* {dg-final { scan-tree-dump-not "sinlh " "optimized" } } */ +/* {dg-final { scan-tree-dump-not "coslh " "optimized" } } */ +/* {dg-final { scan-tree-dump-times "tanh " "1" "optimized" }} */ +/* {dg-final { scan-tree-dump-times "tanhl " "1" "optimized" }} */ +/* {dg-final { scan-tree-dump-times "tanhf " "1" "optimized" }} */ + -- cgit v1.1 From 9af0d5ef3b14a9b3e4b0cb6aaaaba44ea722fb06 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 4 Oct 2019 21:10:39 +0200 Subject: * ipa-inline.c (inline_insns_single, inline_insns_auto): Fix typo. From-SVN: r276597 --- gcc/ChangeLog | 4 ++++ gcc/ipa-inline.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6da73b6..3c96497 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-10-04 Jan Hubicka + + * ipa-inline.c (inline_insns_single, inline_insns_auto): Fix typo. + 2019-10-04 Rafael Tsuha * match.pd (sinh (x) / cosh (x)): New simplification rule. diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 725e675..2801cb9 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -396,7 +396,7 @@ can_inline_edge_p (struct cgraph_edge *e, bool report, static int inline_insns_single (cgraph_node *n, bool hint) { - if (opt_for_fn (n->decl, optimize >= 3)) + if (opt_for_fn (n->decl, optimize) >= 3) { if (hint) return PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE) @@ -418,7 +418,7 @@ inline_insns_single (cgraph_node *n, bool hint) static int inline_insns_auto (cgraph_node *n, bool hint) { - if (opt_for_fn (n->decl, optimize >= 3)) + if (opt_for_fn (n->decl, optimize) >= 3) { if (hint) return PARAM_VALUE (PARAM_MAX_INLINE_INSNS_AUTO) -- cgit v1.1 From 0e8879cb36eca17e7b1ff8f2124bbc5ec3c6dc91 Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Fri, 4 Oct 2019 21:21:21 +0000 Subject: PR fortran.91959 2019-10-04 Steven G. Kargl PR fortran.91959 * fortran/decl.c (variable_decl): Re-arrange code for matching %FILL. 2019-10-04 Steven G. Kargl PR fortran.91959 * gfortran.dg/pr91959.f90: New test. From-SVN: r276601 --- gcc/fortran/ChangeLog | 5 +++ gcc/fortran/decl.c | 60 +++++++++++++++++++---------------- gcc/testsuite/ChangeLog | 5 +++ gcc/testsuite/gfortran.dg/pr91959.f90 | 9 ++++++ 4 files changed, 52 insertions(+), 27 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/pr91959.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 196b40b..dc1e19a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2019-10-04 Steven G. Kargl + + PR fortran.91959 + * fortran/decl.c (variable_decl): Re-arrange code for matching %FILL. + 2019-10-04 Tobias Burnus * error (error_print, gfc_format_decoder): Fix off-by one issue with %C. diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 96b6f3f..d439906 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -2441,6 +2441,7 @@ variable_decl (int elem) match m; bool t; gfc_symbol *sym; + char c; initializer = NULL; as = NULL; @@ -2454,40 +2455,45 @@ variable_decl (int elem) name to be '%FILL' which gives it an anonymous (inaccessible) name. */ m = MATCH_NO; gfc_gobble_whitespace (); - if (gfc_peek_ascii_char () == '%') + c = gfc_peek_ascii_char (); + if (c == '%') { - gfc_next_ascii_char (); + gfc_next_ascii_char (); /* Burn % character. */ m = gfc_match ("fill"); - } - - if (m != MATCH_YES) - { - m = gfc_match_name (name); - if (m != MATCH_YES) - goto cleanup; - } - - else - { - m = MATCH_ERROR; - if (gfc_current_state () != COMP_STRUCTURE) + if (m == MATCH_YES) { - if (flag_dec_structure) - gfc_error ("%qs not allowed outside STRUCTURE at %C", "%FILL"); - else - gfc_error ("%qs at %C is a DEC extension, enable with " + if (gfc_current_state () != COMP_STRUCTURE) + { + if (flag_dec_structure) + gfc_error ("%qs not allowed outside STRUCTURE at %C", "%FILL"); + else + gfc_error ("%qs at %C is a DEC extension, enable with " "%<-fdec-structure%>", "%FILL"); - goto cleanup; - } + m = MATCH_ERROR; + goto cleanup; + } + + if (attr_seen) + { + gfc_error ("%qs entity cannot have attributes at %C", "%FILL"); + m = MATCH_ERROR; + goto cleanup; + } - if (attr_seen) + /* %FILL components are given invalid fortran names. */ + snprintf (name, GFC_MAX_SYMBOL_LEN + 1, "%%FILL%u", fill_id++); + } + else { - gfc_error ("%qs entity cannot have attributes at %C", "%FILL"); - goto cleanup; + gfc_error ("Invalid character %qc in variable name at %C", c); + return MATCH_ERROR; } - - /* %FILL components are given invalid fortran names. */ - snprintf (name, GFC_MAX_SYMBOL_LEN + 1, "%%FILL%u", fill_id++); + } + else + { + m = gfc_match_name (name); + if (m != MATCH_YES) + goto cleanup; } var_locus = gfc_current_locus; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4248c81..f9eefad 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-04 Steven G. Kargl + + PR fortran.91959 + * gfortran.dg/pr91959.f90: New test. + 2019-10-04 Rafael Tsuha * gcc.dg/sinhovercosh-1.c: New test. diff --git a/gcc/testsuite/gfortran.dg/pr91959.f90 b/gcc/testsuite/gfortran.dg/pr91959.f90 new file mode 100644 index 0000000..788b413 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr91959.f90 @@ -0,0 +1,9 @@ +! { dg-do compile } +! PR fortran/91959 +! Code contributed by Gerhard Steinmetz +program p + implicit none + integer :: %a ! { dg-error "Invalid character" } + a = 1 ! { dg-error "has no IMPLICIT type" } + print *, a +end -- cgit v1.1 From 28a5fa54aa47877b6d254430adbf3ca0377beeaa Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Fri, 4 Oct 2019 21:26:27 +0000 Subject: builtins.c (compute_objsize): Add an argument. gcc/ChangeLog: * builtins.c (compute_objsize): Add an argument. * tree-object-size.c (addr_object_size): Same. (compute_builtin_object_size): Same. * tree-object-size.h (compute_builtin_object): Same. gcc/testsuite/ChangeLog: * gcc.dg/Wstringop-overflow-17.c: New test. From-SVN: r276602 --- gcc/ChangeLog | 7 ++++++ gcc/builtins.c | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/Wstringop-overflow-17.c | 20 +++++++++++++++++ gcc/tree-object-size.c | 33 +++++++++++++++++++--------- gcc/tree-object-size.h | 3 ++- 6 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/Wstringop-overflow-17.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3c96497..6a1c17c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-10-04 Martin Sebor + + * builtins.c (compute_objsize): Add an argument. + * tree-object-size.c (addr_object_size): Same. + (compute_builtin_object_size): Same. + * tree-object-size.h (compute_builtin_object): Same. + 2019-10-04 Jan Hubicka * ipa-inline.c (inline_insns_single, inline_insns_auto): Fix typo. diff --git a/gcc/builtins.c b/gcc/builtins.c index fa17afd..a1dc83c 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -3587,7 +3587,7 @@ compute_objsize (tree dest, int ostype, tree *pdecl /* = NULL */) /* Only the two least significant bits are meaningful. */ ostype &= 3; - if (compute_builtin_object_size (dest, ostype, &size)) + if (compute_builtin_object_size (dest, ostype, &size, pdecl)) return build_int_cst (sizetype, size); if (TREE_CODE (dest) == SSA_NAME) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f9eefad..9a5adf7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-10-04 Martin Sebor + + * gcc.dg/Wstringop-overflow-17.c: New test. + 2019-10-04 Steven G. Kargl PR fortran.91959 diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-17.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-17.c new file mode 100644 index 0000000..de22c98 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-17.c @@ -0,0 +1,20 @@ +/* Test to verify that -Wstringop-overflow mentions the referenced object + i. + { dg-do compile } + { dg-options "-O2 -Wall" } */ + +static void copy_n (char *d, const char *s, int n) +{ + while (n--) + *d++ = *s++; + *d = 0; // { dg-warning "writing 1 byte into a region of size 0" } +} + +void sink (void*); + +void call_copy_n (const char *s) +{ + char a[3]; // { dg-message "destination object declared here" } + copy_n (a, "1234567", 7); + sink (a); +} diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c index f9ad7e8..db9b569 100644 --- a/gcc/tree-object-size.c +++ b/gcc/tree-object-size.c @@ -54,7 +54,8 @@ static const unsigned HOST_WIDE_INT unknown[4] = { static tree compute_object_offset (const_tree, const_tree); static bool addr_object_size (struct object_size_info *, - const_tree, int, unsigned HOST_WIDE_INT *); + const_tree, int, unsigned HOST_WIDE_INT *, + tree * = NULL); static unsigned HOST_WIDE_INT alloc_object_size (const gcall *, int); static tree pass_through_call (const gcall *); static void collect_object_sizes_for (struct object_size_info *, tree); @@ -172,10 +173,15 @@ compute_object_offset (const_tree expr, const_tree var) static bool addr_object_size (struct object_size_info *osi, const_tree ptr, - int object_size_type, unsigned HOST_WIDE_INT *psize) + int object_size_type, unsigned HOST_WIDE_INT *psize, + tree *pdecl /* = NULL */) { tree pt_var, pt_var_size = NULL_TREE, var_size, bytes; + tree dummy; + if (!pdecl) + pdecl = &dummy; + gcc_assert (TREE_CODE (ptr) == ADDR_EXPR); /* Set to unknown and overwrite just before returning if the size @@ -195,7 +201,7 @@ addr_object_size (struct object_size_info *osi, const_tree ptr, || TREE_CODE (TREE_OPERAND (pt_var, 0)) != SSA_NAME) { compute_builtin_object_size (TREE_OPERAND (pt_var, 0), - object_size_type & ~1, &sz); + object_size_type & ~1, &sz, pdecl); } else { @@ -232,7 +238,10 @@ addr_object_size (struct object_size_info *osi, const_tree ptr, && DECL_P (pt_var) && tree_fits_uhwi_p (DECL_SIZE_UNIT (pt_var)) && tree_to_uhwi (DECL_SIZE_UNIT (pt_var)) < offset_limit) - pt_var_size = DECL_SIZE_UNIT (pt_var); + { + *pdecl = pt_var; + pt_var_size = DECL_SIZE_UNIT (pt_var); + } else if (pt_var && TREE_CODE (pt_var) == STRING_CST && TYPE_SIZE_UNIT (TREE_TYPE (pt_var)) @@ -478,13 +487,16 @@ pass_through_call (const gcall *call) /* Compute __builtin_object_size value for PTR and set *PSIZE to - the resulting value. OBJECT_SIZE_TYPE is the second argument - to __builtin_object_size. Return true on success and false - when the object size could not be determined. */ + the resulting value. If the declared object is known and PDECL + is nonnull, sets *PDECL to the object's DECL. OBJECT_SIZE_TYPE + is the second argument to __builtin_object_size. + Returns true on success and false when the object size could not + be determined. */ bool compute_builtin_object_size (tree ptr, int object_size_type, - unsigned HOST_WIDE_INT *psize) + unsigned HOST_WIDE_INT *psize, + tree *pdecl /* = NULL */) { gcc_assert (object_size_type >= 0 && object_size_type <= 3); @@ -496,7 +508,7 @@ compute_builtin_object_size (tree ptr, int object_size_type, init_offset_limit (); if (TREE_CODE (ptr) == ADDR_EXPR) - return addr_object_size (NULL, ptr, object_size_type, psize); + return addr_object_size (NULL, ptr, object_size_type, psize, pdecl); if (TREE_CODE (ptr) != SSA_NAME || !POINTER_TYPE_P (TREE_TYPE (ptr))) @@ -520,7 +532,8 @@ compute_builtin_object_size (tree ptr, int object_size_type, ptr = gimple_assign_rhs1 (def); if (tree_fits_shwi_p (offset) - && compute_builtin_object_size (ptr, object_size_type, psize)) + && compute_builtin_object_size (ptr, object_size_type, + psize, pdecl)) { /* Return zero when the offset is out of bounds. */ unsigned HOST_WIDE_INT off = tree_to_shwi (offset); diff --git a/gcc/tree-object-size.h b/gcc/tree-object-size.h index 420af3e..65528b3 100644 --- a/gcc/tree-object-size.h +++ b/gcc/tree-object-size.h @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see extern void init_object_sizes (void); extern void fini_object_sizes (void); -extern bool compute_builtin_object_size (tree, int, unsigned HOST_WIDE_INT *); +extern bool compute_builtin_object_size (tree, int, unsigned HOST_WIDE_INT *, + tree * = NULL); #endif // GCC_TREE_OBJECT_SIZE_H -- cgit v1.1 From daa94de24b9afdf21c636532e53561aa3713910b Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Fri, 4 Oct 2019 21:29:41 +0000 Subject: PR middle-end/91977 - missing -Wstringop-overflow on memcpy into a pointer plus offset gcc/ChangeLog: PR middle-end/91977 * tree-ssa-strlen.c (count_nonzero_bytes): Handle assignments with MEM_REF right operand. Avoid failing for MEM_REF assignments from uninitialized objects. gcc/testsuite/ChangeLog: PR middle-end/91977 * gcc.dg/Wstringop-overflow-18.c: New test. From-SVN: r276603 --- gcc/ChangeLog | 7 + gcc/testsuite/ChangeLog | 5 + gcc/testsuite/gcc.dg/Warray-bounds-18.c | 2 +- gcc/testsuite/gcc.dg/Wstringop-overflow-18.c | 239 +++++++++++++++++++++++++++ gcc/tree-ssa-strlen.c | 75 +++++---- 5 files changed, 297 insertions(+), 31 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/Wstringop-overflow-18.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a1c17c..18b4f89 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2019-10-04 Martin Sebor + PR middle-end/91977 + * tree-ssa-strlen.c (count_nonzero_bytes): Handle assignments with + MEM_REF right operand. Avoid failing for MEM_REF assignments from + uninitialized objects. + +2019-10-04 Martin Sebor + * builtins.c (compute_objsize): Add an argument. * tree-object-size.c (addr_object_size): Same. (compute_builtin_object_size): Same. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9a5adf7..d8987ca 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2019-10-04 Martin Sebor + PR middle-end/91977 + * gcc.dg/Wstringop-overflow-18.c: New test. + +2019-10-04 Martin Sebor + * gcc.dg/Wstringop-overflow-17.c: New test. 2019-10-04 Steven G. Kargl diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-18.c b/gcc/testsuite/gcc.dg/Warray-bounds-18.c index 888fb80..092363a 100644 --- a/gcc/testsuite/gcc.dg/Warray-bounds-18.c +++ b/gcc/testsuite/gcc.dg/Warray-bounds-18.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -Warray-bounds" } */ +/* { dg-options "-O2 -Warray-bounds -Wno-stringop-overflow" } */ typedef struct { diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-18.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-18.c new file mode 100644 index 0000000..7866b58 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-18.c @@ -0,0 +1,239 @@ +/* PR middle-end/91977 - missing -Wstringop-overflow on memcpy into + a pointer plus offset + { dg-do compile } + { dg-options "-O2 -Wall -Wno-array-bounds -ftrack-macro-expansion=0" } */ + +#define NOIPA __attribute__ ((noipa)) +#define CONCAT(a, b) a ## b +#define CAT(a, b) CONCAT (a, b) + +#define S3 "123" +#define S4 "1234" + +char a1[1], a2[2], a3[3], a4[4], a5[5], a6[6], a7[7], a8[8]; +char b1[1], b2[2], b3[3], b4[4], b5[5], b6[6], b7[7], b8[8]; + +#define T(dst, src, off, n) \ + NOIPA void CAT (test_on_line_, __LINE__) (const void *s) \ + { \ + __builtin_memcpy (dst + off, src, n); \ + } typedef void dummy_type + +T (a4, s, 0, 1); +T (a4, s, 1, 1); +T (a4, s, 2, 1); +T (a4, s, 3, 1); +T (a4, s, 4, 1); // { dg-warning "writing 1 byte into a region of size 0" } + +T (a4, s, 0, 2); +T (a4, s, 1, 2); +T (a4, s, 2, 2); +T (a4, s, 3, 2); // { dg-warning "writing 2 bytes into a region of size 1" } +T (a4, s, 4, 2); // { dg-warning "writing 2 bytes into a region of size 0" } + +T (a4, s, 0, 3); +T (a4, s, 1, 3); +T (a4, s, 2, 3); // { dg-warning "writing 3 bytes into a region of size 2" } +T (a4, s, 3, 3); // { dg-warning "writing 3 bytes into a region of size 1" } +T (a4, s, 4, 3); // { dg-warning "writing 3 bytes into a region of size 0" } + +T (a4, s, 0, 4); +T (a4, s, 1, 4); // { dg-warning "writing 4 bytes into a region of size 3" } +T (a4, s, 2, 4); // { dg-warning "writing 4 bytes into a region of size 2" } +T (a4, s, 3, 4); // { dg-warning "writing 4 bytes into a region of size 1" } +T (a4, s, 4, 4); // { dg-warning "writing 4 bytes into a region of size 0" } + +T (a7, s, 3, 3); +T (a7, s, 4, 3); +T (a7, s, 5, 3); // { dg-warning "writing 3 bytes into a region of size 2" } +T (a7, s, 6, 3); // { dg-warning "writing 3 bytes into a region of size 1" } +T (a7, s, 7, 3); // { dg-warning "writing 3 bytes into a region of size 0" } + +T (a7, s, 3, 4); +T (a7, s, 4, 4); // { dg-warning "writing 4 bytes into a region of size 3" } +T (a7, s, 5, 4); // { dg-warning "writing 4 bytes into a region of size 2" } +T (a7, s, 6, 4); // { dg-warning "writing 4 bytes into a region of size 1" } +T (a7, s, 7, 4); // { dg-warning "writing 4 bytes into a region of size 0" } + +T (a7, s, 1, 6); +T (a7, s, 2, 6); // { dg-warning "writing 6 bytes into a region of size 5" } +T (a7, s, 3, 6); // { dg-warning "writing 6 bytes into a region of size 4" } +T (a7, s, 4, 6); // { dg-warning "writing 6 bytes into a region of size 3" } +T (a7, s, 5, 6); // { dg-warning "writing 6 bytes into a region of size 2" } +T (a7, s, 6, 6); // { dg-warning "writing 6 bytes into a region of size 1" } +T (a7, s, 7, 6); // { dg-warning "writing 6 bytes into a region of size 0" } + +T (a8, s, 1, 7); +T (a8, s, 2, 7); // { dg-warning "writing 7 bytes into a region of size 6" } +T (a8, s, 3, 7); // { dg-warning "writing 7 bytes into a region of size 5" } +T (a8, s, 4, 7); // { dg-warning "writing 7 bytes into a region of size 4" } +T (a8, s, 5, 7); // { dg-warning "writing 7 bytes into a region of size 3" } +T (a8, s, 6, 7); // { dg-warning "writing 7 bytes into a region of size 2" } +T (a8, s, 7, 7); // { dg-warning "writing 7 bytes into a region of size 1" } +T (a8, s, 8, 7); // { dg-warning "writing 7 bytes into a region of size 0" } + +#undef T +#define T(dst, src, off, n) \ + NOIPA void CAT (test_on_line_, __LINE__) (const void *s) \ + { \ + char *d = dst + off; \ + __builtin_memcpy (d, src, n); \ + } typedef void dummy_type + +T (a4, s, 0, 1); +T (a4, s, 1, 1); +T (a4, s, 2, 1); +T (a4, s, 3, 1); +T (a4, s, 4, 1); // { dg-warning "writing 1 byte into a region of size 0" } + +T (a4, s, 0, 2); +T (a4, s, 1, 2); +T (a4, s, 2, 2); +T (a4, s, 3, 2); // { dg-warning "writing 2 bytes into a region of size 1" } +T (a4, s, 4, 2); // { dg-warning "writing 2 bytes into a region of size 0" } + +T (a4, s, 0, 3); +T (a4, s, 1, 3); +T (a4, s, 2, 3); // { dg-warning "writing 3 bytes into a region of size 2" } +T (a4, s, 3, 3); // { dg-warning "writing 3 bytes into a region of size 1" } +T (a4, s, 4, 3); // { dg-warning "writing 3 bytes into a region of size 0" } + +T (a4, s, 0, 4); +T (a4, s, 1, 4); // { dg-warning "writing 4 bytes into a region of size 3" } +T (a4, s, 2, 4); // { dg-warning "writing 4 bytes into a region of size 2" } +T (a4, s, 3, 4); // { dg-warning "writing 4 bytes into a region of size 1" } +T (a4, s, 4, 4); // { dg-warning "writing 4 bytes into a region of size 0" } + +T (a7, s, 3, 3); +T (a7, s, 4, 3); +T (a7, s, 5, 3); // { dg-warning "writing 3 bytes into a region of size 2" } +T (a7, s, 6, 3); // { dg-warning "writing 3 bytes into a region of size 1" } +T (a7, s, 7, 3); // { dg-warning "writing 3 bytes into a region of size 0" } + +T (a7, s, 3, 4); +T (a7, s, 4, 4); // { dg-warning "writing 4 bytes into a region of size 3" } +T (a7, s, 5, 4); // { dg-warning "writing 4 bytes into a region of size 2" } +T (a7, s, 6, 4); // { dg-warning "writing 4 bytes into a region of size 1" } +T (a7, s, 7, 4); // { dg-warning "writing 4 bytes into a region of size 0" } + +T (a7, s, 1, 6); +T (a7, s, 2, 6); // { dg-warning "writing 6 bytes into a region of size 5" } +T (a7, s, 3, 6); // { dg-warning "writing 6 bytes into a region of size 4" } +T (a7, s, 4, 6); // { dg-warning "writing 6 bytes into a region of size 3" } +T (a7, s, 5, 6); // { dg-warning "writing 6 bytes into a region of size 2" } +T (a7, s, 6, 6); // { dg-warning "writing 6 bytes into a region of size 1" } +T (a7, s, 7, 6); // { dg-warning "writing 6 bytes into a region of size 0" } + +#undef T +#define T(dst, src, init, off, n) \ + NOIPA void CAT (test_on_line_, __LINE__) (void) \ + { \ + __builtin_strcpy (src, init); \ + char *d = dst + off; \ + __builtin_memcpy (d, src, n); \ + } typedef void dummy_type + + +T (a6, b6, S4, 0, 4); +T (a6, b6, S4, 1, 4); +T (a6, b6, S4, 2, 4); +T (a6, b6, S4, 3, 4); // { dg-warning "writing 4 bytes into a region of size 3" } */ +T (a6, b6, S4, 4, 4); // { dg-warning "writing 4 bytes into a region of size 2" } */ +T (a6, b6, S4, 5, 4); // { dg-warning "writing 4 bytes into a region of size 1" } */ +T (a6, b6, S4, 6, 4); // { dg-warning "writing 4 bytes into a region of size 0" } */ + +T (a7, b7, S4, 0, 4); +T (a7, b7, S4, 1, 4); +T (a7, b7, S4, 2, 4); +T (a7, b7, S4, 3, 4); +T (a7, b7, S4, 4, 4); // { dg-warning "writing 4 bytes into a region of size 3" } */ +T (a7, b7, S4, 5, 4); // { dg-warning "writing 4 bytes into a region of size 2" } */ +T (a7, b7, S4, 6, 4); // { dg-warning "writing 4 bytes into a region of size 1" } */ +T (a7, b7, S4, 7, 4); // { dg-warning "writing 4 bytes into a region of size 0" } */ + +T (a8, b4, S3, 0, 4); +T (a8, b4, S3, 1, 4); +T (a8, b4, S3, 2, 4); +T (a8, b4, S3, 3, 4); +T (a8, b4, S3, 4, 4); +T (a8, b4, S3, 5, 4); // { dg-warning "writing 4 bytes into a region of size 3" } */ +T (a8, b4, S3, 6, 4); // { dg-warning "writing 4 bytes into a region of size 2" } */ +T (a8, b4, S3, 7, 4); // { dg-warning "writing 4 bytes into a region of size 1" } */ +T (a8, b4, S3, 8, 4); // { dg-warning "writing 4 bytes into a region of size 0" } */ + +T (a8, b8, S3, 0, 4); +T (a8, b8, S3, 1, 4); +T (a8, b8, S3, 2, 4); +T (a8, b8, S3, 3, 4); +T (a8, b8, S3, 4, 4); +T (a8, b8, S3, 5, 4); // { dg-warning "writing 4 bytes into a region of size 3" } */ +T (a8, b8, S3, 6, 4); // { dg-warning "writing 4 bytes into a region of size 2" } */ +T (a8, b8, S3, 7, 4); // { dg-warning "writing 4 bytes into a region of size 1" } */ +T (a8, b8, S3, 8, 4); // { dg-warning "writing 4 bytes into a region of size 0" } */ + +T (a8, b8, S4, 0, 4); +T (a8, b8, S4, 1, 4); +T (a8, b8, S4, 2, 4); +T (a8, b8, S4, 3, 4); +T (a8, b8, S4, 4, 4); +T (a8, b8, S4, 5, 4); // { dg-warning "writing 4 bytes into a region of size 3" } */ +T (a8, b8, S4, 6, 4); // { dg-warning "writing 4 bytes into a region of size 2" } */ +T (a8, b8, S4, 7, 4); // { dg-warning "writing 4 bytes into a region of size 1" } */ +T (a8, b8, S4, 8, 4); // { dg-warning "writing 4 bytes into a region of size 0" } */ + +T (a8, b8, S4, 0, 5); +T (a8, b8, S4, 1, 5); +T (a8, b8, S4, 2, 5); +T (a8, b8, S4, 3, 5); +T (a8, b8, S4, 4, 5); // { dg-warning "writing 5 bytes into a region of size 4" } */ +T (a8, b8, S4, 5, 5); // { dg-warning "writing 5 bytes into a region of size 3" } */ +T (a8, b8, S4, 6, 5); // { dg-warning "writing 5 bytes into a region of size 2" } */ +T (a8, b8, S4, 7, 5); // { dg-warning "writing 5 bytes into a region of size 1" } */ +T (a8, b8, S4, 8, 5); // { dg-warning "writing 5 bytes into a region of size 0" } */ + +T (a8, b8, S4, 0, 6); +T (a8, b8, S4, 1, 6); +T (a8, b8, S4, 2, 6); +T (a8, b8, S4, 3, 6); // { dg-warning "writing 6 bytes into a region of size 5" } */ +T (a8, b8, S4, 4, 6); // { dg-warning "writing 6 bytes into a region of size 4" } */ +T (a8, b8, S4, 5, 6); // { dg-warning "writing 6 bytes into a region of size 3" } */ +T (a8, b8, S4, 6, 6); // { dg-warning "writing 6 bytes into a region of size 2" } */ +T (a8, b8, S4, 7, 6); // { dg-warning "writing 6 bytes into a region of size 1" } */ +T (a8, b8, S4, 8, 6); // { dg-warning "writing 6 bytes into a region of size 0" } */ + + +#undef T +#define T(dst, init, off, n) \ + NOIPA void CAT (test_on_line_, __LINE__) (char *src) \ + { \ + __builtin_strcpy (src, init); \ + char *d = dst + off; \ + __builtin_memcpy (d, src, n); \ + } typedef void dummy_type + +T (a6, S4, 0, 4); +T (a6, S4, 1, 4); +T (a6, S4, 2, 4); +T (a6, S4, 3, 4); // { dg-warning "writing 4 bytes into a region of size 3" } */ +T (a6, S4, 4, 4); // { dg-warning "writing 4 bytes into a region of size 2" } */ +T (a6, S4, 5, 4); // { dg-warning "writing 4 bytes into a region of size 1" } */ +T (a6, S4, 6, 4); // { dg-warning "writing 4 bytes into a region of size 0" } */ + +T (a7, S4, 0, 4); +T (a7, S4, 1, 4); +T (a7, S4, 2, 4); +T (a7, S4, 3, 4); +T (a7, S4, 4, 4); // { dg-warning "writing 4 bytes into a region of size 3" } */ +T (a7, S4, 5, 4); // { dg-warning "writing 4 bytes into a region of size 2" } */ +T (a7, S4, 6, 4); // { dg-warning "writing 4 bytes into a region of size 1" } */ +T (a7, S4, 7, 4); // { dg-warning "writing 4 bytes into a region of size 0" } */ + +T (a8, S3, 0, 4); +T (a8, S3, 1, 4); +T (a8, S3, 2, 4); +T (a8, S3, 3, 4); +T (a8, S3, 4, 4); +T (a8, S3, 5, 4); // { dg-warning "writing 4 bytes into a region of size 3" } */ +T (a8, S3, 6, 4); // { dg-warning "writing 4 bytes into a region of size 2" } */ +T (a8, S3, 7, 4); // { dg-warning "writing 4 bytes into a region of size 1" } */ +T (a8, S3, 8, 4); // { dg-warning "writing 4 bytes into a region of size 0" } */ diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index c82bc7c..d68df19 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -3801,40 +3801,44 @@ count_nonzero_bytes (tree exp, unsigned HOST_WIDE_INT offset, tree type = TREE_TYPE (exp); if (TREE_CODE (type) == INTEGER_TYPE && TYPE_MODE (type) == TYPE_MODE (char_type_node) - && TYPE_PRECISION (type) == TYPE_PRECISION (char_type_node)) + && TYPE_PRECISION (type) == TYPE_PRECISION (char_type_node) + && tree_expr_nonzero_p (exp)) { - /* Determine if the character EXP is known to be non-zero - (even if its exact value is not known) and if so, recurse - once to set the range, etc. */ - if (tree_expr_nonzero_p (exp)) - return count_nonzero_bytes (build_int_cst (type, 1), - offset, nbytes, lenrange, - nulterm, allnul, allnonnul, snlim); - /* Don't know whether EXP is or isn't nonzero. */ - return false; + /* If the character EXP is known to be non-zero (even if its + exact value is not known) recurse once to set the range + for an arbitrary constant. */ + exp = build_int_cst (type, 1); + return count_nonzero_bytes (exp, offset, 1, lenrange, + nulterm, allnul, allnonnul, snlim); } gimple *stmt = SSA_NAME_DEF_STMT (exp); - if (gimple_code (stmt) != GIMPLE_PHI) - return false; - - /* Avoid processing an SSA_NAME that has already been visited - or if an SSA_NAME limit has been reached. Indicate success - if the former and failure if the latter. */ - if (int res = snlim.next_ssa_name (exp)) - return res > 0; - - /* Determine the minimum and maximum from the PHI arguments. */ - unsigned int n = gimple_phi_num_args (stmt); - for (unsigned i = 0; i != n; i++) + if (gimple_assign_single_p (stmt)) { - tree def = gimple_phi_arg_def (stmt, i); - if (!count_nonzero_bytes (def, offset, nbytes, lenrange, nulterm, - allnul, allnonnul, snlim)) + exp = gimple_assign_rhs1 (stmt); + if (TREE_CODE (exp) != MEM_REF) return false; } + else if (gimple_code (stmt) == GIMPLE_PHI) + { + /* Avoid processing an SSA_NAME that has already been visited + or if an SSA_NAME limit has been reached. Indicate success + if the former and failure if the latter. */ + if (int res = snlim.next_ssa_name (exp)) + return res > 0; + + /* Determine the minimum and maximum from the PHI arguments. */ + unsigned int n = gimple_phi_num_args (stmt); + for (unsigned i = 0; i != n; i++) + { + tree def = gimple_phi_arg_def (stmt, i); + if (!count_nonzero_bytes (def, offset, nbytes, lenrange, nulterm, + allnul, allnonnul, snlim)) + return false; + } - return true; + return true; + } } if (TREE_CODE (exp) == MEM_REF) @@ -3897,14 +3901,25 @@ count_nonzero_bytes (tree exp, unsigned HOST_WIDE_INT offset, prep = reinterpret_cast (buf); /* Try to extract the representation of the constant object or expression starting from the offset. */ - nbytes = native_encode_expr (exp, buf, sizeof buf, offset); - if (!nbytes) - return false; + unsigned repsize = native_encode_expr (exp, buf, sizeof buf, offset); + if (repsize < nbytes) + { + /* This should only happen when REPSIZE is zero because EXP + doesn't denote an object with a known initializer, except + perhaps when the reference reads past its end. */ + lenrange[0] = 0; + prep = NULL; + } + else + nbytes = repsize; } + if (!nbytes) + return false; + /* Compute the number of leading nonzero bytes in the representation and update the minimum and maximum. */ - unsigned n = strnlen (prep, nbytes); + unsigned n = prep ? strnlen (prep, nbytes) : nbytes; if (n < lenrange[0]) lenrange[0] = n; -- cgit v1.1 From 843f104d5bc6d1f9b4b3f56c3a4e4278e608827f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 4 Oct 2019 22:56:14 +0100 Subject: Add strftime format checking support for C2x %OB and %Ob (bug 82752). C2x adds strftime %OB and %Ob formats, for alternative forms of month names (for mainly Slavic languages where a month name on its own is declined differently from a month name together with a date within that month). This patch adds corresponding format checking support. (glibc support for these formats was added in glibc 2.27.) Bootstrapped with no regressions on x86_64-pc-linux-gnu. PR c/82752 gcc/c-family: * c-format.c (C_STD_VER): Handle C2x. (C_STD_NAME): Likewise. (strftime_flag_specs): Add 'O' modifier with 'p' flag. (time_char_table): Use separate entry for 'B' and 'b', with 'O' modifier allowed and 'p' flag. * c-format.h (enum format_std_version): Add STD_C2X. (struct format_char_info): Mention 'p' in comment on flags2. gcc/testsuite: * gcc.dg/format/c2x-strftime-1.c: New test. From-SVN: r276605 --- gcc/c-family/ChangeLog | 11 +++++++++++ gcc/c-family/c-format.c | 16 +++++++++++----- gcc/c-family/c-format.h | 2 ++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/format/c2x-strftime-1.c | 15 +++++++++++++++ 5 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/format/c2x-strftime-1.c (limited to 'gcc') diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 0eade3c..1ebc4d9 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,14 @@ +2019-10-04 Joseph Myers + + PR c/82752 + * c-format.c (C_STD_VER): Handle C2x. + (C_STD_NAME): Likewise. + (strftime_flag_specs): Add 'O' modifier with 'p' flag. + (time_char_table): Use separate entry for 'B' and 'b', with 'O' + modifier allowed and 'p' flag. + * c-format.h (enum format_std_version): Add STD_C2X. + (struct format_char_info): Mention 'p' in comment on flags2. + 2019-10-01 David Malcolm * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c index 91bae3d..3c291ca 100644 --- a/gcc/c-family/c-format.c +++ b/gcc/c-family/c-format.c @@ -404,9 +404,11 @@ decode_format_attr (const_tree fntype, tree atname, tree args, /* The C standard version we are checking formats against when pedantic. */ #define C_STD_VER ((int) (c_dialect_cxx () \ ? CPLUSPLUS_STD_VER \ - : (flag_isoc99 \ - ? STD_C99 \ - : (flag_isoc94 ? STD_C94 : STD_C89)))) + : (flag_isoc2x \ + ? STD_C2X \ + : (flag_isoc99 \ + ? STD_C99 \ + : (flag_isoc94 ? STD_C94 : STD_C89))))) /* The name to give to the standard version we are warning about when pedantic. FEATURE_VER is the version in which the feature warned out appeared, which is higher than C_STD_VER. */ @@ -415,7 +417,9 @@ decode_format_attr (const_tree fntype, tree atname, tree args, : "ISO C++11") \ : ((FEATURE_VER) == STD_EXT \ ? "ISO C" \ - : "ISO C90")) + : ((FEATURE_VER) == STD_C2X \ + ? "ISO C17" \ + : "ISO C90"))) /* Adjust a C standard version, which may be STD_C9L, to account for -Wno-long-long. Returns other standard versions unchanged. */ #define ADJ_STD(VER) ((int) ((VER) == STD_C9L \ @@ -653,6 +657,7 @@ static const format_flag_spec strftime_flag_specs[] = { 'E', 0, 0, 0, N_("'E' modifier"), N_("the 'E' strftime modifier"), STD_C99 }, { 'O', 0, 0, 0, N_("'O' modifier"), N_("the 'O' strftime modifier"), STD_C99 }, { 'O', 'o', 0, 0, NULL, N_("the 'O' modifier"), STD_EXT }, + { 'O', 'p', 0, 0, NULL, N_("the 'O' modifier"), STD_C2X }, { 0, 0, 0, 0, NULL, NULL, STD_C89 } }; @@ -887,7 +892,8 @@ static const format_char_info scan_char_table[] = static const format_char_info time_char_table[] = { /* C89 conversion specifiers. */ - { "ABZab", 0, STD_C89, NOLENGTHS, "^#", "", NULL }, + { "AZa", 0, STD_C89, NOLENGTHS, "^#", "", NULL }, + { "Bb", 0, STD_C89, NOLENGTHS, "O^#", "p", NULL }, { "cx", 0, STD_C89, NOLENGTHS, "E", "3", NULL }, { "HIMSUWdmw", 0, STD_C89, NOLENGTHS, "-_0Ow", "", NULL }, { "j", 0, STD_C89, NOLENGTHS, "-_0Ow", "o", NULL }, diff --git a/gcc/c-family/c-format.h b/gcc/c-family/c-format.h index 6aa68df..15a3153 100644 --- a/gcc/c-family/c-format.h +++ b/gcc/c-family/c-format.h @@ -48,6 +48,7 @@ enum format_std_version STD_C94, STD_C9L, /* C99, but treat as C89 if -Wno-long-long. */ STD_C99, + STD_C2X, STD_EXT }; @@ -149,6 +150,7 @@ struct format_char_info two digit year formats, "3" for strftime formats giving two digit years in some locales, "4" for "2" which becomes "3" with an "E" modifier, "o" if use of strftime "O" is a GNU extension beyond C99, + "p" if use of strftime "O" is a C2x feature, "W" if the argument is a pointer which is dereferenced and written into, "R" if the argument is a pointer which is dereferenced and read from, "i" for printf integer formats where the '0' flag is ignored with diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d8987ca..4624521 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-04 Joseph Myers + + PR c/82752 + * gcc.dg/format/c2x-strftime-1.c: New test. + 2019-10-04 Martin Sebor PR middle-end/91977 diff --git a/gcc/testsuite/gcc.dg/format/c2x-strftime-1.c b/gcc/testsuite/gcc.dg/format/c2x-strftime-1.c new file mode 100644 index 0000000..c6e7619 --- /dev/null +++ b/gcc/testsuite/gcc.dg/format/c2x-strftime-1.c @@ -0,0 +1,15 @@ +/* Test for strftime formats. Formats using C2x features. */ +/* { dg-do compile } */ +/* { dg-options "-std=c2x -pedantic -Wformat" } */ + +#include "format.h" + +void +foo (char *s, size_t m, const struct tm *tp) +{ + strftime (s, m, "%Ob", tp); + strftime (s, m, "%OB", tp); + /* It's not clear that %h equivalence to %b means %Oh is equivalent + to %Ob; here we expect %Oh to be diagnosed. */ + strftime (s, m, "%Oh", tp); /* { dg-warning "flag|modifier" "bad %Oh" } */ +} -- cgit v1.1 From 30648d02155fd2cf5e15c9741f08ed08554fa3d6 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 5 Oct 2019 00:16:20 +0000 Subject: Daily bump. From-SVN: r276618 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index cd0a63a..4d531d0 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20191004 +20191005 -- cgit v1.1 From 0043b5280e6f571819d8764d76594a7a20467d00 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 5 Oct 2019 09:36:09 +0200 Subject: re PR tree-optimization/91734 (gcc skip an if statement with "-O1 -ffast-math") PR tree-optimization/91734 * generic-match-head.c: Include fold-const-call.h. * match.pd (sqrt(x) cmp c): Check the boundary value and in case inexact computation of c*c affects comparison of the boundary, turn LT_EXPR into LE_EXPR, GE_EXPR into GT_EXPR, LE_EXPR into LT_EXPR or GT_EXPR into GE_EXPR. Punt for sqrt comparisons against NaN and for -frounding-math. For c2, try the next smaller or larger floating point constant depending on comparison code and if it has the same sqrt as c2, use it instead of c2. * gcc.dg/pr91734.c: New test. From-SVN: r276621 --- gcc/ChangeLog | 12 ++++ gcc/generic-match-head.c | 1 + gcc/match.pd | 145 ++++++++++++++++++++++++++++------------- gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/gcc.dg/pr91734.c | 97 +++++++++++++++++++++++++++ 5 files changed, 213 insertions(+), 47 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/pr91734.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 18b4f89..171d554 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2019-10-05 Jakub Jelinek + + PR tree-optimization/91734 + * generic-match-head.c: Include fold-const-call.h. + * match.pd (sqrt(x) cmp c): Check the boundary value and + in case inexact computation of c*c affects comparison of the boundary, + turn LT_EXPR into LE_EXPR, GE_EXPR into GT_EXPR, LE_EXPR into LT_EXPR + or GT_EXPR into GE_EXPR. Punt for sqrt comparisons against NaN and + for -frounding-math. For c2, try the next smaller or larger floating + point constant depending on comparison code and if it has the same + sqrt as c2, use it instead of c2. + 2019-10-04 Martin Sebor PR middle-end/91977 diff --git a/gcc/generic-match-head.c b/gcc/generic-match-head.c index b54e035..fdc6039 100644 --- a/gcc/generic-match-head.c +++ b/gcc/generic-match-head.c @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see #include "cgraph.h" #include "vec-perm-indices.h" #include "fold-const.h" +#include "fold-const-call.h" #include "stor-layout.h" #include "tree-dfa.h" #include "builtins.h" diff --git a/gcc/match.pd b/gcc/match.pd index 9bd5f3e..e3ac06c 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -3726,8 +3726,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (cmp { tem; } @1))))) /* Fold comparisons against built-in math functions. */ - (if (flag_unsafe_math_optimizations - && ! flag_errno_math) + (if (flag_unsafe_math_optimizations && ! flag_errno_math) (for sq (SQRT) (simplify (cmp (sq @0) REAL_CST@1) @@ -3762,56 +3761,108 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) if x is negative or NaN. Due to -funsafe-math-optimizations, the results for other x follow from natural arithmetic. */ (cmp @0 @1))) - (if (cmp == GT_EXPR || cmp == GE_EXPR) + (if ((cmp == LT_EXPR + || cmp == LE_EXPR + || cmp == GT_EXPR + || cmp == GE_EXPR) + && !REAL_VALUE_ISNAN (TREE_REAL_CST (@1)) + /* Give up for -frounding-math. */ + && !HONOR_SIGN_DEPENDENT_ROUNDING (TREE_TYPE (@0))) (with { - REAL_VALUE_TYPE c2; + REAL_VALUE_TYPE c2; + enum tree_code ncmp = cmp; + const real_format *fmt + = REAL_MODE_FORMAT (TYPE_MODE (TREE_TYPE (@0))); real_arithmetic (&c2, MULT_EXPR, &TREE_REAL_CST (@1), &TREE_REAL_CST (@1)); - real_convert (&c2, TYPE_MODE (TREE_TYPE (@0)), &c2); - } - (if (REAL_VALUE_ISINF (c2)) - /* sqrt(x) > y is x == +Inf, when y is very large. */ - (if (HONOR_INFINITIES (@0)) - (eq @0 { build_real (TREE_TYPE (@0), c2); }) - { constant_boolean_node (false, type); }) - /* sqrt(x) > c is the same as x > c*c. */ - (cmp @0 { build_real (TREE_TYPE (@0), c2); })))) - (if (cmp == LT_EXPR || cmp == LE_EXPR) - (with - { - REAL_VALUE_TYPE c2; - real_arithmetic (&c2, MULT_EXPR, - &TREE_REAL_CST (@1), &TREE_REAL_CST (@1)); - real_convert (&c2, TYPE_MODE (TREE_TYPE (@0)), &c2); + real_convert (&c2, fmt, &c2); + /* See PR91734: if c2 is inexact and sqrt(c2) < c (or sqrt(c2) >= c), + then change LT_EXPR into LE_EXPR or GE_EXPR into GT_EXPR. */ + if (!REAL_VALUE_ISINF (c2)) + { + tree c3 = fold_const_call (CFN_SQRT, TREE_TYPE (@0), + build_real (TREE_TYPE (@0), c2)); + if (c3 == NULL_TREE || TREE_CODE (c3) != REAL_CST) + ncmp = ERROR_MARK; + else if ((cmp == LT_EXPR || cmp == GE_EXPR) + && real_less (&TREE_REAL_CST (c3), &TREE_REAL_CST (@1))) + ncmp = cmp == LT_EXPR ? LE_EXPR : GT_EXPR; + else if ((cmp == LE_EXPR || cmp == GT_EXPR) + && real_less (&TREE_REAL_CST (@1), &TREE_REAL_CST (c3))) + ncmp = cmp == LE_EXPR ? LT_EXPR : GE_EXPR; + else + { + /* With rounding to even, sqrt of up to 3 different values + gives the same normal result, so in some cases c2 needs + to be adjusted. */ + REAL_VALUE_TYPE c2alt, tow; + if (cmp == LT_EXPR || cmp == GE_EXPR) + tow = dconst0; + else + real_inf (&tow); + real_nextafter (&c2alt, fmt, &c2, &tow); + real_convert (&c2alt, fmt, &c2alt); + if (REAL_VALUE_ISINF (c2alt)) + ncmp = ERROR_MARK; + else + { + c3 = fold_const_call (CFN_SQRT, TREE_TYPE (@0), + build_real (TREE_TYPE (@0), c2alt)); + if (c3 == NULL_TREE || TREE_CODE (c3) != REAL_CST) + ncmp = ERROR_MARK; + else if (real_equal (&TREE_REAL_CST (c3), + &TREE_REAL_CST (@1))) + c2 = c2alt; + } + } + } } - (if (REAL_VALUE_ISINF (c2)) - (switch - /* sqrt(x) < y is always true, when y is a very large - value and we don't care about NaNs or Infinities. */ - (if (! HONOR_NANS (@0) && ! HONOR_INFINITIES (@0)) - { constant_boolean_node (true, type); }) - /* sqrt(x) < y is x != +Inf when y is very large and we - don't care about NaNs. */ - (if (! HONOR_NANS (@0)) - (ne @0 { build_real (TREE_TYPE (@0), c2); })) - /* sqrt(x) < y is x >= 0 when y is very large and we - don't care about Infinities. */ - (if (! HONOR_INFINITIES (@0)) - (ge @0 { build_real (TREE_TYPE (@0), dconst0); })) - /* sqrt(x) < y is x >= 0 && x != +Inf, when y is large. */ - (if (GENERIC) - (truth_andif - (ge @0 { build_real (TREE_TYPE (@0), dconst0); }) - (ne @0 { build_real (TREE_TYPE (@0), c2); })))) - /* sqrt(x) < c is the same as x < c*c, if we ignore NaNs. */ - (if (! HONOR_NANS (@0)) - (cmp @0 { build_real (TREE_TYPE (@0), c2); }) - /* sqrt(x) < c is the same as x >= 0 && x < c*c. */ - (if (GENERIC) - (truth_andif - (ge @0 { build_real (TREE_TYPE (@0), dconst0); }) - (cmp @0 { build_real (TREE_TYPE (@0), c2); }))))))))) + (if (cmp == GT_EXPR || cmp == GE_EXPR) + (if (REAL_VALUE_ISINF (c2)) + /* sqrt(x) > y is x == +Inf, when y is very large. */ + (if (HONOR_INFINITIES (@0)) + (eq @0 { build_real (TREE_TYPE (@0), c2); }) + { constant_boolean_node (false, type); }) + /* sqrt(x) > c is the same as x > c*c. */ + (if (ncmp != ERROR_MARK) + (if (ncmp == GE_EXPR) + (ge @0 { build_real (TREE_TYPE (@0), c2); }) + (gt @0 { build_real (TREE_TYPE (@0), c2); })))) + /* else if (cmp == LT_EXPR || cmp == LE_EXPR) */ + (if (REAL_VALUE_ISINF (c2)) + (switch + /* sqrt(x) < y is always true, when y is a very large + value and we don't care about NaNs or Infinities. */ + (if (! HONOR_NANS (@0) && ! HONOR_INFINITIES (@0)) + { constant_boolean_node (true, type); }) + /* sqrt(x) < y is x != +Inf when y is very large and we + don't care about NaNs. */ + (if (! HONOR_NANS (@0)) + (ne @0 { build_real (TREE_TYPE (@0), c2); })) + /* sqrt(x) < y is x >= 0 when y is very large and we + don't care about Infinities. */ + (if (! HONOR_INFINITIES (@0)) + (ge @0 { build_real (TREE_TYPE (@0), dconst0); })) + /* sqrt(x) < y is x >= 0 && x != +Inf, when y is large. */ + (if (GENERIC) + (truth_andif + (ge @0 { build_real (TREE_TYPE (@0), dconst0); }) + (ne @0 { build_real (TREE_TYPE (@0), c2); })))) + /* sqrt(x) < c is the same as x < c*c, if we ignore NaNs. */ + (if (ncmp != ERROR_MARK && ! HONOR_NANS (@0)) + (if (ncmp == LT_EXPR) + (lt @0 { build_real (TREE_TYPE (@0), c2); }) + (le @0 { build_real (TREE_TYPE (@0), c2); })) + /* sqrt(x) < c is the same as x >= 0 && x < c*c. */ + (if (ncmp != ERROR_MARK && GENERIC) + (if (ncmp == LT_EXPR) + (truth_andif + (ge @0 { build_real (TREE_TYPE (@0), dconst0); }) + (lt @0 { build_real (TREE_TYPE (@0), c2); })) + (truth_andif + (ge @0 { build_real (TREE_TYPE (@0), dconst0); }) + (le @0 { build_real (TREE_TYPE (@0), c2); }))))))))))) /* Transform sqrt(x) cmp sqrt(y) -> x cmp y. */ (simplify (cmp (sq @0) (sq @1)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4624521..10ba0d9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-05 Jakub Jelinek + + PR tree-optimization/91734 + * gcc.dg/pr91734.c: New test. + 2019-10-04 Joseph Myers PR c/82752 diff --git a/gcc/testsuite/gcc.dg/pr91734.c b/gcc/testsuite/gcc.dg/pr91734.c new file mode 100644 index 0000000..1cc3e40 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr91734.c @@ -0,0 +1,97 @@ +/* PR tree-optimization/91734 */ +/* { dg-do run } */ +/* { dg-add-options ieee } */ +/* { dg-additional-options "-O2 -std=gnu99" } */ + +__attribute__((noipa, optimize ("Ofast"))) int +f1 (float x) +{ + return __builtin_sqrtf (x) < __FLT_MIN__; +} + +__attribute__((noipa, optimize ("Ofast"))) int +f2 (float x) +{ + return __builtin_sqrtf (x) < 0x1.2dd3d0p-65f; +} + +__attribute__((noipa, optimize ("Ofast"))) int +f3 (float x) +{ + return __builtin_sqrtf (x) >= 0x1.2dd3d0p-65f; +} + +__attribute__((noipa, optimize ("Ofast"))) int +f4 (float x) +{ + return __builtin_sqrtf (x) >= 0x1.5642e6p+54f; +} + +__attribute__((noipa, optimize ("Ofast"))) int +f5 (float x) +{ + return __builtin_sqrtf (x) > 0x1.5642e6p+54f; +} + +__attribute__((noipa, optimize ("Ofast"))) int +f6 (float x) +{ + return __builtin_sqrtf (x) < 0x1.4da1cp-19f; +} + +__attribute__((noipa, optimize ("Ofast"))) int +f7 (float x) +{ + return __builtin_sqrtf (x) <= 0x1.4da1cp-19f; +} + +__attribute__((noipa, optimize ("Ofast"))) int +f8 (float x) +{ + return __builtin_sqrtf (x) < 0x1.50cb62p-65f; +} + +__attribute__((noipa, optimize ("Ofast"))) int +f9 (float x) +{ + return __builtin_sqrtf (x) <= 0x1.4fc00cp-73f; +} + +__attribute__((noipa, optimize ("Ofast"))) int +f10 (float x) +{ + return __builtin_sqrtf (x) < 0x1.001002p+0f; +} + +int +main () +{ + if (__FLT_RADIX__ != 2 + || __FLT_MANT_DIG__ != 24 + || __FLT_MIN_EXP__ != -125 + || __FLT_MAX_EXP__ != 128 + || __FLT_HAS_DENORM__ != 1 + || __FLT_HAS_INFINITY__ != 1) + return 0; + if (!f1 (0.0f) || f1 (0x1.0p-149f)) + __builtin_abort (); + if (!f2 (0x1.63dbc0p-130f)) + __builtin_abort (); + if (f3 (0x1.63dbc0p-130f)) + __builtin_abort (); + if (!f4 (0x1.c996d0p+108f) || !f4 (0x1.c996cep+108f) || f4 (0x1.c996ccp+108f)) + __builtin_abort (); + if (f5 (0x1.c996d0p+108f) || f5 (0x1.c996d2p+108f) || !f5 (0x1.c996d4p+108f)) + __builtin_abort (); + if (!f6 (0x1.b2ce3p-38f) || f6 (0x1.b2ce32p-38f) || f6 (0x1.b2ce34p-38f)) + __builtin_abort (); + if (!f7 (0x1.b2ce3p-38f) || !f7 (0x1.b2ce34p-38f) || !f7 (0x1.b2ce36p-38f) || f7 (0x1.b2ce38p-38f)) + __builtin_abort (); + if (!f8 (0x1.bb166p-130f) || !f8 (0x1.bb168p-130f) || f8 (0x1.bb16ap-130f) || f8 (0x1.bb16cp-130f)) + __builtin_abort (); + if (!f9 (0x1.8p-146f) || !f9 (0x1.ap-146f) || f9 (0x1.cp-146f) || f9 (0x1.ep-146f)) + __builtin_abort (); + if (f10 (0x1.002004p+0f)) + __builtin_abort (); + return 0; +} -- cgit v1.1 From 8e007055dd1374ca4c44406a4ead172be0dfa3a8 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 5 Oct 2019 09:38:21 +0200 Subject: PR c++/91369 - Implement P0784R7: constexpr new PR c++/91369 - Implement P0784R7: constexpr new c-family/ * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a. cp/ * cp-tree.h (enum cp_tree_index): Add CPTI_HEAP_UNINIT_IDENTIFIER, CPTI_HEAP_IDENTIFIER and CPTI_HEAP_DELETED_IDENTIFIER. (heap_uninit_identifier, heap_identifier, heap_deleted_identifier): Define. (type_has_constexpr_destructor, build_new_constexpr_heap_type, cxx_constant_dtor): Declare. * class.c (type_maybe_constexpr_default_constructor): Make static. (type_maybe_constexpr_destructor, type_has_constexpr_destructor): New functions. (finalize_literal_type_property): For c++2a, don't clear CLASSTYPE_LITERAL_P for types without trivial destructors unless they have non-constexpr destructors. (explain_non_literal_class): For c++2a, complain about non-constexpr destructors rather than about non-trivial destructors. * constexpr.c: Include stor-layout.h. (struct constexpr_global_ctx): New type. (struct constexpr_ctx): Add global field, remove values and constexpr_ops_count. (cxx_replaceable_global_alloc_fn): New inline function. (cxx_eval_call_expression): For c++2a allow calls to replaceable global allocation functions, for new return address of a heap uninit var, for delete record its deletion. Change ctx->values->{get,put} to ctx->global->values.{get,put}. (non_const_var_error): Add auto_diagnostic_group sentinel. Emit special diagnostics for heap variables. (cxx_eval_store_expression): Change ctx->values->{get,put} to ctx->global->values.{get,put}. (cxx_eval_loop_expr): Initialize jump_target if NULL. Change new_ctx.values->remove to ctx->global->values.remove. (cxx_eval_constant_expression): Change *ctx->constexpr_ops_count to ctx->global->constexpr_ops_count. Change ctx->values->{get,put} to ctx->global->values.{get,put}. : Formatting fix. On cast of replaceable global allocation function to some pointer type, adjust the type of the heap variable and change name from heap_uninit_identifier to heap_identifier. (find_heap_var_refs): New function. (cxx_eval_outermost_constant_expr): Add constexpr_dtor argument, handle evaluation of constexpr dtors and add tracking of heap variables. Use tf_no_cleanup for get_target_expr_with_sfinae. (cxx_constant_value): Adjust cxx_eval_outermost_constant_expr caller. (cxx_constant_dtor): New function. (maybe_constant_value, fold_non_dependent_expr_template, maybe_constant_init_1): Adjust cxx_eval_outermost_constant_expr callers. (potential_constant_expression_1): Ignore clobbers. Allow COND_EXPR_IS_VEC_DELETE for c++2a. * decl.c (initialize_predefined_identifiers): Add heap identifiers. (decl_maybe_constant_destruction): New function. (cp_finish_decl): Don't clear TREE_READONLY for constexpr variables with non-trivial, but constexpr destructors. (register_dtor_fn): For constexpr variables with constexpr non-trivial destructors call cxx_maybe_build_cleanup instead of adding destructor calls at runtime. (expand_static_init): For constexpr variables with constexpr non-trivial destructors call cxx_maybe_build_cleanup. (grokdeclarator): Allow constexpr destructors for c++2a. Formatting fix. (cxx_maybe_build_cleanup): For constexpr variables with constexpr non-trivial destructors call cxx_constant_dtor instead of adding destructor calls at runtime. * init.c: Include stor-layout.h. (build_new_constexpr_heap_type, maybe_wrap_new_for_constexpr): New functions. (build_new_1): For c++2a and new[], add cast around the alloc call to help constexpr evaluation figure out the type of the heap storage. (build_vec_delete_1): Set DECL_INITIAL of tbase and emit a DECL_EXPR for it instead of initializing an uninitialized variable. * method.c: Include intl.h. (SFK_CTOR_P, SFK_DTOR_P, SFK_ASSIGN_P, SFK_COPY_P, SFK_MOVE_P): Move definitions earlier. (process_subob_fn): Add sfk argument, adjust non-constexpr call diagnostics based on it. (walk_field_subobs): Formatting fixes. Adjust process_subob_fn caller. (synthesized_method_base_walk): Likewise. (synthesized_method_walk): Set *constexpr_p to true for dtors in c++2a. Fix up DR number in comment. (implicitly_declare_fn): Formatting fix. * typeck2.c (store_init_value): Don't call cp_fully_fold_init on initializers of automatic non-constexpr variables in constexpr functions. testsuite/ * g++.dg/cpp0x/constexpr-delete2.C: Adjust expected diagnostics for c++2a. * g++.dg/cpp0x/locations1.C: Only expect constexpr ~S() diagnostics in c++17_down, adjust expected wording. * g++.dg/cpp1y/constexpr-new.C: Only expect diagnostics in c++17_down. * g++.dg/cpp2a/constexpr-dtor1.C: New test. * g++.dg/cpp2a/constexpr-dtor2.C: New test. * g++.dg/cpp2a/constexpr-dtor3.C: New test. * g++.dg/cpp2a/constexpr-new1.C: New test. * g++.dg/cpp2a/constexpr-new2.C: New test. * g++.dg/cpp2a/constexpr-new3.C: New test. * g++.dg/cpp2a/constexpr-new4.C: New test. * g++.dg/cpp2a/feat-cxx2a.C: Add __cpp_constinit and __cpp_constexpr_dynamic_alloc tests. Tweak __cpp_* tests for c++2a features to use style like older features, including #ifdef test. * g++.dg/ext/is_literal_type3.C: New test. From-SVN: r276622 --- gcc/c-family/ChangeLog | 6 + gcc/c-family/c-cppbuiltin.c | 1 + gcc/cp/ChangeLog | 85 +++++++ gcc/cp/class.c | 44 +++- gcc/cp/constexpr.c | 340 ++++++++++++++++++++----- gcc/cp/cp-tree.h | 9 + gcc/cp/decl.c | 52 +++- gcc/cp/init.c | 97 ++++++- gcc/cp/method.c | 69 ++--- gcc/cp/typeck2.c | 8 +- gcc/testsuite/ChangeLog | 18 ++ gcc/testsuite/g++.dg/cpp0x/constexpr-delete2.C | 3 +- gcc/testsuite/g++.dg/cpp0x/locations1.C | 2 +- gcc/testsuite/g++.dg/cpp1y/constexpr-new.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-dtor1.C | 9 + gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C | 66 +++++ gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C | 185 ++++++++++++++ gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C | 39 +++ gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C | 21 ++ gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C | 73 ++++++ gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C | 29 +++ gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C | 32 ++- gcc/testsuite/g++.dg/ext/is_literal_type3.C | 26 ++ 23 files changed, 1082 insertions(+), 134 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp2a/constexpr-dtor1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C create mode 100644 gcc/testsuite/g++.dg/ext/is_literal_type3.C (limited to 'gcc') diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 1ebc4d9..7deaff0 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2019-10-05 Jakub Jelinek + + PR c++/91369 - Implement P0784R7: constexpr new + * c-cppbuiltin.c (c_cpp_builtins): Predefine + __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a. + 2019-10-04 Joseph Myers PR c/82752 diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index fc68bc4..9e0ce42 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -989,6 +989,7 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__cpp_constinit=201907"); cpp_define (pfile, "__cpp_nontype_template_parameter_class=201806"); cpp_define (pfile, "__cpp_impl_destroying_delete=201806"); + cpp_define (pfile, "__cpp_constexpr_dynamic_alloc=201907"); } if (flag_concepts) cpp_define (pfile, "__cpp_concepts=201507"); diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e705bcc..b40825e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,88 @@ +2019-10-05 Jakub Jelinek + + PR c++/91369 - Implement P0784R7: constexpr new + * cp-tree.h (enum cp_tree_index): Add CPTI_HEAP_UNINIT_IDENTIFIER, + CPTI_HEAP_IDENTIFIER and CPTI_HEAP_DELETED_IDENTIFIER. + (heap_uninit_identifier, heap_identifier, heap_deleted_identifier): + Define. + (type_has_constexpr_destructor, build_new_constexpr_heap_type, + cxx_constant_dtor): Declare. + * class.c (type_maybe_constexpr_default_constructor): Make static. + (type_maybe_constexpr_destructor, type_has_constexpr_destructor): New + functions. + (finalize_literal_type_property): For c++2a, don't clear + CLASSTYPE_LITERAL_P for types without trivial destructors unless they + have non-constexpr destructors. + (explain_non_literal_class): For c++2a, complain about non-constexpr + destructors rather than about non-trivial destructors. + * constexpr.c: Include stor-layout.h. + (struct constexpr_global_ctx): New type. + (struct constexpr_ctx): Add global field, remove values and + constexpr_ops_count. + (cxx_replaceable_global_alloc_fn): New inline function. + (cxx_eval_call_expression): For c++2a allow calls to replaceable + global allocation functions, for new return address of a heap uninit + var, for delete record its deletion. Change ctx->values->{get,put} to + ctx->global->values.{get,put}. + (non_const_var_error): Add auto_diagnostic_group sentinel. Emit + special diagnostics for heap variables. + (cxx_eval_store_expression): Change ctx->values->{get,put} to + ctx->global->values.{get,put}. + (cxx_eval_loop_expr): Initialize jump_target if NULL. Change + new_ctx.values->remove to ctx->global->values.remove. + (cxx_eval_constant_expression): Change *ctx->constexpr_ops_count + to ctx->global->constexpr_ops_count. Change ctx->values->{get,put} to + ctx->global->values.{get,put}. + : Formatting fix. On cast of replaceable global + allocation function to some pointer type, adjust the type of + the heap variable and change name from heap_uninit_identifier + to heap_identifier. + (find_heap_var_refs): New function. + (cxx_eval_outermost_constant_expr): Add constexpr_dtor argument, + handle evaluation of constexpr dtors and add tracking of heap + variables. Use tf_no_cleanup for get_target_expr_with_sfinae. + (cxx_constant_value): Adjust cxx_eval_outermost_constant_expr caller. + (cxx_constant_dtor): New function. + (maybe_constant_value, fold_non_dependent_expr_template, + maybe_constant_init_1): Adjust cxx_eval_outermost_constant_expr + callers. + (potential_constant_expression_1): Ignore clobbers. Allow + COND_EXPR_IS_VEC_DELETE for c++2a. + * decl.c (initialize_predefined_identifiers): Add heap identifiers. + (decl_maybe_constant_destruction): New function. + (cp_finish_decl): Don't clear TREE_READONLY for constexpr variables + with non-trivial, but constexpr destructors. + (register_dtor_fn): For constexpr variables with constexpr non-trivial + destructors call cxx_maybe_build_cleanup instead of adding destructor + calls at runtime. + (expand_static_init): For constexpr variables with constexpr + non-trivial destructors call cxx_maybe_build_cleanup. + (grokdeclarator): Allow constexpr destructors for c++2a. Formatting + fix. + (cxx_maybe_build_cleanup): For constexpr variables with constexpr + non-trivial destructors call cxx_constant_dtor instead of adding + destructor calls at runtime. + * init.c: Include stor-layout.h. + (build_new_constexpr_heap_type, maybe_wrap_new_for_constexpr): New + functions. + (build_new_1): For c++2a and new[], add cast around the alloc call + to help constexpr evaluation figure out the type of the heap storage. + (build_vec_delete_1): Set DECL_INITIAL of tbase and emit a DECL_EXPR + for it instead of initializing an uninitialized variable. + * method.c: Include intl.h. + (SFK_CTOR_P, SFK_DTOR_P, SFK_ASSIGN_P, SFK_COPY_P, SFK_MOVE_P): Move + definitions earlier. + (process_subob_fn): Add sfk argument, adjust non-constexpr call + diagnostics based on it. + (walk_field_subobs): Formatting fixes. Adjust process_subob_fn caller. + (synthesized_method_base_walk): Likewise. + (synthesized_method_walk): Set *constexpr_p to true for dtors in c++2a. + Fix up DR number in comment. + (implicitly_declare_fn): Formatting fix. + * typeck2.c (store_init_value): Don't call cp_fully_fold_init on + initializers of automatic non-constexpr variables in constexpr + functions. + 2019-10-04 Jakub Jelinek PR c++/71504 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 3838f76..4abcfaf 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -206,6 +206,7 @@ static int empty_base_at_nonzero_offset_p (tree, tree, splay_tree); static tree end_of_base (tree); static tree get_vcall_index (tree, tree); static bool type_maybe_constexpr_default_constructor (tree); +static bool type_maybe_constexpr_destructor (tree); static bool field_poverlapping_p (tree); /* Return a COND_EXPR that executes TRUE_STMT if this execution of the @@ -5242,7 +5243,7 @@ type_has_constexpr_default_constructor (tree t) without forcing a lazy declaration (which might cause undesired instantiations). */ -bool +static bool type_maybe_constexpr_default_constructor (tree t) { if (CLASS_TYPE_P (t) && CLASSTYPE_LAZY_DEFAULT_CTOR (t) @@ -5252,6 +5253,34 @@ type_maybe_constexpr_default_constructor (tree t) return type_has_constexpr_default_constructor (t); } +/* Returns true iff class T has a constexpr destructor. */ + +bool +type_has_constexpr_destructor (tree t) +{ + tree fns; + + if (CLASSTYPE_LAZY_DESTRUCTOR (t)) + /* Non-trivial, we need to check subobject destructors. */ + lazily_declare_fn (sfk_destructor, t); + fns = CLASSTYPE_DESTRUCTOR (t); + return (fns && DECL_DECLARED_CONSTEXPR_P (fns)); +} + +/* Returns true iff class T has a constexpr destructor or has an + implicitly declared destructor that we can't tell if it's constexpr + without forcing a lazy declaration (which might cause undesired + instantiations). */ + +static bool +type_maybe_constexpr_destructor (tree t) +{ + if (CLASS_TYPE_P (t) && CLASSTYPE_LAZY_DESTRUCTOR (t)) + /* Assume it's constexpr. */ + return true; + return type_has_constexpr_destructor (t); +} + /* Returns true iff class TYPE has a virtual destructor. */ bool @@ -5503,8 +5532,11 @@ finalize_literal_type_property (tree t) { tree fn; - if (cxx_dialect < cxx11 - || TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)) + if (cxx_dialect < cxx11) + CLASSTYPE_LITERAL_P (t) = false; + else if (CLASSTYPE_LITERAL_P (t) + && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) + && (cxx_dialect < cxx2a || !type_maybe_constexpr_destructor (t))) CLASSTYPE_LITERAL_P (t) = false; else if (CLASSTYPE_LITERAL_P (t) && LAMBDA_TYPE_P (t)) CLASSTYPE_LITERAL_P (t) = (cxx_dialect >= cxx17); @@ -5558,8 +5590,12 @@ explain_non_literal_class (tree t) inform (UNKNOWN_LOCATION, " %qT is a closure type, which is only literal in " "C++17 and later", t); - else if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)) + else if (cxx_dialect < cxx2a && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)) inform (UNKNOWN_LOCATION, " %q+T has a non-trivial destructor", t); + else if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) + && !type_maybe_constexpr_destructor (t)) + inform (UNKNOWN_LOCATION, " %q+T does not have % destructor", + t); else if (CLASSTYPE_NON_AGGREGATE (t) && !TYPE_HAS_TRIVIAL_DFLT (t) && !LAMBDA_TYPE_P (t) diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 2dc57f1..f50cc04 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple-fold.h" #include "timevar.h" #include "fold-const-call.h" +#include "stor-layout.h" static bool verify_constant (tree, bool, bool *, bool *); #define VERIFY_CONSTANT(X) \ @@ -1006,17 +1007,35 @@ enum constexpr_switch_state { css_default_processing }; +/* The constexpr expansion context part which needs one instance per + cxx_eval_outermost_constant_expr invocation. VALUES is a map of values of + variables initialized within the expression. */ + +struct constexpr_global_ctx { + /* Values for any temporaries or local variables within the + constant-expression. */ + hash_map values; + /* Number of cxx_eval_constant_expression calls (except skipped ones, + on simple constants or location wrappers) encountered during current + cxx_eval_outermost_constant_expr call. */ + HOST_WIDE_INT constexpr_ops_count; + /* Heap VAR_DECLs created during the evaluation of the outermost constant + expression. */ + auto_vec heap_vars; + /* Constructor. */ + constexpr_global_ctx () : constexpr_ops_count (0) {} +}; + /* The constexpr expansion context. CALL is the current function expansion, CTOR is the current aggregate initializer, OBJECT is the - object being initialized by CTOR, either a VAR_DECL or a _REF. VALUES - is a map of values of variables initialized within the expression. */ + object being initialized by CTOR, either a VAR_DECL or a _REF. */ struct constexpr_ctx { + /* The part of the context that needs to be unique to the whole + cxx_eval_outermost_constant_expr invocation. */ + constexpr_global_ctx *global; /* The innermost call we're evaluating. */ constexpr_call *call; - /* Values for any temporaries or local variables within the - constant-expression. */ - hash_map *values; /* SAVE_EXPRs that we've seen within the current LOOP_EXPR. NULL if we aren't inside a loop. */ vec *save_exprs; @@ -1027,10 +1046,6 @@ struct constexpr_ctx { tree object; /* If inside SWITCH_EXPR. */ constexpr_switch_state *css_state; - /* Number of cxx_eval_constant_expression calls (except skipped ones, - on simple constants or location wrappers) encountered during current - cxx_eval_outermost_constant_expr call. */ - HOST_WIDE_INT *constexpr_ops_count; /* Whether we should error on a non-constant expression or fail quietly. */ bool quiet; @@ -1578,6 +1593,17 @@ modifying_const_object_error (tree expr, tree obj) inform (location_of (obj), "originally declared % here"); } +/* Return true if FNDECL is a replaceable global allocation function that + should be useable during constant expression evaluation. */ + +static inline bool +cxx_replaceable_global_alloc_fn (tree fndecl) +{ + return (cxx_dialect >= cxx2a + && IDENTIFIER_NEWDEL_OP_P (DECL_NAME (fndecl)) + && CP_DECL_CONTEXT (fndecl) == global_namespace); +} + /* Subroutine of cxx_eval_constant_expression. Evaluate the call expression tree T in the context of OLD_CALL expression evaluation. */ @@ -1656,6 +1682,62 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, lval, non_constant_p, overflow_p); if (!DECL_DECLARED_CONSTEXPR_P (fun)) { + if (cxx_replaceable_global_alloc_fn (fun)) + { + const int nargs = call_expr_nargs (t); + tree arg0 = NULL_TREE; + for (int i = 0; i < nargs; ++i) + { + tree arg = CALL_EXPR_ARG (t, i); + arg = cxx_eval_constant_expression (ctx, arg, false, + non_constant_p, overflow_p); + VERIFY_CONSTANT (arg); + if (i == 0) + arg0 = arg; + } + gcc_assert (arg0); + if (IDENTIFIER_NEW_OP_P (DECL_NAME (fun))) + { + tree type = build_array_type_nelts (char_type_node, + tree_to_uhwi (arg0)); + tree var = build_decl (loc, VAR_DECL, heap_uninit_identifier, + type); + DECL_ARTIFICIAL (var) = 1; + TREE_STATIC (var) = 1; + ctx->global->heap_vars.safe_push (var); + ctx->global->values.put (var, NULL_TREE); + return fold_convert (ptr_type_node, build_address (var)); + } + else + { + STRIP_NOPS (arg0); + if (TREE_CODE (arg0) == ADDR_EXPR + && VAR_P (TREE_OPERAND (arg0, 0))) + { + tree var = TREE_OPERAND (arg0, 0); + if (DECL_NAME (var) == heap_uninit_identifier + || DECL_NAME (var) == heap_identifier) + { + DECL_NAME (var) = heap_deleted_identifier; + ctx->global->values.remove (var); + return void_node; + } + else if (DECL_NAME (var) == heap_deleted_identifier) + { + if (!ctx->quiet) + error_at (loc, "deallocation of already deallocated " + "storage"); + *non_constant_p = true; + return t; + } + } + if (!ctx->quiet) + error_at (loc, "deallocation of storage that was " + "not previously allocated"); + *non_constant_p = true; + return t; + } + } if (!ctx->quiet) { if (!lambda_static_thunk_p (fun)) @@ -1675,7 +1757,7 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, new_ctx.object = AGGR_INIT_EXPR_SLOT (t); tree ctor = new_ctx.ctor = build_constructor (DECL_CONTEXT (fun), NULL); CONSTRUCTOR_NO_CLEARING (ctor) = true; - ctx->values->put (new_ctx.object, ctor); + ctx->global->values.put (new_ctx.object, ctor); ctx = &new_ctx; } @@ -1877,7 +1959,7 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, arg = unshare_constructor (arg); if (TREE_CODE (arg) == CONSTRUCTOR) vec_safe_push (ctors, arg); - ctx->values->put (remapped, arg); + ctx->global->values.put (remapped, arg); remapped = DECL_CHAIN (remapped); } /* Add the RESULT_DECL to the values map, too. */ @@ -1887,11 +1969,11 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, slot = AGGR_INIT_EXPR_SLOT (t); tree addr = build_address (slot); addr = build_nop (TREE_TYPE (res), addr); - ctx->values->put (res, addr); - ctx->values->put (slot, NULL_TREE); + ctx->global->values.put (res, addr); + ctx->global->values.put (slot, NULL_TREE); } else - ctx->values->put (res, NULL_TREE); + ctx->global->values.put (res, NULL_TREE); /* Track the callee's evaluated SAVE_EXPRs so that we can forget their values after the call. */ @@ -1916,7 +1998,7 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, result = void_node; else { - result = *ctx->values->get (slot ? slot : res); + result = *ctx->global->values.get (slot ? slot : res); if (result == NULL_TREE && !*non_constant_p) { if (!ctx->quiet) @@ -1934,8 +2016,8 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, && CLASS_TYPE_P (TREE_TYPE (new_obj)) && CP_TYPE_CONST_P (TREE_TYPE (new_obj))) { - /* Subobjects might not be stored in ctx->values but we can - get its CONSTRUCTOR by evaluating *this. */ + /* Subobjects might not be stored in ctx->global->values but we + can get its CONSTRUCTOR by evaluating *this. */ tree e = cxx_eval_constant_expression (ctx, new_obj, /*lval*/false, non_constant_p, @@ -1947,17 +2029,17 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, unsigned int i; tree save_expr; FOR_EACH_VEC_ELT (save_exprs, i, save_expr) - ctx_with_save_exprs.values->remove (save_expr); + ctx->global->values.remove (save_expr); /* Remove the parms/result from the values map. Is it worth bothering to do this when the map itself is only live for one constexpr evaluation? If so, maybe also clear out other vars from call, maybe in BIND_EXPR handling? */ - ctx->values->remove (res); + ctx->global->values.remove (res); if (slot) - ctx->values->remove (slot); + ctx->global->values.remove (slot); for (tree parm = parms; parm; parm = TREE_CHAIN (parm)) - ctx->values->remove (parm); + ctx->global->values.remove (parm); /* Free any parameter CONSTRUCTORs we aren't returning directly. */ while (!ctors->is_empty ()) @@ -3077,7 +3159,7 @@ verify_ctor_sanity (const constexpr_ctx *ctx, tree type) (TREE_TYPE (type), TREE_TYPE (otype))))); } gcc_assert (!ctx->object || !DECL_P (ctx->object) - || *(ctx->values->get (ctx->object)) == ctx->ctor); + || *(ctx->global->values.get (ctx->object)) == ctx->ctor); } /* Subroutine of cxx_eval_constant_expression. @@ -3610,7 +3692,23 @@ cxx_eval_indirect_ref (const constexpr_ctx *ctx, tree t, static void non_const_var_error (tree r) { + auto_diagnostic_group d; tree type = TREE_TYPE (r); + if (DECL_NAME (r) == heap_uninit_identifier + || DECL_NAME (r) == heap_identifier) + { + error ("the content of uninitialized storage is not usable " + "in a constant expression"); + inform (DECL_SOURCE_LOCATION (r), "allocated here"); + return; + } + if (DECL_NAME (r) == heap_deleted_identifier) + { + error ("use of allocated storage after deallocation in a " + "constant expression"); + inform (DECL_SOURCE_LOCATION (r), "allocated here"); + return; + } error ("the value of %qD is not usable in a constant " "expression", r); /* Avoid error cascade. */ @@ -3854,7 +3952,7 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t, DECL_NAME to handle TARGET_EXPR temporaries, which are fair game. */ valp = NULL; else if (DECL_P (object)) - valp = ctx->values->get (object); + valp = ctx->global->values.get (object); else valp = NULL; if (!valp) @@ -4056,7 +4154,7 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t, non_constant_p, overflow_p); if (ctors->is_empty()) /* The hash table might have moved since the get earlier. */ - valp = ctx->values->get (object); + valp = ctx->global->values.get (object); } /* Don't share a CONSTRUCTOR that might be changed later. */ @@ -4332,6 +4430,12 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t, tree *jump_target) { constexpr_ctx new_ctx = *ctx; + tree local_target; + if (!jump_target) + { + local_target = NULL_TREE; + jump_target = &local_target; + } tree body, cond = NULL_TREE, expr = NULL_TREE; int count = 0; @@ -4410,7 +4514,7 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t, unsigned int i; tree save_expr; FOR_EACH_VEC_ELT (save_exprs, i, save_expr) - new_ctx.values->remove (save_expr); + ctx->global->values.remove (save_expr); save_exprs.truncate (0); if (++count >= constexpr_loop_limit) @@ -4434,7 +4538,7 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t, unsigned int i; tree save_expr; FOR_EACH_VEC_ELT (save_exprs, i, save_expr) - new_ctx.values->remove (save_expr); + ctx->global->values.remove (save_expr); return NULL_TREE; } @@ -4586,14 +4690,14 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, } /* Avoid excessively long constexpr evaluations. */ - if (++*ctx->constexpr_ops_count >= constexpr_ops_limit) + if (++ctx->global->constexpr_ops_count >= constexpr_ops_limit) { if (!ctx->quiet) error_at (cp_expr_loc_or_input_loc (t), "% evaluation operation count exceeds limit of " "%wd (use %<-fconstexpr-ops-limit=%> to increase the limit)", constexpr_ops_limit); - *ctx->constexpr_ops_count = INTTYPE_MINIMUM (HOST_WIDE_INT); + ctx->global->constexpr_ops_count = INTTYPE_MINIMUM (HOST_WIDE_INT); *non_constant_p = true; return t; } @@ -4610,7 +4714,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, /* We ask for an rvalue for the RESULT_DECL when indirecting through an invisible reference, or in named return value optimization. */ - if (tree *p = ctx->values->get (t)) + if (tree *p = ctx->global->values.get (t)) return *p; else { @@ -4666,7 +4770,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, && TREE_CODE (TARGET_EXPR_INITIAL (r)) == CONSTRUCTOR) r = TARGET_EXPR_INITIAL (r); if (VAR_P (r)) - if (tree *p = ctx->values->get (r)) + if (tree *p = ctx->global->values.get (r)) if (*p != NULL_TREE) r = *p; if (DECL_P (r)) @@ -4693,7 +4797,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, case PARM_DECL: if (lval && !TYPE_REF_P (TREE_TYPE (t))) /* glvalue use. */; - else if (tree *p = ctx->values->get (r)) + else if (tree *p = ctx->global->values.get (r)) r = *p; else if (lval) /* Defer in case this is only used for its type. */; @@ -4735,7 +4839,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, new_ctx.object = r; new_ctx.ctor = build_constructor (TREE_TYPE (r), NULL); CONSTRUCTOR_NO_CLEARING (new_ctx.ctor) = true; - new_ctx.values->put (r, new_ctx.ctor); + ctx->global->values.put (r, new_ctx.ctor); ctx = &new_ctx; } @@ -4751,12 +4855,12 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, if (CLASS_TYPE_P (TREE_TYPE (r)) && CP_TYPE_CONST_P (TREE_TYPE (r))) TREE_READONLY (init) = true; - ctx->values->put (r, init); + ctx->global->values.put (r, init); } else if (ctx == &new_ctx) /* We gave it a CONSTRUCTOR above. */; else - ctx->values->put (r, NULL_TREE); + ctx->global->values.put (r, NULL_TREE); } break; @@ -4782,7 +4886,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, new_ctx.ctor = build_constructor (TREE_TYPE (t), NULL); CONSTRUCTOR_NO_CLEARING (new_ctx.ctor) = true; new_ctx.object = TARGET_EXPR_SLOT (t); - ctx->values->put (new_ctx.object, new_ctx.ctor); + ctx->global->values.put (new_ctx.object, new_ctx.ctor); ctx = &new_ctx; } /* Pass false for 'lval' because this indicates @@ -4797,7 +4901,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, { tree slot = TARGET_EXPR_SLOT (t); r = unshare_constructor (r); - ctx->values->put (slot, r); + ctx->global->values.put (slot, r); return slot; } break; @@ -4837,13 +4941,13 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, case SAVE_EXPR: /* Avoid evaluating a SAVE_EXPR more than once. */ - if (tree *p = ctx->values->get (t)) + if (tree *p = ctx->global->values.get (t)) r = *p; else { r = cxx_eval_constant_expression (ctx, TREE_OPERAND (t, 0), false, non_constant_p, overflow_p); - ctx->values->put (t, r); + ctx->global->values.put (t, r); if (ctx->save_exprs) ctx->save_exprs->safe_push (t); } @@ -5177,8 +5281,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, if (VOID_TYPE_P (type)) return void_node; - if (TREE_CODE (op) == PTRMEM_CST - && !TYPE_PTRMEM_P (type)) + if (TREE_CODE (op) == PTRMEM_CST && !TYPE_PTRMEM_P (type)) op = cplus_expand_constant (op); if (TREE_CODE (op) == PTRMEM_CST && tcode == NOP_EXPR) @@ -5232,6 +5335,34 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, } } + if (INDIRECT_TYPE_P (type) + && TREE_CODE (op) == NOP_EXPR + && TREE_TYPE (op) == ptr_type_node + && TREE_CODE (TREE_OPERAND (op, 0)) == ADDR_EXPR + && VAR_P (TREE_OPERAND (TREE_OPERAND (op, 0), 0)) + && DECL_NAME (TREE_OPERAND (TREE_OPERAND (op, 0), + 0)) == heap_uninit_identifier) + { + tree var = TREE_OPERAND (TREE_OPERAND (op, 0), 0); + tree var_size = TYPE_SIZE_UNIT (TREE_TYPE (var)); + tree elt_type = TREE_TYPE (type); + tree cookie_size = NULL_TREE; + if (TREE_CODE (elt_type) == RECORD_TYPE + && TYPE_NAME (elt_type) == heap_identifier) + { + tree fld1 = TYPE_FIELDS (elt_type); + tree fld2 = DECL_CHAIN (fld1); + elt_type = TREE_TYPE (TREE_TYPE (fld2)); + cookie_size = TYPE_SIZE_UNIT (TREE_TYPE (fld1)); + } + DECL_NAME (var) = heap_identifier; + TREE_TYPE (var) + = build_new_constexpr_heap_type (elt_type, cookie_size, + var_size); + TREE_TYPE (TREE_OPERAND (op, 0)) + = build_pointer_type (TREE_TYPE (var)); + } + if (op == oldop && tcode != UNARY_PLUS_EXPR) /* We didn't fold at the top so we could check for ptr-int conversion. */ @@ -5473,6 +5604,7 @@ instantiate_cx_fn_r (tree *tp, int *walk_subtrees, void */*data*/) return NULL_TREE; } + static void instantiate_constexpr_fns (tree t) { @@ -5481,34 +5613,58 @@ instantiate_constexpr_fns (tree t) input_location = loc; } +/* Look for heap variables in the expression *TP. */ + +static tree +find_heap_var_refs (tree *tp, int *walk_subtrees, void */*data*/) +{ + if (VAR_P (*tp) + && (DECL_NAME (*tp) == heap_uninit_identifier + || DECL_NAME (*tp) == heap_identifier + || DECL_NAME (*tp) == heap_deleted_identifier)) + return *tp; + + if (TYPE_P (*tp)) + *walk_subtrees = 0; + return NULL_TREE; +} + /* ALLOW_NON_CONSTANT is false if T is required to be a constant expression. STRICT has the same sense as for constant_value_1: true if we only allow conforming C++ constant expressions, or false if we want a constant value even if it doesn't conform. MANIFESTLY_CONST_EVAL is true if T is manifestly const-evaluated as - per P0595 even when ALLOW_NON_CONSTANT is true. */ + per P0595 even when ALLOW_NON_CONSTANT is true. + CONSTEXPR_DTOR is true when evaluating the dtor of a constexpr variable. + OBJECT must be non-NULL in that case. */ static tree cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, bool strict = true, bool manifestly_const_eval = false, + bool constexpr_dtor = false, tree object = NULL_TREE) { auto_timevar time (TV_CONSTEXPR); bool non_constant_p = false; bool overflow_p = false; - hash_map map; - HOST_WIDE_INT constexpr_ctx_count = 0; - constexpr_ctx ctx = { NULL, &map, NULL, NULL, NULL, NULL, - &constexpr_ctx_count, allow_non_constant, strict, + constexpr_global_ctx global_ctx; + constexpr_ctx ctx = { &global_ctx, NULL, NULL, NULL, NULL, NULL, + allow_non_constant, strict, manifestly_const_eval || !allow_non_constant }; tree type = initialized_type (t); tree r = t; if (VOID_TYPE_P (type)) - return t; + { + if (constexpr_dtor) + /* Used for destructors of array elements. */ + type = TREE_TYPE (object); + else + return t; + } if (AGGREGATE_TYPE_P (type) || VECTOR_TYPE_P (type)) { /* In C++14 an NSDMI can participate in aggregate initialization, @@ -5518,8 +5674,22 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, update ctx.values for the VAR_DECL. We use the same strategy for C++11 constexpr constructors that refer to the object being initialized. */ - ctx.ctor = build_constructor (type, NULL); - CONSTRUCTOR_NO_CLEARING (ctx.ctor) = true; + if (constexpr_dtor) + { + gcc_assert (object && VAR_P (object)); + gcc_assert (DECL_DECLARED_CONSTEXPR_P (object)); + gcc_assert (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (object)); + ctx.ctor = unshare_expr (DECL_INITIAL (object)); + TREE_READONLY (ctx.ctor) = false; + /* Temporarily force decl_really_constant_value to return false + for it, we want to use ctx.ctor for the current value instead. */ + DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (object) = false; + } + else + { + ctx.ctor = build_constructor (type, NULL); + CONSTRUCTOR_NO_CLEARING (ctx.ctor) = true; + } if (!object) { if (TREE_CODE (t) == TARGET_EXPR) @@ -5532,7 +5702,7 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, gcc_assert (same_type_ignoring_top_level_qualifiers_p (type, TREE_TYPE (object))); if (object && DECL_P (object)) - map.put (object, ctx.ctor); + global_ctx.values.put (object, ctx.ctor); if (TREE_CODE (r) == TARGET_EXPR) /* Avoid creating another CONSTRUCTOR when we expand the TARGET_EXPR. */ @@ -5543,13 +5713,15 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, r = cxx_eval_constant_expression (&ctx, r, false, &non_constant_p, &overflow_p); - verify_constant (r, allow_non_constant, &non_constant_p, &overflow_p); + if (!constexpr_dtor) + verify_constant (r, allow_non_constant, &non_constant_p, &overflow_p); + else + DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (object) = true; /* Mutable logic is a bit tricky: we want to allow initialization of constexpr variables with mutable members, but we can't copy those members to another constexpr variable. */ - if (TREE_CODE (r) == CONSTRUCTOR - && CONSTRUCTOR_MUTABLE_POISON (r)) + if (TREE_CODE (r) == CONSTRUCTOR && CONSTRUCTOR_MUTABLE_POISON (r)) { if (!allow_non_constant) error ("%qE is not a constant expression because it refers to " @@ -5557,8 +5729,7 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, non_constant_p = true; } - if (TREE_CODE (r) == CONSTRUCTOR - && CONSTRUCTOR_NO_CLEARING (r)) + if (TREE_CODE (r) == CONSTRUCTOR && CONSTRUCTOR_NO_CLEARING (r)) { if (!allow_non_constant) error ("%qE is not a constant expression because it refers to " @@ -5567,6 +5738,32 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, non_constant_p = true; } + if (!global_ctx.heap_vars.is_empty ()) + { + tree heap_var = cp_walk_tree_without_duplicates (&r, find_heap_var_refs, + NULL); + unsigned int i; + if (heap_var) + { + if (!allow_non_constant && !non_constant_p) + error_at (DECL_SOURCE_LOCATION (heap_var), + "%qE is not a constant expression because it refers to " + "a result of %", t); + r = t; + non_constant_p = true; + } + FOR_EACH_VEC_ELT (global_ctx.heap_vars, i, heap_var) + if (DECL_NAME (heap_var) != heap_deleted_identifier) + { + if (!allow_non_constant && !non_constant_p) + error_at (DECL_SOURCE_LOCATION (heap_var), + "%qE is not a constant expression because allocated " + "storage has not been deallocated", t); + r = t; + non_constant_p = true; + } + } + /* Technically we should check this for all subexpressions, but that runs into problems with our internal representation of pointer subtraction and the 5.19 rules are still in flux. */ @@ -5592,6 +5789,8 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, if (non_constant_p && !allow_non_constant) return error_mark_node; + else if (constexpr_dtor) + return r; else if (non_constant_p && TREE_CONSTANT (r)) { /* If __builtin_is_constant_evaluated () was evaluated to true @@ -5599,7 +5798,7 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, punt. */ if (manifestly_const_eval) return cxx_eval_outermost_constant_expr (t, true, strict, - false, object); + false, false, object); /* This isn't actually constant, so unset TREE_CONSTANT. Don't clear TREE_CONSTANT on ADDR_EXPR, as the middle-end requires it to be set if it is invariant address, even when it is not @@ -5627,7 +5826,7 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, return t; else if (TREE_CODE (t) != CONSTRUCTOR) { - r = get_target_expr (r); + r = get_target_expr_sfinae (r, tf_warning_or_error | tf_no_cleanup); TREE_CONSTANT (r) = true; } } @@ -5642,7 +5841,16 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, tree cxx_constant_value (tree t, tree decl) { - return cxx_eval_outermost_constant_expr (t, false, true, true, decl); + return cxx_eval_outermost_constant_expr (t, false, true, true, false, decl); +} + +/* Like cxx_constant_value, but used for evaluation of constexpr destructors + of constexpr variables. The actual initializer of DECL is not modified. */ + +void +cxx_constant_dtor (tree t, tree decl) +{ + cxx_eval_outermost_constant_expr (t, false, true, true, true, decl); } /* Helper routine for fold_simple function. Either return simplified @@ -5746,14 +5954,14 @@ maybe_constant_value (tree t, tree decl, bool manifestly_const_eval) return t; if (manifestly_const_eval) - return cxx_eval_outermost_constant_expr (t, true, true, true, decl); + return cxx_eval_outermost_constant_expr (t, true, true, true, false, decl); if (cv_cache == NULL) cv_cache = hash_map::create_ggc (101); if (tree *cached = cv_cache->get (t)) return *cached; - r = cxx_eval_outermost_constant_expr (t, true, true, false, decl); + r = cxx_eval_outermost_constant_expr (t, true, true, false, false, decl); gcc_checking_assert (r == t || CONVERT_EXPR_P (t) || TREE_CODE (t) == VIEW_CONVERT_EXPR @@ -5815,7 +6023,7 @@ fold_non_dependent_expr_template (tree t, tsubst_flags_t complain, tree r = cxx_eval_outermost_constant_expr (t, true, true, manifestly_const_eval, - NULL_TREE); + false, NULL_TREE); /* cp_tree_equal looks through NOPs, so allow them. */ gcc_checking_assert (r == t || CONVERT_EXPR_P (t) @@ -5919,7 +6127,7 @@ maybe_constant_init_1 (tree t, tree decl, bool allow_non_constant, else t = cxx_eval_outermost_constant_expr (t, allow_non_constant, /*strict*/false, - manifestly_const_eval, decl); + manifestly_const_eval, false, decl); if (TREE_CODE (t) == TARGET_EXPR) { tree init = TARGET_EXPR_INITIAL (t); @@ -6213,7 +6421,10 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, if (!DECL_DECLARED_CONSTEXPR_P (fun) /* Allow any built-in function; if the expansion isn't constant, we'll deal with that then. */ - && !fndecl_built_in_p (fun)) + && !fndecl_built_in_p (fun) + /* In C++2a, replaceable global allocation functions + are constant expressions. */ + && !cxx_replaceable_global_alloc_fn (fun)) { if (flags & tf_error) { @@ -6442,6 +6653,9 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, goto fail; if (!RECUR (TREE_OPERAND (t, 0), any)) return false; + /* Just ignore clobbers. */ + if (TREE_CLOBBER_P (TREE_OPERAND (t, 1))) + return true; if (!RECUR (TREE_OPERAND (t, 1), rval)) return false; return true; @@ -6911,7 +7125,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, return true; case COND_EXPR: - if (COND_EXPR_IS_VEC_DELETE (t)) + if (COND_EXPR_IS_VEC_DELETE (t) && cxx_dialect < cxx2a) { if (flags & tf_error) error_at (loc, "% is not a constant expression"); diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index be1a44e..b82b580 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -172,6 +172,9 @@ enum cp_tree_index CPTI_VALUE_IDENTIFIER, CPTI_FUN_IDENTIFIER, CPTI_CLOSURE_IDENTIFIER, + CPTI_HEAP_UNINIT_IDENTIFIER, + CPTI_HEAP_IDENTIFIER, + CPTI_HEAP_DELETED_IDENTIFIER, CPTI_LANG_NAME_C, CPTI_LANG_NAME_CPLUSPLUS, @@ -310,6 +313,9 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX]; #define value_identifier cp_global_trees[CPTI_VALUE_IDENTIFIER] #define fun_identifier cp_global_trees[CPTI_FUN_IDENTIFIER] #define closure_identifier cp_global_trees[CPTI_CLOSURE_IDENTIFIER] +#define heap_uninit_identifier cp_global_trees[CPTI_HEAP_UNINIT_IDENTIFIER] +#define heap_identifier cp_global_trees[CPTI_HEAP_IDENTIFIER] +#define heap_deleted_identifier cp_global_trees[CPTI_HEAP_DELETED_IDENTIFIER] #define lang_name_c cp_global_trees[CPTI_LANG_NAME_C] #define lang_name_cplusplus cp_global_trees[CPTI_LANG_NAME_CPLUSPLUS] @@ -6342,6 +6348,7 @@ extern bool vbase_has_user_provided_move_assign (tree); extern tree default_init_uninitialized_part (tree); extern bool trivial_default_constructor_is_constexpr (tree); extern bool type_has_constexpr_default_constructor (tree); +extern bool type_has_constexpr_destructor (tree); extern bool type_has_virtual_destructor (tree); extern bool classtype_has_move_assign_or_move_ctor_p (tree, bool user_declared); extern bool classtype_has_non_deleted_move_ctor (tree); @@ -6648,6 +6655,7 @@ extern tree build_offset_ref (tree, tree, bool, extern tree throw_bad_array_new_length (void); extern bool type_has_new_extended_alignment (tree); extern unsigned malloc_alignment (void); +extern tree build_new_constexpr_heap_type (tree, tree, tree); extern tree build_new (vec **, tree, tree, vec **, int, tsubst_flags_t); @@ -7747,6 +7755,7 @@ extern bool require_constant_expression (tree); extern bool require_rvalue_constant_expression (tree); extern bool require_potential_rvalue_constant_expression (tree); extern tree cxx_constant_value (tree, tree = NULL_TREE); +extern void cxx_constant_dtor (tree, tree); extern tree cxx_constant_init (tree, tree = NULL_TREE); extern tree maybe_constant_value (tree, tree = NULL_TREE, bool = false); extern tree maybe_constant_init (tree, tree = NULL_TREE, bool = false); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index d6cca65..ea9a001 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4146,6 +4146,9 @@ initialize_predefined_identifiers (void) {"value", &value_identifier, cik_normal}, {"_FUN", &fun_identifier, cik_normal}, {"__closure", &closure_identifier, cik_normal}, + {"heap uninit", &heap_uninit_identifier, cik_normal}, + {"heap ", &heap_identifier, cik_normal}, + {"heap deleted", &heap_deleted_identifier, cik_normal}, {NULL, NULL, cik_normal} }; @@ -7006,6 +7009,19 @@ notice_forced_label_r (tree *tp, int *walk_subtrees, void *) return NULL_TREE; } +/* Return true if DECL has either a trivial destructor, or for C++2A + is constexpr and has a constexpr destructor. */ + +static bool +decl_maybe_constant_destruction (tree decl, tree type) +{ + return (TYPE_HAS_TRIVIAL_DESTRUCTOR (type) + || (cxx_dialect >= cxx2a + && VAR_P (decl) + && DECL_DECLARED_CONSTEXPR_P (decl) + && type_has_constexpr_destructor (strip_array_types (type)))); +} + /* Finish processing of a declaration; install its line number and initial value. If the length of an array type is not known before, @@ -7430,7 +7446,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, TREE_READONLY (decl) = 1; /* Likewise if it needs destruction. */ - if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)) + if (!decl_maybe_constant_destruction (decl, type)) TREE_READONLY (decl) = 0; } @@ -8312,6 +8328,13 @@ register_dtor_fn (tree decl) if (TYPE_HAS_TRIVIAL_DESTRUCTOR (type)) return void_node; + if (decl_maybe_constant_destruction (decl, type) + && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)) + { + cxx_maybe_build_cleanup (decl, tf_warning_or_error); + return void_node; + } + /* If we're using "__cxa_atexit" (or "__cxa_thread_atexit" or "__aeabi_atexit"), and DECL is a class object, we can just pass the destructor to "__cxa_atexit"; we don't have to build a temporary @@ -8429,7 +8452,7 @@ expand_static_init (tree decl, tree init) gcc_assert (TREE_STATIC (decl)); /* Some variables require no dynamic initialization. */ - if (TYPE_HAS_TRIVIAL_DESTRUCTOR (TREE_TYPE (decl))) + if (decl_maybe_constant_destruction (decl, TREE_TYPE (decl))) { /* Make sure the destructor is callable. */ cxx_maybe_build_cleanup (decl, tf_warning_or_error); @@ -12697,12 +12720,13 @@ grokdeclarator (const cp_declarator *declarator, "a destructor cannot be %"); return error_mark_node; } - if (constexpr_p) - { - error_at (declspecs->locations[ds_constexpr], - "a destructor cannot be %"); - return error_mark_node; - } + if (constexpr_p && cxx_dialect < cxx2a) + { + error_at (declspecs->locations[ds_constexpr], + "% destructors only available" + " with %<-std=c++2a%> or %<-std=gnu++2a%>"); + return error_mark_node; + } } else if (sfk == sfk_constructor && friendp && !ctype) { @@ -12739,10 +12763,11 @@ grokdeclarator (const cp_declarator *declarator, } /* Tell grokfndecl if it needs to set TREE_PUBLIC on the node. */ - function_context = (ctype != NULL_TREE) ? - decl_function_context (TYPE_MAIN_DECL (ctype)) : NULL_TREE; - publicp = (! friendp || ! staticp) - && function_context == NULL_TREE; + function_context + = (ctype != NULL_TREE + ? decl_function_context (TYPE_MAIN_DECL (ctype)) : NULL_TREE); + publicp = ((! friendp || ! staticp) + && function_context == NULL_TREE); decl = grokfndecl (ctype, type, TREE_CODE (unqualified_id) != TEMPLATE_ID_EXPR @@ -16742,6 +16767,9 @@ cxx_maybe_build_cleanup (tree decl, tsubst_flags_t complain) cleanup = error_mark_node; else if (TYPE_HAS_TRIVIAL_DESTRUCTOR (type)) /* Discard the call. */; + else if (decl_maybe_constant_destruction (decl, type) + && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)) + cxx_constant_dtor (call, decl); else if (cleanup) cleanup = cp_build_compound_expr (cleanup, call, complain); else diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 857f360..1c51e26 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see #include "stringpool.h" #include "attribs.h" #include "asan.h" +#include "stor-layout.h" static bool begin_init_stmts (tree *, tree *); static tree finish_init_stmts (bool, tree, tree); @@ -2860,6 +2861,82 @@ std_placement_new_fn_p (tree alloc_fn) return false; } +/* For element type ELT_TYPE, return the appropriate type of the heap object + containing such element(s). COOKIE_SIZE is NULL or the size of cookie + in bytes. FULL_SIZE is NULL if it is unknown how big the heap allocation + will be, otherwise size of the heap object. If COOKIE_SIZE is NULL, + return array type ELT_TYPE[FULL_SIZE / sizeof(ELT_TYPE)], otherwise return + struct { size_t[COOKIE_SIZE/sizeof(size_t)]; ELT_TYPE[N]; } + where N is nothing (flexible array member) if FULL_SIZE is NULL, otherwise + it is computed such that the size of the struct fits into FULL_SIZE. */ + +tree +build_new_constexpr_heap_type (tree elt_type, tree cookie_size, tree full_size) +{ + gcc_assert (cookie_size == NULL_TREE || tree_fits_uhwi_p (cookie_size)); + gcc_assert (full_size == NULL_TREE || tree_fits_uhwi_p (full_size)); + unsigned HOST_WIDE_INT csz = cookie_size ? tree_to_uhwi (cookie_size) : 0; + tree itype2 = NULL_TREE; + if (full_size) + { + unsigned HOST_WIDE_INT fsz = tree_to_uhwi (full_size); + gcc_assert (fsz >= csz); + fsz -= csz; + fsz /= int_size_in_bytes (elt_type); + itype2 = build_index_type (size_int (fsz - 1)); + if (!cookie_size) + return build_cplus_array_type (elt_type, itype2); + } + else + gcc_assert (cookie_size); + csz /= int_size_in_bytes (sizetype); + tree itype1 = build_index_type (size_int (csz - 1)); + tree atype1 = build_cplus_array_type (sizetype, itype1); + tree atype2 = build_cplus_array_type (elt_type, itype2); + tree rtype = cxx_make_type (RECORD_TYPE); + TYPE_NAME (rtype) = heap_identifier; + tree fld1 = build_decl (UNKNOWN_LOCATION, FIELD_DECL, NULL_TREE, atype1); + tree fld2 = build_decl (UNKNOWN_LOCATION, FIELD_DECL, NULL_TREE, atype2); + DECL_FIELD_CONTEXT (fld1) = rtype; + DECL_FIELD_CONTEXT (fld2) = rtype; + DECL_ARTIFICIAL (fld1) = true; + DECL_ARTIFICIAL (fld2) = true; + TYPE_FIELDS (rtype) = fld1; + DECL_CHAIN (fld1) = fld2; + layout_type (rtype); + return rtype; +} + +/* Help the constexpr code to find the right type for the heap variable + by adding a NOP_EXPR around ALLOC_CALL if needed for cookie_size. + Return ALLOC_CALL or ALLOC_CALL cast to a pointer to + struct { size_t[cookie_size/sizeof(size_t)]; elt_type[]; }. */ + +static tree +maybe_wrap_new_for_constexpr (tree alloc_call, tree elt_type, tree cookie_size) +{ + if (cxx_dialect < cxx2a) + return alloc_call; + + if (current_function_decl != NULL_TREE + && !DECL_DECLARED_CONSTEXPR_P (current_function_decl)) + return alloc_call; + + tree call_expr = extract_call_expr (alloc_call); + if (call_expr == error_mark_node) + return alloc_call; + + tree alloc_call_fndecl = cp_get_callee_fndecl_nofold (call_expr); + if (alloc_call_fndecl == NULL_TREE + || !IDENTIFIER_NEW_OP_P (DECL_NAME (alloc_call_fndecl)) + || CP_DECL_CONTEXT (alloc_call_fndecl) != global_namespace) + return alloc_call; + + tree rtype = build_new_constexpr_heap_type (elt_type, cookie_size, + NULL_TREE); + return build_nop (build_pointer_type (rtype), alloc_call); +} + /* Generate code for a new-expression, including calling the "operator new" function, initializing the object, and, if an exception occurs during construction, cleaning up. The arguments are as for @@ -3327,6 +3404,10 @@ build_new_1 (vec **placement, tree type, tree nelts, } } + if (cookie_size) + alloc_call = maybe_wrap_new_for_constexpr (alloc_call, elt_type, + cookie_size); + /* In the simple case, we can stop now. */ pointer_type = build_pointer_type (type); if (!cookie_size && !is_initialized) @@ -3902,17 +3983,11 @@ build_vec_delete_1 (tree base, tree maxindex, tree type, fold_convert (sizetype, maxindex)); tbase = create_temporary_var (ptype); - tbase_init - = cp_build_modify_expr (input_location, tbase, NOP_EXPR, - fold_build_pointer_plus_loc (input_location, - fold_convert (ptype, - base), - virtual_size), - complain); - if (tbase_init == error_mark_node) - return error_mark_node; - controller = build3 (BIND_EXPR, void_type_node, tbase, - NULL_TREE, NULL_TREE); + DECL_INITIAL (tbase) + = fold_build_pointer_plus_loc (input_location, fold_convert (ptype, base), + virtual_size); + tbase_init = build_stmt (input_location, DECL_EXPR, tbase); + controller = build3 (BIND_EXPR, void_type_node, tbase, NULL_TREE, NULL_TREE); TREE_SIDE_EFFECTS (controller) = 1; body = build1 (EXIT_EXPR, void_type_node, diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 53fa85b..01bf534 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see #include "cgraph.h" #include "varasm.h" #include "toplev.h" +#include "intl.h" #include "common/common-target.h" static void do_build_copy_assign (tree); @@ -1237,12 +1238,24 @@ is_xible (enum tree_code code, tree to, tree from) return !!expr; } +/* Categorize various special_function_kinds. */ +#define SFK_CTOR_P(sfk) \ + ((sfk) >= sfk_constructor && (sfk) <= sfk_move_constructor) +#define SFK_DTOR_P(sfk) \ + ((sfk) == sfk_destructor || (sfk) == sfk_virtual_destructor) +#define SFK_ASSIGN_P(sfk) \ + ((sfk) == sfk_copy_assignment || (sfk) == sfk_move_assignment) +#define SFK_COPY_P(sfk) \ + ((sfk) == sfk_copy_constructor || (sfk) == sfk_copy_assignment) +#define SFK_MOVE_P(sfk) \ + ((sfk) == sfk_move_constructor || (sfk) == sfk_move_assignment) + /* Subroutine of synthesized_method_walk. Update SPEC_P, TRIVIAL_P and DELETED_P or give an error message MSG with argument ARG. */ static void -process_subob_fn (tree fn, tree *spec_p, bool *trivial_p, - bool *deleted_p, bool *constexpr_p, +process_subob_fn (tree fn, special_function_kind sfk, tree *spec_p, + bool *trivial_p, bool *deleted_p, bool *constexpr_p, bool diag, tree arg, bool dtor_from_ctor = false) { if (!fn || fn == error_mark_node) @@ -1283,24 +1296,15 @@ process_subob_fn (tree fn, tree *spec_p, bool *trivial_p, if (diag) { inform (DECL_SOURCE_LOCATION (fn), - "defaulted constructor calls non-% %qD", fn); + SFK_DTOR_P (sfk) + ? G_("defaulted destructor calls non-% %qD") + : G_("defaulted constructor calls non-% %qD"), + fn); explain_invalid_constexpr_fn (fn); } } } -/* Categorize various special_function_kinds. */ -#define SFK_CTOR_P(sfk) \ - ((sfk) >= sfk_constructor && (sfk) <= sfk_move_constructor) -#define SFK_DTOR_P(sfk) \ - ((sfk) == sfk_destructor || (sfk) == sfk_virtual_destructor) -#define SFK_ASSIGN_P(sfk) \ - ((sfk) == sfk_copy_assignment || (sfk) == sfk_move_assignment) -#define SFK_COPY_P(sfk) \ - ((sfk) == sfk_copy_constructor || (sfk) == sfk_copy_assignment) -#define SFK_MOVE_P(sfk) \ - ((sfk) == sfk_move_constructor || (sfk) == sfk_move_assignment) - /* Subroutine of synthesized_method_walk to allow recursion into anonymous aggregates. If DTOR_FROM_CTOR is true, we're walking subobject destructors called from a synthesized constructor, in which case we don't consider @@ -1318,8 +1322,7 @@ walk_field_subobs (tree fields, special_function_kind sfk, tree fnname, { tree mem_type, argtype, rval; - if (TREE_CODE (field) != FIELD_DECL - || DECL_ARTIFICIAL (field)) + if (TREE_CODE (field) != FIELD_DECL || DECL_ARTIFICIAL (field)) continue; /* Variant members only affect deletedness. In particular, they don't @@ -1457,7 +1460,7 @@ walk_field_subobs (tree fields, special_function_kind sfk, tree fnname, rval = locate_fn_flags (mem_type, fnname, argtype, flags, complain); - process_subob_fn (rval, spec_p, trivial_p, deleted_p, + process_subob_fn (rval, sfk, spec_p, trivial_p, deleted_p, constexpr_p, diag, field, dtor_from_ctor); } } @@ -1510,23 +1513,23 @@ synthesized_method_base_walk (tree binfo, tree base_binfo, && DECL_CONTEXT (*inheriting_ctor) == DECL_CONTEXT (rval)) *inheriting_ctor = DECL_CLONED_FUNCTION (rval); - process_subob_fn (rval, spec_p, trivial_p, deleted_p, + process_subob_fn (rval, sfk, spec_p, trivial_p, deleted_p, constexpr_p, diag, BINFO_TYPE (base_binfo)); - if (SFK_CTOR_P (sfk) && - (!BINFO_VIRTUAL_P (base_binfo) - || TYPE_HAS_NONTRIVIAL_DESTRUCTOR (BINFO_TYPE (base_binfo)))) + if (SFK_CTOR_P (sfk) + && (!BINFO_VIRTUAL_P (base_binfo) + || TYPE_HAS_NONTRIVIAL_DESTRUCTOR (BINFO_TYPE (base_binfo)))) { /* In a constructor we also need to check the subobject destructors for cleanup of partially constructed objects. */ tree dtor = locate_fn_flags (base_binfo, complete_dtor_identifier, NULL_TREE, flags, diag ? tf_warning_or_error : tf_none); - /* Note that we don't pass down trivial_p; the subobject - destructors don't affect triviality of the constructor. Nor - do they affect constexpr-ness (a constant expression doesn't - throw) or exception-specification (a throw from one of the - dtors would be a double-fault). */ - process_subob_fn (dtor, NULL, NULL, deleted_p, NULL, false, + /* Note that we don't pass down trivial_p; the subobject + destructors don't affect triviality of the constructor. Nor + do they affect constexpr-ness (a constant expression doesn't + throw) or exception-specification (a throw from one of the + dtors would be a double-fault). */ + process_subob_fn (dtor, sfk, NULL, NULL, deleted_p, NULL, false, BINFO_TYPE (base_binfo), /*dtor_from_ctor*/true); } @@ -1608,7 +1611,8 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, member is a constexpr function. */ if (constexpr_p) *constexpr_p = (SFK_CTOR_P (sfk) - || (SFK_ASSIGN_P (sfk) && cxx_dialect >= cxx14)); + || (SFK_ASSIGN_P (sfk) && cxx_dialect >= cxx14) + || (SFK_DTOR_P (sfk) && cxx_dialect >= cxx2a)); bool expected_trivial = type_has_trivial_fn (ctype, sfk); if (trivial_p) @@ -1704,8 +1708,8 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, else if (vec_safe_is_empty (vbases)) /* No virtual bases to worry about. */; else if (ABSTRACT_CLASS_TYPE_P (ctype) && cxx_dialect >= cxx14 - /* DR 1658 specifis that vbases of abstract classes are - ignored for both ctors and dtors. Except DR 2338 + /* DR 1658 specifies that vbases of abstract classes are + ignored for both ctors and dtors. Except DR 2336 overrides that skipping when determing the eh-spec of a virtual destructor. */ && sfk != sfk_virtual_destructor) @@ -2046,7 +2050,8 @@ implicitly_declare_fn (special_function_kind kind, tree type, constexpr_p = false; /* A trivial copy/move constructor is also a constexpr constructor, unless the class has virtual bases (7.1.5p4). */ - else if (trivial_p && cxx_dialect >= cxx11 + else if (trivial_p + && cxx_dialect >= cxx11 && (kind == sfk_copy_constructor || kind == sfk_move_constructor) && !CLASSTYPE_VBASECLASSES (type)) diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index ec0e6a7..54d6b84 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -902,7 +902,13 @@ store_init_value (tree decl, tree init, vec** cleanups, int flags) value = oldval; } } - value = cp_fully_fold_init (value); + /* Don't fold initializers of automatic variables in constexpr functions, + that might fold away something that needs to be diagnosed at constexpr + evaluation time. */ + if (!current_function_decl + || !DECL_DECLARED_CONSTEXPR_P (current_function_decl) + || TREE_STATIC (decl)) + value = cp_fully_fold_init (value); /* Handle aggregate NSDMI in non-constant initializers, too. */ value = replace_placeholders (value, decl); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 10ba0d9..8a0a035 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,23 @@ 2019-10-05 Jakub Jelinek + PR c++/91369 - Implement P0784R7: constexpr new + * g++.dg/cpp0x/constexpr-delete2.C: Adjust expected diagnostics for + c++2a. + * g++.dg/cpp0x/locations1.C: Only expect constexpr ~S() diagnostics + in c++17_down, adjust expected wording. + * g++.dg/cpp1y/constexpr-new.C: Only expect diagnostics in c++17_down. + * g++.dg/cpp2a/constexpr-dtor1.C: New test. + * g++.dg/cpp2a/constexpr-dtor2.C: New test. + * g++.dg/cpp2a/constexpr-dtor3.C: New test. + * g++.dg/cpp2a/constexpr-new1.C: New test. + * g++.dg/cpp2a/constexpr-new2.C: New test. + * g++.dg/cpp2a/constexpr-new3.C: New test. + * g++.dg/cpp2a/constexpr-new4.C: New test. + * g++.dg/cpp2a/feat-cxx2a.C: Add __cpp_constinit and + __cpp_constexpr_dynamic_alloc tests. Tweak __cpp_* tests for c++2a + features to use style like older features, including #ifdef test. + * g++.dg/ext/is_literal_type3.C: New test. + PR tree-optimization/91734 * gcc.dg/pr91734.c: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-delete2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-delete2.C index 4a453a4..999f9b7 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-delete2.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-delete2.C @@ -5,8 +5,9 @@ struct A { ~A(); }; constexpr int f(int i) { return i; } constexpr int g(A* ap) { - return f((delete[] ap, 42)); // { dg-message "" } + return f((delete[] ap, 42)); // { dg-message "" "" { target c++17_down } } } A a; constexpr int i = g(&a); // { dg-error "" } + // { dg-message "in 'constexpr' expansion of" "" { target c++2a } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp0x/locations1.C b/gcc/testsuite/g++.dg/cpp0x/locations1.C index 6de0368..62a72ea 100644 --- a/gcc/testsuite/g++.dg/cpp0x/locations1.C +++ b/gcc/testsuite/g++.dg/cpp0x/locations1.C @@ -11,7 +11,7 @@ struct S { virtual S(); // { dg-error "3:constructors cannot be declared .virtual." } constexpr int s = 1; // { dg-error "3:non-static data member .s. declared .constexpr." } - constexpr ~S(); // { dg-error "3:a destructor cannot be .constexpr." } + constexpr ~S(); // { dg-error "3:'constexpr' destructors only available with" "" { target c++17_down } } }; typedef constexpr int my_int; // { dg-error "9:.constexpr. cannot appear in a typedef declaration" } diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-new.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-new.C index 9e300b9..90cb425 100644 --- a/gcc/testsuite/g++.dg/cpp1y/constexpr-new.C +++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-new.C @@ -4,7 +4,7 @@ constexpr int *f4(bool b) { if (b) { return nullptr; } else { - return new int{42}; // { dg-error "call to non-.constexpr." } + return new int{42}; // { dg-error "call to non-.constexpr." "" { target c++17_down } } } } static_assert(f4(true) == nullptr, ""); diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor1.C new file mode 100644 index 0000000..a2ea6bf --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor1.C @@ -0,0 +1,9 @@ +// P0784R7 +// { dg-do compile { target c++11 } } + +struct S +{ + constexpr S () : s (0) {} + constexpr ~S () {} // { dg-error "'constexpr' destructors only available with" "" { target c++17_down } } + int s; +}; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C new file mode 100644 index 0000000..397cfb0 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C @@ -0,0 +1,66 @@ +// P0784R7 +// { dg-do compile { target c++2a } } + +struct S +{ + constexpr S () : r (4), s (3) { --r; s -= 2; } + constexpr ~S () { if (s == 1) s = 0; else asm (""); if (s == 0 && r == 3) r = 0; else asm (""); } + int r, s; +}; +struct T : public S +{ + constexpr T () : t (2) {} + int t; + S u; +}; +struct U : public S +{ + constexpr U (int x) : u (x) {} + constexpr ~U () = default; + int u; + S v; +}; + +constexpr S a; +constexpr T b; +constexpr U c = 3; +static_assert (a.s == 1 && a.r == 3); +static_assert (b.s == 1 && b.r == 3 && b.t == 2 && b.u.s == 1 && b.u.r == 3); +static_assert (c.s == 1 && c.r == 3 && c.u == 3 && c.v.s == 1 && c.v.r == 3); + +void +foo () +{ + static constexpr S d; + static constexpr T e; + static constexpr U f = 4; + static_assert (d.s == 1 && d.r == 3); + static_assert (e.s == 1 && e.r == 3 && e.t == 2 && e.u.s == 1 && e.u.r == 3); + static_assert (f.s == 1 && f.r == 3 && f.u == 4 && f.v.s == 1 && f.v.r == 3); + if (1) + { + constexpr S g; + constexpr T h; + constexpr U i = 5; + static_assert (g.s == 1 && g.r == 3); + static_assert (h.s == 1 && h.r == 3 && h.t == 2 && h.u.s == 1 && h.u.r == 3); + static_assert (i.s == 1 && i.r == 3 && i.u == 5 && i.v.s == 1 && i.v.r == 3); + } +} + +constexpr bool +bar () +{ + S j; + T k; + U l = 6; + if (j.s != 1 || j.r != 3) + return false; + if (k.s != 1 || k.r != 3 || k.t != 2 || k.u.s != 1 || k.u.r != 3) + return false; + if (l.s != 1 || l.r != 3 || l.u != 6 || l.v.s != 1 || l.v.r != 3) + return false; + return true; +} + +static_assert (bar ()); diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C new file mode 100644 index 0000000..dcfa4e6 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C @@ -0,0 +1,185 @@ +// P0784R7 +// { dg-do compile { target c++2a } } + +struct S +{ + constexpr S () : s (0) {} + constexpr ~S () {} + int s; +}; +struct T // { dg-message "'T' is not literal because" } +{ // { dg-message "'T' does not have 'constexpr' destructor" "" { target *-*-* } .-1 } + constexpr T () : t (0) {} + ~T () {} // { dg-message "defaulted destructor calls non-'constexpr' 'T::~T\\(\\)'" } + int t; +}; +struct U : public S +{ + constexpr U () : u (0) {} + constexpr ~U () = default; // { dg-error "explicitly defaulted function 'constexpr U::~U\\(\\)' cannot be declared 'constexpr' because the implicit declaration is not 'constexpr'" } + int u; + T t; +}; +struct V : virtual public S +{ + V () : v (0) {} + constexpr ~V () = default; // { dg-error "explicitly defaulted function 'constexpr V::~V\\(\\)' cannot be declared 'constexpr' because the implicit declaration is not 'constexpr'" } + int v; +}; +struct W0 +{ + constexpr W0 () : w (0) {} + constexpr W0 (int x) : w (x) {} + constexpr ~W0 () { if (w == 5) asm (""); w = 3; } + int w; +}; +struct W1 +{ + constexpr W1 () : w (0) {} + constexpr W1 (int x) : w (x) {} + constexpr ~W1 () { if (w == 5) asm (""); w = 3; } // { dg-error "inline assembly is not a constant expression" } + // { dg-message "only unevaluated inline assembly is allowed in a 'constexpr' function" "" { target *-*-* } .-1 } + int w; +}; +struct W2 +{ + constexpr W2 () : w (0) {} + constexpr W2 (int x) : w (x) {} + constexpr ~W2 () { if (w == 5) asm (""); w = 3; } // { dg-error "inline assembly is not a constant expression" } + // { dg-message "only unevaluated inline assembly is allowed in a 'constexpr' function" "" { target *-*-* } .-1 } + int w; +}; +struct W3 +{ + constexpr W3 () : w (0) {} + constexpr W3 (int x) : w (x) {} + constexpr ~W3 () { if (w == 5) asm (""); w = 3; } // { dg-error "inline assembly is not a constant expression" } + // { dg-message "only unevaluated inline assembly is allowed in a 'constexpr' function" "" { target *-*-* } .-1 } + int w; +}; +struct W4 +{ + constexpr W4 () : w (0) {} + constexpr W4 (int x) : w (x) {} + constexpr ~W4 () { if (w == 5) asm (""); w = 3; } // { dg-error "inline assembly is not a constant expression" } + // { dg-message "only unevaluated inline assembly is allowed in a 'constexpr' function" "" { target *-*-* } .-1 } + int w; +}; +struct W5 +{ + constexpr W5 () : w (0) {} + constexpr W5 (int x) : w (x) {} + constexpr ~W5 () { if (w == 5) asm (""); w = 3; } // { dg-error "inline assembly is not a constant expression" } + // { dg-message "only unevaluated inline assembly is allowed in a 'constexpr' function" "" { target *-*-* } .-1 } + int w; +}; +struct W6 +{ + constexpr W6 () : w (0) {} + constexpr W6 (int x) : w (x) {} + constexpr ~W6 () { if (w == 5) asm (""); w = 3; } // { dg-error "inline assembly is not a constant expression" } + // { dg-message "only unevaluated inline assembly is allowed in a 'constexpr' function" "" { target *-*-* } .-1 } + int w; +}; +struct W7 +{ + constexpr W7 () : w (0) {} + constexpr W7 (int x) : w (x) {} + constexpr ~W7 () { if (w == 5) asm (""); w = 3; } // { dg-error "inline assembly is not a constant expression" } + // { dg-message "only unevaluated inline assembly is allowed in a 'constexpr' function" "" { target *-*-* } .-1 } + int w; +}; +struct W8 +{ + constexpr W8 () : w (0) {} + constexpr W8 (int x) : w (x) {} + constexpr ~W8 () { if (w == 5) asm (""); w = 3; } // { dg-error "inline assembly is not a constant expression" } + // { dg-message "only unevaluated inline assembly is allowed in a 'constexpr' function" "" { target *-*-* } .-1 } + int w; +}; +struct X : public T +{ + constexpr X () : x (0) {} + constexpr ~X () = default; // { dg-error "explicitly defaulted function 'constexpr X::~X\\(\\)' cannot be declared 'constexpr' because the implicit declaration is not 'constexpr'" } + int x; +}; +constexpr S s; +constexpr T t; // { dg-error "the type 'const T' of 'constexpr' variable 't' is not literal" } +constexpr W0 w1; +constexpr W0 w2 = 12; +constexpr W1 w3 = 5; // { dg-message "in 'constexpr' expansion of" } +constexpr W0 w4[3] = { 1, 2, 3 }; +constexpr W2 w5[3] = { 4, 5, 6 }; // { dg-message "in 'constexpr' expansion of" } + +void +f1 () +{ + constexpr S s2; + constexpr W0 w6; + constexpr W0 w7 = 12; + constexpr W3 w8 = 5; // { dg-message "in 'constexpr' expansion of" } + constexpr W0 w9[3] = { 1, 2, 3 }; + constexpr W4 w10[3] = { 4, 5, 6 }; // { dg-message "in 'constexpr' expansion of" } +} + +constexpr int +f2 () +{ + constexpr S s3; + constexpr W0 w11; + constexpr W0 w12 = 12; + constexpr W5 w13 = 5; // { dg-message "in 'constexpr' expansion of" } + constexpr W0 w14[3] = { 1, 2, 3 }; + constexpr W6 w15[3] = { 4, 5, 6 }; // { dg-message "in 'constexpr' expansion of" } + return 0; +} + +constexpr int +f3 () +{ + S s3; + W0 w11; + W0 w12 = 12; + W0 w14[3] = { 1, 2, 3 }; + return 0; +} + +constexpr int x3 = f3 (); + +constexpr int +f4 () +{ + W7 w13 = 5; + return 0; +} + +constexpr int x4 = f4 (); // { dg-message "in 'constexpr' expansion of" } + +constexpr int +f5 () +{ + W8 w15[3] = { 4, 5, 6 }; // { dg-message "in 'constexpr' expansion of" } + return 0; +} + +constexpr int x5 = f5 (); // { dg-message "in 'constexpr' expansion of" } + +void +f6 () +{ + constexpr T t2; // { dg-error "the type 'const T' of 'constexpr' variable 't2' is not literal" } +} + +constexpr int +f7 () +{ + constexpr T t3; // { dg-error "the type 'const T' of 'constexpr' variable 't3' is not literal" } + return 0; +} + +constexpr int +f8 () +{ + T t4; // { dg-error "variable 't4' of non-literal type 'T' in 'constexpr' function" } + return 0; +} diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C new file mode 100644 index 0000000..873edd4 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C @@ -0,0 +1,39 @@ +// P0784R7 +// { dg-do compile { target c++2a } } + +struct S { constexpr S () : s (5) {} constexpr S (int x) : s (x) {} int s; }; + +constexpr bool +foo () +{ + int r = 0; + S *p = new S (); + p->s += 3; + r += p->s; + delete p; + p = new S (12); + p->s = p->s * 2; + r += p->s; + delete p; + int *q = new int; + *q = 25; + r += *q; + delete q; + q = new int (1); + r += *q; + if (!q) + return false; + delete q; + q = new int[5]{1,2,3,4,5}; + r += q[0] + q[4]; + delete[] q; + q = new int[4]; + q[0] = 6; + q[1] = 7; + q[3] = 8; + r += q[0] + q[1] + q[3]; + delete[] q; + return r == 5 + 3 + 2 * 12 + 25 + 1 + 1 + 5 + 6 + 7 + 8; +} +constexpr bool a = foo (); +static_assert (a); diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C new file mode 100644 index 0000000..be54962 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C @@ -0,0 +1,21 @@ +// P0784R7 +// { dg-do compile { target c++2a } } + +template +constexpr bool +foo (const char (&x)[N]) +{ + int **p = new int *[N]; + for (int i = 0; i < N; i++) + p[i] = new int (x[i]); + for (int i = 0; i < N; i++) + if (*p[i] != x[i]) + return false; + for (int i = 0; i < N; ++i) + delete p[i]; + delete[] p; + return true; +} + +constexpr bool a = foo ("foobar"); +static_assert (a); diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C new file mode 100644 index 0000000..3380df7 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C @@ -0,0 +1,73 @@ +// P0784R7 +// { dg-do compile { target c++2a } } + +constexpr int * +f1 () +{ + return new int (2); // { dg-error "is not a constant expression because it refers to a result of" } +} + +constexpr auto v1 = f1 (); + +constexpr bool +f2 () +{ + int *p = new int (3); // { dg-error "is not a constant expression because allocated storage has not been deallocated" } + return false; +} + +constexpr auto v2 = f2 (); + +constexpr bool +f3 () +{ + int *p = new int (3); + int *q = p; + delete p; + delete q; // { dg-error "deallocation of already deallocated storage" } + return false; +} + +constexpr auto v3 = f3 (); // { dg-message "in 'constexpr' expansion of" } + +constexpr bool +f4 (int *p) +{ + delete p; // { dg-error "deallocation of storage that was not previously allocated" } + return false; +} + +int q; +constexpr auto v4 = f4 (&q); // { dg-message "in 'constexpr' expansion of" } + +constexpr bool +f5 () +{ + int *p = new int; // { dg-message "allocated here" } + return *p == 1; +} + +constexpr auto v5 = f5 (); // { dg-error "the content of uninitialized storage is not usable in a constant expression" } + // { dg-message "in 'constexpr' expansion of" "" { target *-*-* } .-1 } + +constexpr bool +f6 () +{ + int *p = new int (2); // { dg-message "allocated here" } + int *q = p; + delete p; + return *q == 2; +} + +constexpr auto v6 = f6 (); // { dg-error "use of allocated storage after deallocation in a constant expression" } + // { dg-message "in 'constexpr' expansion of" "" { target *-*-* } .-1 } + +constexpr int * +f7 () +{ + int *p = new int (2); // { dg-error "is not a constant expression because it refers to a result of" } + delete p; + return p; +} + +constexpr auto v7 = f7 (); diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C new file mode 100644 index 0000000..6cac983 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C @@ -0,0 +1,29 @@ +// P0784R7 +// { dg-do compile { target c++2a } } + +struct S +{ + constexpr S () : s (0) { s++; } + constexpr S (int x) : s (x) { s += 2; } + constexpr ~S () { if (s != 35) asm (""); s = 5; } + int s; +}; + +constexpr bool +foo () +{ + S *p = new S (7); + if (p->s != 9) return false; + p->s = 35; + delete p; + p = new S[3] { 11, 13, 15 }; + if (p[0].s != 13 || p[1].s != 15 || p[2].s != 17) return false; + p[0].s = 35; + p[2].s = 35; + p[1].s = 35; + delete[] p; + return true; +} + +constexpr bool a = foo (); +static_assert (a); diff --git a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C index 086109a..2b9cfd0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C +++ b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C @@ -430,16 +430,34 @@ // C++20 features -#if __cpp_conditional_explicit != 201806 -# error "__cpp_conditional_explicit != 201806" +#ifndef __cpp_conditional_explicit +# error "__cpp_conditional_explicit" +#elif __cpp_conditional_explicit != 201806 +# error "__cpp_conditional_explicit != 201806" #endif -#if __cpp_nontype_template_parameter_class != 201806 -# error "__cpp_nontype_template_parameter_class != 201806" +#ifndef __cpp_nontype_template_parameter_class +# error "__cpp_nontype_template_parameter_class" +#elif __cpp_nontype_template_parameter_class != 201806 +# error "__cpp_nontype_template_parameter_class != 201806" #endif -#if __cpp_impl_destroying_delete != 201806 -# error "__cpp_impl_destroying_delete != 201806" +#ifndef __cpp_impl_destroying_delete +# error "__cpp_impl_destroying_delete" +#elif __cpp_impl_destroying_delete != 201806 +# error "__cpp_impl_destroying_delete != 201806" +#endif + +#ifndef __cpp_constinit +# error "__cpp_constinit" +#elif __cpp_constinit != 201907 +# error "__cpp_constinit != 201907" +#endif + +#ifndef __cpp_constexpr_dynamic_alloc +# error "__cpp_constexpr_dynamic_alloc" +#elif __cpp_constexpr_dynamic_alloc != 201907 +# error "__cpp_constexpr_dynamic_alloc != 201907" #endif #ifdef __has_cpp_attribute @@ -484,8 +502,6 @@ # error "__has_cpp_attribute" #endif -// C++2A features: - #ifndef __cpp_char8_t # error "__cpp_char8_t" #elif __cpp_char8_t != 201811 diff --git a/gcc/testsuite/g++.dg/ext/is_literal_type3.C b/gcc/testsuite/g++.dg/ext/is_literal_type3.C new file mode 100644 index 0000000..22d8494 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/is_literal_type3.C @@ -0,0 +1,26 @@ +// { dg-do compile { target c++11 } } + +struct S { + constexpr S () : n{} { } + ~S () { n = 1; } + int n; +}; + +static_assert(!__is_literal_type(S), ""); + +#ifdef __cpp_constexpr_dynamic_alloc +struct T { + constexpr T () : n{} { } + constexpr ~T () { n = 1; } + int n; +}; + +static_assert(__is_literal_type(T), ""); + +struct U : public T { + constexpr U () : u{} { } + int u; +}; + +static_assert(__is_literal_type(U), ""); +#endif -- cgit v1.1 From d56cbcc0a2ae508afbbc1c3d6a6b925971ff2d6e Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 5 Oct 2019 08:05:44 +0000 Subject: [Darwin] Amend section for constants with reloactions. Darwin's linker doesn't like text section relocations (they require special enabling). At least, the Fortran FE seems to generate cases where the initialiser for a pointer constant can need a relocation. We can handle this by special-casing SECCAT_RODATA when the relocation is present by placing the constant in the .const_data section. gcc/ChangeLog: 2019-10-05 Iain Sandoe PR target/59888 * config/darwin.c (darwin_rodata_section): Add relocation flag, choose const_data section for constants with relocations. (machopic_select_section): Pass relocation flag to darwin_rodata_section (). From-SVN: r276623 --- gcc/ChangeLog | 8 ++++++++ gcc/config/darwin.c | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 171d554..e855712 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-10-05 Iain Sandoe + + PR target/59888 + * config/darwin.c (darwin_rodata_section): Add relocation flag, + choose const_data section for constants with relocations. + (machopic_select_section): Pass relocation flag to + darwin_rodata_section (). + 2019-10-05 Jakub Jelinek PR tree-optimization/91734 diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 3a1be5a..2fb9c56 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1251,12 +1251,13 @@ darwin_mark_decl_preserved (const char *name) } static section * -darwin_rodata_section (int use_coal, bool zsize) +darwin_rodata_section (int use_coal, bool zsize, int reloc) { return (use_coal ? darwin_sections[const_coal_section] : (zsize ? darwin_sections[zobj_const_section] - : darwin_sections[const_section])); + : reloc ? darwin_sections[const_data_section] + : darwin_sections[const_section])); } static section * @@ -1549,7 +1550,7 @@ machopic_select_section (tree decl, case SECCAT_RODATA: case SECCAT_SRODATA: - base_section = darwin_rodata_section (use_coal, zsize); + base_section = darwin_rodata_section (use_coal, zsize, reloc); break; case SECCAT_RODATA_MERGE_STR: -- cgit v1.1 From 980f185ce3ba6d532530ce0f23bfb6e30320fd8a Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Sat, 5 Oct 2019 08:17:55 +0000 Subject: re PR fortran/91926 (assumed rank optional) 2019-10-05 Paul Thomas PR fortran/91926 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the assignment of the attribute field to account correctly for an assumed shape dummy. Assign separately to the gfc and cfi descriptors since the atribute can be different. Add btanch to correctly handle missing optional dummies. 2019-10-05 Paul Thomas PR fortran/91926 * gfortran.dg/ISO_Fortran_binding_13.f90 : New test. * gfortran.dg/ISO_Fortran_binding_13.c : Additional source. * gfortran.dg/ISO_Fortran_binding_14.f90 : New test. 2019-10-05 Paul Thomas PR fortran/91926 * runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Do not modify the bounds and offset for CFI_other. From-SVN: r276624 --- gcc/fortran/ChangeLog | 11 ++++- gcc/fortran/trans-expr.c | 48 +++++++++++++++++++--- gcc/testsuite/ChangeLog | 7 ++++ gcc/testsuite/gfortran.dg/ISO_Fortran_binding_13.c | 12 ++++++ .../gfortran.dg/ISO_Fortran_binding_13.f90 | 39 ++++++++++++++++++ .../gfortran.dg/ISO_Fortran_binding_14.f90 | 41 ++++++++++++++++++ 6 files changed, 151 insertions(+), 7 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/ISO_Fortran_binding_13.c create mode 100644 gcc/testsuite/gfortran.dg/ISO_Fortran_binding_13.f90 create mode 100644 gcc/testsuite/gfortran.dg/ISO_Fortran_binding_14.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index dc1e19a..2da44e0 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,12 @@ +2019-10-05 Paul Thomas + + PR fortran/91926 + * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the + assignment of the attribute field to account correctly for an + assumed shape dummy. Assign separately to the gfc and cfi + descriptors since the atribute can be different. Add btanch to + correctly handle missing optional dummies. + 2019-10-04 Steven G. Kargl PR fortran.91959 @@ -65,7 +74,7 @@ character types are possible it can get the character length from gfc_expr for character literals. (gfc_dummy_typename): New functionfor gfc_typespec *, if no character - length is present the character type is assumed and the appropriate + length is present the character type is assumed and the appropriate string is return otherwise it calls gfc_typename for gfc_typespec *. (gfc_typespec): for character types construct the type name with length and kind (if it is not default kind). diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 61db4e3..965ab77 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -5202,7 +5202,9 @@ gfc_conv_gfc_desc_to_cfi_desc (gfc_se *parmse, gfc_expr *e, gfc_symbol *fsym) tree gfc_desc_ptr; tree type; tree cond; + tree desc_attr; int attribute; + int cfi_attribute; symbol_attribute attr = gfc_expr_attr (e); stmtblock_t block; @@ -5211,12 +5213,20 @@ gfc_conv_gfc_desc_to_cfi_desc (gfc_se *parmse, gfc_expr *e, gfc_symbol *fsym) attribute = 2; if (!e->rank || gfc_get_full_arrayspec_from_expr (e)) { - if (fsym->attr.pointer) + if (attr.pointer) attribute = 0; - else if (fsym->attr.allocatable) + else if (attr.allocatable) attribute = 1; } + /* If the formal argument is assumed shape and neither a pointer nor + allocatable, it is unconditionally CFI_attribute_other. */ + if (fsym->as->type == AS_ASSUMED_SHAPE + && !fsym->attr.pointer && !fsym->attr.allocatable) + cfi_attribute = 2; + else + cfi_attribute = attribute; + if (e->rank != 0) { parmse->force_no_tmp = 1; @@ -5283,11 +5293,12 @@ gfc_conv_gfc_desc_to_cfi_desc (gfc_se *parmse, gfc_expr *e, gfc_symbol *fsym) parmse->expr, attr); } - /* Set the CFI attribute field. */ - tmp = gfc_conv_descriptor_attribute (parmse->expr); + /* Set the CFI attribute field through a temporary value for the + gfc attribute. */ + desc_attr = gfc_conv_descriptor_attribute (parmse->expr); tmp = fold_build2_loc (input_location, MODIFY_EXPR, - void_type_node, tmp, - build_int_cst (TREE_TYPE (tmp), attribute)); + void_type_node, desc_attr, + build_int_cst (TREE_TYPE (desc_attr), cfi_attribute)); gfc_add_expr_to_block (&parmse->pre, tmp); /* Now pass the gfc_descriptor by reference. */ @@ -5305,6 +5316,12 @@ gfc_conv_gfc_desc_to_cfi_desc (gfc_se *parmse, gfc_expr *e, gfc_symbol *fsym) gfor_fndecl_gfc_to_cfi, 2, tmp, gfc_desc_ptr); gfc_add_expr_to_block (&parmse->pre, tmp); + /* Now set the gfc descriptor attribute. */ + tmp = fold_build2_loc (input_location, MODIFY_EXPR, + void_type_node, desc_attr, + build_int_cst (TREE_TYPE (desc_attr), attribute)); + gfc_add_expr_to_block (&parmse->pre, tmp); + /* The CFI descriptor is passed to the bind_C procedure. */ parmse->expr = cfi_desc_ptr; @@ -5325,6 +5342,25 @@ gfc_conv_gfc_desc_to_cfi_desc (gfc_se *parmse, gfc_expr *e, gfc_symbol *fsym) tmp = build_call_expr_loc (input_location, gfor_fndecl_cfi_to_gfc, 2, gfc_desc_ptr, tmp); gfc_prepend_expr_to_block (&parmse->post, tmp); + + /* Deal with an optional dummy being passed to an optional formal arg + by finishing the pre and post blocks and making their execution + conditional on the dummy being present. */ + if (fsym->attr.optional && e->expr_type == EXPR_VARIABLE + && e->symtree->n.sym->attr.optional) + { + cond = gfc_conv_expr_present (e->symtree->n.sym); + tmp = fold_build2 (MODIFY_EXPR, void_type_node, + cfi_desc_ptr, + build_int_cst (pvoid_type_node, 0)); + tmp = build3_v (COND_EXPR, cond, + gfc_finish_block (&parmse->pre), tmp); + gfc_add_expr_to_block (&parmse->pre, tmp); + tmp = build3_v (COND_EXPR, cond, + gfc_finish_block (&parmse->post), + build_empty_stmt (input_location)); + gfc_add_expr_to_block (&parmse->post, tmp); + } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8a0a035..e40a167 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-10-05 Paul Thomas + + PR fortran/91926 + * gfortran.dg/ISO_Fortran_binding_13.f90 : New test. + * gfortran.dg/ISO_Fortran_binding_13.c : Additional source. + * gfortran.dg/ISO_Fortran_binding_14.f90 : New test. + 2019-10-05 Jakub Jelinek PR c++/91369 - Implement P0784R7: constexpr new diff --git a/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_13.c b/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_13.c new file mode 100644 index 0000000..1ac9fc8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_13.c @@ -0,0 +1,12 @@ +/* Test the fix for PR91926. */ + +/* Contributed by José Rui Faustino de Sousa */ + +#include + +int ifb_echo(void*); + +int ifb_echo(void *this) +{ + return this == NULL ? 1 : 2; +} diff --git a/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_13.f90 b/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_13.f90 new file mode 100644 index 0000000..132a97c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_13.f90 @@ -0,0 +1,39 @@ +! { dg-do run { target c99_runtime } } +! { dg-additional-sources ISO_Fortran_binding_13.c } +! +! Test the fix for PR91926. The additional source is the main program. +! +! Contributed by José Rui Faustino de Sousa +! +program ifb_p + + implicit none + + integer :: i = 42 + + interface + integer function ifb_echo_aux(this) bind(c, name="ifb_echo") + implicit none + type(*), dimension(..), & ! removing assumed rank solves segmentation fault + optional, intent(in) :: this + end function ifb_echo_aux + end interface + + if (ifb_echo_aux() .ne. 1) STOP 1 ! worked + if (ifb_echo() .ne. 1) stop 2 ! segmentation fault + if (ifb_echo_aux(i) .ne. 2) stop 3 ! worked + if (ifb_echo(i) .ne. 2) stop 4 ! worked + + stop + +contains + + integer function ifb_echo(this) + type(*), dimension(..), & + optional, intent(in) :: this + + ifb_echo = ifb_echo_aux(this) + return + end function ifb_echo + +end program ifb_p diff --git a/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_14.f90 b/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_14.f90 new file mode 100644 index 0000000..388c543 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_14.f90 @@ -0,0 +1,41 @@ +! { dg-do run } +! +! Correct an error in the eveluation of the CFI descriptor attribute for +! the case where the bind_C formal argument is not an assumed shape array +! and not allocatable or pointer. +! +! Contributed by Gilles Gouaillardet +! +MODULE FOO +INTERFACE +SUBROUTINE dummy(buf) BIND(C, name="sync") +type(*), dimension(..) :: buf +END SUBROUTINE +END INTERFACE +END MODULE + +PROGRAM main + USE FOO + IMPLICIT NONE + integer(8) :: before, after + + INTEGER, parameter :: n = 1 + + INTEGER, ALLOCATABLE :: buf(:) + INTEGER :: buf2(n) + INTEGER :: i + + ALLOCATE(buf(n)) + before = LOC(buf(1)) + CALL dummy (buf) + after = LOC(buf(1)) + + if (before .NE. after) stop 1 + + before = LOC(buf2(1)) + CALL dummy (buf) + after = LOC(buf2(1)) + + if (before .NE. after) stop 2 + +END PROGRAM -- cgit v1.1 From 74e4fb1361b89fcca2b713ac79832934a7b3030b Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Sat, 5 Oct 2019 14:27:26 +0000 Subject: re PR fortran/91497 (-Wconversion warns when doing explicit type conversion) 2019-10-05 Steven G. Kargl PR fortran/91497 * gfortran.dg/pr91497.f90: Run on i?86-*-* and x86_64-*-* only. From-SVN: r276626 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/pr91497.f90 | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e40a167..255fce5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-05 Steven G. Kargl + + PR fortran/91497 + * gfortran.dg/pr91497.f90: Run on i?86-*-* and x86_64-*-* only. + 2019-10-05 Paul Thomas PR fortran/91926 diff --git a/gcc/testsuite/gfortran.dg/pr91497.f90 b/gcc/testsuite/gfortran.dg/pr91497.f90 index aa06a49..d324b3b 100644 --- a/gcc/testsuite/gfortran.dg/pr91497.f90 +++ b/gcc/testsuite/gfortran.dg/pr91497.f90 @@ -1,4 +1,4 @@ -! { dg-do compile } +! { dg-do compile { target { i?86-*-* x86_64-*-* } } } ! { dg-options "-Wall" } ! Code contributed by Manfred Schwarb ! PR fortran/91497 -- cgit v1.1 From 2345fe52da74dac58173489e844647d3a94f4ca8 Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Sat, 5 Oct 2019 15:23:26 +0000 Subject: re PR fortran/47054 (Compilation error when cray pointers are declared in both host and internal subroutines) 2019-10-05 Steven G. Kargl PR fortran/47045 * decl.c (variable_decl): Do not search parent namespace for symbol. 2019-10-05 Steven G. Kargl PR fortran/47045 * gfortran.dg/pr47054_1.f90: New test * gfortran.dg/pr47054_2.f90: Ditto. From-SVN: r276627 --- gcc/fortran/ChangeLog | 5 + gcc/fortran/decl.c | 2 +- gcc/testsuite/ChangeLog | 14167 ++++++++++++++++++++++++++++++ gcc/testsuite/gfortran.dg/pr47054_1.f90 | 15 + gcc/testsuite/gfortran.dg/pr47054_2.f90 | 41 + 5 files changed, 14229 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/pr47054_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/pr47054_2.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2da44e0..84ee818 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2019-10-05 Steven G. Kargl + + PR fortran/47045 + * decl.c (variable_decl): Do not search parent namespace for symbol. + 2019-10-05 Paul Thomas PR fortran/91926 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index d439906..9b604c8 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -2682,7 +2682,7 @@ variable_decl (int elem) then we want to set the type & bail out. */ if (flag_cray_pointer && !gfc_comp_struct (gfc_current_state ())) { - gfc_find_symbol (name, gfc_current_ns, 1, &sym); + gfc_find_symbol (name, gfc_current_ns, 0, &sym); if (sym != NULL && sym->attr.cray_pointee) { m = MATCH_YES; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 255fce5..2397eec 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,14172 @@ 2019-10-05 Steven G. Kargl + PR fortran/47045 + * gfortran.dg/pr47054_1.f90: New test + * gfortran.dg/pr47054_2.f90: Ditto. + +2019-10-05 Steven G. Kargl + + PR fortran/91497 + * gfortran.dg/pr91497.f90: Run on i?86-*-* and x86_64-*-* only. + +2019-10-05 Paul Thomas + + PR fortran/91926 + * gfortran.dg/ISO_Fortran_binding_13.f90 : New test. + * gfortran.dg/ISO_Fortran_binding_13.c : Additional source. + * gfortran.dg/ISO_Fortran_binding_14.f90 : New test. + +2019-10-05 Jakub Jelinek + + PR c++/91369 - Implement P0784R7: constexpr new + * g++.dg/cpp0x/constexpr-delete2.C: Adjust expected diagnostics for + c++2a. + * g++.dg/cpp0x/locations1.C: Only expect constexpr ~S() diagnostics + in c++17_down, adjust expected wording. + * g++.dg/cpp1y/constexpr-new.C: Only expect diagnostics in c++17_down. + * g++.dg/cpp2a/constexpr-dtor1.C: New test. + * g++.dg/cpp2a/constexpr-dtor2.C: New test. + * g++.dg/cpp2a/constexpr-dtor3.C: New test. + * g++.dg/cpp2a/constexpr-new1.C: New test. + * g++.dg/cpp2a/constexpr-new2.C: New test. + * g++.dg/cpp2a/constexpr-new3.C: New test. + * g++.dg/cpp2a/constexpr-new4.C: New test. + * g++.dg/cpp2a/feat-cxx2a.C: Add __cpp_constinit and + __cpp_constexpr_dynamic_alloc tests. Tweak __cpp_* tests for c++2a + features to use style like older features, including #ifdef test. + * g++.dg/ext/is_literal_type3.C: New test. + + PR tree-optimization/91734 + * gcc.dg/pr91734.c: New test. + +2019-10-04 Joseph Myers + + PR c/82752 + * gcc.dg/format/c2x-strftime-1.c: New test. + +2019-10-04 Martin Sebor + + PR middle-end/91977 + * gcc.dg/Wstringop-overflow-18.c: New test. + +2019-10-04 Martin Sebor + + * gcc.dg/Wstringop-overflow-17.c: New test. + +2019-10-04 Steven G. Kargl + + PR fortran.91959 + * gfortran.dg/pr91959.f90: New test. + +2019-10-04 Rafael Tsuha + + * gcc.dg/sinhovercosh-1.c: New test. + +2019-10-04 Joseph Myers + + * gcc.dg/c11-builtins-1.c, gcc.dg/c2x-builtins-1.c, + gcc.dg/dfp/c2x-builtins-dfp-1.c: New tests. + +2019-10-04 Mark Eggleston + + * gfortran.dg/auto_in_equiv_1.f90: Replaced. + * gfortran.dg/auto_in_equiv_2.f90: Replaced. + * gfortran.dg/auto_in_equiv_3.f90: Deleted. + +2019-10-04 Richard Sandiford + + * gcc.target/aarch64/torture/simd-abi-8.c: Use -mlittle-endian. + Check that there are no Q register saves or restores. + +2019-10-04 Richard Biener + + * gcc.c-torture/execute/loop-3.c: Fix undefined behavior. + +2019-10-04 Yuliang Wang + + * gcc.target/aarch64/sve2/shracc_1.c: Tighten scan-assembler-nots + to avoid matching scalar code. + +2019-10-04 Tobias Burnus + + * gfortran.dg/use_without_only_1.f90: Update column num in dg-warning. + +2019-10-04 Jakub Jelinek + + PR c++/71504 + * g++.dg/cpp0x/constexpr-array21.C: New test. + * g++.dg/cpp1y/constexpr-array7.C: New test. + * g++.dg/cpp1z/constexpr-array1.C: New test. + +2019-10-04 Jason Merrill + + PR c++/71504 + * g++.dg/cpp0x/constexpr-array20.C: New test. + +2019-10-04 Jakub Jelinek + + PR c++/91974 + * g++.dg/cpp1z/eval-order5.C: New test. + +2019-10-03 Steven G. Kargl + + PR fortran/91497 + * gfortran.dg/pr91497.f90: New test. + +2019-10-03 Jan Hubicka + + * g++.dg/tree-ssa/pr61034.C: Add --param max-inline-insns-single-O2=200. + +2019-10-03 Dragan Mladjenovic + + PR target/91769 + * gcc.target/mips/pr91769.c: New test. + +2019-10-03 Rainer Orth + + * g++.dg/cpp0x/gen-attrs-67.C: Expect constructor priorities error + on any !init_priority target. + +2019-10-03 Thomas Koenig + + PR fortran/84487 + * gfortran.dg/typebound_call_22.f03: xfail. + +2019-10-03 Mark Eggleston + + * gfortran.dg/bad_operands.f90: New test. + * gfortran.dg/character mismatch.f90: New test. + * gfortran.dg/compare_interfaces.f90: New test. + * gfortran.dg/hollerith_to_char_parameter_1.f90: New test. + * gfortran.dg/hollerith_to_char_parameter_2.f90: New test. + * gfortran.dg/widechar_intrinsics_1.f90: Checked for specific character + type names instead of "Type of argument". + * gfortran.dg/widechar_intrinsics_2.f90: Checked for specific character + type names instead of "Type of argument". + * gfortran.dg/widechar_intrinsics_3.f90: Checked for specific character + type names instead of "Type of argument". + +2019-10-02 Joseph Myers + + * gcc.dg/cr-decimal-dig-2.c: New test. + * gcc.dg/limits-width-2.c: New test. Based on limits-width-1.c. + * gcc.dg/stdint-width-2.c: New test. Based on stdint-width-1.c. + +2019-10-03 Paolo Carlini + + * g++.dg/diagnostic/integral-array-size-1.C: New. + * g++.dg/cpp0x/alias-decl-1.C: Test location(s) too. + * g++.dg/init/new43.C: Likewise. + * g++.dg/lookup/friend12.C: Likewise. + * g++.dg/lookup/pr79766.C: Likewise. + * g++.dg/lookup/pr84375.C: Likewise. + * g++.dg/other/new-size-type.C: Likewise. + +2019-10-03 Jakub Jelinek + + * g++.dg/ext/constexpr-attr-cleanup1.C: New test. + +2019-10-02 Martin Sebor + + PR tree-optimization/80936 + * gcc.dg/Wnonnull-2.c: New test. + * gcc.dg/Wnonnull-3.c: New test. + * gcc.dg/nonnull-3.c: Expect more warnings. + +2019-10-02 Steven G. Kargl + + PR fortran/91784 + * gfortran.dg/pr91784.f90: New test. + +2019-10-02 Steven G. Kargl + + PR fortran/91785 + * gfortran.dg/pr91785.f90: New test. + +2019-10-02 Steven G. Kargl + + PR fortran/91942 + * gfortran.dg/pr91587.f90: Update dg-error regex. + * gfortran.dg/pr91942.f90: New test. + +2019-10-02 Steven G. Kargl + + PR fortran/91943 + gfortran.dg/pr91943.f90 + +2019-10-02 Jan Hubicka + + * g++.dg/tree-ssa/pr53844.C: Add -fno-inline-functions --param + max-inline-insns-single-O2=200. + * gcc.c-torture/execute/builtins/builtins.exp: Add + -fno-inline-functions to additional_flags. + * gcc.dg/ipa/inline-7.c: Add -fno-inline-functions. + * gcc.dg/optimize-bswapsi-5.c: Add -fno-inline-functions. + * gcc.dg/tree-ssa/ssa-thread-12.c: Add --param + early-inlining-insns-O2=14 -fno-inline-functions; revert previous + change. + * gcc.dg/winline-3.c: Use --param max-inline-insns-single-O2=1 + --param inline-min-speedup-O2=100 + instead of --param max-inline-insns-single=1 --param + inline-min-speedup=100 + +2019-10-02 Alexander Monakov + + PR rtl-optimization/87047 + * gcc.dg/pr87047.c: New test. + +2019-10-02 Martin Jambor + + PR testsuite/91842 + * gcc.dg/ipa/ipa-sra-19.c: Skip on powerpc. + +2019-10-02 Eric Botcazou + + * gnat.dg/opt82.adb: New test. + * gnat.dg/opt82_pkg.ads: New helper. + +2019-10-02 Richard Sandiford + + * gcc.target/mips/call-clobbered-3.c: Remove skip for -Os. + * gcc.target/mips/call-clobbered-4.c: Delete. + +2019-10-02 Tobias Burnus + + * gfortran.dg/gomp/is_device_ptr-1.f90: New. + +2019-10-02 Richard Biener + + PR c++/91606 + * g++.dg/torture/pr91606.C: New testcase. + +2019-10-02 Tobias Burnus + + * gfortran.dg/goacc/asyncwait-1.f95: Handle new error message. + * gfortran.dg/goacc/asyncwait-2.f95: Likewise. + * gfortran.dg/goacc/asyncwait-3.f95: Likewise. + * gfortran.dg/goacc/asyncwait-4.f95: Likewise. + * gfortran.dg/goacc/default-2.f: Likewise. + * gfortran.dg/goacc/enter-exit-data.f95: Likewise. + * gfortran.dg/goacc/if.f95: Likewise. + * gfortran.dg/goacc/list.f95: Likewise. + * gfortran.dg/goacc/literal.f95: Likewise. + * gfortran.dg/goacc/loop-2-kernels-tile.f95: Likewise. + * gfortran.dg/goacc/loop-2-parallel-tile.f95: Likewise. + * gfortran.dg/goacc/loop-7.f95: Likewise. + * gfortran.dg/goacc/parallel-kernels-clauses.f95: Likewise. + * gfortran.dg/goacc/routine-6.f90: Likewise. + * gfortran.dg/goacc/several-directives.f95: Likewise. + * gfortran.dg/goacc/sie.f95: Likewise. + * gfortran.dg/goacc/tile-1.f90: Likewise. + * gfortran.dg/goacc/update-if_present-2.f90: Likewise. + * gfortran.dg/gomp/declare-simd-1.f90: Likewise. + * gfortran.dg/gomp/pr29759.f90: Likewise. + +2019-10-02 Tobias Burnus + + * libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-1.f90: New. + +2019-10-02 Jakub Jelinek + + PR tree-optimization/91940 + * gcc.dg/vect/vect-bswap16.c: Add -msse4 on x86, run on all targets, + expect vectorized 1 loops message on both vect_bswap and sse4_runtime + targets. + * gcc.dg/vect/vect-bswap16a.c: New test. + +2019-10-02 Joseph Myers + + * gcc.dg/asm-scope-1.c, gcc.dg/cpp/c11-scope-1.c, + gcc.dg/cpp/c17-scope-1.c, gcc.dg/cpp/c2x-scope-1.c, + gcc.dg/cpp/c2x-scope-2.c, gcc.dg/cpp/c90-scope-1.c, + gcc.dg/cpp/c94-scope-1.c, gcc.dg/cpp/c99-scope-1.c, + gcc.dg/cpp/gnu11-scope-1.c, gcc.dg/cpp/gnu17-scope-1.c, + gcc.dg/cpp/gnu89-scope-1.c, gcc.dg/cpp/gnu99-scope-1.c: New tests. + +2019-10-01 David Malcolm + + * gcc.dg/plugin/diagnostic_group_plugin.c (test_begin_group_cb): + Clear the prefix before emitting the "END GROUP" line. + * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c + (custom_diagnostic_finalizer): Temporarily clear prefix when + calling diagnostic_show_locus, rather than destroying it + afterwards. + +2019-10-01 Jan Hubicka + + * gcc.dg/tree-ssa/alias-access-path-10.c: New testcase. + * gcc.dg/tree-ssa/alias-access-path-11.c: New testcase. + +2019-10-01 Jan Hubicka + + * g++.dg/lto/odr-6_0.C: New testcase. + * g++.dg/lto/odr-6_1.c: New testcase. + +2019-10-01 Jan Hubicka + + * gcc.dg/tree-ssa/ssa-thread-12.c: Fix warning introduced by my + previous change. + +2019-10-01 Jan Hubicka + + * g++.dg/tree-ssa/pr61034.C: Set early-inlining-insns-O2=14. + * g++.dg/tree-ssa/pr8781.C: Likewise. + * g++.dg/warn/Wstringop-truncation-1.C: Likewise. + * gcc.dg/ipa/pr63416.c: likewise. + * gcc.dg/vect/pr66142.c: Likewise. + * gcc.dg/tree-ssa/ssa-thread-12.c: Mark compure_idf inline. + +2019-10-01 Jakub Jelinek + + PR c++/91925 + * g++.dg/conversion/packed2.C: New test. + +2019-10-01 Bill Schmidt + + * gcc.target/powerpc/pr91275.c: New. + +2019-10-01 Alexandre Oliva + + * gcc.dg/torture/pr41094.c: Introduce intermediate variable. + + PR debug/91507 + * gcc.dg/debug/dwarf2/array-0.c: New. + * gcc.dg/debug/dwarf2/array-1.c: New. + * gcc.dg/debug/dwarf2/array-2.c: New. + * gcc.dg/debug/dwarf2/array-3.c: New. + * g++.dg/debug/dwarf2/array-0.C: New. + * g++.dg/debug/dwarf2/array-1.C: New. + * g++.dg/debug/dwarf2/array-2.C: New. Based on libstdc++-v3's + src/c++98/pool_allocator.cc:__pool_alloc_base::_S_heap_size. + * g++.dg/debug/dwarf2/array-3.C: New. Based on + gcc's config/i386/i386-features.c:xlogue_layout::s_instances. + * g++.dg/debug/dwarf2/array-4.C: New. + +2019-10-01 Richard Sandiford + + * gcc.dg/diag-aka-1.c (T): Turn into a pointer typedef. + (foo): Update accordingly. + * gcc.dg/diag-aka-4.c: New test. + +2019-10-01 Richard Sandiford + + * gcc.dg/diag-aka-3.c: New test. + * gcc.target/aarch64/diag_aka_1.c: New test. + * g++.dg/diagnostic/aka4.C: New test. + +2019-10-01 Richard Sandiford + + * gcc.target/aarch64/torture/simd-abi-10.c: New test. + * gcc.target/aarch64/torture/simd-abi-11.c: Likewise. + +2019-09-30 Yuliang Wang + + * gcc.dg/vect/vect-sdiv-pow2-1.c: New test. + * gcc.target/aarch64/sve/asrdiv_1.c: As above. + * lib/target-supports.exp (check_effective_target_vect_sdiv_pow2_si): + Return true for AArch64 with SVE. + +2019-09-30 Richard Sandiford + + * gcc.target/aarch64/torture/simd-abi-9.c: New test. + +2019-09-30 Richard Sandiford + + * gcc.target/aarch64/torture/simd-abi-8.c: New test. + +2019-09-30 Richard Sandiford + + * gcc.dg/Wincompatible-pointer-types-1.c (f1): Expect only one + space between the comma and "...". + +2019-09-30 Martin Jambor + + PR ipa/91853 + * gcc.dg/ipa/pr91853.c: New test. + +2019-09-30 Jakub Jelinek + + PR target/91931 + * gcc.target/i386/pr91931.c: New test. + +2019-09-29 Steven G. Kargl + + PR fortran/91641 + * gfortran.dg/pr91641.f90: New test. + +2019-09-29 Steven G. Kargl + + PR fortran/91714 + * gfortran.dg/dec_type_print_3.f90: Update dg-error regex. + * gfortran.dg/pr91714.f90: New test. + +2019-09-29 Paul Thomas + + PR fortran/91726 + * gfortran.dg/coarray_poly_9.f90 : New test. + +2019-09-29 Kewen Lin + + * gcc.target/powerpc/conv-vectorize-1.c: New test. + * gcc.target/powerpc/conv-vectorize-2.c: New test. + +2019-09-28 Steven G. Kargl + + PR fortran/91802 + * gfortran.dg/pr91802.f90: New test. + +2019-09-28 Steven G. Kargl + + PR fortran/91864 + * gcc/testsuite/gfortran.dg/pr91864.f90 + +2019-09-28 Marek Polacek + + PR c++/91889 - follow-up fix for DR 2352. + * g++.dg/cpp0x/ref-bind3.C: Add dg-error. + * g++.dg/cpp0x/ref-bind4.C: New test. + * g++.dg/cpp0x/ref-bind5.C: New test. + * g++.dg/cpp0x/ref-bind6.C: New test. + * g++.old-deja/g++.pt/spec35.C: Revert earlier change. + + PR c++/91921 - stray warning with -Woverloaded-virtual. + * g++.dg/warn/Woverloaded-2.C: New. + * g++.dg/warn/Woverloaded-2.h: New. + * g++.dg/warn/pr61945.C: Turn dg-warning into dg-message. + * g++.old-deja/g++.mike/warn6.C: Likewise. + * g++.old-deja/g++.warn/virt1.C: Likewise. + + PR c++/91923 - failure-to-SFINAE with class type NTTP in C++17. + * g++.dg/cpp0x/nontype5.C: New test. + +2019-09-28 Alan Modra + + PR testsuite/91676 + PR rtl-optimization/91656 + * gcc.dg/torture/pr91656-1.c: Correct for big and pdp endian. + * gcc.dg/torture/pr91656-2.c: Likewise. + * gcc.dg/torture/pr91656-3.c: Likewise. + +2019-09-27 Jakub Jelinek + + PR c++/88203 + * c-c++-common/gomp/pr88203-1.c: New test. + * c-c++-common/gomp/pr88203-2.c: New test. + * c-c++-common/gomp/pr88203-3.c: New test. + + PR middle-end/91920 + * c-c++-common/gomp/pr91920.c: New test. + + PR target/91919 + * gcc.c-torture/compile/pr91919.c: New test. + +2019-09-27 Manfred Schwarb + + * gfortran.dg/associate_48.f90: Fix a dg directive. + * gfortran.dg/auto_in_equiv_1.f90: Ditto. + * gfortran.dg/auto_in_equiv_2.f90: Ditto. + * gfortran.dg/lto/pr87689_0.f: Ditto. + +2019-09-27 Jakub Jelinek + + PR tree-optimization/91885 + * gcc.dg/pr91885.c (__int64_t): Change from long to long long. + (__uint64_t): Change from unsigned long to unsigned long long. + +2019-09-27 Yuliang Wang + + * gcc.target/aarch64/sve2/shracc_1.c: New test. + +2019-09-26 Eric Botcazou + + * gcc.dg/cpp/ucs.c: Add test for new warning and adjust. + * gcc.dg/cpp/utf8-5byte-1.c: Add -w to the options. + * gcc.dg/attr-alias-5.c: Likewise. + * g++.dg/cpp/ucn-1.C: Add test for new warning. + * g++.dg/cpp2a/ucn1.C: New test. + +2019-09-26 Max Filippov + + * gcc.target/xtensa/pr91880.c: New test case. + * gcc.target/xtensa/xtensa.exp: New test suite. + +2019-09-26 Will Schmidt + + * gcc.target/powerpc/pure-builtin-redundant-load.c: New. + +2019-09-26 Richard Biener + + PR middle-end/91897 + * gcc.target/i386/pr91897.c: New testcase. + +2019-09-26 Martin Sebor + + PR tree-optimization/91914 + * gcc.dg/strlenopt-79.c: New test. + +2019-09-26 Kyrylo Tkachov + + * gcc.target/arm/acle/simd32.c: Update test. + +2019-09-26 Kyrylo Tkachov + + * lib/target-supports.exp + (check_effective_target_arm_simd32_ok_nocache): New procedure. + (check_effective_target_arm_simd32_ok): Likewise. + (add_options_for_arm_simd32): Likewise. + * gcc.target/arm/acle/simd32.c: New test. + +2019-09-26 Richard Sandiford + + * gcc.target/arm/fp16-compile-alt-3.c: Expect (__fp16) -2.0 + to be written as a negative short rather than a positive one. + * gcc.target/arm/fp16-compile-ieee-3.c: Likewise. + +2019-09-26 Martin Liska + + PR tree-optimization/91885 + * gcc.dg/pr91885.c: New test. + +2019-09-25 Marek Polacek + + PR c++/91877 - ICE with converting member of packed struct. + * g++.dg/conversion/packed1.C: New test. + +2019-09-25 Richard Biener + + PR tree-optimization/91896 + * gcc.dg/torture/pr91896.c: New testcase. + +2019-09-25 Martin Liska + + * gcc.target/s390/pr91014.c: Move to ... + * gcc.dg/pr91014.c: ... this. + +2019-09-25 Paolo Carlini + + * g++.dg/diagnostic/redeclaration-1.C: New. + * g++.dg/lookup/extern-c-hidden.C: Test location(s) too. + * g++.dg/lookup/extern-c-redecl.C: Likewise. + * g++.dg/lookup/extern-c-redecl6.C: Likewise. + * g++.old-deja/g++.other/using9.C: Likewise. + +2019-09-23 Martin Sebor + + PR tree-optimization/91570 + * gcc.dg/pr91570.c: New test. + +2019-09-24 Marek Polacek + + PR c++/91868 - improve -Wshadow location. + * g++.dg/warn/Wshadow-16.C: New test. + + PR c++/91845 - ICE with invalid pointer-to-member. + * g++.dg/cpp1y/pr91845.C: New test. + +2019-09-24 Kyrylo Tkachov + + * gcc.target/aarch64/nosplit-di-const-volatile_1.c: New test. + +2019-09-24 Jakub Jelinek + + PR middle-end/91866 + * gcc.dg/tree-ssa/pr91866.c: New test. + +2019-09-24 Martin Jambor + + PR ipa/91831 + * g++.dg/ipa/pr91831.C: New test. + +2019-09-24 Martin Jambor + + PR ipa/91832 + * gcc.dg/ipa/pr91832.c: New test. + +2019-09-24 Richard Biener + + * gcc.dg/torture/20190924-1.c: New testcase. + +2019-09-23 Maciej W. Rozycki + + * lib/gnat.exp (gnat_target_compile): Pass the `ada' option to + `target_compile'. + +2019-09-23 Paolo Carlini + + * g++.dg/cpp0x/pr68724.C: Check location(s) too. + * g++.dg/cpp0x/variadic38.C: Likewise. + * g++.dg/cpp1z/nontype2.C: Likewise. + * g++.dg/parse/explicit1.C: Likewise. + * g++.dg/template/crash11.C: Likewise. + * g++.dg/template/non-dependent8.C: Likewise. + * g++.dg/template/nontype-array1.C: Likewise. + * g++.dg/template/nontype3.C: Likewise. + * g++.dg/template/nontype8.C: Likewise. + * g++.dg/template/partial5.C: Likewise. + * g++.dg/template/spec33.C: Likewise. + * g++.old-deja/g++.pt/memtemp64.C: Likewise. + * g++.old-deja/g++.pt/spec20.C: Likewise. + * g++.old-deja/g++.pt/spec21.C: Likewise. + * g++.old-deja/g++.robertl/eb103.C: Likewise. + +2019-09-23 Sandra Loosemore + + * lib/target-supports.exp + (check_effective_target_arm_vfp_ok_nocache): New. + (check_effective_target_arm_vfp_ok): Rewrite. + (add_options_for_arm_vfp): New. + (add_options_for_sqrt_insn): Add options for arm. + * gcc.target/arm/attr-neon-builtin-fail2.c: Use dg-add-options. + * gcc.target/arm/short-vfp-1.c: Likewise. + +2019-09-23 Marek Polacek + + PR c++/91844 - Implement CWG 2352, Similar types and reference binding. + * g++.dg/cpp0x/pr33930.C: Add dg-error. + * g++.dg/cpp0x/ref-bind1.C: New test. + * g++.dg/cpp0x/ref-bind2.C: New test. + * g++.dg/cpp0x/ref-bind3.C: New test. + * g++.old-deja/g++.pt/spec35.C: Remove dg-error. + +2019-09-23 Rainer Orth + + * gcc.dg/ucnid-5-utf8.c: Skip unless ucn is supported. + +2019-09-23 Paul Thomas + + PR fortran/91729 + * gfortran.dg/select_rank_2.f90 : Add two more errors in foo2. + * gfortran.dg/select_rank_3.f90 : New test. + +2019-09-23 Rainer Orth + + * gnat.dg/system_info1.adb: Sort dg-do target list. + Add *-*-solaris2.*. + +2019-09-23 Eric Botcazou + + * gnat.dg/specs/compile_time1.ads: New test. + * gnat.dg/specs/compile_time1_pkg.ads: New helper. + +2019-09-22 Marek Polacek + + PR c++/91819 - ICE with operator++ and enum. + * g++.dg/other/operator4.C: New test. + +2019-09-21 Martin Sebor + + PR middle-end/91830 + * gcc/testsuite/gcc.dg/Warray-bounds-47.c: New test. + +2019-09-21 Jakub Jelinek + + PR c++/30277 + * g++.dg/expr/bitfield14.C (struct S): Use signed long long instead + of signed long. + (foo): Use long long instead of long. + +2019-09-21 Marek Polacek + + DR 2345 - Jumping across initializers in init-statements and conditions. + * g++.dg/cpp1z/init-statement10.C: New test. + +2019-09-21 Richard Sandiford + + * gcc.target/aarch64/sve/cond_convert_1.c: Remove XFAILs. + * gcc.target/aarch64/sve/cond_convert_4.c: Likewise. + * gcc.target/aarch64/sve/cond_unary_2.c: Likewise. + +2019-09-20 Iain Sandoe + + * gcc.target/i386/naked-1.c: Alter options to use non- + PIC codegen for m32 Darwin. + +2019-09-20 Tobias Burnus + + PR fortran/78260 + * gfortran.dg/goacc/parameter.f95: Change + dg-error as it is now detected earlier. + * gfortran.dg/goacc/pr85701.f90: Modify to + use a separate result variable. + * gfortran.dg/goacc/pr78260.f90: New. + * gfortran.dg/goacc/pr78260-2.f90: New. + * gfortran.dg/gomp/pr78260.f90: New. + * gfortran.dg/gomp/pr78260-2.f90: New. + * gfortran.dg/gomp/pr78260-3.f90: New. + +2019-09-20 Olivier Hainque + + * gnat.dg/system_info1.adb: Restrict to *-*-linux* and *-*-mingw*. + +2019-09-20 Eric Botcazou + + * gcc.dg/pr91269.c: New test. + +2019-09-20 Eric Botcazou + + * gcc.dg/typedef-var-1.c: New test. + * gcc.dg/typedef-var-2.c: Likewise. + +2019-09-20 Martin Jambor + + * g++.dg/ipa/pr81248.C: Adjust dg-options and dump-scan. + * gcc.dg/ipa/ipa-sra-1.c: Likewise. + * gcc.dg/ipa/ipa-sra-10.c: Likewise. + * gcc.dg/ipa/ipa-sra-11.c: Likewise. + * gcc.dg/ipa/ipa-sra-3.c: Likewise. + * gcc.dg/ipa/ipa-sra-4.c: Likewise. + * gcc.dg/ipa/ipa-sra-5.c: Likewise. + * gcc.dg/ipa/ipacost-2.c: Disable ipa-sra. + * gcc.dg/ipa/ipcp-agg-9.c: Likewise. + * gcc.dg/ipa/pr78121.c: Adjust scan pattern. + * gcc.dg/ipa/vrp1.c: Likewise. + * gcc.dg/ipa/vrp2.c: Likewise. + * gcc.dg/ipa/vrp3.c: Likewise. + * gcc.dg/ipa/vrp7.c: Likewise. + * gcc.dg/ipa/vrp8.c: Likewise. + * gcc.dg/noreorder.c: use noipa attribute instead of noinline. + * gcc.dg/ipa/20040703-wpa.c: New test. + * gcc.dg/ipa/ipa-sra-12.c: New test. + * gcc.dg/ipa/ipa-sra-13.c: Likewise. + * gcc.dg/ipa/ipa-sra-14.c: Likewise. + * gcc.dg/ipa/ipa-sra-15.c: Likewise. + * gcc.dg/ipa/ipa-sra-16.c: Likewise. + * gcc.dg/ipa/ipa-sra-17.c: Likewise. + * gcc.dg/ipa/ipa-sra-18.c: Likewise. + * gcc.dg/ipa/ipa-sra-19.c: Likewise. + * gcc.dg/ipa/ipa-sra-20.c: Likewise. + * gcc.dg/ipa/ipa-sra-21.c: Likewise. + * gcc.dg/ipa/ipa-sra-22.c: Likewise. + * gcc.dg/sso/ipa-sra-1.c: Likewise. + * g++.dg/ipa/ipa-sra-2.C: Likewise. + * g++.dg/ipa/ipa-sra-3.C: Likewise. + * gcc.dg/tree-ssa/ipa-cp-1.c: Make return value used. + * g++.dg/ipa/devirt-19.C: Add missing return, add -fipa-cp-clone + option. + * g++.dg/lto/devirt-19_0.C: Add -fipa-cp-clone option. + * gcc.dg/ipa/ipa-sra-2.c: Removed. + * gcc.dg/ipa/ipa-sra-6.c: Likewise. + +2019-09-19 Martin Sebor + + PR middle-end/91631 + * /c-c++-common/Warray-bounds-3.c: Correct expected offsets. + * /c-c++-common/Warray-bounds-4.c: Same. + * gcc.dg/Warray-bounds-39.c: Remove xfails. + * gcc.dg/Warray-bounds-45.c: New test. + * gcc.dg/Warray-bounds-46.c: New test. + +2019-09-19 Lewis Hyatt + + PR c/67224 + * c-c++-common/cpp/ucnid-2011-1-utf8.c: New test. + * g++.dg/cpp/ucnid-1-utf8.C: New test. + * g++.dg/cpp/ucnid-2-utf8.C: New test. + * g++.dg/cpp/ucnid-3-utf8.C: New test. + * g++.dg/cpp/ucnid-4-utf8.C: New test. + * g++.dg/other/ucnid-1-utf8.C: New test. + * gcc.dg/cpp/ucnid-1-utf8.c: New test. + * gcc.dg/cpp/ucnid-10-utf8.c: New test. + * gcc.dg/cpp/ucnid-11-utf8.c: New test. + * gcc.dg/cpp/ucnid-12-utf8.c: New test. + * gcc.dg/cpp/ucnid-13-utf8.c: New test. + * gcc.dg/cpp/ucnid-14-utf8.c: New test. + * gcc.dg/cpp/ucnid-15-utf8.c: New test. + * gcc.dg/cpp/ucnid-2-utf8.c: New test. + * gcc.dg/cpp/ucnid-3-utf8.c: New test. + * gcc.dg/cpp/ucnid-4-utf8.c: New test. + * gcc.dg/cpp/ucnid-6-utf8.c: New test. + * gcc.dg/cpp/ucnid-7-utf8.c: New test. + * gcc.dg/cpp/ucnid-9-utf8.c: New test. + * gcc.dg/ucnid-1-utf8.c: New test. + * gcc.dg/ucnid-10-utf8.c: New test. + * gcc.dg/ucnid-11-utf8.c: New test. + * gcc.dg/ucnid-12-utf8.c: New test. + * gcc.dg/ucnid-13-utf8.c: New test. + * gcc.dg/ucnid-14-utf8.c: New test. + * gcc.dg/ucnid-15-utf8.c: New test. + * gcc.dg/ucnid-16-utf8.c: New test. + * gcc.dg/ucnid-2-utf8.c: New test. + * gcc.dg/ucnid-3-utf8.c: New test. + * gcc.dg/ucnid-4-utf8.c: New test. + * gcc.dg/ucnid-5-utf8.c: New test. + * gcc.dg/ucnid-6-utf8.c: New test. + * gcc.dg/ucnid-7-utf8.c: New test. + * gcc.dg/ucnid-8-utf8.c: New test. + * gcc.dg/ucnid-9-utf8.c: New test. + +2019-09-19 Iain Sandoe + + * gcc.dg/pr89313.c: Test for __POWERPC__ in addition to + __powerpc__ in register name selection. + +2019-09-19 Richard Henderson + + * gcc.target/aarch64/atomic-op-acq_rel.c: Use -mno-outline-atomics. + * gcc.target/aarch64/atomic-comp-swap-release-acquire.c: Likewise. + * gcc.target/aarch64/atomic-op-acquire.c: Likewise. + * gcc.target/aarch64/atomic-op-char.c: Likewise. + * gcc.target/aarch64/atomic-op-consume.c: Likewise. + * gcc.target/aarch64/atomic-op-imm.c: Likewise. + * gcc.target/aarch64/atomic-op-int.c: Likewise. + * gcc.target/aarch64/atomic-op-long.c: Likewise. + * gcc.target/aarch64/atomic-op-relaxed.c: Likewise. + * gcc.target/aarch64/atomic-op-release.c: Likewise. + * gcc.target/aarch64/atomic-op-seq_cst.c: Likewise. + * gcc.target/aarch64/atomic-op-short.c: Likewise. + * gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c: Likewise. + * gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c: Likewise. + * gcc.target/aarch64/sync-comp-swap.c: Likewise. + * gcc.target/aarch64/sync-op-acquire.c: Likewise. + * gcc.target/aarch64/sync-op-full.c: Likewise. + +2019-09-19 Feng Xue + + * gcc.dg/ipa/pr91089.c: Add a new function and pattern. + +2019-09-19 Richard Biener + + PR tree-optimization/91812 + * gcc.dg/torture/pr91812.c: New testcase. + +2019-09-19 Tom Tromey + + * gnat.dg/bias1.adb: New testcase. + +2019-09-19 Steve Baird + + * gnat.dg/annotation1.adb: New testcase. + +2019-09-19 Eric Botcazou + + * gnat.dg/inline21.adb, gnat.dg/inline21_g.ads, + gnat.dg/inline21_h.adb, gnat.dg/inline21_h.ads, + gnat.dg/inline21_q.ads: New testcase. + +2019-09-19 Eric Botcazou + + * gnat.dg/inline20.adb, gnat.dg/inline20_g.adb, + gnat.dg/inline20_g.ads, gnat.dg/inline20_h.ads, + gnat.dg/inline20_i.ads, gnat.dg/inline20_q-io.ads, + gnat.dg/inline20_q.ads, gnat.dg/inline20_r.ads: New testcase. + +2019-09-19 Ed Schonberg + + * gnat.dg/generic2-child.ads, gnat.dg/generic2-io_any.adb, + gnat.dg/generic2-io_any.ads, gnat.dg/generic2.ads: New testcase. + +2019-09-19 Yannick Moy + + * gnat.dg/global2.adb, gnat.dg/global2.ads: New testcase. + +2019-09-19 Eric Botcazou + + * gnat.dg/access9.adb: New testcase. + +2019-09-19 Ed Schonberg + + * gnat.dg/predicate14.adb, gnat.dg/predicate14.ads: New + testcase. + +2019-09-19 Eric Botcazou + + * gnat.dg/generic_inst13.adb, + gnat.dg/generic_inst13_pkg-nested_g.ads, + gnat.dg/generic_inst13_pkg-ops_g.ads, + gnat.dg/generic_inst13_pkg.ads: New testcase. + +2019-09-19 Bob Duff + + * gnat.dg/concat3.adb: New testcase. + +2019-09-19 Eric Botcazou + + * gnat.dg/pack26.adb: New testcase. + +2019-09-19 Hongtao Liu + + PR target/87007 + * gcc.target/i386/pr87007-3.c: New test. + +2019-09-18 H.J. Lu + + PR target/90878 + * gcc.target/i386/pr90878.c: New test. + +2019-09-18 H.J. Lu + + PR target/91446 + * gcc.target/i386/pr91446.c: New test. + +2019-09-18 Eric Botcazou + + * gnat.dg/warn31.adb, gnat.dg/warn31.ads: New testcase. + +2019-09-18 Ed Schonberg + + * gnat.dg/fixedpnt8.adb: New testcase. + +2019-09-18 Ed Schonberg + + * gnat.dg/discr58.adb: New testcase. + +2019-09-18 Justin Squirek + + * gnat.dg/warn30.adb, gnat.dg/warn30.ads: New testcase. + +2019-09-18 Justin Squirek + + * gnat.dg/access8.adb, gnat.dg/access8_pkg.adb, + gnat.dg/access8_pkg.ads: New testcase. + +2019-09-18 Eric Botcazou + + * gnat.dg/aggr28.adb: New testcase. + +2019-09-18 Steve Baird + + * gnat.dg/ai12_0086_example.adb: New testcase. + +2019-09-18 Nicolas Roche + + * gnat.dg/float_value2.adb: New testcase. + +2019-09-18 Vadim Godunko + + * gnat.dg/expect4.adb: New testcase. + +2019-09-18 Steve Baird + + * gnat.dg/ghost7.adb, gnat.dg/ghost7.ads: New testcase. + +2019-09-18 Olivier Hainque + + * gnat.dg/system_info1.adb: New testcase. + +2019-09-18 Bob Duff + + * gnat.dg/containers1.adb, gnat.dg/containers1.ads: New + testcase. + +2019-09-18 Richard Sandiford + + * gcc.target/i386/pr82361-1.c (f1, f2, f3, f4, f5, f6): Force + "c" to be in %rax and "d" to be in %rdx. + * gcc.target/i386/pr82361-2.c: Expect 4 instances of "movl\t%edx". + +2019-19-17 Christophe Lyon + + * lib/target-supports.exp + (check_effective_target_arm_arch_FUNC_ok): Add v4t_arm, v4t_thumb, + v5t_arm, v5t_thumb, v5te_arm, v5te_thumb, v6_arm, v6_thumb, + v6k_arm, v6k_thumb, v6z_arm, v6z_thumb. + Add -mfloat-abi=softfp to v4t, v5t, v5te, v6, v6k, v6z. + Remove early exit for -marm. + * gcc.target/arm/armv6-unaligned-load-ice.c: Add arm_arch + effective-target. + * gcc.target/arm/attr-unaligned-load-ice.c: Likewise. + * gcc.target/arm/ftest-armv4-arm.c: Likewise. + * gcc.target/arm/ftest-armv4t-arm.c: Likewise. + * gcc.target/arm/ftest-armv4t-thumb.c: Likewise. + * gcc.target/arm/ftest-armv5t-arm.c: Likewise. + * gcc.target/arm/ftest-armv5t-thumb.c: Likewise. + * gcc.target/arm/ftest-armv5te-arm.c: Likewise. + * gcc.target/arm/ftest-armv5te-thumb.c: Likewise. + * gcc.target/arm/ftest-armv6-arm.c: Likewise. + * gcc.target/arm/ftest-armv6-thumb.c: Likewise. + * gcc.target/arm/ftest-armv6k-arm.c: Likewise. + * gcc.target/arm/ftest-armv6k-thumb.c: Likewise. + * gcc.target/arm/ftest-armv6m-thumb.c: Likewise. + * gcc.target/arm/ftest-armv6t2-arm.c: Likewise. + * gcc.target/arm/ftest-armv6t2-thumb.c: Likewise. + * gcc.target/arm/ftest-armv6z-arm.c: Likewise. + * gcc.target/arm/ftest-armv6z-thumb.c: Likewise. + * gcc.target/arm/g2.c: Likewise. + * gcc.target/arm/macro_defs1.c: Likewise. + * gcc.target/arm/pr59858.c: Likewise. + * gcc.target/arm/pr65647-2.c: Likewise. + * gcc.target/arm/pr79058.c: Likewise. + * gcc.target/arm/pr83712.c: Likewise. + * gcc.target/arm/pragma_arch_switch_2.c: Likewise. + * gcc.target/arm/scd42-1.c: Likewise. + * gcc.target/arm/scd42-2.c: Likewise. + * gcc.target/arm/scd42-3.c: Likewise. + * gcc.c-torture/compile/pr82096.c: Fix arm_arch effective-target. + * gcc.target/arm/attr_arm-err.c: Likewise. + * gcc.target/arm/di-longlong64-sync-withldrexd.c: Likewise. + +2019-09-17 Feng Xue + + PR ipa/91089 + * gcc.dg/ipa/pr91089.c: New test. + +2019-09-17 Paul Thomas + + PR fortran/91588 + * gfortran.dg/associate_49.f90 : New test. + +2019-09-17 Yannick Moy + + * gnat.dg/fixedpnt7.adb: New testcase. + +2019-09-17 Yannick Moy + + * gnat.dg/multfixed.adb: New testcase. + +2019-09-17 Vadim Godunko + + * gnat.dg/expect3.adb: New testcase. + +2019-09-17 Ed Schonberg + + * gnat.dg/predicate13.adb, gnat.dg/predicate13.ads: New + testcase. + +2019-09-17 Javier Miranda + + * gnat.dg/limited4.adb: New testcase. + +2019-09-17 Eric Botcazou + + * gnat.dg/pack25.adb: New testcase. + +2019-09-16 Paolo Carlini + + * g++.dg/ext/int128-6.C: New. + * c-c++-common/pr68107.c: Test location(s). + * g++.dg/other/large-size-array.C: Likewise. + * g++.dg/template/dtor2.C: Likewise. + * g++.dg/template/error9.C: Likewise. + * g++.dg/tls/diag-2.C: Likewise. + * g++.dg/tls/diag-4.C: Likewise. + * g++.dg/tls/diag-5.C: Likewise. + * g++.old-deja/g++.pt/memtemp71.C: Likewise. + +2019-09-16 Li Jia He + Qi Feng + + PR middle-end/88784 + * gcc.dg/pr88784-1.c: New testcase. + * gcc.dg/pr88784-2.c: New testcase. + * gcc.dg/pr88784-3.c: New testcase. + * gcc.dg/pr88784-4.c: New testcase. + * gcc.dg/pr88784-5.c: New testcase. + * gcc.dg/pr88784-6.c: New testcase. + * gcc.dg/pr88784-7.c: New testcase. + * gcc.dg/pr88784-8.c: New testcase. + * gcc.dg/pr88784-9.c: New testcase. + * gcc.dg/pr88784-10.c: New testcase. + * gcc.dg/pr88784-11.c: New testcase. + * gcc.dg/pr88784-12.c: New testcase. + +2019-09-16 Richard Biener + + PR tree-optimization/91756 + PR tree-optimization/87132 + * gcc.dg/tree-ssa/ssa-fre-81.c: New testcase. + +2019-09-15 Marek Polacek + + PR c++/91740 - ICE with constexpr call and ?: in ARRAY_REF. + * g++.dg/cpp1y/var-templ63.C: New test. + +2019-09-15 Sandra Loosemore + + * lib/target-supports.exp + (check_effective_target_arm_neon_fp16_hw) + (check_effective_target_arm_fp16_hw): Use check_runtime + instead of check_runtime_nocache. + +2019-09-15 Steven G. Kargl + + PR fortran/91727 + * gfortran.dg/pr91727.f90: New test. + +2019-09-15 Thomas Koenig + + PR fortran/91550 + * gfortran.dg/do_subscript_6.f90: New test. + +2019-09-15 Thomas Koenig + + PR fortran/91556 + * gfortran.dg/warn_argument_mismatch_1.f90: Remove. + +2019-09-14 Thomas Koenig + + PR fortran/91557 + PR fortran/91556 + * gfortran.dg/argument_checking_20.f90: New test. + * gfortran.dg/argument_checking_21.f90: New test. + * gfortran.dg/argument_checking_22.f90: New test. + * gfortran.dg/argument_checking_23.f90: New test. + * gfortran.dg/warn_unused_dummy_argument_5.f90: New test. + * gfortran.dg/bessel_3.f90: Add pattern for type mismatch. + * gfortran.dg/g77/20010519-1.f: Adjust dg-warning messages to new + handling. + * gfortran.dg/pr24823.f: Likewise. + * gfortran.dg/pr39937.f: Likewise. + +2019-09-14 Sandra Loosemore + + PR testsuite/83889 + * g++.dg/vect/pr87914.cc: Remove explicit dg-do run. + +2019-09-14 Kewen Lin + + PR middle-end/80791 + * gcc.dg/tree-ssa/ivopts-3.c: Adjust for doloop change. + * gcc.dg/tree-ssa/ivopts-lt.c: Likewise. + * gcc.dg/tree-ssa/pr32044.c: Likewise. + +2019-09-13 Steven G. Kargl + + PR fortran/91566 + * gfortran.dg/pr91566.f90: + +2019-09-13 Bernd Edlinger + + PR fortran/91716 + * gfortran.dg/pr91716.f90: New test. + +2019-09-13 Paul Thomas + + PR fortran/91717 + * gfortran.dg/dependency_55.f90 : New test. + +2019-09-12 Uroš Bizjak + + PR tree-optimization/89386 + * gcc.target/i386/pr89386.c: New test. + * gcc.target/i386/pr89386-1.c: Ditto. + +2019-09-12 Richard Biener + + PR tree-optimization/91750 + * gcc.dg/vect/pr91750.c: New testcase. + +2019-09-12 Yuliang Wang + + PR tree-optimization/89386 + * testsuite/gcc.target/aarch64/sve2/mulhrs_1.c: New test. + * testsuite/gcc.dg/vect/vect-mulhrs-1.c: As above. + * testsuite/gcc.dg/vect/vect-mulhrs-2.c: As above. + * testsuite/gcc.dg/vect/vect-mulhrs-3.c: As above. + * testsuite/gcc.dg/vect/vect-mulhrs-4.c: As above. + * doc/sourcebuild.texi (vect_mulhrs_hi): Document new target selector. + * testsuite/lib/target-supports.exp + (check_effective_target_vect_mulhrs_hi): Return true for AArch64 + with SVE2. + +2019-09-11 Sandra Loosemore + + PR testsuite/83889 + * gcc.dg/vect/pr81740-2.c: Remove explicit dg-do run. + * gcc.dg/vect/pr88598-1.c: Likewise. + * gcc.dg/vect/pr88598-2.c: Likewise. + * gcc.dg/vect/pr88598-3.c: Likewise. + * gcc.dg/vect/pr88598-4.c: Likewise. + * gcc.dg/vect/pr88598-5.c: Likewise. + * gcc.dg/vect/pr88598-6.c: Likewise. + * gcc.dg/vect/pr89440.c: Likewise. + * gcc.dg/vect/pr90018.c: Likewise. + * gcc.dg/vect/pr91293-1.c: Likewise. + * gcc.dg/vect/pr91293-2.c: Likewise. + * gcc.dg/vect/pr91293-3.c: Likewise. + +2019-09-11 Steven G. Kargl + + PR fortran/91553 + * gfortran.dg/pr91553.f90: New test. + +2019-09-11 Steven G. Kargl + + PR fortran/91642 + * gfortran.dg/pr91642.f90: New test. + +2019-09-11 Jakub Jelinek + + PR rtl-optimization/89435 + PR rtl-optimization/89795 + PR rtl-optimization/91720 + * gcc.dg/pr89435.c: New test. + * gcc.dg/pr89795.c: New test. + * gcc.dg/pr91720.c: New test. + +2019-09-11 Richard Biener + + PR tree-optimization/90387 + * gcc.dg/Warray-bounds-44.c: New testcase. + +2019-09-11 Eric Botcazou + + * gcc.target/sparc/20161111-1.c: XFAIL redundant zero-extension test. + +2019-09-11 Jakub Jelinek + + PR tree-optimization/91723 + * gcc.dg/vect/vect-fma-3.c: New test. + + PR middle-end/91725 + * gcc.c-torture/compile/pr91725.c: New test. + +2019-09-11 Richard Biener + + Revert + 2019-09-09 Barnaby Wilks + + * gcc.dg/fold-binary-math-casts.c: New test. + +2019-09-10 Marek Polacek + + PR c++/91673 - ICE with noexcept in alias-declaration. + * g++.dg/cpp1z/using7.C: New test. + * g++.dg/cpp1z/using8.C: New test. + +2019-09-10 Marek Polacek + + PR c++/91705 - constexpr evaluation rejects ++/-- on floats. + * g++.dg/cpp1y/constexpr-incr2.C: New test. + +2019-09-10 David Edelsohn + + * gfortran.dg/default_format_1.f90: Remove XFAIL AIX. + * gfortran.dg/default_format_denormal_1.f90: Same. + +2019-09-10 Jakub Jelinek + + PR middle-end/91680 + * gcc.dg/tree-ssa/pr91680.c: New test. + * g++.dg/torture/pr91680.C: New test. + +2019-09-10 Paolo Carlini + + * g++.dg/cpp0x/enum29.C: Test location(s) too. + * g++.dg/cpp0x/lambda/lambda-ice10.C: Likewise. + * g++.dg/cpp2a/constinit3.C: Likewise. + * g++.dg/ext/desig4.C: Likewise. + * g++.dg/ext/label10.C: Likewise. + * g++.old-deja/g++.other/dtor3.C: Likewise. + +2019-09-10 Christophe Lyon + + * lib/target-supports.exp (check_effective_target_static): Disable + for ARM FDPIC target. + +2019-09-10 Christophe Lyon + + * gcc.target/arm/pr43698.c (bswap_32): Rename as my_bswap_32. + +2019-09-10 Christophe Lyon + + * g++.dg/cpp0x/noexcept03.C: Add pie_enabled. + * g++.dg/ipa/devirt-c-7.C: Likewise. + * g++.dg/ipa/ivinline-1.C: Likewise. + * g++.dg/ipa/ivinline-2.C: Likewise. + * g++.dg/ipa/ivinline-3.C: Likewise. + * g++.dg/ipa/ivinline-4.C: Likewise. + * g++.dg/ipa/ivinline-5.C: Likewise. + * g++.dg/ipa/ivinline-7.C: Likewise. + * g++.dg/ipa/ivinline-8.C: Likewise. + * g++.dg/ipa/ivinline-9.C: Likewise. + * g++.dg/tls/pr79288.C: Likewise. + * gcc.dg/addr_equal-1.c: Likewise. + * gcc.dg/const-1.c: Likewise. + * gcc.dg/ipa/pure-const-1.c: Likewise. + * gcc.dg/noreturn-8.c: Likewise. + * gcc.dg/pr33826.c: Likewise. + * gcc.dg/torture/ipa-pta-1.c: Likewise. + * gcc.dg/tree-ssa/alias-2.c: Likewise. + * gcc.dg/tree-ssa/ipa-split-5.c: Likewise. + * gcc.dg/tree-ssa/loadpre6.c: Likewise. + * gcc.dg/uninit-19.c: Likewise. + +2019-09-10 Christophe Lyon + + * g++.dg/abi/forced.C: Add *-*-uclinux*. + * g++.dg/abi/guard2.C: Likewise. + * g++.dg/ext/cleanup-10.C: Likewise. + * g++.dg/ext/cleanup-11.C: Likewise. + * g++.dg/ext/cleanup-8.C: Likewise. + * g++.dg/ext/cleanup-9.C: Likewise. + * g++.dg/ext/sync-4.C: Likewise. + * g++.dg/ipa/comdat.C: Likewise. + * gcc.dg/20041106-1.c: Likewise. + * gcc.dg/cleanup-10.c: Likewise. + * gcc.dg/cleanup-11.c: Likewise. + * gcc.dg/cleanup-8.c: Likewise. + * gcc.dg/cleanup-9.c: Likewise. + * gcc.dg/fdata-sections-1.c: Likewise. + * gcc.dg/fdata-sections-2.c: Likewise. + * gcc.dg/pr39323-1.c: Likewise. + * gcc.dg/pr39323-2.c: Likewise. + * gcc.dg/pr39323-3.c: Likewise. + * gcc.dg/pr65780-1.c: Likewise. + * gcc.dg/pr65780-2.c: Likewise. + * gcc.dg/pr67338.c: Likewise. + * gcc.dg/pr78185.c: Likewise. + * gcc.dg/pr83100-1.c: Likewise. + * gcc.dg/pr83100-4.c: Likewise. + * gcc.dg/strlenopt-12g.c: Likewise. + * gcc.dg/strlenopt-14g.c: Likewise. + * gcc.dg/strlenopt-14gf.c: Likewise. + * gcc.dg/strlenopt-16g.c: Likewise. + * gcc.dg/strlenopt-17g.c: Likewise. + * gcc.dg/strlenopt-18g.c: Likewise. + * gcc.dg/strlenopt-1f.c: Likewise. + * gcc.dg/strlenopt-22g.c: Likewise. + * gcc.dg/strlenopt-2f.c: Likewise. + * gcc.dg/strlenopt-31g.c: Likewise. + * gcc.dg/strlenopt-33g.c: Likewise. + * gcc.dg/strlenopt-4g.c: Likewise. + * gcc.dg/strlenopt-4gf.c: Likewise. + * gcc.dg/strncmp-2.c: Likewise. + * gcc.dg/struct-ret-3.c: Likewise. + * gcc.dg/torture/pr69760.c: Likewise. + * gcc.target/arm/div64-unwinding.c: Likewise. + * gcc.target/arm/stack-checking.c: Likewise. + * gcc.target/arm/synchronize.c: Likewise. + * gcc.target/arm/pr66912.c: Add arm*-*-uclinuxfdpiceabi. + * lib/target-supports.exp (check_effective_target_pie): Likewise. + (check_effective_target_sync_long_long_runtime): Likewise. + (check_effective_target_sync_int_long): Likewise. + (check_effective_target_sync_char_short): Likewise. + +2019-09-10 Christophe Lyon + + * gcc.target/arm/eliminate.c: Accept only nonpic targets. + * g++.dg/other/anon5.C: Likewise. + +2019-09-10 Christophe Lyon + Mickaël Guêné + + * gcc.target/arm/interrupt-1.c: Add scan-assembler pattern for + arm*-*-uclinuxfdpiceabi. + * gcc.target/arm/interrupt-2.c: Likewise. + * gcc.target/arm/pr70830.c: Likewise. + +2019-09-10 Christophe Lyon + Mickaël Guêné + + * gcc.dg/20020312-2.c: Skip on arm*-*-uclinuxfdpiceabi. + * gcc.target/arm/20051215-1.c: Likewise. + * gcc.target/arm/mmx-1.c: Likewise. + * gcc.target/arm/pr19599.c: Likewise. + * gcc.target/arm/pr40887.c: Likewise. + * gcc.target/arm/pr61948.c: Likewise. + * gcc.target/arm/pr77933-1.c: Likewise. + * gcc.target/arm/pr77933-2.c: Likewise. + * gcc.target/arm/sibcall-1.c: Likewise. + * gcc.target/arm/data-rel-2.c: Likewise. + * gcc.target/arm/data-rel-3.c: Likewise. + * gcc.target/arm/tail-long-call: Likewise. + * gcc.target/arm/tlscall.c: Likewise. + * gcc.target/arm/vfp-longcall-apcs: Likewise. + * gcc.target/arm/ivopts-2.c: Skip object-size test on + arm*-*-uclinuxfdpiceabi. + * gcc.target/arm/ivopts-3.c: Likewise. + * gcc.target/arm/ivopts-4.c: Likewise. + * gcc.target/arm/ivopts-5.c: Likewise. + * gcc.target/arm/pr43597.c: Likewise. + * gcc.target/arm/pr43920-2.c: Likewise. + * gcc.target/arm/pr45701-1.c: Skip scan-assembler on + arm*-*-uclinuxfdpiceabi. + * gcc.target/arm/pr45701-2.c: Likewise. + * gcc.target/arm/stack-red-zone.c: Likewise. + +2019-09-10 Christophe Lyon + Mickaël Guêné + + * gcc.target/arm/fp16-aapcs-2.c: Adjust scan-assembler-times. + * gcc.target/arm/fp16-aapcs-4.c: Likewise. + +2019-09-09 Marek Polacek + + PR c++/84374 - diagnose invalid uses of decltype(auto). + * g++.dg/cpp1y/auto-fn57.C: New test. + +2019-09-09 Segher Boessenkool + + * gcc.target/powerpc/rlwinm-0.c: Adjust expected instruction counts. + * gcc.target/powerpc/rlwinm-1.c: Ditto. + * gcc.target/powerpc/rlwinm-2.c: Ditto. + +2019-09-09 Barnaby Wilks + + * gcc.dg/fold-binary-math-casts.c: New test. + +2019-09-09 Jakub Jelinek + + PR target/87853 + * gcc.target/i386/pr87853.c: New test. + + PR target/91704 + * gcc.target/i386/pr91704.c: New test. + +2019-09-09 Jose E. Marchesi + + * gcc.dg/builtins-config.h: eBPF doesn't support C99 standard + functions. + * gcc.c-torture/compile/20101217-1.c: Add a function prototype for + printf. + * gcc.c-torture/compile/20000211-1.c: Skip if target bpf-*-*. + * gcc.c-torture/compile/poor.c: Likewise. + * gcc.c-torture/compile/pr25311.c: Likewise. + * gcc.c-torture/compile/pr39928-1.c: Likewise. + * gcc.c-torture/compile/pr70061.c: Likewise. + * gcc.c-torture/compile/920501-7.c: Likewise. + * gcc.c-torture/compile/20000403-1.c: Likewise. + * gcc.c-torture/compile/20001226-1.c: Likewise. + * gcc.c-torture/compile/20030903-1.c: Likewise. + * gcc.c-torture/compile/20031125-1.c: Likewise. + * gcc.c-torture/compile/20040101-1.c: Likewise. + * gcc.c-torture/compile/20040317-2.c: Likewise. + * gcc.c-torture/compile/20040726-1.c: Likewise. + * gcc.c-torture/compile/20051216-1.c: Likewise. + * gcc.c-torture/compile/900313-1.c: Likewise. + * gcc.c-torture/compile/920625-1.c: Likewise. + * gcc.c-torture/compile/930421-1.c: Likewise. + * gcc.c-torture/compile/930623-1.c: Likewise. + * gcc.c-torture/compile/961004-1.c: Likewise. + * gcc.c-torture/compile/980504-1.c: Likewise. + * gcc.c-torture/compile/980816-1.c: Likewise. + * gcc.c-torture/compile/990625-1.c: Likewise. + * gcc.c-torture/compile/DFcmp.c: Likewise. + * gcc.c-torture/compile/HIcmp.c: Likewise. + * gcc.c-torture/compile/HIset.c: Likewise. + * gcc.c-torture/compile/QIcmp.c: Likewise. + * gcc.c-torture/compile/QIset.c: Likewise. + * gcc.c-torture/compile/SFset.c: Likewise. + * gcc.c-torture/compile/SIcmp.c: Likewise. + * gcc.c-torture/compile/SIset.c: Likewise. + * gcc.c-torture/compile/UHIcmp.c: Likewise. + * gcc.c-torture/compile/UQIcmp.c: Likewise. + * gcc.c-torture/compile/USIcmp.c: Likewise. + * gcc.c-torture/compile/consec.c: Likewise. + * gcc.c-torture/compile/limits-fndefn.c: Likewise. + * gcc.c-torture/compile/lll.c: Likewise. + * gcc.c-torture/compile/parms.c: Likewise. + * gcc.c-torture/compile/pass.c: Likewise. + * gcc.c-torture/compile/pp.c: Likewise. + * gcc.c-torture/compile/pr32399.c: Likewise. + * gcc.c-torture/compile/pr34091.c: Likewise. + * gcc.c-torture/compile/pr34688.c: Likewise. + * gcc.c-torture/compile/pr37258.c: Likewise. + * gcc.c-torture/compile/pr37327.c: Likewise. + * gcc.c-torture/compile/pr37381.c: Likewise. + * gcc.c-torture/compile/pr37669-2.c: Likewise. + * gcc.c-torture/compile/pr37669.c: Likewise. + * gcc.c-torture/compile/pr37742-3.c: Likewise. + * gcc.c-torture/compile/pr44063.c: Likewise. + * gcc.c-torture/compile/pr48596.c: Likewise. + * gcc.c-torture/compile/pr51856.c: Likewise. + * gcc.c-torture/compile/pr54428.c: Likewise. + * gcc.c-torture/compile/pr54713-1.c: Likewise. + * gcc.c-torture/compile/pr54713-2.c: Likewise. + * gcc.c-torture/compile/pr54713-3.c: Likewise. + * gcc.c-torture/compile/pr55921.c: Likewise. + * gcc.c-torture/compile/pr70240.c: Likewise. + * gcc.c-torture/compile/pr70355.c: Likewise. + * gcc.c-torture/compile/pr82052.c: Likewise. + * gcc.c-torture/compile/pr83487.c: Likewise. + * gcc.c-torture/compile/pr86122.c: Likewise. + * gcc.c-torture/compile/pret-arg.c: Likewise. + * gcc.c-torture/compile/regs-arg-size.c: Likewise. + * gcc.c-torture/compile/structret.c: Likewise. + * gcc.c-torture/compile/uuarg.c: Likewise. + * gcc.dg/20001009-1.c: Likewise. + * gcc.dg/20020418-1.c: Likewise. + * gcc.dg/20020426-2.c: Likewise. + * gcc.dg/20020430-1.c: Likewise. + * gcc.dg/20040306-1.c: Likewise. + * gcc.dg/20040622-2.c: Likewise. + * gcc.dg/20050603-2.c: Likewise. + * gcc.dg/20050629-1.c: Likewise. + * gcc.dg/20061026.c: Likewise. + * gcc.dg/Warray-bounds-3.c: Likewise. + * gcc.dg/Warray-bounds-30.c: Likewise. + * gcc.dg/Wframe-larger-than-2.c: Likewise. + * gcc.dg/Wframe-larger-than.c: Likewise. + * gcc.dg/Wrestrict-11.c: Likewise. + * gcc.c-torture/compile/20000804-1.c: Likewise. + +2019-09-09 Jose E. Marchesi + + * lib/target-supports.exp (check_effective_target_trampolines): + Adapt to eBPF. + (check_effective_target_indirect_jumps): Likewise. + (check_effective_target_nonlocal_goto): Likewise. + (check_effective_target_global_constructor): Likewise. + (check_effective_target_return_address): Likewise. + +2019-09-09 Jose E. Marchesi + + * gcc.target/bpf/bpf.exp: New file. + * gcc.target/bpf/builtin-load.c: Likewise. + * cc.target/bpf/constant-calls.c: Likewise. + * gcc.target/bpf/diag-funargs.c: Likewise. + * gcc.target/bpf/diag-funargs-2.c: Likewise. + * gcc.target/bpf/diag-funargs-3.c: Likewise. + * gcc.target/bpf/diag-indcalls.c: Likewise. + * gcc.target/bpf/helper-bind.c: Likewise. + * cc.target/bpf/helper-bpf-redirect.c: Likewise. + * gcc.target/bpf/helper-clone-redirect.c: Likewise. + * gcc.target/bpf/helper-csum-diff.c: Likewise. + * gcc.target/bpf/helper-csum-update.c: Likewise. + * gcc.target/bpf/helper-current-task-under-cgroup.c: Likewise. + * gcc.target/bpf/helper-fib-lookup.c: Likewise. + * gcc.target/bpf/helper-get-cgroup-classid.c: Likewise. + * gcc.target/bpf/helper-get-current-cgroup-id.c: Likewise. + * gcc.target/bpf/helper-get-current-comm.c: Likewise. + * gcc.target/bpf/helper-get-current-pid-tgid.c: Likewise. + * gcc.target/bpf/helper-get-current-task.c: Likewise. + * gcc.target/bpf/helper-get-current-uid-gid.c: Likewise. + * gcc.target/bpf/helper-get-hash-recalc.c: Likewise. + * gcc.target/bpf/helper-get-listener-sock.c: Likewise. + * gcc.target/bpf/helper-get-local-storage.c: Likewise. + * gcc.target/bpf/helper-get-numa-node-id.c: Likewise. + * gcc.target/bpf/helper-get-prandom-u32.c: Likewise. + * gcc.target/bpf/helper-get-route-realm.c: Likewise. + * gcc.target/bpf/helper-get-smp-processor-id.c: Likewise. + * gcc.target/bpf/helper-get-socket-cookie.c: Likewise. + * gcc.target/bpf/helper-get-socket-uid.c: Likewise. + * gcc.target/bpf/helper-getsockopt.c: Likewise. + * gcc.target/bpf/helper-get-stack.c: Likewise. + * gcc.target/bpf/helper-get-stackid.c: Likewise. + * gcc.target/bpf/helper-ktime-get-ns.c: Likewise. + * gcc.target/bpf/helper-l3-csum-replace.c: Likewise. + * gcc.target/bpf/helper-l4-csum-replace.c: Likewise. + * gcc.target/bpf/helper-lwt-push-encap.c: Likewise. + * gcc.target/bpf/helper-lwt-seg6-action.c: Likewise. + * gcc.target/bpf/helper-lwt-seg6-adjust-srh.c: Likewise. + * gcc.target/bpf/helper-lwt-seg6-store-bytes.c: Likewise. + * gcc.target/bpf/helper-map-delete-elem.c: Likewise. + * gcc.target/bpf/helper-map-lookup-elem.c: Likewise. + * gcc.target/bpf/helper-map-peek-elem.c: Likewise. + * gcc.target/bpf/helper-map-pop-elem.c: Likewise. + * gcc.target/bpf/helper-map-push-elem.c: Likewise. + * gcc.target/bpf/helper-map-update-elem.c: Likewise. + * gcc.target/bpf/helper-msg-apply-bytes.c: Likewise. + * gcc.target/bpf/helper-msg-cork-bytes.c: Likewise. + * gcc.target/bpf/helper-msg-pop-data.c: Likewise. + * gcc.target/bpf/helper-msg-pull-data.c: Likewise. + * gcc.target/bpf/helper-msg-push-data.c: Likewise. + * gcc.target/bpf/helper-msg-redirect-hash.c: Likewise. + * gcc.target/bpf/helper-msg-redirect-map.c: Likewise. + * gcc.target/bpf/helper-override-return.c: Likewise. + * gcc.target/bpf/helper-perf-event-output.c: Likewise. + * gcc.target/bpf/helper-perf-event-read.c: Likewise. + * gcc.target/bpf/helper-perf-event-read-value.c: Likewise. + * gcc.target/bpf/helper-perf-prog-read-value.c: Likewise. + * gcc.target/bpf/helper-probe-read.c: Likewise. + * gcc.target/bpf/helper-probe-read-str.c: Likewise. + * gcc.target/bpf/helper-probe-write-user.c: Likewise. + * gcc.target/bpf/helper-rc-keydown.c: Likewise. + * gcc.target/bpf/helper-rc-pointer-rel.c: Likewise. + * gcc.target/bpf/helper-rc-repeat.c: Likewise. + * gcc.target/bpf/helper-redirect-map.c: Likewise. + * gcc.target/bpf/helper-set-hash.c: Likewise. + * gcc.target/bpf/helper-set-hash-invalid.c: Likewise. + * gcc.target/bpf/helper-setsockopt.c: Likewise. + * gcc.target/bpf/helper-skb-adjust-room.c: Likewise. + * gcc.target/bpf/helper-skb-cgroup-id.c: Likewise. + * gcc.target/bpf/helper-skb-change-head.c: Likewise. + * gcc.target/bpf/helper-skb-change-proto.c: Likewise. + * gcc.target/bpf/helper-skb-change-tail.c: Likewise. + * gcc.target/bpf/helper-skb-change-type.c: Likewise. + * gcc.target/bpf/helper-skb-ecn-set-ce.c: Likewise. + * gcc.target/bpf/helper-skb-get-tunnel-key.c: Likewise. + * gcc.target/bpf/helper-skb-get-tunnel-opt.c: Likewise. + * gcc.target/bpf/helper-skb-get-xfrm-state.c: Likewise. + * gcc.target/bpf/helper-skb-load-bytes.c: Likewise. + * gcc.target/bpf/helper-skb-load-bytes-relative.c: Likewise. + * gcc.target/bpf/helper-skb-pull-data.c: Likewise. + * gcc.target/bpf/helper-skb-set-tunnel-key.c: Likewise. + * gcc.target/bpf/helper-skb-set-tunnel-opt.c: Likewise. + * gcc.target/bpf/helper-skb-store-bytes.c: Likewise. + * gcc.target/bpf/helper-skb-under-cgroup.c: Likewise. + * gcc.target/bpf/helper-skb-vlan-pop.c: Likewise. + * gcc.target/bpf/helper-skb-vlan-push.c: Likewise. + * gcc.target/bpf/helper-skc-lookup-tcp.c: Likewise. + * gcc.target/bpf/helper-sk-fullsock.c: Likewise. + * gcc.target/bpf/helper-sk-lookup-tcp.c: Likewise. + * gcc.target/bpf/helper-sk-lookup-upd.c: Likewise. + * gcc.target/bpf/helper-sk-redirect-hash.c: Likewise. + * gcc.target/bpf/helper-sk-redirect-map.c: Likewise. + * gcc.target/bpf/helper-sk-release.c: Likewise. + * gcc.target/bpf/helper-sk-select-reuseport.c: Likewise. + * gcc.target/bpf/helper-sk-storage-delete.c: Likewise. + * gcc.target/bpf/helper-sk-storage-get.c: Likewise. + * gcc.target/bpf/helper-sock-hash-update.c: Likewise. + * gcc.target/bpf/helper-sock-map-update.c: Likewise. + * gcc.target/bpf/helper-sock-ops-cb-flags-set.c: Likewise. + * gcc.target/bpf/helper-spin-lock.c: Likewise. + * gcc.target/bpf/helper-spin-unlock.c: Likewise. + * gcc.target/bpf/helper-strtol.c: Likewise. + * gcc.target/bpf/helper-strtoul.c: Likewise. + * gcc.target/bpf/helper-sysctl-get-current-value.c: Likewise. + * gcc.target/bpf/helper-sysctl-get-name.c: Likewise. + * gcc.target/bpf/helper-sysctl-get-new-value.c: Likewise. + * gcc.target/bpf/helper-sysctl-set-new-value.c: Likewise. + * gcc.target/bpf/helper-tail-call.c: Likewise. + * gcc.target/bpf/helper-tcp-check-syncookie.c: Likewise. + * gcc.target/bpf/helper-tcp-sock.c: Likewise. + * gcc.target/bpf/helper-trace-printk.c: Likewise. + * gcc.target/bpf/helper-xdp-adjust-head.c: Likewise. + * gcc.target/bpf/helper-xdp-adjust-meta.c: Likewise. + * gcc.target/bpf/helper-xdp-adjust-tail.c: Likewise. + * gcc.target/bpf/skb-ancestor-cgroup-id.c: Likewise. + * gcc.target/bpf/sync-fetch-and-add.c: Likewise. + +2019-09-09 Jose E. Marchesi + + * lib/target-supports.exp (check_effective_target_indirect_calls): + New proc. + * gcc.c-torture/compile/20010102-1.c: Annotate with + dg-require-effective-target indirect_calls. + * gcc.c-torture/compile/20010107-1.c: Likewise. + * gcc.c-torture/compile/20011109-1.c: Likewise. + * gcc.c-torture/compile/20011218-1.c: Likewise. + * gcc.c-torture/compile/20011229-1.c: Likewise. + * gcc.c-torture/compile/20020129-1.c: Likewise. + * gcc.c-torture/compile/20020320-1.c: Likewise. + * gcc.c-torture/compile/20020706-1.c: Likewise. + * gcc.c-torture/compile/20020706-2.c: Likewise. + * gcc.c-torture/compile/20021205-1.c: Likewise. + * gcc.c-torture/compile/20030921-1.c: Likewise. + * gcc.c-torture/compile/20031023-1.c: Likewise. + * gcc.c-torture/compile/20031023-2.c: Likewise. + * gcc.c-torture/compile/20031023-3.c: Likewise. + * gcc.c-torture/compile/20031023-4.c: Likewise. + * gcc.c-torture/compile/20040614-1.c: Likewise. + * gcc.c-torture/compile/20040909-1.c: Likewise. + * gcc.c-torture/compile/20050122-1.c: Likewise. + * gcc.c-torture/compile/20050202-1.c: Likewise. + * gcc.c-torture/compile/20060208-1.c: Likewise. + * gcc.c-torture/compile/20081108-1.c: Likewise. + * gcc.c-torture/compile/20150327.c: Likewise. + * gcc.c-torture/compile/920428-2.c: Likewise. + * gcc.c-torture/compile/920928-5.c: Likewise. + * gcc.c-torture/compile/930117-1.c: Likewise. + * gcc.c-torture/compile/930607-1.c: Likewise. + * gcc.c-torture/compile/991213-2.c: Likewise. + * gcc.c-torture/compile/callind.c: Likewise. + * gcc.c-torture/compile/calls-void.c: Likewise. + * gcc.c-torture/compile/calls.c: Likewise. + * gcc.c-torture/compile/pr21840.c: Likewise. + * gcc.c-torture/compile/pr32139.c: Likewise. + * gcc.c-torture/compile/pr35607.c: Likewise. + * gcc.c-torture/compile/pr37433-1.c: Likewise. + * gcc.c-torture/compile/pr37433.c: Likewise. + * gcc.c-torture/compile/pr39941.c: Likewise. + * gcc.c-torture/compile/pr40080.c: Likewise. + * gcc.c-torture/compile/pr43635.c: Likewise. + * gcc.c-torture/compile/pr43791.c: Likewise. + * gcc.c-torture/compile/pr43845.c: Likewise. + * gcc.c-torture/compile/pr44043.c: Likewise. + * gcc.c-torture/compile/pr51694.c: Likewise. + * gcc.c-torture/compile/pr77754-2.c: Likewise. + * gcc.c-torture/compile/pr77754-3.c: Likewise. + * gcc.c-torture/compile/pr77754-4.c: Likewise. + * gcc.c-torture/compile/pr89663-2.c: Likewise. + * gcc.c-torture/compile/pta-1.c: Likewise. + * gcc.c-torture/compile/stack-check-1.c: Likewise. + * gcc.dg/Walloc-size-larger-than-18.c: Likewise. + +2019-09-09 Jose E. Marchesi + + * gcc.c-torture/compile/20000609-1.c: Annotate with + dg-require-stack-size. + * gcc.c-torture/compile/20000804-1.c: Likewise. + * gcc.c-torture/compile/20020304-1.c: Likewise. + * gcc.c-torture/compile/20020604-1.c: Likewise. + * gcc.c-torture/compile/20021015-1.c: Likewise. + * gcc.c-torture/compile/20050303-1.c: Likewise. + * gcc.c-torture/compile/20060421-1.c: Likewise. + * gcc.c-torture/compile/20071207-1.c: Likewise. + * gcc.c-torture/compile/20080903-1.c: Likewise. + * gcc.c-torture/compile/20121027-1.c: Likewise. + * gcc.c-torture/compile/20151204.c: Likewise. + * gcc.c-torture/compile/920501-12.c: Likewise. + * gcc.c-torture/compile/920501-4.c: Likewise. + * gcc.c-torture/compile/920723-1.c: Likewise. + * gcc.c-torture/compile/921202-1.c: Likewise. + * gcc.c-torture/compile/931003-1.c: Likewise. + * gcc.c-torture/compile/931004-1.c: Likewise. + * gcc.c-torture/compile/950719-1.c: Likewise. + * gcc.c-torture/compile/951222-1.c: Likewise. + * gcc.c-torture/compile/990517-1.c: Likewise. + * gcc.c-torture/compile/bcopy.c: Likewise. + * gcc.c-torture/compile/pr23929.c: Likewise. + * gcc.c-torture/compile/pr25310.c: Likewise. + * gcc.c-torture/compile/pr34458.c: Likewise. + * gcc.c-torture/compile/pr39937.c: Likewise. + * gcc.c-torture/compile/pr41181.c: Likewise. + * gcc.c-torture/compile/pr41634.c: Likewise. + * gcc.c-torture/compile/pr43415.c: Likewise. + * gcc.c-torture/compile/pr43417.c: Likewise. + * gcc.c-torture/compile/pr44788.c: Likewise. + * gcc.c-torture/compile/sound.c: Likewise. + +2019-09-07 Bernd Edlinger + + * gcc.target/arm/pr91684.c: Use effective-target arm_prefer_ldrd_strd. + +2019-09-07 David Edelsohn + + * g++.dg/cpp2a/decomp2.C: Add TLS options. + * gcc.target/powerpc/pr88233.c: Limit to lp64. + +2019-09-07 Jakub Jelinek + + PR tree-optimization/91665 + * gcc.dg/vect/pr91665.c: New test. + +2019-09-07 Bernd Edlinger + + PR target/91684 + * gcc.target/arm/pr91684.c: New test. + +2019-09-06 Ian Lance Taylor + + * go.test/test/fixedbugs/bug369.go: Update to match libgo update + to Go 1.13beta1. + +2019-09-06 David Edelsohn + + * gcc.dg/torture/inf-compare-1.c: Skip AIX. + * gcc.dg/torture/inf-compare-2.c: Skip AIX. + * gcc.dg/torture/inf-compare-3.c: Skip AIX. + * gcc.dg/torture/inf-compare-4.c: Skip AIX. + * gcc.dg/torture/pr52451.c: Skip AIX. + * gcc.dg/torture/pr68264.c: Skip AIX + * gcc.dg/torture/pr91323.c: Skip AIX. + + * g++.dg/warn/Warray-bounds-4.C: Skip AIX. + * g++.dg/warn/Warray-bounds-8.C: Skip AIX. + * g++.dg/opt/flifetime-dse2.C: XFAIL AIX. + * g++.dg/opt/flifetime-dse4.C: XFAIL AIX. + +2019-09-06 Caroline Tice + + PR testsuite/91670 + * g++.dg/ubsan/pr59415.C: Disable LTO, since test uses + -fvtable-verify, and the two options are no longer allowed + together. + +2019-09-06 Nathan Sidwell + + * c-c++-common/cpp/line-1.c: New. + +2019-09-06 Martin Liska + + PR c++/91125 + * g++.dg/parse/repo1.C: Remove. + * g++.dg/rtti/repo1.C: Remove. + * g++.dg/template/repo1.C: Remove. + * g++.dg/template/repo10.C: Remove. + * g++.dg/template/repo11.C: Remove. + * g++.dg/template/repo2.C: Remove. + * g++.dg/template/repo3.C: Remove. + * g++.dg/template/repo4.C: Remove. + * g++.dg/template/repo5.C: Remove. + * g++.dg/template/repo6.C: Remove. + * g++.dg/template/repo7.C: Remove. + * g++.dg/template/repo8.C: Remove. + * g++.dg/template/repo9.C: Remove. + * g++.old-deja/g++.pt/instantiate4.C: Remove. + * g++.old-deja/g++.pt/instantiate6.C: Remove. + * g++.old-deja/g++.pt/repo1.C: Remove. + * g++.old-deja/g++.pt/repo2.C: Remove. + * g++.old-deja/g++.pt/repo3.C: Remove. + * g++.old-deja/g++.pt/repo4.C: Remove. + * lib/g++.exp: Remove removal of repo files. + * lib/gcc-dg.exp: Likewise. + * lib/obj-c++.exp: Likewise. + +2019-09-05 Jakub Jelinek + Jim Wilson + + PR target/91635 + * gcc.c-torture/execute/pr91635.c: New test. + * gcc.target/riscv/shift-shift-4.c: New test. + * gcc.target/riscv/shift-shift-5.c: New test. + +2019-09-05 Harald Anlauf + + PR fortran/91496 + * gfortran.dg/directive_unroll_5.f90: Adjust error message. + +2019-09-05 Steven G. Kargl + + PR fortran/91660 + * gfortran.dg/pdt_4.f03: Fix invalid code. + * gfortran.dg/pr91660_1.f90: New test. + * gfortran.dg/pr91660_2.f90: Ditto. + +2019-09-05 Marek Polacek + + PR c++/91644 - ICE with constinit in function template. + * g++.dg/cpp2a/constinit13.C: New test. + +2019-09-05 Jakub Jelinek + + PR middle-end/91001 + PR middle-end/91105 + PR middle-end/91106 + * gcc.c-torture/compile/pr91001.c: New test. + +2019-09-05 Richard Biener + + PR rtl-optimization/91656 + * gcc.dg/torture/pr91656-1.c: New testcase. + * gcc.dg/torture/pr91656-2.c: Likewise. + * gcc.dg/torture/pr91656-3.c: Likewise. + +2019-09-05 Nathan Sidwell + + PR preprocessor/91639 + * c-c++-common/cpp/pr91639.c: New. + * c-c++-common/cpp/pr91639-one.h: New. + * c-c++-common/cpp/pr91639-two.h: New. + +2019-09-05 Richard Sandiford + + PR middle-end/91577 + * gfortran.dg/pr91577.f90: New test, taken from temporary_1.f90. + +2019-09-04 Steven G. Kargl + + PR fortran/91650 + * gfortran.dg/pr91650_1.f90: New test. + * gfortran.dg/pr91650_2.f90: Ditto. + +2019-09-04 Marek Polacek + + * g++.dg/cpp0x/initlist-deduce.C: Don't use -fdeduce-init-list. Remove + dg-warning. Add dg-error. + +2019-09-04 Prathamesh Kulkarni + + PR c/78736 + * gcc.dg/Wenum-conversion.c: New test-case. + +2019-09-03 Jozef Lawrynowicz + + * gcc.target/msp430/data-attributes-2.c: New test. + * gcc.target/msp430/function-attributes-4.c: Update dg-warning + strings. + * gcc.target/msp430/region-attribute-misuse.c: Likewise. + +2019-09-03 Kamlesh Kumar + + PR tree-optimization/91504 + gcc.dg/tree-ssa/pr91504.c: New test. + +2019-09-03 Jakub Jelinek + + PR target/91604 + * gcc.target/i386/pr91604.c: New test. + +2019-09-03 Ulrich Weigand + + * lib/compat.exp: Remove references to spu. + * lib/fortran-torture.exp: Likewise. + * lib/gcc-dg.exp: Likewise. + * lib/gfortran.exp: Likewise. + * lib/target-supports.exp: Likewise. + * lib/target-utils.exp: Likewise. + + * c-c++-common/torture/complex-sign-add.c: Remove references to spu. + * c-c++-common/torture/complex-sign-mixed-add.c: Likewise. + * c-c++-common/torture/complex-sign-mixed-div.c: Likewise. + * c-c++-common/torture/complex-sign-mixed-mul.c: Likewise. + * c-c++-common/torture/complex-sign-mixed-sub.c: Likewise. + * c-c++-common/torture/complex-sign-mul-minus-one.c: Likewise. + * c-c++-common/torture/complex-sign-mul-one.c: Likewise. + * c-c++-common/torture/complex-sign-mul.c: Likewise. + * c-c++-common/torture/complex-sign-sub.c: Likewise. + + * g++.dg/opt/temp1.C: Remove references to spu. + * g++.dg/opt/vt1.C: Likewise. + * g++.dg/torture/type-generic-1.C: Likewise. + * g++.dg/warn/pr30551-2.C: Likewise. + * g++.dg/warn/pr30551.C: Likewise. + * g++.old-deja/g++.jason/thunk2.C: Likewise. + * g++.old-deja/g++.other/comdat5.C: Likewise. + * g++.old-deja/g++.other/local-alloc1.C: Likewise. + + * gcc.c-torture/compile/20001226-1.c: Remove references to spu. + * gcc.c-torture/execute/20030222-1.c: Likewise. + * gcc.c-torture/execute/20031003-1.c: Likewise. + * gcc.c-torture/execute/20101011-1.c: Likewise. + * gcc.c-torture/execute/conversion.c: Likewise. + * gcc.c-torture/execute/ieee/compare-fp-4.x: Likewise. + * gcc.c-torture/execute/ieee/fp-cmp-2.x: Likewise. + * gcc.c-torture/execute/ieee/inf-1.c: Likewise. + * gcc.c-torture/execute/ieee/inf-2.c: Likewise. + * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: Likewise. + * gcc.c-torture/execute/ieee/rbug.c: Likewise. + * gcc.c-torture/execute/pr39228.c: Likewise. + * gcc.c-torture/execute/ieee/20010114-2.x: Remove file. + * gcc.c-torture/execute/ieee/20030331-1.x: Remove file. + * gcc.c-torture/execute/ieee/920518-1.x: Remove file. + * gcc.c-torture/execute/ieee/compare-fp-1.x: Remove file. + * gcc.c-torture/execute/ieee/fp-cmp-4f.x: Remove file. + * gcc.c-torture/execute/ieee/fp-cmp-8f.x: Remove file. + + * gcc.dg/20020312-2.c: Remove references to spu. + * gcc.dg/20030702-1.c: Likewise. + * gcc.dg/and-1.c: Likewise. + * gcc.dg/builtin-inf-1.c: Likewise. + * gcc.dg/builtins-1.c: Likewise. + * gcc.dg/builtins-43.c: Likewise. + * gcc.dg/builtins-44.c: Likewise. + * gcc.dg/builtins-45.c: Likewise. + * gcc.dg/float-range-1.c: Likewise. + * gcc.dg/float-range-3.c: Likewise. + * gcc.dg/float-range-4.c: Likewise. + * gcc.dg/float-range-5.c: Likewise. + * gcc.dg/fold-overflow-1.c: Likewise. + * gcc.dg/format/ms_unnamed-1.c: Likewise. + * gcc.dg/format/unnamed-1.c: Likewise. + * gcc.dg/hex-round-1.c: Likewise. + * gcc.dg/hex-round-2.c: Likewise. + * gcc.dg/lower-subreg-1.c: Likewise. + * gcc.dg/nrv3.c: Likewise. + * gcc.dg/pr15784-3.c: Likewise. + * gcc.dg/pr27095.c: Likewise. + * gcc.dg/pr28243.c: Likewise. + * gcc.dg/pr28796-2.c: Likewise. + * gcc.dg/pr30551-3.c: Likewise. + * gcc.dg/pr30551-6.c: Likewise. + * gcc.dg/pr30551.c: Likewise. + * gcc.dg/pr70317.c: Likewise. + * gcc.dg/sms-1.c: Likewise. + * gcc.dg/sms-2.c: Likewise. + * gcc.dg/sms-3.c: Likewise. + * gcc.dg/sms-4.c: Likewise. + * gcc.dg/sms-5.c: Likewise. + * gcc.dg/sms-6.c: Likewise. + * gcc.dg/sms-7.c: Likewise. + * gcc.dg/stack-usage-1.c: Likewise. + * gcc.dg/strlenopt-73.c: Likewise. + * gcc.dg/titype-1.c: Likewise. + * gcc.dg/tls/thr-cse-1.c: Likewise. + * gcc.dg/torture/builtin-attr-1.c: Likewise. + * gcc.dg/torture/builtin-complex-1.c: Likewise. + * gcc.dg/torture/builtin-cproj-1.c: Likewise. + * gcc.dg/torture/builtin-frexp-1.c: Likewise. + * gcc.dg/torture/builtin-ldexp-1.c: Likewise. + * gcc.dg/torture/builtin-logb-1.c: Likewise. + * gcc.dg/torture/builtin-math-2.c: Likewise. + * gcc.dg/torture/builtin-math-5.c: Likewise. + * gcc.dg/torture/builtin-modf-1.c: Likewise. + * gcc.dg/torture/fp-int-convert.h: Likewise. + * gcc.dg/torture/pr25947-1.c: Likewise. + * gcc.dg/torture/type-generic-1.c: Likewise. + * gcc.dg/tree-ssa/20040204-1.c: Likewise. + * gcc.dg/tree-ssa/ivopts-1.c: Likewise. + * gcc.dg/tree-ssa/ssa-fre-3.c: Likewise. + * gcc.dg/tree-ssa/vector-6.c: Likewise. + * gcc.dg/uninit-C-O0.c: Likewise. + * gcc.dg/uninit-C.c: Likewise. + * gcc.dg/vect/no-math-errno-slp-32.c: Likewise. + * gcc.dg/vect/no-math-errno-vect-pow-1.c: Likewise. + * gcc.dg/vect/vect-float-extend-1.c: Likewise. + * gcc.dg/vect/vect-float-truncate-1.c: Likewise. + * gcc.dg/vect/vect.exp: Likewise. + * gcc.gd/vect/costmodel/spu/: Remove directory. + + * gcc.target/spu/: Remove directory. + + * gfortran.dg/bessel_6.f90: Remove references to spu. + * gfortran.dg/bessel_7.f90: Likewise. + * gfortran.dg/char4_iunit_1.f03: Likewise. + * gfortran.dg/chmod_1.f90: Likewise. + * gfortran.dg/chmod_2.f90: Likewise. + * gfortran.dg/chmod_3.f90: Likewise. + * gfortran.dg/default_format_1.f90: Likewise. + * gfortran.dg/default_format_denormal_1.f90: Likewise. + * gfortran.dg/erf_2.F90: Likewise. + * gfortran.dg/erf_3.F90: Likewise. + * gfortran.dg/init_flag_10.f90: Likewise. + * gfortran.dg/init_flag_3.f90: Likewise. + * gfortran.dg/int_conv_2.f90: Likewise. + * gfortran.dg/integer_exponentiation_3.F90: Likewise. + * gfortran.dg/integer_exponentiation_5.F90: Likewise. + * gfortran.dg/isnan_1.f90: Likewise. + * gfortran.dg/isnan_2.f90: Likewise. + * gfortran.dg/maxloc_2.f90: Likewise. + * gfortran.dg/maxlocval_2.f90: Likewise. + * gfortran.dg/maxlocval_4.f90: Likewise. + * gfortran.dg/minloc_1.f90: Likewise. + * gfortran.dg/minlocval_1.f90: Likewise. + * gfortran.dg/minlocval_4.f90: Likewise. + * gfortran.dg/module_nan.f90: Likewise. + * gfortran.dg/namelist_42.f90: Likewise. + * gfortran.dg/namelist_43.f90: Likewise. + * gfortran.dg/nan_1.f90: Likewise. + * gfortran.dg/nan_2.f90: Likewise. + * gfortran.dg/nan_3.f90: Likewise. + * gfortran.dg/nan_4.f90: Likewise. + * gfortran.dg/nan_5.f90: Likewise. + * gfortran.dg/nan_6.f90: Likewise. + * gfortran.dg/nearest_1.f90: Likewise. + * gfortran.dg/nearest_3.f90: Likewise. + * gfortran.dg/open_errors.f90: Likewise. + * gfortran.dg/pr20257.f90: Likewise. + * gfortran.dg/read_infnan_1.f90: Likewise. + * gfortran.dg/real_const_3.f90: Likewise. + * gfortran.dg/realloc_on_assign_2.f03: Likewise. + * gfortran.dg/reassoc_4.f: Likewise. + * gfortran.dg/scalar_mask_2.f90: Likewise. + * gfortran.dg/scratch_1.f90: Likewise. + * gfortran.dg/stat_1.f90: Likewise. + * gfortran.dg/stat_2.f90: Likewise. + * gfortran.dg/transfer_simplify_1.f90: Likewise. + * gfortran.dg/typebound_operator_9.f03: Likewise. + + * gfortran.fortran-torture/execute/intrinsic_nearest.x: Remove + references to spu. + * gfortran.fortran-torture/execute/intrinsic_set_exponent.x: Likewise. + * gfortran.fortran-torture/execute/nan_inf_fmt.x: Likewise. + * gfortran.fortran-torture/execute/getarg_1.x: Remove file. + +2019-09-03 Bernd Edlinger + + PR middle-end/91603 + * gcc.target/arm/pr91603.c: New test. + +2019-09-03 Ilya Leoshkevich + + * gcc.target/s390/sigfpe-eh.c: New test. + +2019-09-03 Kyrylo Tkachov + + * gcc.target/aarch64/acle/jcvt_1.c: New test. + +2019-09-03 Kyrylo Tkachov + + * gcc.target/aarch64/acle/rintnzx_1.c: New test. + * gcc.target/aarch64/simd/vrndnzx_1.c: Likewise. + +2019-09-03 Jakub Jelinek + Richard Biener + + PR tree-optimization/91597 + * gcc.c-torture/execute/pr91597.c: New test. + +2019-09-03 Alexandre Oliva + + * gcc.target/i386/20020616-1.c: Preserve full register across + main. + +2019-09-02 Paul Thomas + + PR fortran/91589 + * gfortran.dg/pr91589.f90 : New test. + +2019-09-02 Steven G. Kargl + + PR fortran/91552 + * gfortran.dg/pr91552.f90: New test. + +2019-09-02 Bernd Edlinger + + PR middle-end/91605 + * g++.target/i386/pr91605.C: New test. + +2019-09-02 Jakub Jelinek + + PR tree-optimization/91632 + * gcc.c-torture/execute/pr91632.c: New test. + +2019-09-02 Eric Botcazou + + * gcc.dg/tree-ssa/slsr-42.c: New test. + +2019-09-02 Martin Liska + + PR c++/91155 + * g++.dg/torture/pr91155.C: New test. + +2019-09-01 Marek Polacek + + PR c++/91129 - wrong error with binary op in template argument. + * g++.dg/cpp1y/nontype1.C: New test. + +2019-09-01 Iain Sandoe + + * gcc.c-torture/compile/20190827-1.c: Add dg-requires-alias. + +2019-09-01 Eric Botcazou + + * gcc.c-torture/execute/20190901-1.c: New test. + + * lib/target-supports.exp (check_effective_target_pthread): Add + #include directive to the test. + +2019-09-01 Paul Thomas + + * gfortran.dg/select_rank_1.f90 : New test. + * gfortran.dg/select_rank_2.f90 : New test. + +2019-09-01 Jakub Jelinek + + PR middle-end/91623 + * gcc.target/i386/pr91623.c: New test. + + PR lto/91572 + * g++.dg/lto/pr91572_0.C: New test. + +2019-08-30 Steven G. Kargl + + PR fortran/91587 + * gfortran.dg/pr91587.f90: New test. + +2019-08-30 Martin Sebor + + PR middle-end/91599 + * gcc.dg/Wstringop-overflow-16.c: New test. + + PR middle-end/91584 + * gfortran.dg/char_array_constructor_4.f90: New test. + +2019-08-30 Eric Botcazou + + * gnat.dg/pack24.adb: New test. + +2019-08-30 Jeff Law + + * gcc.target/mips/r10k-cache-barrier-9.c: Suppress warnings. + +2019-08-30 Martin Jambor + + tree-optimization/91579 + * gcc.dg/tree-ssa/pr91579.c: New test. + +2019-08-29 Jakub Jelinek + + PR target/91560 + * gcc.dg/torture/vshuf-8.inc: Add two further permutations. + + PR tree-optimization/91351 + * g++.dg/opt/pr91351.C: New test. + +2019-08-29 Paolo Carlini + + * g++.dg/spellcheck-typenames.C: Adjust expected locations. + * g++.dg/cpp0x/pr84676.C: Check locations. + * g++.dg/other/pr88187.C: Likewise. + * g++.dg/parse/crash13.C: Likewise. + * g++.dg/parse/crash46.C: Likewise. + * g++.dg/parse/template28.C: Likewise. + * g++.dg/parse/typename4.C: Likewise. + +2019-08-29 Richard Biener + + PR tree-optimization/91568 + * gfortran.dg/pr91568.f: New testcase. + +2019-08-28 Marek Polacek + + Implement P1152R4: Deprecating some uses of volatile. + PR c++/91361 + * c-c++-common/Wbool-operation-1.c: Use -Wno-volatile in C++. + * c-c++-common/gomp/atomic-1.c: Likewise. + * c-c++-common/gomp/atomic-9.c: Likewise. + * c-c++-common/gomp/depend-iterator-1.c: Likewise. + * c-c++-common/gomp/loop-1.c: Adjust warning location for C++. + * c-c++-common/gomp/order-3.c: Likewise. + * c-c++-common/pr69733.c: Use -Wno-volatile in C++. + * c-c++-common/spec-barrier-2.c: Likewise. + * c-c++-common/tm/pr54893.c: Likewise. + * g++.dg/cpp0x/pr65327.C: Add dg-warning. + * g++.dg/cpp0x/rv-conv2.C: Likewise. + * g++.dg/cpp0x/rv1n.C: Likewise. + * g++.dg/cpp0x/rv1p.C: Likewise. + * g++.dg/cpp0x/rv2n.C: Likewise. + * g++.dg/cpp0x/rv2p.C: Likewise. + * g++.dg/cpp0x/rv3n.C: Likewise. + * g++.dg/cpp0x/rv3p.C: Likewise. + * g++.dg/cpp0x/rv4n.C: Likewise. + * g++.dg/cpp0x/rv4p.C: Likewise. + * g++.dg/cpp0x/rv5n.C: Likewise. + * g++.dg/cpp0x/rv5p.C: Likewise. + * g++.dg/cpp0x/rv6n.C: Likewise. + * g++.dg/cpp0x/rv6p.C: Likewise. + * g++.dg/cpp0x/rv7n.C: Likewise. + * g++.dg/cpp0x/rv7p.C: Likewise. + * g++.dg/cpp0x/rv8p.C: Likewise. + * g++.dg/cpp0x/trailing14.C: Use -Wno-volatile. + * g++.dg/cpp1y/new1.C: Add dg-warning. + * g++.dg/cpp2a/volatile1.C: New test. + * g++.dg/cpp2a/volatile2.C: New test. + * g++.dg/cpp2a/volatile3.C: New test. + * g++.dg/cpp2a/volatile4.C: New test. + * g++.dg/expr/bool3.C: Add dg-warning. + * g++.dg/expr/bool4.C: Likewise. + * g++.dg/expr/cond9.C: Likewise. + * g++.dg/ext/vector25.C: Likewise. + * g++.dg/gomp/depend-iterator-1.C: Use -Wno-volatile. + * g++.dg/inherit/covariant21.C: Add dg-warning. + * g++.dg/init/ref18.C: Likewise. + * g++.dg/ipa/pr63838.C: Likewise. + * g++.dg/overload/rvalue2.C: Likewise. + * g++.dg/parse/semicolon4.C: Likewise. + * g++.dg/warn/Wreturn-type-4.C: Likewise. + * g++.dg/warn/pr36069.C: Likewise. + * g++.old-deja/g++.mike/p9506.C: Likewise. + * g++.old-deja/g++.other/volatile1.C: Likewise. + +2019-08-28 Steven G. Kargl + + PR fortran/91551 + * gfortran.dg/allocated_3.f90 + +2019-08-28 Marek Polacek + + PR c++/91360 - Implement C++20 P1143R2: constinit. + * g++.dg/cpp2a/constinit1.C: New test. + * g++.dg/cpp2a/constinit2.C: New test. + * g++.dg/cpp2a/constinit3.C: New test. + * g++.dg/cpp2a/constinit4.C: New test. + * g++.dg/cpp2a/constinit5.C: New test. + * g++.dg/cpp2a/constinit6.C: New test. + * g++.dg/cpp2a/constinit7.C: New test. + * g++.dg/cpp2a/constinit8.C: New test. + * g++.dg/cpp2a/constinit9.C: New test. + * g++.dg/cpp2a/constinit10.C: New test. + * g++.dg/cpp2a/constinit11.C: New test. + * g++.dg/cpp2a/constinit12.C: New test. + +2019-08-28 Steven G. Kargl + + PR fortran/91565 + * gfortran.dg/pr91565.f90: New test. + +2019-08-28 Steven G. Kargl + + PR fortran/91564 + * gfortran.dg/pr91564.f90: New test. + +2019-08-28 Martin Sebor + + PR tree-optimization/91457 + * c-c++-common/Wstringop-overflow-2.c: New test. + * g++.dg/warn/Warray-bounds-8.C: New test. + * g++.dg/warn/Wstringop-overflow-3.C: New test. + * gcc.dg/Wstringop-overflow-15.c: New test. + +2019-08-16 Martin Liska + + PR c++/90613 + * g++.dg/lookup/using61.C: New. + +2019-08-28 Bernd Edlinger + + PR middle-end/89544 + * gcc.target/arm/unaligned-argument-3.c: New test. + +2019-08-27 Marek Polacek + + PR c++/81676 - bogus -Wunused warnings in constexpr if. + * g++.dg/cpp1z/constexpr-if31.C: New test. + * g++.dg/cpp1z/constexpr-if32.C: New test. + + PR c++/91428 - warn about std::is_constant_evaluated in if constexpr. + * g++.dg/cpp2a/is-constant-evaluated9.C: New test. + +2019-08-27 Martin Sebor + + PR tree-optimization/91567 + * gcc.dg/tree-ssa/builtin-snprintf-6.c: Xfail a subset of assertions + on targets other than x86_64 to work around PR 83543. + * gcc.dg/tree-ssa/builtin-sprintf-warn-22.c: New test. + +2019-08-27 Jeff Law + + * gcc.c-torture/compile/20190827-1.c: New test. + +2019-08-27 Harald Anlauf + + PR fortran/91496 + * gfortran.dg/pr91496.f90: New testcase. + +2019-08-27 Uroš Bizjak + + * gcc.target/i386/sse4_1-round-roundeven-1.c (dg-options): + Add -mfpmath=sse. + * gcc.target/i386/sse4_1-round-roundeven-2.c (dg-options): Ditto. + +2019-08-27 Uroš Bizjak + + PR target/91528 + * gcc.target/i386/pr91528.c: New test. + +2019-08-27 Martin Sebor + + PR c++/83431 + PR testsuite/91562 + * gcc.dg/strlenopt-8.c: Adjust pass/dump name. + +2019-08-27 Jakub Jelinek + + PR c++/91415 + * g++.dg/warn/sequence-pt-4.C: New test. + +2019-08-27 Robin Dapp + + PR testsuite/91549 + * gcc.dg/wrapped-binop-simplify.c: Test only on x86, s390 with lp64. + +2019-08-26 Thomas Koenig + + PR fortran/91390 + PR fortran/91473 + * gfortran.dg/used_before_typed_4.f90: Change warning to error. + * gfortran.dg/argument_checking_20.f90: New test. + +2019-08-26 Marek Polacek + + PR c++/91545 - ICE in constexpr store evaluation. + * g++.dg/cpp0x/pr91545.C: New test. + +2019-08-26 Tejas Joshi + + * gcc.target/i386/sse4_1-round-roundeven-1.c: New test. + * gcc.target/i386/sse4_1-round-roundeven-2.c: New test. + +2019-08-26 Tejas Joshi + + * gcc.dg/torture/builtin-round-roundeven.c: New test. + * gcc.dg/torture/builtin-round-roundevenf128.c: Likewise. + +2019-08-26 Robin Dapp + + * gcc.dg/tree-ssa/copy-headers-5.c: Do not run vrp pass. + * gcc.dg/tree-ssa/copy-headers-7.c: Do not run vrp pass. + * gcc.dg/tree-ssa/loop-15.c: Remove XFAIL. + * gcc.dg/tree-ssa/pr23744.c: Change search pattern. + * gcc.dg/wrapped-binop-simplify.c: New test. + +2019-08-26 Kito Cheng + + * gcc.target/riscv/li.c: New test. + +2019-08-24 Nathan Sidwell + + * g++.dg/inherit/virtual14.C: New. + +2019-08-24 Thomas Koenig + + PR fortran/91390 + PR fortran/91519 + * gfortran.dg/bessel_3.f90: Add type mismatch errors. + * gfortran.dg/coarray_7.f90: Rename subroutines to avoid + additional errors. + * gfortran.dg/g77/20010519-1.f: Add -std=legacy. Remove + warnings for ASSIGN. Add warnings for type mismatch. + * gfortran.dg/goacc/acc_on_device-1.f95: Add -std=legacy. + Add catch-all warning. + * gfortran.dg/internal_pack_9.f90: Rename subroutine to + avoid type error. + * gfortran.dg/internal_pack_9.f90: Add -std=legacy. Add + warnings for type mismatch. + * gfortran.dg/pr39937.f: Add -std=legacy and type warnings. Move + here from + * gfortran.fortran-torture/compile/pr39937.f: Move to gfortran.dg. + +2019-08-24 Paolo Carlini + + * g++.dg/conversion/simd4.C: Test all the locations. + +2019-08-23 Marek Polacek + + PR c++/91521 - wrong error with operator->. + * g++.dg/parse/operator8.C: New test. + +2019-08-23 Segher Boessenkool + + PR target/91481 + * gcc.target/powerpc/darn-3.c: New testcase. + +2019-08-23 Marek Polacek + + PR c++/79817 - attribute deprecated on namespace. + * g++.dg/cpp0x/attributes-namespace1.C: New test. + * g++.dg/cpp0x/attributes-namespace2.C: New test. + * g++.dg/cpp0x/attributes-namespace3.C: New test. + * g++.dg/cpp0x/attributes-namespace4.C: New test. + * g++.dg/cpp0x/attributes-namespace5.C: New test. + * g++.dg/cpp1z/namespace-attribs.C: Adjust. + * g++.dg/cpp1z/namespace-attribs2.C: Adjust. + +2019-08-23 Mihailo Stojanovic + + * gcc.target/mips/get-fcsr-3.c: New test. + +2019-08-23 Martin Sebor + + PR c++/83431 + * gcc.dg/strlenopt-63.c: New test. + * gcc.dg/pr79538.c: Adjust text of expected warning. + * gcc.dg/pr81292-1.c: Adjust pass name. + * gcc.dg/pr81292-2.c: Same. + * gcc.dg/pr81703.c: Same. + * gcc.dg/strcmpopt_2.c: Same. + * gcc.dg/strcmpopt_3.c: Same. + * gcc.dg/strcmpopt_4.c: Same. + * gcc.dg/strlenopt-1.c: Same. + * gcc.dg/strlenopt-10.c: Same. + * gcc.dg/strlenopt-11.c: Same. + * gcc.dg/strlenopt-13.c: Same. + * gcc.dg/strlenopt-14g.c: Same. + * gcc.dg/strlenopt-14gf.c: Same. + * gcc.dg/strlenopt-15.c: Same. + * gcc.dg/strlenopt-16g.c: Same. + * gcc.dg/strlenopt-17g.c: Same. + * gcc.dg/strlenopt-18g.c: Same. + * gcc.dg/strlenopt-19.c: Same. + * gcc.dg/strlenopt-1f.c: Same. + * gcc.dg/strlenopt-2.c: Same. + * gcc.dg/strlenopt-20.c: Same. + * gcc.dg/strlenopt-21.c: Same. + * gcc.dg/strlenopt-22.c: Same. + * gcc.dg/strlenopt-22g.c: Same. + * gcc.dg/strlenopt-24.c: Same. + * gcc.dg/strlenopt-25.c: Same. + * gcc.dg/strlenopt-26.c: Same. + * gcc.dg/strlenopt-27.c: Same. + * gcc.dg/strlenopt-28.c: Same. + * gcc.dg/strlenopt-29.c: Same. + * gcc.dg/strlenopt-2f.c: Same. + * gcc.dg/strlenopt-3.c: Same. + * gcc.dg/strlenopt-30.c: Same. + * gcc.dg/strlenopt-31g.c: Same. + * gcc.dg/strlenopt-32.c: Same. + * gcc.dg/strlenopt-33.c: Same. + * gcc.dg/strlenopt-33g.c: Same. + * gcc.dg/strlenopt-34.c: Same. + * gcc.dg/strlenopt-35.c: Same. + * gcc.dg/strlenopt-4.c: Same. + * gcc.dg/strlenopt-48.c: Same. + * gcc.dg/strlenopt-49.c: Same. + * gcc.dg/strlenopt-4g.c: Same. + * gcc.dg/strlenopt-4gf.c: Same. + * gcc.dg/strlenopt-5.c: Same. + * gcc.dg/strlenopt-50.c: Same. + * gcc.dg/strlenopt-51.c: Same. + * gcc.dg/strlenopt-52.c: Same. + * gcc.dg/strlenopt-53.c: Same. + * gcc.dg/strlenopt-54.c: Same. + * gcc.dg/strlenopt-55.c: Same. + * gcc.dg/strlenopt-56.c: Same. + * gcc.dg/strlenopt-6.c: Same. + * gcc.dg/strlenopt-61.c: Same. + * gcc.dg/strlenopt-7.c: Same. + * gcc.dg/strlenopt-8.c: Same. + * gcc.dg/strlenopt-9.c: Same. + * gcc.dg/strlenopt.h (snprintf, snprintf): Declare. + * gcc.dg/tree-ssa/builtin-snprintf-6.c: New test. + * gcc.dg/tree-ssa/builtin-snprintf-7.c: New test. + * gcc.dg/tree-ssa/builtin-snprintf-8.c: New test. + * gcc.dg/tree-ssa/builtin-snprintf-9.c: New test. + * gcc.dg/tree-ssa/builtin-sprintf-warn-21.c: New test. + * gcc.dg/tree-ssa/dump-4.c: New test. + * gcc.dg/tree-ssa/pr83501.c: Adjust pass name. + +2019-08-23 Martin Sebor + + * gcc.dg/Warray-bounds-36.c: Make functions static to avoid failures + with -fpic. + * gcc.dg/Warray-bounds-41.c: Same. + * gcc.dg/pr78973.c: Same. + * gcc.dg/pr78973-2.c: Same. + +2019-08-22 Marek Polacek + + PR c++/91304 - prefix attributes ignored in condition. + * g++.dg/cpp0x/gen-attrs-70.C: New test. + +2019-08-22 Martin Sebor + + PR middle-end/91490 + * c-c++-common/Warray-bounds-7.c: New test. + * gcc.dg/Warray-bounds-39.c: Expect either -Warray-bounds or + -Wstringop-overflow. + * gcc.dg/strlenopt-78.c: New test. + +2019-08-22 Rainer Orth + + * gcc.target/i386/minmax-4.c: Add -mno-stackrealign to dg-options. + * gcc.target/i386/minmax-5.c: Likewise. + * gcc.target/i386/minmax-6.c: Likewise. + * gcc.target/i386/minmax-7.c: Likewise. + * gcc.target/i386/pr91154.c: Likewise. + +2019-08-22 Eric Botcazou + + * c-c++-common/dump-ada-spec-15.c: Check that the parameters are named. + +2019-08-22 Kyrylo Tkachov + + * gcc.target/arm/acle/crc_hf_1.c: New test. + +2019-08-22 Wilco Dijkstra + + * gcc.target/arm/neon-extend-1.c: Remove test. + * gcc.target/arm/neon-extend-2.c: Remove test. + +2019-08-22 Sylvia Taylor + + * gcc.target/aarch64/advsimd-intrinsics/vld1x4.c: New test. + * gcc.target/aarch64/advsimd-intrinsics/vst1x4.c: New test. + +2019-08-22 Prathamesh Kulkarni + Richard Sandiford + + PR target/88839 + * gcc.target/aarch64/sve/sel_1.c: New test. + * gcc.target/aarch64/sve/sel_2.c: Likewise. + * gcc.target/aarch64/sve/sel_3.c: Likewise. + * gcc.target/aarch64/sve/sel_4.c: Likewise. + * gcc.target/aarch64/sve/sel_5.c: Likewise. + * gcc.target/aarch64/sve/sel_6.c: Likewise. + +2019-08-21 Richard Sandiford + + PR c++/91505 + * g++.target/i386/crc32-4.C: New test. + +2019-08-21 Richard Biener + + PR tree-optimization/91482 + * gcc.dg/tree-ssa/pr91482.c: New testcase. + +2019-08-21 Eric Botcazou + + * c-c++-common/dump-ada-spec-15.c: New test. + +2019-08-21 Christophe Lyon + + * gcc.target/arm/cmse/cmse-9.c: Add quotes to expected + warning messages. + +2019-08-21 Eric Botcazou + + * gnat.dg/prot9.adb, gnat.dg/prot9_gen.ads, + gnat.dg/prot9_pkg1.ads, gnat.dg/prot9_pkg2.ads: New testcase. + +2019-08-21 Javier Miranda + + * gnat.dg/implicit_param.adb, gnat.dg/implicit_param_pkg.ads: + New testcase. + +2019-08-20 Martin Sebor + + PR testsuite/91458 + * g++.dg/tree-ssa/ssa-dse-1.C: Use the same search pattern + unconditionally (correcting r272199, PR middle-end/90676). + * gcc.dg/tree-prof/stringop-2.c: Same. + +2019-08-20 Ian Lance Taylor + + * go.test/test/fixedbugs/bug073.go: Update for language changes. + +2019-08-20 Matthew Beliveau + + * gcc.dg/tree-ssa/redundant-assign-zero-1.c: New test. + * gcc.dg/tree-ssa/redundant-assign-zero-2.c: New test. + +2019-08-20 Richard Biener + + PR tree-optimization/37242 + * gcc.dg/tree-ssa/ssa-fre-80.c: New testcase. + +2019-08-20 Ed Schonberg + + * gnat.dg/storage_size1.adb: New testcase. + +2019-08-20 Ed Schonberg + + * gnat.dg/loop_entry2.adb: New testcase. + +2019-08-20 Ed Schonberg + + * gnat.dg/tagged5.adb, gnat.dg/tagged5.ads: New testcase. + +2019-08-20 Gary Dismukes + + * gnat.dg/type_conv2.adb, gnat.dg/type_conv2.ads: New testcase. + +2019-08-20 Bob Duff + + * gnat.dg/unchecked_convert14.adb: New testcase. + +2019-08-20 Bob Duff + + * gnat.dg/object_size1.adb: New testcase. + +2019-08-20 Eric Botcazou + + * gcc.c-torture/execute/20190820-1.c: New test. + +2019-08-20 Richard Biener + + PR target/91498 + * gcc.target/i386/minmax-7.c: New testcase. + +2019-08-20 Lili Cui + + * gcc.target/i386/funcspec-56.inc: Handle new march. + * g++.target/i386/mv16.C: Handle new march + +2019-08-20 Bernd Edlinger + + PR middle-end/89544 + * gcc.target/arm/unaligned-argument-1.c: New test. + * gcc.target/arm/unaligned-argument-2.c: New test. + +2019-08-19 Joel Hutton + + * gcc.target/aarch64/fmul_scvtf_1.c: New test. + +2019-08-19 Marek Polacek + + PR c++/91264 - detect modifying const objects in constexpr. + * g++.dg/cpp1y/constexpr-tracking-const1.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const2.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const3.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const4.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const5.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const6.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const7.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const8.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const9.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const10.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const11.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const12.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const13.C: New test. + * g++.dg/cpp1y/constexpr-tracking-const14.C: New test. + +2019-08-19 Eric Botcazou + + * gnat.dg/elab8.adb, gnat.dg/elab8_gen.adb, + gnat.dg/elab8_gen.ads, gnat.dg/elab8_pkg.adb, + gnat.dg/elab8_pkg.ads: New testcase. + +2019-08-19 Bob Duff + + * gnat.dg/warn29.adb, gnat.dg/warn29.ads: New testcase. + +2019-08-19 Ed Schonberg + + * gnat.dg/expr_func9.adb: New testcase. + +2019-08-19 Bob Duff + + * gnat.dg/valid_scalars2.adb: New testcase. + +2019-08-19 Eric Botcazou + + * gnat.dg/generic_inst12.adb, gnat.dg/generic_inst12_pkg1.adb, + gnat.dg/generic_inst12_pkg1.ads, + gnat.dg/generic_inst12_pkg2.ads: New testcase. + +2019-08-19 Ed Schonberg + + * gnat.dg/warn28.adb, gnat.dg/warn28.ads: New testcase. + +2019-08-19 Ed Schonberg + + * gnat.dg/rep_clause9.adb: New testcase. + +2019-08-19 Olivier Hainque + + * gnat.dg/openacc1.adb: New testcase. + +2019-08-19 Kito Cheng + + PR target/91441 + * gcc.target/riscv/pr91441.c: New. + +2019-08-18 Steven G. Kargl + + PR fortran/91485 + * gfortran.dg/pr91485.f90: New test. + +2019-08-17 Steven G. Kargl + + PR fortran/82992 + * gfortran.dg/pr71649.f90: Adjust error messages. + * gfortran.dg/use_15.f90: Ditto. + * gfortran.dg/use_rename_8.f90: Ditto. + +2019-08-17 Steven G. Kargl + + PR fortran/78739 + * fortran.dg/pr78739.f90: New test. + +2019-08-17 Steven G. Kargl + + PR fortran/78719 + * gfortran.dg/pr78719_1.f90: New test. + * gfortran.dg/pr78719_2.f90: Ditto. + * gfortran.dg/pr78719_3.f90: Ditto. + +2019-08-17 Steven G. Kargl + + PR fortran/91471 + * gfortran.dg/pr91471.f90: New test. + +2019-08-16 Marek Polacek + + PR c++/85827 + * g++.dg/cpp1z/constexpr-if29.C: New test. + +2019-08-16 Jeff Law + + * gcc.target/sh/pr54236-6.c: Use -fno-tree-forwprop. + +2019-08-16 Martin Sebor + + * gcc.dg/struct-ret-1.c: Enable on all targets. + +2019-08-16 Eric Botcazou + + * gnat.dg/opt81.ad[sb]: New test. + +2019-08-16 Martin Sebor + + PR testsuite/91458 + * g++.dg/tree-ssa/pr19807.C: Use the same search pattern + unconditionally (correcting r272199, PR middle-end/90676). + +2019-08-16 Richard Biener + + PR target/91469 + * gcc.target/i386/pr91469-1.c: New testcase. + * gcc.target/i386/pr91469-2.c: Likewise. + +2019-08-16 Mark Eggleston + + * gfortran.dg/auto_in_equiv_1.f90: New test. + * gfortran.dg/auto_in_equiv_2.f90: New test. + * gfortran.dg/auto_in_equiv_3.f90: New test. + +2019-08-16 Richard Biener + + * gcc.dg/tree-ssa/forwprop-31.c: Adjust. + +2019-08-16 Martin Liska + + PR ipa/91447 + * g++.dg/ipa/ipa-icf-4.C: Add -missed for target that + don't have aliases. + +2019-08-16 Alexandre Oliva + + * gcc.target/i386/pr85044.c: Require support for trampolines. + + * gcc.target/i386/asm-4.c: Use amd64 natural addressing mode + on all __LP64__ targets. + + * gcc.target/arc/interrupt-6.c: Use __builtin_alloca, require + effective target support for alloca, drop include of alloca.h. + * gcc.target/i386/pr80969-3.c: Likewise. + * gcc.target/sparc/setjmp-1.c: Likewise. + * gcc.target/x86_64/abi/ms-sysv/gen.cc: Likewise. + * gcc.target/x86_64/abi/ms-sysv/ms-sysv.c: Likewise. + + * gcc.misc-tests/options.exp: Match /ld and -ld besides + /collect2. + +2019-08-15 Thomas Koenig + + PR fortran/91443 + * gfortran.dg/argument_checking_19.f90: New test. + * gfortran.dg/altreturn_10.f90: Change dg-warning to dg-error. + * gfortran.dg/dec_union_11.f90: Add -std=legacy. + * gfortran.dg/hollerith8.f90: Likewise. Remove warning for + Hollerith constant. + * gfortran.dg/integer_exponentiation_2.f90: New subroutine gee_i8; + use it to avoid type mismatches. + * gfortran.dg/pr41011.f: Add -std=legacy. + * gfortran.dg/whole_file_1.f90: Change warnings to errors. + * gfortran.dg/whole_file_2.f90: Likewise. + +2019-08-15 Richard Biener + + PR tree-optimization/91445 + * gcc.dg/torture/pr91445.c: New testcase. + +2019-08-15 Richard Biener + + * gcc.dg/pr80170.c: Adjust to use __SIZETYPE__. + +2019-08-15 Richard Sandiford + + * gcc.target/aarch64/sve/loop_add_4.c: Expect 10 INCWs and + INCDs rather than 8. + +2019-08-15 Richard Sandiford + + * gcc.target/aarch64/sve/revb_1.c: Restrict to little-endian targets. + Avoid including stdint.h. + * gcc.target/aarch64/sve/revh_1.c: Likewise. + * gcc.target/aarch64/sve/revw_1.c: Likewise. + * gcc.target/aarch64/sve/revb_2.c: New big-endian test. + * gcc.target/aarch64/sve/revh_2.c: Likewise. + * gcc.target/aarch64/sve/revw_2.c: Likewise. + +2019-08-15 Richard Sandiford + Kugan Vivekanandarajah + + * gcc.target/aarch64/sve/cond_mla_5.c: Allow FMAD as well as FMLA + and FMSB as well as FMLS. + +2019-08-15 Richard Sandiford + + * gcc.target/aarch64/sve/ext_2.c: Expect a MOVPRFX. + * gcc.target/aarch64/sve/ext_3.c: New test. + +2019-08-15 Richard Sandiford + Prathamesh Kulkarni + + * gcc.target/aarch64/sve/shift_1.c: Accept reversed shifts. + +2019-08-15 Richard Sandiford + Kugan Vivekanandarajah + + * gcc.target/aarch64/sve/cond_mla_1.c: New test. + * gcc.target/aarch64/sve/cond_mla_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_2.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_3.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_4.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_4_run.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_5.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_5_run.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_6.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_6_run.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_7.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_7_run.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_8.c: Likewise. + * gcc.target/aarch64/sve/cond_mla_8_run.c: Likewise. + +2019-08-15 Richard Sandiford + Kugan Vivekanandarajah + + * gcc.target/aarch64/sve/cond_fadd_1.c: New test. + * gcc.target/aarch64/sve/cond_fadd_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fadd_2.c: Likewise. + * gcc.target/aarch64/sve/cond_fadd_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fadd_3.c: Likewise. + * gcc.target/aarch64/sve/cond_fadd_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fadd_4.c: Likewise. + * gcc.target/aarch64/sve/cond_fadd_4_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fsubr_1.c: Likewise. + * gcc.target/aarch64/sve/cond_fsubr_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fsubr_2.c: Likewise. + * gcc.target/aarch64/sve/cond_fsubr_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fsubr_3.c: Likewise. + * gcc.target/aarch64/sve/cond_fsubr_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fsubr_4.c: Likewise. + * gcc.target/aarch64/sve/cond_fsubr_4_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fmaxnm_1.c: Likewise. + * gcc.target/aarch64/sve/cond_fmaxnm_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fmaxnm_2.c: Likewise. + * gcc.target/aarch64/sve/cond_fmaxnm_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fmaxnm_3.c: Likewise. + * gcc.target/aarch64/sve/cond_fmaxnm_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fmaxnm_4.c: Likewise. + * gcc.target/aarch64/sve/cond_fmaxnm_4_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fminnm_1.c: Likewise. + * gcc.target/aarch64/sve/cond_fminnm_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fminnm_2.c: Likewise. + * gcc.target/aarch64/sve/cond_fminnm_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fminnm_3.c: Likewise. + * gcc.target/aarch64/sve/cond_fminnm_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fminnm_4.c: Likewise. + * gcc.target/aarch64/sve/cond_fminnm_4_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fmul_1.c: Likewise. + * gcc.target/aarch64/sve/cond_fmul_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fmul_2.c: Likewise. + * gcc.target/aarch64/sve/cond_fmul_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fmul_3.c: Likewise. + * gcc.target/aarch64/sve/cond_fmul_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fmul_4.c: Likewise. + * gcc.target/aarch64/sve/cond_fmul_4_run.c: Likewise. + +2019-08-15 Richard Sandiford + Kugan Vivekanandarajah + + * gcc.target/aarch64/sve/cond_fabd_1.c: New test. + * gcc.target/aarch64/sve/cond_fabd_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fabd_2.c: Likewise. + * gcc.target/aarch64/sve/cond_fabd_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fabd_3.c: Likewise. + * gcc.target/aarch64/sve/cond_fabd_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fabd_4.c: Likewise. + * gcc.target/aarch64/sve/cond_fabd_4_run.c: Likewise. + * gcc.target/aarch64/sve/cond_fabd_5.c: Likewise. + * gcc.target/aarch64/sve/cond_fabd_5_run.c: Likewise. + +2019-08-15 Richard Sandiford + Kugan Vivekanandarajah + + * gcc.target/aarch64/sve/cond_abd_1.c: New test. + * gcc.target/aarch64/sve/cond_abd_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_abd_2.c: Likewise. + * gcc.target/aarch64/sve/cond_abd_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_abd_3.c: Likewise. + * gcc.target/aarch64/sve/cond_abd_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_abd_4.c: Likewise. + * gcc.target/aarch64/sve/cond_abd_4_run.c: Likewise. + * gcc.target/aarch64/sve/cond_abd_5.c: Likewise. + * gcc.target/aarch64/sve/cond_abd_5_run.c: Likewise. + +2019-08-15 Richard Sandiford + Prathamesh Kulkarni + + * gcc.target/aarch64/sve/cond_shift_1.c: New test. + * gcc.target/aarch64/sve/cond_shift_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_2.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_3.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_4.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_4_run.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_5.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_5_run.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_6.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_6_run.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_7.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_7_run.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_8.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_8_run.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_9.c: Likewise. + * gcc.target/aarch64/sve/cond_shift_9_run.c: Likewise. + +2019-08-14 Martin Sebor + + PR testsuite/91449 + * gcc.dg/strlenopt-73.c: Restrict 128-bit tests to i386. + +2019-08-14 Jonathan Wakely + + PR c++/91436 + * g++.dg/lookup/missing-std-include-5.C: Limit test to C++14 and up. + * g++.dg/lookup/missing-std-include-6.C: Don't check make_unique in + test that runs for C++11. + * g++.dg/lookup/missing-std-include-8.C: Check make_unique here. + +2019-08-14 Christophe Lyon + + * gcc.c-torture/execute/noinit-attribute.c: Fix typo. + +2019-08-14 Martin Sebor + + PR tree-optimization/91294 + * gcc.dg/strlenopt-44.c: Adjust tested result. + * gcc.dg/strlenopt-70.c: Avoid exercising unimplemnted optimization. + * gcc.dg/strlenopt-73.c: New test. + * gcc.dg/strlenopt-74.c: New test. + * gcc.dg/strlenopt-75.c: New test. + * gcc.dg/strlenopt-76.c: New test. + * gcc.dg/strlenopt-77.c: New test. + +2019-08-14 Jakub Jelinek + Marek Polacek + + PR c++/91391 - bogus -Wcomma-subscript warning. + * g++.dg/cpp2a/comma5.C: New test. + +2019-08-14 Christophe Lyon + + * lib/target-supports.exp (check_effective_target_noinit): New + proc. + * gcc.c-torture/execute/noinit-attribute.c: New test. + +2019-08-14 Richard Biener + + PR target/91154 + * gcc.target/i386/pr91154.c: New testcase. + * gcc.target/i386/minmax-3.c: Likewise. + * gcc.target/i386/minmax-4.c: Likewise. + * gcc.target/i386/minmax-5.c: Likewise. + * gcc.target/i386/minmax-6.c: Likewise. + * gcc.target/i386/minmax-1.c: Add -mno-stv. + * gcc.target/i386/minmax-2.c: Likewise. + +2019-08-14 Richard Sandiford + Kugan Vivekanandarajah + + * gcc.target/aarch64/sve/cond_logical_1.c: New test. + * gcc.target/aarch64/sve/cond_logical_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_logical_2.c: Likewise. + * gcc.target/aarch64/sve/cond_logical_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_logical_3.c: Likewise. + * gcc.target/aarch64/sve/cond_logical_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_logical_4.c: Likewise. + * gcc.target/aarch64/sve/cond_logical_4_run.c: Likewise. + * gcc.target/aarch64/sve/cond_logical_5.c: Likewise. + * gcc.target/aarch64/sve/cond_logical_5_run.c: Likewise. + +2019-08-14 Richard Sandiford + + * gcc.target/aarch64/sve/cond_uxt_1.c: New test. + * gcc.target/aarch64/sve/cond_uxt_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_uxt_2.c: Likewise. + * gcc.target/aarch64/sve/cond_uxt_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_uxt_3.c: Likewise. + * gcc.target/aarch64/sve/cond_uxt_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_uxt_4.c: Likewise. + * gcc.target/aarch64/sve/cond_uxt_4_run.c: Likewise. + +2019-08-14 Richard Sandiford + + * gcc.target/aarch64/sve/cond_convert_1.c: New test. + * gcc.target/aarch64/sve/cond_convert_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_convert_2.c: Likewise. + * gcc.target/aarch64/sve/cond_convert_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_convert_3.c: Likewise. + * gcc.target/aarch64/sve/cond_convert_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_convert_4.c: Likewise. + * gcc.target/aarch64/sve/cond_convert_4_run.c: Likewise. + * gcc.target/aarch64/sve/cond_convert_5.c: Likewise. + * gcc.target/aarch64/sve/cond_convert_5_run.c: Likewise. + * gcc.target/aarch64/sve/cond_convert_6.c: Likewise. + * gcc.target/aarch64/sve/cond_convert_6_run.c: Likewise. + +2019-08-14 Richard Sandiford + Kugan Vivekanandarajah + + * gcc.target/aarch64/sve/cond_unary_1.c: Add tests for + floating-point types. + * gcc.target/aarch64/sve/cond_unary_2.c: Likewise. + * gcc.target/aarch64/sve/cond_unary_3.c: Likewise. + * gcc.target/aarch64/sve/cond_unary_4.c: Likewise. + +2019-08-14 Richard Sandiford + Kugan Vivekanandarajah + + * gcc.target/aarch64/sve/cond_unary_1.c: New test. + * gcc.target/aarch64/sve/cond_unary_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_unary_2.c: Likewise. + * gcc.target/aarch64/sve/cond_unary_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_unary_3.c: Likewise. + * gcc.target/aarch64/sve/cond_unary_3_run.c: Likewise. + * gcc.target/aarch64/sve/cond_unary_4.c: Likewise. + * gcc.target/aarch64/sve/cond_unary_4_run.c: Likewise. + +2019-08-14 Bob Duff + + * gnat.dg/alignment15.adb: New testcase. + +2019-08-14 Bob Duff + + * gnat.dg/warn27.adb: New testcase. + +2019-08-14 Bob Duff + + * gnat.dg/inline19.adb, gnat.dg/inline19.ads: New testcase. + +2019-08-14 Gary Dismukes + + * gnat.dg/equal11.adb, gnat.dg/equal11_interface.ads, + gnat.dg/equal11_record.adb, gnat.dg/equal11_record.ads: New + testcase. + +2019-08-14 Bob Duff + + * gnat.dg/discr57.adb: New testcase. + +2019-08-14 Eric Botcazou + + * gnat.dg/generic_inst11.adb, gnat.dg/generic_inst11_pkg.adb, + gnat.dg/generic_inst11_pkg.ads: New testcase. + +2019-08-14 Ed Schonberg + + * gnat.dg/assert2.adb, gnat.dg/assert2.ads: New testcase. + +2019-08-14 Eric Botcazou + + * gnat.dg/inline18.adb, gnat.dg/inline18.ads, + gnat.dg/inline18_gen1-inner_g.ads, gnat.dg/inline18_gen1.adb, + gnat.dg/inline18_gen1.ads, gnat.dg/inline18_gen2.adb, + gnat.dg/inline18_gen2.ads, gnat.dg/inline18_gen3.adb, + gnat.dg/inline18_gen3.ads, gnat.dg/inline18_pkg1.adb, + gnat.dg/inline18_pkg1.ads, gnat.dg/inline18_pkg2-child.ads, + gnat.dg/inline18_pkg2.ads: New testcase. + +2019-08-14 Ed Schonberg + + * gnat.dg/predicate12.adb, gnat.dg/predicate12.ads: New + testcase. + +2019-08-14 Gary Dismukes + + * gnat.dg/task5.adb: New testcase. + +2019-08-14 Richard Biener + + PR testsuite/91419 + * lib/target-supports.exp (natural_alignment_32): Amend target + list based on BIGGEST_ALIGNMENT. + (natural_alignment_64): Targets not natural_alignment_32 cannot + be natural_alignment_64. + * gcc.dg/tree-ssa/pr91091-2.c: XFAIL for !natural_alignment_32. + * gcc.dg/tree-ssa/ssa-fre-77.c: Likewise. + * gcc.dg/tree-ssa/ssa-fre-61.c: Require natural_alignment_32. + +2019-08-14 Richard Sandiford + + * gcc.target/aarch64/sve/vcond_21.c: New test. + * gcc.target/aarch64/sve/vcond_21_run.c: Likewise. + +2019-08-14 Richard Sandiford + Kugan Vivekanandarajah + + * g++.target/aarch64/sve/dup_sel_1.C: New test. + * g++.target/aarch64/sve/dup_sel_2.C: Likewise. + * g++.target/aarch64/sve/dup_sel_3.C: Likewise. + * g++.target/aarch64/sve/dup_sel_4.C: Likewise. + * g++.target/aarch64/sve/dup_sel_5.C: Likewise. + * g++.target/aarch64/sve/dup_sel_6.C: Likewise. + +2019-08-14 Richard Sandiford + Kugan Vivekanandarajah + + * gcc.target/aarch64/sve/vcond_18.c: New test. + * gcc.target/aarch64/sve/vcond_18_run.c: Likewise. + * gcc.target/aarch64/sve/vcond_19.c: Likewise. + * gcc.target/aarch64/sve/vcond_19_run.c: Likewise. + * gcc.target/aarch64/sve/vcond_20.c: Likewise. + * gcc.target/aarch64/sve/vcond_20_run.c: Likewise. + +2019-08-14 Richard Sandiford + + * gcc.target/aarch64/sve/fmaxnm_1.c: New test. + * gcc.target/aarch64/sve/fminnm_1.c: Likewise. + +2019-08-14 Richard Sandiford + + * gcc.target/aarch64/sve/smax_1.c: New test. + * gcc.target/aarch64/sve/smin_1.c: Likewise. + * gcc.target/aarch64/sve/umax_1.c: Likewise. + * gcc.target/aarch64/sve/umin_1.c: Likewise. + +2019-08-14 Richard Sandiford + + * gcc.target/aarch64/sve/cnot_1.c: New test. + * gcc.target/aarch64/sve/cond_cnot_1.c: Likewise. + * gcc.target/aarch64/sve/cond_cnot_1_run.c: Likewise. + * gcc.target/aarch64/sve/cond_cnot_2.c: Likewise. + * gcc.target/aarch64/sve/cond_cnot_2_run.c: Likewise. + * gcc.target/aarch64/sve/cond_cnot_3.c: Likewise. + * gcc.target/aarch64/sve/cond_cnot_3_run.c: Likewise. + +2019-08-14 Richard Sandiford + + * gcc.target/aarch64/vect-clz.c: Force SVE off. + * gcc.target/aarch64/sve/clrsb_1.c: New test. + * gcc.target/aarch64/sve/clrsb_1_run.c: Likewise. + * gcc.target/aarch64/sve/clz_1.c: Likewise. + * gcc.target/aarch64/sve/clz_1_run.c: Likewise. + +2019-08-14 Richard Sandiford + + * gcc.target/aarch64/sve/adr_1.c: New test. + * gcc.target/aarch64/sve/adr_1_run.c: Likewise. + * gcc.target/aarch64/sve/adr_2.c: Likewise. + * gcc.target/aarch64/sve/adr_2_run.c: Likewise. + * gcc.target/aarch64/sve/adr_3.c: Likewise. + * gcc.target/aarch64/sve/adr_3_run.c: Likewise. + * gcc.target/aarch64/sve/adr_4.c: Likewise. + * gcc.target/aarch64/sve/adr_4_run.c: Likewise. + * gcc.target/aarch64/sve/adr_5.c: Likewise. + * gcc.target/aarch64/sve/adr_5_run.c: Likewise. + +2019-08-14 Paolo Carlini + + * g++.dg/conversion/simd4.C: Test locations. + +2019-08-14 Richard Sandiford + + * gcc.target/aarch64/sve/peel_ind_1.c: Look for an inverted .B VL1. + * gcc.target/aarch64/sve/peel_ind_2.c: Likewise .S VL7. + +2019-08-14 Paolo Carlini + + * g++.dg/parse/typedef9.C: Test locations too. + +2019-08-14 Martin Liska + + * c-c++-common/asan/memcmp-1.c: There's a new function in the + stack-trace on the top. So shift expected output in stack + trace. + +2019-08-14 Richard Sandiford + + * gcc.target/aarch64/sve/vcond_17.c: New test. + * gcc.target/aarch64/sve/vcond_17_run.c: Likewise. + +2019-08-14 Richard Sandiford + + * gcc.target/aarch64/sve/spill_4.c: Expect all ptrues to be .Bs. + * gcc.target/aarch64/sve/single_1.c: Likewise. + * gcc.target/aarch64/sve/single_2.c: Likewise. + * gcc.target/aarch64/sve/single_3.c: Likewise. + * gcc.target/aarch64/sve/single_4.c: Likewise. + +2019-08-13 Steven G. Kargl + + PR fortran/87991 + * gfortran.dg/pr87991.f90: New test. + +2019-08-13 Richard Sandiford + + * gcc.target/aarch64/sve/spill_2.c: Increase iteration counts + beyond the range of a PTRUE. + * gcc.target/aarch64/sve/while_6.c: New test. + * gcc.target/aarch64/sve/while_7.c: Likewise. + * gcc.target/aarch64/sve/while_8.c: Likewise. + * gcc.target/aarch64/sve/while_9.c: Likewise. + * gcc.target/aarch64/sve/while_10.c: Likewise. + +2019-08-13 Steven G. Kargl + + PR fortran/88072 + * gfortran.dg/unlimited_polymorphic_28.f90: Fix error message. Left + out of previous commit! + +2019-08-13 Steven G. Kargl + + PR fortran/88072 + * gfortran.dg/pr88072.f90: New test. + * gfortran.dg/unlimited_polymorphic_28.f90: Fix error message. + +2019-08-13 Iain Sandoe + + * obj-c++.dg/stubify-1.mm: Rename symbol stub option. + * obj-c++.dg/stubify-2.mm: Likewise. + * objc.dg/stubify-1.m: Likewise. + * objc.dg/stubify-2.m: Likewise. + +2013-08-13 Thomas Koenig + + PR fortran/90563 + * gfortran.dg/do_subsript_5.f90: New test. + +2019-08-13 Steven G. Kargl + + PR fortran/89647 + * gfortran.dg/pr89647.f90: New test. + +2019-08-13 Steven G. Kargl + + PR fortran/87993 + * gfortran.dg/pr87993.f90: New test. + +2019-08-13 Martin Sebor + + PR c/80619 + * gcc.dg/format/pr80619.c: New test. + +2019-08-13 Marek Polacek + + PR c++/90473 - wrong code with nullptr in default argument. + * g++.dg/cpp0x/nullptr42.C: New test. + +2019-08-13 Olivier Hainque + + * gnat.dg/casesi.ad[bs], test_casesi.adb: New test. + +2019-08-13 Wilco Dijkstra + + PR target/81800 + * gcc.target/aarch64/no-inline-lrint_3.c: New test. + +2019-08-13 Richard Sandiford + + * gcc.target/aarch64/sve/init_2.c: Expect ld1rd to be used + instead of a full vector load. + * gcc.target/aarch64/sve/init_4.c: Likewise. + * gcc.target/aarch64/sve/ld1r_2.c: Remove constants that no longer + need to be loaded from memory. + * gcc.target/aarch64/sve/slp_2.c: Expect the same output for + big and little endian. + * gcc.target/aarch64/sve/slp_3.c: Likewise. Expect 3 of the + doubles to be moved via integer registers rather than loaded + from memory. + * gcc.target/aarch64/sve/slp_4.c: Likewise but for 4 doubles. + * gcc.target/aarch64/sve/spill_4.c: Expect 16-bit constants to be + loaded via an integer register rather than from memory. + * gcc.target/aarch64/sve/const_1.c: New test. + * gcc.target/aarch64/sve/const_2.c: Likewise. + * gcc.target/aarch64/sve/const_3.c: Likewise. + +2019-08-13 Jozef Lawrynowicz + + * gcc.target/msp430/msp430.exp (msp430_device_permutations_runtest): + Handle csv-* and bad-devices-* tests. + * gcc.target/msp430/devices/README: Document how bad-devices-* tests + work. + * gcc.target/msp430/devices/bad-devices-1.c: New test. + * gcc.target/msp430/devices/bad-devices-2.c: Likewise. + * gcc.target/msp430/devices/bad-devices-3.c: Likewise. + * gcc.target/msp430/devices/bad-devices-4.c: Likewise. + * gcc.target/msp430/devices/bad-devices-5.c: Likewise. + * gcc.target/msp430/devices/bad-devices-6.c: Likewise. + * gcc.target/msp430/devices/csv-device-order.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_00.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_01.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_02.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_04.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_08.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_10.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_11.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_12.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_14.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_18.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_20.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_21.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_22.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_24.c: Likewise. + * gcc.target/msp430/devices/csv-msp430_28.c: Likewise. + * gcc.target/msp430/devices/csv-msp430fr5969.c: Likewise. + * gcc.target/msp430/devices/hard-foo.c: Likewise. + * gcc.target/msp430/devices/bad-devices-1.csv: New test support file. + * gcc.target/msp430/devices/bad-devices-2.csv: Likewise. + * gcc.target/msp430/devices/bad-devices-3.csv: Likewise. + * gcc.target/msp430/devices/bad-devices-4.csv: Likewise. + * gcc.target/msp430/devices/bad-devices-5.csv: Likewise. + * gcc.target/msp430/devices/bad-devices-6.csv: Likewise. + * gcc.target/msp430/devices/devices.csv: Likewise. + +2019-08-13 Jozef Lawrynowicz + + * gcc.target/msp430/msp430.exp + (check_effective_target_msp430_430_selected): New. + (check_effective_target_msp430_430x_selected): New. + (check_effective_target_msp430_mlarge_selected): New. + (check_effective_target_msp430_hwmul_not_none): New. + (check_effective_target_msp430_hwmul_not_16bit): New. + (check_effective_target_msp430_hwmul_not_32bit): New. + (check_effective_target_msp430_hwmul_not_f5): New. + (msp430_get_opts): New. + (msp430_device_permutations_runtest): New. + * gcc.target/msp430/devices/README: New file. + * gcc.target/msp430/devices-main.c: New test. + * gcc.target/msp430/devices/hard-cc430f5123.c: Likewise. + * gcc.target/msp430/devices/hard-foo.c: Likewise. + * gcc.target/msp430/devices/hard-msp430afe253.c: Likewise. + * gcc.target/msp430/devices/hard-msp430cg4616.c: Likewise. + * gcc.target/msp430/devices/hard-msp430f4783.c: Likewise. + * gcc.target/msp430/devices/hard-rf430frl154h_rom.c: Likewise. + +2019-08-13 Richard Sandiford + + * gcc.target/aarch64/asm-x-constraint-1.c: New test. + * gcc.target/aarch64/asm-y-constraint-1.c: Likewise. + +2019-08-13 Janne Blomqvist + + PR fortran/91414 + * gfortran.dg/random_seed_1.f90: Update to match new seed size. + +2019-08-13 Eric Botcazou + + * gnat.dg/discr56.adb, gnat.dg/discr56.ads, + gnat.dg/discr56_pkg1.adb, gnat.dg/discr56_pkg1.ads, + gnat.dg/discr56_pkg2.ads: New testcase. + +2019-08-13 Ed Schonberg + + * gnat.dg/tagged4.adb: New testcase. + +2019-08-13 Eric Botcazou + + * gnat.dg/generic_inst10.adb, gnat.dg/generic_inst10_pkg.ads: + New testcase. + +2019-08-13 Javier Miranda + + * gnat.dg/tagged3.adb, gnat.dg/tagged3_pkg.adb, + gnat.dg/tagged3_pkg.ads: New testcase. + +2019-08-13 Ed Schonberg + + * gnat.dg/aggr27.adb: New testcase. + +2019-08-13 Gary Dismukes + + * gnat.dg/aggr26.adb: New testcase. + +2019-08-13 Yannick Moy + + * gnat.dg/allocator2.adb, gnat.dg/allocator2.ads: New testcase. + +2019-08-13 Eric Botcazou + + * gnat.dg/generic_inst9.adb, gnat.dg/generic_inst9.ads, + gnat.dg/generic_inst9_pkg1-operator.ads, + gnat.dg/generic_inst9_pkg1.ads, gnat.dg/generic_inst9_pkg2.adb, + gnat.dg/generic_inst9_pkg2.ads: New testcase. + +2019-08-13 Justin Squirek + + * gnat.dg/anon3.adb, gnat.dg/anon3.ads: New testcase. + +2019-08-13 Eric Botcazou + + * gnat.dg/generic_inst8.adb, gnat.dg/generic_inst8.ads, + gnat.dg/generic_inst8_g.adb, gnat.dg/generic_inst8_g.ads: New + testcase. + +2019-08-13 Javier Miranda + + * gnat.dg/tag2.adb, gnat.dg/tag2_pkg.ads: New testcase. + +2019-08-13 Martin Liska + + * gcc.dg/tree-prof/ic-misattribution-1.c: Use -fdump-ipa-profile-node. + +2019-08-12 Thomas Koenig + + PR fortran/91424 + * gfortran.dg/do_subscript_3.f90: New test. + * gfortran.dg/do_subscript_4.f90: New test. + * gfortran.dg/pr70754.f90: Use indices that to not overflow. + +2019-08-12 Jakub Jelinek + + PR target/83250 + PR target/91340 + * gcc.target/i386/avx-typecast-1.c: New test. + * gcc.target/i386/avx-typecast-2.c: New test. + * gcc.target/i386/avx512f-typecast-2.c: New test. + +2019-08-12 Ed Schonberg + + * gnat.dg/null_check.adb: New testcase. + +2019-08-12 Ed Schonberg + + * gnat.dg/renaming15.adb: New testcase. + +2019-08-12 Eric Botcazou + + * gnat.dg/slice10.adb: New testcase. + +2019-08-12 Gary Dismukes + + * gnat.dg/generic_inst7.adb, gnat.dg/generic_inst7_pkg.adb, + gnat.dg/generic_inst7_pkg.ads, gnat.dg/generic_inst7_types.ads: + New testcase. + +2019-08-12 Ed Schonberg + + * gnat.dg/equal10.adb, gnat.dg/equal10.ads: New testcase. + +2019-08-12 Gary Dismukes + + * gnat.dg/suppress_initialization2.adb, + gnat.dg/suppress_initialization2.ads: New testcase. + +2019-08-12 Yannick Moy + + * gnat.dg/no_caching.adb, gnat.dg/no_caching.ads: New testcase. + +2019-08-12 Eric Botcazou + + * gnat.dg/range_check7.adb: New testcase. + +2019-08-12 Eric Botcazou + + * gnat.dg/range_check6.adb: New testcase. + +2019-08-11 Iain Buclaw + + PR d/90601 + * gdc.dg/pr90601.d: New test. + +2019-08-10 Steven G. Kargl + + * gfortran.dg/boz_8.f90: Adjust error messages. + * gfortran.dg/nan_4.f90: Ditto. + * gfortran.dg/boz_1.f90: Add -fallow-invalid-boz to dg-options, + and test for warnings. + * gfortran.dg/boz_3.f90: Ditto. + * gfortran.dg/boz_4.f90: Ditto. + * gfortran.dg/dec_structure_6.f90: Ditto. + * gfortran.dg/ibits.f90: Ditto. + +2019-08-10 Iain Buclaw + + PR d/91238 + * gdc.dg/pr91238.d: New test. + +2019-08-10 Jakub Jelinek + + * c-c++-common/gomp/declare-target-2.c: Don't expect error for + declare target with clauses in between declare target without clauses + and end declare target. + * c-c++-common/gomp/declare-target-4.c: New test. + + PR target/91408 + * gcc.target/i386/pr91408.c: New test. + +2019-08-09 Segher Boessenkool + + * gcc.target/powerpc/vec_rotate-1.c: Rename to ... + * gcc.target/powerpc/vec-rotate-1.c: ... this. Add -maltivec option. + * gcc.target/powerpc/vec_rotate-2.c: Rename to ... + * gcc.target/powerpc/vec-rotate-2.c: ... this. + * gcc.target/powerpc/vec_rotate-3.c: Rename to ... + * gcc.target/powerpc/vec-rotate-3.c: ... this. Add -maltivec option. + * gcc.target/powerpc/vec_rotate-4.c: Rename to ... + * gcc.target/powerpc/vec-rotate-4.c: ... this. + +2019-08-09 Sam Tebbs + + * lib/target-supports.exp + (check_effective_target_arm_v8_4a_bkey_directive): New proc. + * g++.target/aarch64/return_address_sign_b_exception.C, + return_address_sign_ab_exception.C: Add dg-require-effective-target + checks. + +2019-08-09 Richard Sandiford + + PR middle-end/90313 + * g++.dg/torture/pr90313.cc: New test. + +2019-08-09 Martin Liska + + * g++.dg/lto/devirt-19_0.C: Add -flto=auto. + +2019-08-09 Martin Liska + + * gcc.dg/spellcheck-options-21.c: New test. + +2019-08-09 Martin Liska + + * g++.dg/ipa/ipa-icf-2.C: Add -optimized to -fdump-ipa-icf. + * g++.dg/ipa/ipa-icf-3.C: Likewise. + * g++.dg/ipa/ipa-icf-4.C: Likewise. + * g++.dg/ipa/ipa-icf-6.C: Likewise. + * gcc.dg/ipa/ipa-icf-1.c: Likewise. + * gcc.dg/ipa/ipa-icf-10.c: Likewise. + * gcc.dg/ipa/ipa-icf-11.c: Likewise. + * gcc.dg/ipa/ipa-icf-12.c: Likewise. + * gcc.dg/ipa/ipa-icf-13.c: Likewise. + * gcc.dg/ipa/ipa-icf-16.c: Likewise. + * gcc.dg/ipa/ipa-icf-18.c: Likewise. + * gcc.dg/ipa/ipa-icf-2.c: Likewise. + * gcc.dg/ipa/ipa-icf-20.c: Likewise. + * gcc.dg/ipa/ipa-icf-21.c: Likewise. + * gcc.dg/ipa/ipa-icf-23.c: Likewise. + * gcc.dg/ipa/ipa-icf-25.c: Likewise. + * gcc.dg/ipa/ipa-icf-26.c: Likewise. + * gcc.dg/ipa/ipa-icf-27.c: Likewise. + * gcc.dg/ipa/ipa-icf-3.c: Likewise. + * gcc.dg/ipa/ipa-icf-35.c: Likewise. + * gcc.dg/ipa/ipa-icf-36.c: Likewise. + * gcc.dg/ipa/ipa-icf-37.c: Likewise. + * gcc.dg/ipa/ipa-icf-38.c: Likewise. + * gcc.dg/ipa/ipa-icf-39.c: Likewise. + * gcc.dg/ipa/ipa-icf-5.c: Likewise. + * gcc.dg/ipa/ipa-icf-7.c: Likewise. + * gcc.dg/ipa/ipa-icf-8.c: Likewise. + * gcc.dg/ipa/ipa-icf-merge-1.c: Likewise. + * gcc.dg/ipa/pr64307.c: Likewise. + * gcc.dg/ipa/pr90555.c: Likewise. + +2019-08-09 Martin Liska + + * g++.dg/tree-prof/indir-call-prof.C: Add -optimize + to -fdump-ipa-profile. + * g++.dg/tree-prof/morefunc.C: Likewise. + * g++.dg/tree-prof/reorder.C: Likewise. + * gcc.dg/tree-prof/ic-misattribution-1.c: Likewise. + * gcc.dg/tree-prof/indir-call-prof.c: Likewise. + * gcc.dg/tree-prof/stringop-1.c: Likewise. + * gcc.dg/tree-prof/stringop-2.c: Likewise. + * gcc.dg/tree-prof/val-prof-1.c: Likewise. + * gcc.dg/tree-prof/val-prof-2.c: Likewise. + * gcc.dg/tree-prof/val-prof-3.c: Likewise. + * gcc.dg/tree-prof/val-prof-4.c: Likewise. + * gcc.dg/tree-prof/val-prof-5.c: Likewise. + * gcc.dg/tree-prof/val-prof-7.c: Likewise. + +2019-08-09 Jakub Jelinek + + * c-c++-common/gomp/if-4.c: New test. + * c-c++-common/gomp/clause-dups-1.c: New test. + + PR c/91401 + * c-c++-common/gomp/pr91401-1.c: New test. + * c-c++-common/gomp/pr91401-2.c: New test. + +2019-08-09 Alexandre Oliva + + * gcc.target/i386/sse2-mul-1.c: Use rand. Drop fallback. + * gcc.target/i386/sse4_1-blendps-2.c: Likewise. + * gcc.target/i386/sse4_1-blendps.c: Likewise. + * gcc.target/i386/xop-vshift-1.c: Likewise. + * gcc.target/powerpc/direct-move.h: Likewise. + +2019-08-08 Paolo Carlini + + * g++.dg/cpp0x/enum20.C: Test location(s) too. + * g++.dg/other/friend3.C: Likewise. + * g++.dg/parse/dtor5.C: Likewise. + * g++.dg/parse/friend7.C: Likewise. + * g++.dg/template/error22.C: Likewise. + * g++.old-deja/g++.brendan/err-msg5.C: Likewise. + +2019-08-08 Jim Wilson + + PR target/91229 + * gcc.target/riscv/flattened-struct-abi-1.c: New test. + * gcc.target/riscv/flattened-struct-abi-2.c: New test. + +2019-08-08 Marek Polacek + + PR c++/79520 + * g++.dg/cpp1y/constexpr-79520.C: New test. + +2019-08-08 Richard Sandiford + + * gcc.dg/pr79983.c (enum E): Don't allow an error about nested + definitions. + * gcc.dg/enum-redef-1.c: New test. + +2019-08-08 Marek Polacek + + PR c++/87519 - bogus warning with -Wsign-conversion. + * g++.dg/warn/Wsign-conversion-5.C: New test. + + * g++.dg/cpp2a/inline-asm3.C: New test. + +2019-08-07 Steven G. Kargl + + PR fortran/91359 + * pr91359_2.f: Fix missing hyphen in dg-do + * pr91359_1.f: Ditto. Remove RESULT variable to test actual fix! + +2019-08-07 Marek Polacek + + PR c++/67533 + * g++.dg/tls/thread_local-ice5.C: New test. + +2019-08-07 Richard Sandiford + + * gcc.target/aarch64/sve/init_13.c: New test. + +2019-08-07 Richard Sandiford + + * gcc.target/aarch64/sve/init_12.c: Expect w1 to be moved into + a temporary FPR. + +2019-08-07 Richard Sandiford + + * gcc.target/aarch64/sve/clastb_8.c: New test. + +2019-08-07 Uroš Bizjak + + PR target/91385 + * gcc.target/i386/pr91385.c: New test. + +2019-08-07 Marek Polacek + + PR c++/81429 - wrong parsing of constructor with C++11 attribute. + * g++.dg/cpp0x/gen-attrs-68.C: New test. + * g++.dg/cpp0x/gen-attrs-69.C: New test. + +2019-08-07 Marek Polacek + + PR c++/91346 - Implement P1668R1, allow unevaluated asm in constexpr. + * g++.dg/cpp2a/inline-asm1.C: New test. + * g++.dg/cpp2a/inline-asm2.C: New test. + * g++.dg/cpp1y/constexpr-neg1.C: Adjust dg-error. + +2019-08-07 Janne Blomqvist + + PR fortran/53796 + * gfortran.dg/inquire_recl_f2018.f90: Test for unconnected unit + with inquire via filename. + +2019-08-07 Jakub Jelinek + + * c-c++-common/gomp/target-data-1.c (foo): Use use_device_addr clause + instead of use_device_ptr clause where required by OpenMP 5.0, add + further tests for both use_device_ptr and use_device_addr clauses. + +2019-08-07 Kewen Lin + + * gcc.target/powerpc/vec_rotate-1.c: New test. + * gcc.target/powerpc/vec_rotate-2.c: New test. + * gcc.target/powerpc/vec_rotate-3.c: New test. + * gcc.target/powerpc/vec_rotate-4.c: New test. + +2019-08-07 Alexandre Oliva + + * gcc.target/i386/math_m_pi.h: New. + * gcc.target/i386/sse4_1-round.h: Use it. + * gcc.target/i386/pr73350.c: Likewise. + * gcc.target/i386/avx512f-vfixupimmpd-2.c: Likewise. + * gcc.target/i386/avx512f-vfixupimmps-2.c: Likewise. + * gcc.target/i386/avx512f-vfixupimmsd-2.c: Likewise. + * gcc.target/i386/avx512f-vfixupimmss-2.c: Likewise. + * gcc.target/i386/avx512f-vfixupimmss-2.c: Likewise. + * gcc.target/i386/avx-ceil-sfix-2-vec.c: Likewise. Drop + dg-skip-if "no M_PI". + * gcc.target/i386/avx-cvt-2-vec.c: Likewise. + * gcc.target/i386/avx-floor-sfix-2-vec.c: Likewise. + * gcc.target/i386/avx-rint-sfix-2-vec.c: Likewise. + * gcc.target/i386/avx-round-sfix-2-vec.c: Likewise. + * gcc.target/i386/avx512f-ceil-sfix-vec-1.c: Likewise. + * gcc.target/i386/avx512f-ceil-vec-1.c: Likewise. + * gcc.target/i386/avx512f-ceilf-sfix-vec-1.c: Likewise. + * gcc.target/i386/avx512f-ceilf-vec-1.c: Likewise. + * gcc.target/i386/avx512f-floor-sfix-vec-1.c: Likewise. + * gcc.target/i386/avx512f-floor-vec-1.c: Likewise. + * gcc.target/i386/avx512f-floorf-sfix-vec-1.c: Likewise. + * gcc.target/i386/avx512f-floorf-vec-1.c: Likewise. + * gcc.target/i386/avx512f-rint-sfix-vec-1.c: Likewise. + * gcc.target/i386/avx512f-rintf-sfix-vec-1.c: Likewise. + * gcc.target/i386/avx512f-round-sfix-vec-1.c: Likewise. + * gcc.target/i386/avx512f-roundf-sfix-vec-1.c: Likewise. + * gcc.target/i386/avx512f-trunc-vec-1.c: Likewise. + * gcc.target/i386/avx512f-truncf-vec-1.c: Likewise. + * gcc.target/i386/sse2-cvt-vec.c: Likewise. + * gcc.target/i386/sse4_1-ceil-sfix-vec.c: Likewise. + * gcc.target/i386/sse4_1-ceil-vec.c: Likewise. + * gcc.target/i386/sse4_1-ceilf-sfix-vec.c: Likewise. + * gcc.target/i386/sse4_1-ceilf-vec.c: Likewise. + * gcc.target/i386/sse4_1-floor-sfix-vec.c: Likewise. + * gcc.target/i386/sse4_1-floor-vec.c: Likewise. + * gcc.target/i386/sse4_1-floorf-sfix-vec.c: Likewise. + * gcc.target/i386/sse4_1-floorf-vec.c: Likewise. + * gcc.target/i386/sse4_1-rint-sfix-vec.c: Likewise. + * gcc.target/i386/sse4_1-rint-vec.c: Likewise. + * gcc.target/i386/sse4_1-rintf-sfix-vec.c: Likewise. + * gcc.target/i386/sse4_1-rintf-vec.c: Likewise. + * gcc.target/i386/sse4_1-round-sfix-vec.c: Likewise. + * gcc.target/i386/sse4_1-round-vec.c: Likewise. + * gcc.target/i386/sse4_1-roundf-sfix-vec.c: Likewise. + * gcc.target/i386/sse4_1-roundf-vec.c: Likewise. + * gcc.target/i386/sse4_1-roundsd-4.c: Likewise. + * gcc.target/i386/sse4_1-roundss-4.c: Likewise. + * gcc.target/i386/sse4_1-trunc-vec.c: Likewise. + * gcc.target/i386/sse4_1-truncf-vec.c: Likewise. + +2019-08-06 Steven G. Kargl + + PR fortran/91359 + * gfortran.dg/pr91359_1.f: New test. + * gfortran.dg/pr91359_2.f: Ditto. + +2019-08-06 Steven G. Kargl + + PR fortran/42546 + * gfortran.dg/allocated_1.f90: New test. + * gfortran.dg/allocated_2.f90: Ditto. + +2019-08-06 Rainer Orth + + * gcc.target/i386/avx512vp2intersect-2intersect-1b.c (AVX512F): + Remove. + (AVX512VP2INTERSECT): Define. + * gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c (AVX512F): + Remove. + (AVX512VP2INTERSECT): Define. + +2019-08-06 Paolo Carlini + + * g++.dg/cpp0x/desig1.C: Check location too. + +2019-08-05 Marek Polacek + + DR 2413 - typename in conversion-function-ids. + * g++.dg/cpp2a/typename17.C: New test. + +2019-08-05 Martin Sebor + + PR middle-end/50476 + * gcc.dg/uninit-pr50476.c: New test. + + PR c++/60517 + * g++.dg/pr60517.C: New test. + +2019-08-02 Tom Honermann + + PR c++/88095 + * g++.dg/cpp2a/udlit-class-nttp-ctad.C: New test. + * g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C: New test. + * g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C: New test. + * g++.dg/cpp2a/udlit-class-nttp.C: New test. + * g++.dg/cpp2a/udlit-class-nttp-neg.C: New test. + * g++.dg/cpp2a/udlit-class-nttp-neg2.C: New test. + +2019-08-05 Steven g. Kargl + + PR fortran/91372 + * gfortran.dg/pr91372.f90: New test. + +2019-08-05 Marek Polacek + + PR c++/91338 - Implement P1161R3: Deprecate a[b,c]. + * g++.dg/cpp2a/comma1.C: New test. + * g++.dg/cpp2a/comma2.C: New test. + * g++.dg/cpp2a/comma3.C: New test. + * g++.dg/cpp2a/comma4.C: New test. + +2019-08-05 Richard Sandiford + + * gcc.target/aarch64/sve/mask_load_1.c: New test. + +2019-08-05 Jozef Lawrynowicz + + * gcc.target/msp430/pr80993.c: Add cleanup-saved-temps to final + actions. + +2019-08-05 Martin Liska + + PR c++/91334 + * g++.dg/torture/pr91334.C: New test. + +2019-08-05 Richard Biener + + PR middle-end/91169 + * gnat.dg/array37.adb: New testcase. + +2019-08-05 Jakub Jelinek + + PR target/91341 + * gcc.target/i386/avx-loadu2-m128-1.c: New test. + * gcc.target/i386/avx-loadu2-m128-2.c: New test. + * gcc.target/i386/avx-loadu2-m128d-1.c: New test. + * gcc.target/i386/avx-loadu2-m128d-2.c: New test. + * gcc.target/i386/avx-loadu2-m128i-1.c: New test. + * gcc.target/i386/avx-loadu2-m128i-2.c: New test. + * gcc.target/i386/avx-storeu2-m128-1.c: New test. + * gcc.target/i386/avx-storeu2-m128-2.c: New test. + * gcc.target/i386/avx-storeu2-m128d-1.c: New test. + * gcc.target/i386/avx-storeu2-m128d-2.c: New test. + * gcc.target/i386/avx-storeu2-m128i-1.c: New test. + * gcc.target/i386/avx-storeu2-m128i-2.c: New test. + +2019-08-05 Kito Cheng + + * gcc.target/riscv/promote-type-for-libcall.c: New. + +2019-08-02 Steven G. Kargl + + PR fortran/90985 + * gfortran.dg/pr90985.f90: New test. + +2019-08-02 Steven G. Kargl + + PR fortran/90986 + * gfortran.dg/equiv_10.f90: New test. + +2019-08-02 Marek Polacek + + PR c++/56428 + * g++.dg/cpp0x/nontype4.C: New test. + +2019-08-02 Marek Polacek + + PR c++/53009 + * g++.dg/cpp0x/nontype3.C: New test. + +2019-08-02 Marek Polacek + + PR c++/77575 + * g++.dg/cpp0x/nontype2.C: New test. + +2019-08-02 Steve Ellcey + + * gcc.target/aarch64/simd_pcs_attribute.c: New test. + * gcc.target/aarch64/simd_pcs_attribute-2.c: Ditto. + * gcc.target/aarch64/simd_pcs_attribute-3.c: Ditto. + +2019-08-02 Uroš Bizjak + + PR target/91201 + * gcc.target/i386/sse4_1-pr91201.c: New test. + +2019-08-02 Marek Polacek + + PR c++/91230 - wrong error with __PRETTY_FUNCTION__ and generic lambda. + * g++.dg/cpp1y/lambda-generic-pretty1.C: New test. + +2019-08-02 Uroš Bizjak + + PR target/91323 + * gcc.dg/torture/pr91323.c: New test. + +2019-08-02 Paolo Carlini + + * g++.dg/cpp1z/nodiscard6.C: New. + +2019-08-02 Senthil Kumar Selvaraj + + * gcc.dg/torture/ssa-fre-5.c: Add dg-require-effective-target int32. + * gcc.dg/torture/ssa-fre-7.c: Likewise. + +2019-08-02 Jakub Jelinek + + PR tree-optimization/91201 + * gcc.target/i386/sse2-pr91201-3.c: New test. + * gcc.target/i386/sse2-pr91201-4.c: New test. + * gcc.target/i386/sse2-pr91201-5.c: New test. + * gcc.target/i386/sse2-pr91201-6.c: New test. + +2019-08-02 Martin Liska + + * g++.dg/cpp1y/new2.C: New test. + +2019-08-02 Senthil Kumar Selvaraj + + * gcc.dg/torture/ssa-fre-6.c: Add dg-require-effective-target int32. + +2019-08-02 Kito Cheng + + * g++.dg/lto/pr87906_0.C: Add dg-require-effective-target shared check. + +2019-08-01 Martin Sebor + + PR c++/90947 + * c-c++-common/array-1.c: New test. + * g++.dg/abi/mangle73.C: New test. + * g++.dg/cpp2a/nontype-class23.C: New test. + * g++.dg/init/array53.C: New test. + +2019-08-01 Uroš Bizjak + + PR target/85693 + * gcc.target/i386/pr85693-1.c: New test. + +2019-08-01 Matthew Beliveau + + PR c++/90590 + * c-c++-common/pr90590-1.c: New test. + * c-c++-common/pr90590-1.h: New test. + * c-c++-common/pr90590-2.c: New test. + * c-c++-common/pr90590-2.h: New test. + +2019-08-01 Marek Polacek + + PR c++/90805 - detect narrowing in case values. + * c-c++-common/pr89888.c: Update expected dg-error. + * g++.dg/cpp0x/Wnarrowing17.C: New test. + * g++.dg/cpp0x/enum28.C: Update expected dg-error. + +2019-08-01 Wilco Dijkstra + + * g++.dg/lto/pr89330_0.C: Add effective-target shared. + +2019-08-01 Kito Cheng + + * gcc.target/riscv/attribute-10.c: Fix testcase on rv64. + +2019-07-31 Paolo Carlini + + * g++.dg/diagnostic/delete1.C: New. + +2019-07-31 Maxim Blinov + + * gcc.target/riscv/attribute-10.c: New test. + +2019-07-31 Richard Biener + + PR tree-optimization/91280 + * g++.dg/torture/pr91280.C: New testcase. + +2019-07-31 Richard Biener + + PR tree-optimization/91293 + * gcc.dg/vect/pr91293-1.c: New testcase. + * gcc.dg/vect/pr91293-2.c: Likewise. + * gcc.dg/vect/pr91293-3.c: Likewise. + +2019-07-31 Jakub Jelinek + + PR tree-optimization/91201 + * gcc.target/i386/sse2-pr91201-2.c: New test. + +2019-07-31 Richard Biener + + PR tree-optimization/91178 + * gcc.dg/torture/pr91178-2.c: New testcase. + +2019-07-31 Jakub Jelinek + + PR tree-optimization/91201 + * gcc.target/i386/sse2-pr91201.c: New test. + * gcc.target/i386/avx2-pr91201.c: New test. + * gcc.target/i386/avx512bw-pr91201.c: New test. + +2019-07-31 Sudakshina Das + + * gcc.target/aarch64/acle/tme.c: New test. + * gcc.target/aarch64/pragma_cpp_predefs_2.c: New test. + +2019-07-31 Joel Hutton + + * gcc.target/arm/cmse/cmse-17.c: New test. + +2019-07-30 Martin Sebor + + PR testsuite/91258 + * g++.dg/ubsan/vla-1.C: Suppress a valid warning. + +2019-07-30 Steven G. Kargl + + PR fortran/91296 + * gfortran.dg/pr91296.f90: New test. + +2019-07-30 Martin Liska + + PR tree-optimization/91270 + * g++.dg/torture/pr91270.C: New test. + +2019-07-30 Richard Sandiford + + * gcc.dg/vect/vect-cond-arith-7.c: New test. + +2019-07-30 Jakub Jelinek + + PR middle-end/91282 + * gcc.dg/type-convert-var.c: Add -fexcess-precision=fast to + dg-additional-options. + + PR middle-end/91216 + * gcc.dg/gomp/pr91216.c: New test. + + PR target/91150 + * gcc.target/i386/avx512bw-pr91150.c: New test. + +2019-07-29 Jozef Lawrynowicz + + * gcc.target/msp430/pr78818-data-region.c: Add -mlarge to dg-options. + * gcc.target/msp430/region-misuse-code.c: New test. + * gcc.target/msp430/region-misuse-data.c: Likewise. + * gcc.target/msp430/region-misuse-code-data.c: Likewise. + * gcc.target/msp430/region-attribute-misuse.c: Likewise. + +2019-07-29 Jozef Lawrynowicz + + PR target/70320 + * gcc.target/msp430/asm-register-names-lower-case.c: New test. + * gcc.target/msp430/asm-register-names-upper-case.c: Likewise. + +2019-07-29 Martin Liska + + * g++.dg/cpp1y/new1.C (test_unused): Add new case that causes + ICE. + +2019-07-29 Richard Biener + + PR tree-optimization/91267 + * gcc.dg/torture/pr91267.c: New testcase. + +2019-07-29 Richard Sandiford + + * c-c++-common/guality/Og-dce-1.c: New test. + * c-c++-common/guality/Og-dce-2.c: Likewise. + * c-c++-common/guality/Og-dce-3.c: Likewise. + +2019-07-29 Richard Sandiford + + * c-c++-common/guality/Og-global-dse-1.c: New test. + +2019-07-29 Richard Sandiford + + * c-c++-common/guality/Og-static-wo-1.c: New test. + * g++.dg/guality/guality.exp: Separate the c-c++-common tests into + "Og" and "general" tests. Run the latter at -O0 and -Og only. + * gcc.dg/guality/guality.exp: Likewise. + +2019-07-29 Richard Sandiford + + * lib/scanasm.exp (parse_function_bodies, check_function_body) + (check-function-bodies): New procedures. + * gcc.target/aarch64/sve/init_1.c: Use check-function-bodies + instead of scan-assembler. + * gcc.target/aarch64/sve/init_2.c: Likewise. + * gcc.target/aarch64/sve/init_3.c: Likewise. + * gcc.target/aarch64/sve/init_4.c: Likewise. + * gcc.target/aarch64/sve/init_5.c: Likewise. + * gcc.target/aarch64/sve/init_6.c: Likewise. + * gcc.target/aarch64/sve/init_7.c: Likewise. + * gcc.target/aarch64/sve/init_8.c: Likewise. + * gcc.target/aarch64/sve/init_9.c: Likewise. + * gcc.target/aarch64/sve/init_10.c: Likewise. + * gcc.target/aarch64/sve/init_11.c: Likewise. + * gcc.target/aarch64/sve/init_12.c: Likewise. + +2019-07-28 Rainer Orth + + * g++.dg/lto/pr89330_0.C (dg-lto-options): Add -fPIC. + Require fpic support. + +2019-07-27 Iain Sandoe + + * gcc.target/powerpc/bmi2-bzhi64-1a.c: Add options to enable altivec + and vsx. + +2019-07-26 Iain Sandoe + + * lib/scanasm.exp (object-size): Handle Darwin's size command. + +2018-07-26 Tamar Christina + + * gcc.dg/type-convert-var.c: New test. + +2019-07-26 Martin Jambor + + PR ipa/89330 + * g++.dg/lto/pr89330_[01].C: New test. + * g++.dg/tree-prof/devirt.C: Added -fno-profile-values to dg-options. + +2019-07-25 Martin Sebor + + PR tree-optimization/91183 + PR tree-optimization/86688 + * gcc.dg/Wstringop-overflow-14.c: Disable for stricly aligned targets. + * gcc.dg/strlenopt-70.c: Fix bugs. + * gcc.dg/strlenopt-71.c: Same. + * gcc.dg/strlenopt-72.c: Same. + +2019-07-25 Vladimir Makarov + + PR rtl-optimization/91223 + * gcc.target/i386/pr91223.c: New test. + +2019-07-25 Iain Sandoe + + PR gcov-profile/91087 + * g++.dg/gcov/pr16855.C: Xfail the count lines for the DTORs and the + "final" line for the failure summaries. Adjust source layout so that + dejagnu xfail expressions work. + +2019-07-25 Thomas Koenig + + PR fortran/65819 + * gfortran.dg/dependency_54.f90: New test. + +2019-07-25 Eric Botcazou + + * gnat.dg/case_optimization3.ad[sb]: New test. + +2019-07-25 Martin Liska + Dominik Infuhr + + PR c++/23383 + * g++.dg/cpp1y/new1.C: New test. + +2019-07-25 Eric Botcazou + + PR testsuite/91245 + * gnat.dg/float_value1.adb: Only run on x86. + +2019-07-24 Martin Sebor + + PR tree-optimization/91183 + PR tree-optimization/86688 + * c-c++-common/ubsan/object-size-9.c: Disable warnings. + * gcc.dg/Wstringop-overflow-14.c: New test. + * gcc.dg/attr-nonstring-2.c: Remove xfails. + * gcc.dg/strlenopt-70.c: New test. + * gcc.dg/strlenopt-71.c: New test. + * gcc.dg/strlenopt-72.c: New test. + * gcc.dg/strlenopt-8.c: Remove xfails. + +2019-07-24 Martin Sebor + + PR driver/80545 + * gcc.misc-tests/help.exp: Add tests. + * lib/options.exp: Handle C++. + +2019-07-24 Claudiu Zissulescu + + * gcc.target/arc/arc.exp (check_effective_target_accregs): New + predicate. + * gcc.target/arc/builtin_special.c: Update test/ + * gcc.target/arc/interrupt-1.c: Likewise. + * gcc.target/arc/interrupt-10.c: New test. + * gcc.target/arc/interrupt-11.c: Likewise. + * gcc.target/arc/interrupt-12.c: Likewise. + +2019-07-24 Andreas Krebbel + + * gcc.target/s390/addsub-signed-overflow-1.c: New test. + * gcc.target/s390/addsub-signed-overflow-2.c: New test. + * gcc.target/s390/mul-signed-overflow-1.c: New test. + * gcc.target/s390/mul-signed-overflow-2.c: New test. + +2019-07-24 Prathamesh Kulkarni + + PR middle-end/91166 + * gcc.target/aarch64/sve/pr91166.c: New test. + +2019-07-23 Steven G. Kargl + + PR fortran/54072 + * gfortran.dg/illegal_boz_arg_1.f90: New tests. + +2019-07-23 Steven G. Kargl + + * gfortran.dg/achar_5.f90: Fix for new BOZ handling. + * arithmetic_overflow_1.f90: Ditto. + * gfortran.dg/boz_11.f90: Ditto. + * gfortran.dg/boz_12.f90: Ditto. + * gfortran.dg/boz_4.f90: Ditto. + * gfortran.dg/boz_5.f90: Ditto. + * gfortran.dg/boz_6.f90: Ditto. + * gfortran.dg/boz_7.f90: Ditto. + * gfortran.dg/boz_8.f90: Ditto. + * gfortran.dg/dec_structure_6.f90: Ditto. + * gfortran.dg/dec_union_1.f90: Ditto. + * gfortran.dg/dec_union_2.f90: Ditto. + * gfortran.dg/dec_union_5.f90: Ditto. + * gfortran.dg/dshift_3.f90: Ditto. + * gfortran.dg/gnu_logical_2.f90: Ditto. + * gfortran.dg/int_conv_1.f90: Ditto. + * gfortran.dg/ishft_1.f90: Ditto. + * gfortran.dg/nan_4.f90: Ditto. + * gfortran.dg/no_range_check_3.f90: Ditto. + * gfortran.dg/pr16433.f: Ditto. + * gfortran.dg/pr44491.f90: Ditto. + * gfortran.dg/pr58027.f90: Ditto. + * gfortran.dg/pr81509_2.f90: Ditto. + * gfortran.dg/unf_io_convert_1.f90: Ditto. + * gfortran.dg/unf_io_convert_2.f90: Ditto. + * gfortran.fortran-torture/execute/intrinsic_fraction_exponent.f90: + Ditto. + * gfortran.fortran-torture/execute/intrinsic_mvbits.f90: Ditto. + * gfortran.fortran-torture/execute/intrinsic_nearest.f90: Ditto. + * gfortran.fortran-torture/execute/seq_io.f90: Ditto. + * gfortran.dg/gnu_logical_1.F: Delete test. + * gfortran.dg/merge_bits_3.f90: New test. + * gfortran.dg/merge_bits_3.f90: Ditto. + * gfortran.dg/boz_int.f90: Ditto. + * gfortran.dg/boz_bge.f90: Ditto. + * gfortran.dg/boz_complex_1.f90: Ditto. + * gfortran.dg/boz_complex_2.f90: Ditto. + * gfortran.dg/boz_complex_3.f90: Ditto. + * gfortran.dg/boz_dble.f90: Ditto. + * gfortran.dg/boz_dshift_1.f90: Ditto. + * gfortran.dg/boz_dshift_2.f90: Ditto. + * gfortran.dg/boz_float_1.f90: Ditto. + * gfortran.dg/boz_float_2.f90: Ditto. + * gfortran.dg/boz_float_3.f90: Ditto. + * gfortran.dg/boz_iand_1.f90: Ditto. + * gfortran.dg/boz_iand_2.f90: Ditto. + +2019-07-23 Jeff Law + + PR tree-optimization/86061 + * gcc.dg/tree-ssa/pr86061.c: New test. + +2019-07-23 Richard Biener + + PR tree-optimization/83518 + * gcc.dg/tree-ssa/ssa-fre-79.c: New testcase. + +2019-07-23 Ed Schonberg + + * gnat.dg/task4.adb: New testcase. + +2019-07-23 Eric Botcazou + + * gnat.dg/range_check5.adb: New testcase. + +2019-07-23 Ed Schonberg + + * gnat.dg/iter5.adb: Add an expected error. + * gnat.dg/iter6.adb: New testcase. + +2019-07-23 Yannick Moy + + * gnat.dg/ghost6.adb, gnat.dg/ghost6_pkg.ads: New testcase. + +2019-07-22 Sylvia Taylor + + * gcc.target/aarch64/simd/ssra.c: New test. + * gcc.target/aarch64/simd/usra.c: New test. + +2019-07-22 Jozef Lawrynowicz + + * gcc.target/msp430/isr-push-pop-main.c: New test. + * gcc.target/msp430/isr-push-pop-isr-430.c: Likewise. + * gcc.target/msp430/isr-push-pop-isr-430x.c: Likewise. + * gcc.target/msp430/isr-push-pop-leaf-isr-430.c: Likewise. + * gcc.target/msp430/isr-push-pop-leaf-isr-430x.c: Likewise. + +2019-07-22 Andrea Corallo + + * jit.dg/test-error-gcc_jit_context_new_unary_op-bad-res-type.c: + New testcase. + * jit.dg/test-error-gcc_jit_context_new_binary_op-bad-res-type.c: + Adjust error message. + +2019-07-22 Paul A. Clarke + + * gcc.target/powerpc/sse4_1-check.h: New. + * gcc.target/powerpc/sse4_1-pblendvb.c: New. + * gcc.target/powerpc/sse4_1-pblendw.c: New. + * gcc.target/powerpc/sse4_1-pblendw-2.c: New. + +2019-07-22 Eric Botcazou + + * gnat.dg/fixedpnt6.adb: New testcase. + +2019-07-22 Ed Schonberg + + * gnat.dg/warn26.adb: New testcase. + +2019-07-22 Javier Miranda + + * gnat.dg/class_wide5.adb: New testcase. + +2019-07-22 Ed Schonberg + + * gnat.dg/opt80.adb: New testcase. + +2019-07-22 Ed Schonberg + + * gnat.dg/warn25.adb: New testcase. + +2019-07-22 Yannick Moy + + * gnat.dg/warn24.adb: New testcase. + +2019-07-22 Eric Botcazou + + * gnat.dg/inline17.adb, gnat.dg/inline17_pkg1.adb, + gnat.dg/inline17_pkg1.ads, gnat.dg/inline17_pkg2.ads, + gnat.dg/inline17_pkg3.adb, gnat.dg/inline17_pkg3.ads: New + testcase. + +2019-07-22 Eric Botcazou + + * gnat.dg/iter5.adb, gnat.dg/iter5_pkg.ads: New testcase. + +2019-07-22 Eric Botcazou + + * gnat.dg/enum_val1.adb: New testcase. + +2019-07-22 Nicolas Roche + + * gnat.dg/float_value1.adb: New testcase. + +2019-07-22 Eric Botcazou + + * gnat.dg/encode_string1.adb, gnat.dg/encode_string1_pkg.adb, + gnat.dg/encode_string1_pkg.ads: New testcase. + +2019-07-22 Eric Botcazou + + * gnat.dg/warn23.adb: New testcase. + +2019-07-22 Javier Miranda + + * gnat.dg/cpp_constructor2.adb: New testcase. + +2019-07-22 Ed Schonberg + + * gnat.dg/warn22.adb: New testcase. + +2019-07-22 Eric Botcazou + + * gnat.dg/loop_invariant1.adb, gnat.dg/loop_invariant1.ads: New + testcase. + +2019-07-22 Richard Biener + + PR tree-optimization/91221 + * g++.dg/pr91221.C: New testcase. + +2019-07-22 Martin Liska + + PR driver/91172 + * gcc.dg/pr91172.c: New test. + +2019-07-22 Claudiu Zissulescu + + * gcc.target/arc/tls-2.c: New test. + * gcc.target/arc/tls-3.c: Likewise. + +2019-07-21 Marek Polacek + + PR c++/67853 + * g++.dg/cpp0x/decltype72.C: New test. + +2019-07-22 Stafford Horne + + * gcc.target/or1k/ror-4.c: New file. + * gcc.target/or1k/shftimm-1.c: Update test from rotate to shift + as the shftimm option no longer controls rotate. + +2019-07-22 Stafford Horne + + PR target/90362 + * gcc.target/or1k/div-mul-3.c: New test. + +2019-07-22 Stafford Horne + + PR target/90363 + * gcc.target/or1k/swap-1.c: New test. + * gcc.target/or1k/swap-2.c: New test. + +2019-07-20 Segher Boessenkool + + * gcc.target/powerpc/volatile-mem.c: New testcase. + +2019-07-20 Jakub Jelinek + + PR target/91204 + * gcc.c-torture/compile/pr91204.c: New test. + + * c-c++-common/gomp/cancel-1.c: Adjust expected diagnostic wording. + * c-c++-common/gomp/clauses-1.c (foo, baz, bar): Add order(concurrent) + clause where allowed. Add combined constructs with loop with all + possible clauses. + (qux): New function. + * c-c++-common/gomp/loop-1.c: New test. + * c-c++-common/gomp/loop-2.c: New test. + * c-c++-common/gomp/loop-3.c: New test. + * c-c++-common/gomp/loop-4.c: New test. + * c-c++-common/gomp/loop-5.c: New test. + * c-c++-common/gomp/order-3.c: Adjust expected diagnostic wording. + * c-c++-common/gomp/simd-setjmp-1.c: New test. + * c-c++-common/gomp/teams-2.c: Adjust expected diagnostic wording. + + * gcc.dg/vect/vect-simd-16.c: New test. + +2019-07-19 Jeff Law + + PR tree-optimization/86061 + * gcc.dg/tree-ssa/ssa-dse-37.c: New test. + * gcc.dg/tree-ssa/ssa-dse-38.c: New test. + +2019-07-19 Richard Biener + + PR tree-optimization/91211 + * gcc.dg/torture/pr91211.c: New testcase. + +2019-07-19 Richard Biener + + PR tree-optimization/91200 + * gcc.dg/torture/pr91200.c: New testcase. + +2019-07-19 Jakub Jelinek + + PR middle-end/91190 + * gcc.c-torture/compile/pr91190.c: New test. + +2019-07-19 Richard Biener + + PR tree-optimization/91207 + * gcc.dg/torture/pr91207.c: New testcase. + +2019-07-18 Uroš Bizjak + + PR target/91188 + * gcc.target/i386/pr91188-1a.c: New test. + * gcc.target/i386/pr91188-1b.c: Ditto. + * gcc.target/i386/pr91188-1c.c: Ditto. + * gcc.target/i386/pr91188-2a.c: Ditto. + * gcc.target/i386/pr91188-2b.c: Ditto. + * gcc.target/i386/pr91188-2c.c: Ditto. + +2019-07-18 Sylvia Taylor + + PR target/90317 + * gcc.target/arm/crypto-vsha1cq_u32.c (foo): Change return type to + uint32_t. + (GET_LANE, TEST_SHA1C_VEC_SELECT): New. + * gcc.target/arm/crypto-vsha1h_u32.c (foo): Change return type to + uint32_t. + (GET_LANE, TEST_SHA1H_VEC_SELECT): New. + * gcc.target/arm/crypto-vsha1mq_u32.c (foo): Change return type to + uint32_t. + (GET_LANE, TEST_SHA1M_VEC_SELECT): New. + * gcc.target/arm/crypto-vsha1pq_u32.c (foo): Change return type to + uint32_t. + (GET_LANE, TEST_SHA1P_VEC_SELECT): New. + +2019-07-18 Jan Hubicka + + * g++.dg/lto/alias-5_0.C: New testcase. + * g++.dg/lto/alias-5_1.C: New. + * g++.dg/lto/alias-5_2.c: New. + +2019-07-18 Bin Cheng + + PR tree-optimization/91137 + * gcc.c-torture/execute/pr91137.c: New test. + +2019-07-18 Richard Sandiford + + * c-c++-common/pr53633-2.c: New test. + +2019-07-17 Alexandre Oliva + + PR middle-end/81824 + * g++.dg/Wmissing-attributes-1.C: New. Some of its fragments + are from Martin Sebor. + +2019-07-17 Marek Polacek + + PR c++/90455 + * g++.dg/cpp0x/nsdmi-list6.C: New test. + +2019-07-17 Jan Hubicka + + * g++.dg/lto/alias-4_0.C + +2019-07-17 Richard Biener + + PR tree-optimization/91178 + * gcc.dg/torture/pr91178.c: New testcase. + +2019-07-17 Richard Biener + + PR tree-optimization/91180 + * gcc.dg/torture/pr91180.c: New testcase. + +2019-07-17 Jakub Jelinek + + PR tree-optimization/91157 + * gcc.target/i386/avx512f-pr91157.c: New test. + * gcc.target/i386/avx512bw-pr91157.c: New test. + +2019-07-17 Richard Biener + + PR tree-optimization/91181 + * gcc.dg/pr91181.c: New testcase. + +2019-07-16 Harald Anlauf + + PR fortran/90903 + * gfortran.dg/check_bits_1.f90: New testcase. + +2019-07-16 Jeff Law + + PR rtl-optimization/91173 + * g++.dg/pr91173.C: New test. + +2019-07-16 Wilco Dijkstra + + PR target/89190 + * gcc.target/arm/pr89190.c: New test. + +2019-07-16 Jakub Jelinek + + PR rtl-optimization/91164 + * g++.dg/opt/pr91164.C: New test. + +2019-07-16 Jan Hubicka + + * g++.dg/lto/alias-1_0.C: Use -O3. + * g++.dg/lto/alias-2_0.C: Use -O3. + * g++.dg/lto/alias-3_0.C: Add loop to enable inlining with + -fno-use-linker-plugin. + * g++.dg/lto/alias-3_1.C: Remove dg-lto-do and dg-lto-options. + +2019-07-16 Rainer Orth + + * gcc.dg/tree-ssa/pr84512.c: Don't xfail scan-tree-dump on + sparcv9. + +2019-07-16 Rainer Orth + + * gcc.dg/autopar/pr91162.c: Require int128 support. + +2019-07-15 Richard Biener + + PR middle-end/91162 + * gcc.dg/autopar/pr91162.c: New testcase. + +2019-07-15 Kewen Lin + + PR tree-optimization/88497 + * gcc.dg/tree-ssa/pr88497-1.c: New test. + * gcc.dg/tree-ssa/pr88497-2.c: Likewise. + * gcc.dg/tree-ssa/pr88497-3.c: Likewise. + * gcc.dg/tree-ssa/pr88497-4.c: Likewise. + * gcc.dg/tree-ssa/pr88497-5.c: Likewise. + * gcc.dg/tree-ssa/pr88497-6.c: Likewise. + * gcc.dg/tree-ssa/pr88497-7.c: Likewise. + +2019-07-14 Jerry DeLisle + + PR fortran/87233 + * gfortran.dg/initialization_14.f90: Modify to now pass by + removing two dg-error commands. Added comments. + * gfortran.dg/initialization_30.f90: New test that includes the + two tests removed above with the 'dg-options -std=f95'. + +2019-07-14 Uroš Bizjak + + * gcc.dg/tree-ssa/pr84512.c (dg-final): Remove XFAIL on alpha*-*-*. + +2019-07-14 Segher Boessenkool + + PR target/91148 + * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust. + * gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust. + * gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust. + * gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Adjust. + * gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Adjust. + * gcc.target/powerpc/byte-in-set-2.c: Adjust. + * gcc.target/powerpc/cmpb-3.c: Adjust. + * gcc.target/powerpc/vsu/vec-all-nez-7.c: Adjust. + * gcc.target/powerpc/vsu/vec-any-eqz-7.c: Adjust. + * gcc.target/powerpc/vsu/vec-xl-len-13.c: Adjust. + * gcc.target/powerpc/vsu/vec-xst-len-12.c: Adjust. + +2019-07-13 Iain Sandoe + + * gcc.target/powerpc/stabs-attrib-vect-darwin.c: Require stabs + support. + +2019-07-13 Segher Boessenkool + + PR target/91148 + * gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c: Adjust. + * gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c: Adjust. + * gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c: Adjust. + * gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c: Adjust. + * gcc.target/powerpc/bfp/scalar-extract-exp-1.c: Adjust. + * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust. + * gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Adjust. + * gcc.target/powerpc/bfp/scalar-extract-sig-1.c: Adjust. + * gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust. + * gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Adjust. + * gcc.target/powerpc/bfp/scalar-insert-exp-1.c: Adjust. + * gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Adjust. + * gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust. + * gcc.target/powerpc/bfp/scalar-insert-exp-4.c: Adjust. + * gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Adjust. + * gcc.target/powerpc/bfp/scalar-insert-exp-7.c: Adjust. + * gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Adjust. + * gcc.target/powerpc/bfp/scalar-test-data-class-11.c: Adjust. + * gcc.target/powerpc/bfp/scalar-test-data-class-6.c: Adjust. + * gcc.target/powerpc/bfp/scalar-test-data-class-7.c: Adjust. + * gcc.target/powerpc/bfp/scalar-test-neg-2.c: Adjust. + * gcc.target/powerpc/bfp/scalar-test-neg-3.c: Adjust. + * gcc.target/powerpc/bfp/scalar-test-neg-5.c: Adjust. + * gcc.target/powerpc/bfp/vec-extract-exp-2.c: Adjust. + * gcc.target/powerpc/bfp/vec-extract-exp-3.c: Adjust. + * gcc.target/powerpc/bfp/vec-extract-sig-2.c: Adjust. + * gcc.target/powerpc/bfp/vec-extract-sig-3.c: Adjust. + * gcc.target/powerpc/bfp/vec-insert-exp-2.c: Adjust. + * gcc.target/powerpc/bfp/vec-insert-exp-3.c: Adjust. + * gcc.target/powerpc/bfp/vec-insert-exp-6.c: Adjust. + * gcc.target/powerpc/bfp/vec-insert-exp-7.c: Adjust. + * gcc.target/powerpc/bfp/vec-test-data-class-2.c: Adjust. + * gcc.target/powerpc/bfp/vec-test-data-class-3.c: Adjust. + * gcc.target/powerpc/byte-in-either-range-1.c: Adjust. + * gcc.target/powerpc/byte-in-range-1.c: Adjust. + * gcc.target/powerpc/byte-in-set-1.c: Adjust. + * gcc.target/powerpc/byte-in-set-2.c: Adjust. + * gcc.target/powerpc/cmpb-3.c: Adjust. + * gcc.target/powerpc/crypto-builtin-2.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-1.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-11.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-16.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-21.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-26.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-31.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-36.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-41.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-46.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-51.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-56.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-6.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-61.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-66.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-71.c: Adjust. + * gcc.target/powerpc/dfp/dtstsfi-76.c: Adjust. + * gcc.target/powerpc/vsu/vec-all-nez-7.c: Adjust. + * gcc.target/powerpc/vsu/vec-any-eqz-7.c: Adjust. + * gcc.target/powerpc/vsu/vec-cmpnez-7.c: Adjust. + * gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Adjust. + * gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Adjust. + * gcc.target/powerpc/vsu/vec-xl-len-12.c: Adjust. + * gcc.target/powerpc/vsu/vec-xl-len-13.c: Adjust. + * gcc.target/powerpc/vsu/vec-xlx-7.c: Adjust. + * gcc.target/powerpc/vsu/vec-xrx-7.c: Adjust. + * gcc.target/powerpc/vsu/vec-xst-len-12.c: Adjust. + * gcc.target/powerpc/vsu/vec-xst-len-13.c: Adjust. + +2019-07-13 Jakub Jelinek + + PR c/91149 + * c-c++-common/gomp/reduction-task-3.c: New test. + + * c-c++-common/gomp/order-3.c: New test. + * c-c++-common/gomp/order-4.c: New test. + +2019-07-12 Bill Seurer + + * gcc.dg/tree-ssa/vector-7.c: Fix typo. + +2019-07-12 Iain Sandoe + + * gcc.dg/pr57438-2.c: Remove. + +2019-07-12 Martin Sebor + + * gcc.dg/Warray-bounds-43.c: New test. + +2019-07-12 Jan Hubicka + + * gcc.dg/tree-ssa/alias-access-path-9.c: New testcase. + +2019-07-08 Jiangning Liu + + PR tree-optimization/89430 + * gcc.dg/tree-ssa/pr89430-1.c: New test. + * gcc.dg/tree-ssa/pr89430-2.c: New test. + * gcc.dg/tree-ssa/pr89430-3.c: New test. + * gcc.dg/tree-ssa/pr89430-4.c: New test. + * gcc.dg/tree-ssa/pr89430-5.c: New test. + * gcc.dg/tree-ssa/pr89430-6.c: New test. + +2019-07-12 Richard Biener + + PR tree-optimization/91145 + * gcc.dg/torture/pr91145.c: New testcase. + +2019-07-12 Alexandre Oliva + + * gcc.dg/gimplefe-44.c: New. + * gcc.dg/gimplefe-43.c: New. + +2019-07-12 Richard Biener + + * gcc.dg/tree-ssa/vector-7.c: New testcase. + +2019-07-12 Jakub Jelinek + + * c-c++-common/gomp/order-1.c: New test. + * c-c++-common/gomp/order-2.c: New test. + +2019-07-11 Sunil K Pandey + + PR target/90980 + * gcc.target/i386/pr90980-1.c: New test. + * gcc.target/i386/pr90980-2.c: Likewise. + * gcc.target/i386/pr90980-3.c: Likewise. + +2019-07-11 Yannick Moy + + * gnat.dg/loop_entry1.adb: New testcase. + +2019-07-11 Ed Schonberg + + * gnat.dg/prot8.adb, gnat.dg/prot8.ads: New testcase. + +2019-07-11 Justin Squirek + + * gnat.dg/unreferenced2.adb: New testcase. + +2019-07-11 Hristian Kirtchev + + * gnat.dg/self_ref1.adb: New testcase. + +2019-07-11 Ed Schonberg + + * gnat.dg/predicate11.adb: New testcase. + +2019-07-11 Hristian Kirtchev + + * gnat.dg/equal9.adb: New testcase. + +2019-07-11 Thomas Quinot + + * gnat.dg/scos1.adb: New testcase. + +2019-07-11 Justin Squirek + + * gnat.dg/access7.adb: New testcase. + +2019-07-11 Yannick Moy + + * gnat.dg/warn21.adb, gnat.dg/warn21.ads: New testcase. + +2019-07-11 Richard Biener + + PR middle-end/91131 + * gcc.target/i386/pr91131.c: New testcase. + +2019-07-10 Martin Sebor + + PR testsuite/91132 + * gcc.dg/strlenopt-67.c: Removed second copy of test. + +2019-07-10 Vladimir Makarov + + PR target/91102 + * gcc.target/aarch64/pr91102.c: New test. + +2019-07-10 Richard Biener + + PR tree-optimization/91126 + * gcc.dg/torture/pr91126.c: New testcase. + +2019-07-10 Richard Biener + + * gcc.dg/torture/ssa-fre-5.c: New testcase. + * gcc.dg/torture/ssa-fre-6.c: Likewise. + * gcc.dg/torture/ssa-fre-7.c: Likewise. + +2019-07-10 Ed Schonberg + + * gnat.dg/modular5.adb: New testcase. + +2019-07-10 Ed Schonberg + + * gnat.dg/limited3.adb, gnat.dg/limited3_pkg.adb, + gnat.dg/limited3_pkg.ads: New testcase. + +2019-07-10 Hristian Kirtchev + + * gnat.dg/incomplete7.adb, gnat.dg/incomplete7.ads: New testcase. + +2019-07-10 Hristian Kirtchev + + * gnat.dg/limited2.adb, gnat.dg/limited2_pack_1.adb, + gnat.dg/limited2_pack_1.ads, gnat.dg/limited2_pack_2.adb, + gnat.dg/limited2_pack_2.ads: New testcase. + +2019-07-10 Ed Schonberg + + * gnat.dg/equal8.adb, gnat.dg/equal8.ads, + gnat.dg/equal8_pkg.ads: New testcase. + +2019-07-10 Paolo Carlini + + * g++.dg/diagnostic/complex-invalid-1.C: New. + * g++.dg/diagnostic/static-cdtor-1.C: Likewise. + * g++.dg/cpp1z/has-unique-obj-representations2.C: Test location + too. + * g++.dg/other/anon-union3.C: Adjust expected location. + * g++.dg/parse/error8.C: Likewise. + +2019-07-09 Jan Hubicka + + * g++.dg/lto/alias-3_0.C: New file. + * g++.dg/lto/alias-3_1.c: New file. + +2019-07-09 Martin Sebor + + PR tree-optimization/90989 + * gcc.dg/strlenopt-26.c: Exit with test result status. + * gcc.dg/strlenopt-67.c: New test. + +2019-07-09 Dragan Mladjenovic + + * gcc.target/mips/cfgcleanup-jalr1.c: New test. + * gcc.target/mips/cfgcleanup-jalr2.c: New test. + * gcc.target/mips/cfgcleanup-jalr3.c: New test. + +2019-07-09 Richard Biener + + PR tree-optimization/91114 + * gcc.dg/vect/pr91114.c: New testcase. + +2019-07-09 Sylvia Taylor + + * gcc.target/aarch64/crypto-fuse-1.c: Remove. + * gcc.target/aarch64/crypto-fuse-2.c: Remove. + * gcc.target/aarch64/aes-fuse-1.c: New testcase. + * gcc.target/aarch64/aes-fuse-2.c: New testcase. + +2019-07-09 Christophe Lyon + + * gcc.target/arm/cmse/bitfield-1.c: Fix address of .gnu.sgstubs + section. + * gcc.target/arm/cmse/bitfield-2.c: Likewise. + * gcc.target/arm/cmse/bitfield-3.c: Likewise. + * gcc.target/arm/cmse/struct-1.c: Likewise. + +2019-07-09 Sylvia Taylor + + * gcc.target/arm/aes-fuse-1.c: New. + * gcc.target/arm/aes-fuse-2.c: New. + * gcc.target/arm/aes_xor_combine.c: New. + +2019-07-09 Martin Liska + + * gcc.dg/predict-17.c: Test loop optimizer assumption + about loop iterations. + +2019-07-09 Richard Biener + + * gcc.dg/tree-ssa/alias-access-path-1.c: Scan fre1 dump. + * gcc.dg/tree-ssa/alias-access-path-2.c: Likewise. + * gcc.dg/tree-ssa/alias-access-path-8.c: Likewise. + +2019-07-09 Ed Schonberg + + * gnat.dg/predicate10.adb, gnat.dg/predicate10_pkg.adb, + gnat.dg/predicate10_pkg.ads: New testcase. + +2019-07-09 Justin Squirek + + * gnat.dg/image1.adb: New testcase. + +2019-07-09 Javier Miranda + + * gnat.dg/rep_clause8.adb: New testcase. + +2019-07-09 Ed Schonberg + + * gnat.dg/equal7.adb, gnat.dg/equal7_pkg.adb, + gnat.dg/equal7_pkg.ads: New testcase. + +2019-07-09 Javier Miranda + + * gnat.dg/range_check3.adb, gnat.dg/range_check3_pkg.adb, + gnat.dg/range_check3_pkg.ads: New testcase. + +2019-07-09 Ed Schonberg + + * gnat.dg/generic_inst5.adb, gnat.dg/generic_inst6.adb, + gnat.dg/generic_inst6_g1-c.adb, gnat.dg/generic_inst6_g1-c.ads, + gnat.dg/generic_inst6_g1.ads, gnat.dg/generic_inst6_i1.ads, + gnat.dg/generic_inst6_i2.ads, gnat.dg/generic_inst6_x.ads: New + testcases. + +2019-07-08 Martin Sebor + + PR middle-end/71924 + PR middle-end/90549 + * gcc.c-torture/execute/return-addr.c: New test. + * gcc.dg/Wreturn-local-addr-2.c: New test. + * gcc.dg/Wreturn-local-addr-4.c: New test. + * gcc.dg/Wreturn-local-addr-5.c: New test. + * gcc.dg/Wreturn-local-addr-6.c: New test. + * gcc.dg/Wreturn-local-addr-7.c: New test. + * gcc.dg/Wreturn-local-addr-8.c: New test. + * gcc.dg/Wreturn-local-addr-9.c: New test. + * gcc.dg/Wreturn-local-addr-10.c: New test. + * gcc.dg/Walloca-4.c: Handle expected warnings. + * gcc.dg/pr41551.c: Same. + * gcc.dg/pr59523.c: Same. + * gcc.dg/tree-ssa/pr88775-2.c: Same. + * gcc.dg/tree-ssa/alias-37.c: Same. + * gcc.dg/winline-7.c: Same. + +2019-07-08 Jakub Jelinek + + * g++.dg/vect/simd-6.cc: Replace xfail with target x86. + * g++.dg/vect/simd-9.cc: Likewise. + + PR c++/91110 + * g++.dg/gomp/pr91110.C: New test. + +2019-07-08 Segher Boessenkool + + PR rtl-optimization/88233 + * gcc.target/powerpc/pr88233.c: New testcase. + +2019-07-08 Wilco Dijkstra + + PR testsuite/91059 + PR testsuite/78529 + * gcc.c-torture/execute/builtins/builtins.exp: Add -fno-ipa-ra. + +2019-07-08 Robin Dapp + + * gcc.target/s390/rotate-truncation-mask.c: New test. + +2019-07-08 Robin Dapp + + * gcc.target/s390/combine-rotate-modulo.c: New test. + * gcc.target/s390/combine-shift-rotate-add-mod.c: New test. + * gcc.target/s390/vector/combine-shift-vec.c: New test. + +2019-07-08 Joern Rennecke + + Avoid clash with system header declaration. + * gcc.dg/vect/slp-reduc-sad.c (uint32_t): Remove unused declaration. + +2019-07-08 Richard Biener + + PR tree-optimization/91108 + * gcc.dg/tree-ssa/ssa-fre-61.c: Adjust back. + * gcc.dg/tree-ssa/ssa-fre-78.c: New testcase. + +2019-07-08 Jim Wilson + + * gcc.target/riscv/shift-shift-2.c: Add one more test. + +2019-07-08 Paolo Carlini + + PR c++/65143 + * g++.dg/tree-ssa/final2.C: New. + * g++.dg/tree-ssa/final3.C: Likewise. + +2019-07-08 Javier Miranda + + * gnat.dg/interface10.adb: New testcase. + +2019-07-08 Hristian Kirtchev + + * gnat.dg/addr13.adb, gnat.dg/addr13.ads: New testcase. + +2019-07-08 Ed Schonberg + + * gnat.dg/entry1.adb, gnat.dg/entry1.ads: New testcase. + +2019-07-08 Ed Schonberg + + * gnat.dg/fixed_delete.adb: New testcase. + +2019-07-08 Javier Miranda + + * gnat.dg/interface9.adb, gnat.dg/interface9_root-child.ads, + gnat.dg/interface9_root.ads: New testcase. + +2019-07-08 Ed Schonberg + + * gnat.dg/predicate9.adb: New testcase. + +2019-07-08 Justin Squirek + + * gnat.dg/sso16.adb: New testcase. + +2019-07-08 Ed Schonberg + + * gnat.dg/predicate8.adb, gnat.dg/predicate8_pkg.adb, + gnat.dg/predicate8_pkg.ads: New testcase. + +2019-07-08 Richard Biener + + PR tree-optimization/83518 + * gcc.dg/tree-ssa/ssa-fre-73.c: New testcase. + * gcc.dg/tree-ssa/ssa-fre-74.c: Likewise. + * gcc.dg/tree-ssa/ssa-fre-75.c: Likewise. + * gcc.dg/tree-ssa/ssa-fre-76.c: Likewise. + * g++.dg/tree-ssa/pr83518.C: Likewise. + +2019-07-08 Richard Sandiford + + * gcc.dg/guality/guality.h: Include on Linux targets. + (main): Use PR_SET_PTRACER where available. + +2019-07-07 Paul Thomas + + PR fortran/91077 + * gfortran.dg/pointer_array_11.f90 : New test. + +2019-07-06 Jakub Jelinek + + * c-c++-common/gomp/scan-4.c: Don't expect sorry message. + + PR tree-optimization/91096 + * gcc.dg/vect/vect-simd-10.c (FLT_MIN_VALUE): Define. + (bar, main): Use it instead of -__builtin_inff (). + * gcc.dg/vect/vect-simd-14.c (FLT_MIN_VALUE): Define. + (bar, main): Use it instead of -__builtin_inff (). + +2019-07-05 Paolo Carlini + + PR c++/67184 (again) + PR c++/69445 + * g++.dg/other/final4.C: New. + +2019-07-04 Marek Polacek + + DR 1813 + PR c++/83374 - __is_standard_layout wrong for a class with repeated + bases. + * g++.dg/ext/is_std_layout3.C: New test. + * g++.dg/ext/is_std_layout4.C: New test. + +2019-07-05 Richard Biener + + * gcc.dg/tree-ssa/ssa-fre-77.c: New testcase. + +2019-07-05 Richard Biener + + PR tree-optimization/91091 + * gcc.dg/tree-ssa/pr91091-2.c: New testcase. + * gcc.dg/tree-ssa/ssa-fre-70.c: Likewise. + * gcc.dg/tree-ssa/ssa-fre-71.c: Likewise. + * gcc.dg/tree-ssa/ssa-fre-72.c: Likewise. + +2019-07-05 Richard Biener + + PR tree-optimization/91091 + * gcc.dg/tree-ssa/pr91091-1.c: New testcase. + * gcc.dg/tree-ssa/ssa-fre-61.c: Adjust. + +2019-07-05 Eric Botcazou + + * gnat.dg/pack23.adb, gnat.dg/pack23_pkg.ads: New testcase. + +2019-07-05 Hristian Kirtchev + + * gnat.dg/task3.adb, gnat.dg/task3.ads, gnat.dg/task3_pkg1.ads, + gnat.dg/task3_pkg2.ads: New testcase. + +2019-07-05 Javier Miranda + + * gnat.dg/access6.adb: New testcase. + +2019-07-05 Bob Duff + + * gnat.dg/bip_export.adb, gnat.dg/bip_export.ads: New testcase. + +2019-07-05 Ed Schonberg + + * gnat.dg/aggr25.adb, gnat.dg/aggr25.ads: New testcase. + +2019-07-05 Ed Schonberg + + * gnat.dg/predicate7.adb, gnat.dg/predicate7.ads, + gnat.dg/predicate7_pkg.ads: New testcase. + +2019-07-04 Jakub Jelinek + + PR middle-end/78884 + * gcc.dg/gomp/pr78884.c: New test. + +2019-07-04 Andrea Corallo + + * jit.dg/test-error-gcc_jit_context_new_binary_op-bad-res-type.c: + New testcase. + +2019-07-04 Wilco Dijkstra + + * gcc.dg/tree-ssa/cunroll-15.c: Remove XFAIL on arm. + +2019-07-04 Andrea Corallo + + * jit.dg/all-non-failing-tests.h: Add test-accessing-bitfield.c. + * jit.dg/test-accessing-bitfield.c: New testcase. + * jit.dg/test-error-gcc_jit_context_new_bitfield-invalid-type.c: + Likewise. + * jit.dg/test-error-gcc_jit_context_new_bitfield-invalid-width.c: + Likewise. + * jit.dg/test-error-gcc_jit_lvalue_get_address-bitfield.c: + Likewise. + +2019-07-04 Jan Hubicka + + * gcc.dg/tree-ssa/alias-access-path-3.c: New testcase. + * gcc.dg/tree-ssa/alias-access-path-8.c: New testcase. + +2019-07-04 Andrew Stubbs + + * g++.dg/gomp/unmappable-1.C: New file. + +2019-07-04 Javier Miranda + + * gnat.dg/cpp_constructor.adb, gnat.dg/cpp_constructor_fp.ads, + gnat.dg/cpp_constructor_useit.ads: New testcase. + +2019-07-04 Gary Dismukes + + * gnat.dg/ghost5.adb, gnat.dg/ghost5.ads, + gnat.dg/ghost5_parent.ads: New testcase. + +2019-07-04 Yannick Moy + + * gnat.dg/spark3.adb: New testcase. + +2019-07-04 Justin Squirek + + * gnat.dg/tagged2.adb, gnat.dg/tagged2.ads: New testcase. + +2019-07-04 Ed Schonberg + + * gnat.dg/equal6.adb, gnat.dg/equal6_types.adb, + gnat.dg/equal6_types.ads: New testcase. + +2019-07-04 Justin Squirek + + * gnat.dg/allocator.adb: New testcase. + +2019-07-04 Hristian Kirtchev + + * gnat.dg/default_initial_condition.adb, + gnat.dg/default_initial_condition_pack.adb, + gnat.dg/default_initial_condition_pack.ads: New testcase. + +2019-07-04 Ed Schonberg + + * gnat.dg/aspect2.adb, gnat.dg/aspect2.ads: New testcase. + +2019-07-04 Yannick Moy + + * gnat.dg/synchronized2.adb, gnat.dg/synchronized2.ads, + gnat.dg/synchronized2_pkg.ads: New testcase. + +2019-07-04 Justin Squirek + + * gnat.dg/generic_inst4.adb, gnat.dg/generic_inst4_gen.ads, + gnat.dg/generic_inst4_inst.ads, gnat.dg/generic_inst4_typ.ads: + New testcase. + +2019-07-04 Ed Schonberg + + * gnat.dg/dimensions2.adb, gnat.dg/dimensions2_phys.ads, + gnat.dg/dimensions2_real_numbers.ads: New testcase. + +2019-07-04 Jakub Jelinek + + PR tree-optimization/91063 + * gcc.dg/gomp/pr91063.c: New test. + +2019-07-04 Prathamesh Kulkarni + + PR target/88833 + * gfortran.dg/pr88833.f90: New test. + +2019-07-04 Jakub Jelinek + + PR middle-end/91069 + * gcc.dg/pr91069.c (v2df): Use 2 * sizeof (double) instead of + hardcoded 16 for better portability. + (v2di): Change from long vector to long long vector. Use + 2 * sizeof (long long) instead of hardcoded 16. + + PR rtl-optimization/90756 + * gcc.dg/pr90756.c: New test. + +2019-07-04 Chenghua Xu + + * gcc.target/mips/mips-fmadd.c: Rename to ... + * gcc.target/mips/mips-fmadd-o32.c: ... Here; add abi=32. + * gcc.target/mips/mips-fmadd-n64.c: New. + +2019-07-03 Wilco Dijkstra + + * gcc.dg/store_merging_27.c: Fix test for Arm. + * gcc.dg/store_merging_28.c: Likewise. + * gcc.dg/store_merging_29.c: Likewise. + * gcc.dg/tree-ssa/dump-6.c: Likewise. + +2019-07-03 Mark Wielaard + + PR debug/90981 + * g++.dg/pr90981.C: New test. + +2019-07-03 Richard Biener + + PR middle-end/91069 + * gcc.dg/pr91069.c: New testcase. + +2019-07-03 Martin Liska + + * gcc.dg/tree-prof/val-prof-2.c: Update scanned pattern + as we do now better. + +2019-07-03 Eric Botcazou + + * gnat.dg/specs/debug1.ads: New test. + +2019-07-03 Martin Liska + + PR tree-optimization/90892 + * gcc.dg/pr90892.c: New test. + +2019-07-03 Martin Liska + + PR middle-end/90899 + * gcc.target/i386/pr90899.c: New test. + +2019-07-03 Jakub Jelinek + + PR tree-optimization/91033 + * gcc.target/i386/pr91033.c: New test. + +2019-07-03 Bob Duff + + * gnat.dg/task2.adb, gnat.dg/task2_pkg.adb, + gnat.dg/task2_pkg.ads: New testcase. + +2019-07-03 Ed Schonberg + + * gnat.dg/inline16.adb, gnat.dg/inline16_gen.adb, + gnat.dg/inline16_gen.ads, gnat.dg/inline16_types.ads: New + testcase. + +2019-07-03 Justin Squirek + + * gnat.dg/renaming13.adb, gnat.dg/renaming14.adb: New testcases. + +2019-07-03 Hristian Kirtchev + + * gnat.dg/inline15.adb, gnat.dg/inline15_gen.adb, + gnat.dg/inline15_gen.ads, gnat.dg/inline15_types.ads: New + testcase. + +2019-07-03 Bob Duff + + * gnat.dg/warn20.adb, gnat.dg/warn20_pkg.adb, + gnat.dg/warn20_pkg.ads: New testcase. + +2019-07-03 Ed Schonberg + + * gnat.dg/predicate6.adb, gnat.dg/predicate6.ads: New testcase. + * gnat.dg/static_pred1.adb: Remove expected error. + +2019-07-03 Ed Schonberg + + * gnat.dg/predicate5.adb, gnat.dg/predicate5.ads: New testcase. + +2019-07-03 Eric Botcazou + + * gnat.dg/alignment14.adb: New testcase. + +2019-07-03 Ed Schonberg + + * gnat.dg/predicate4.adb, gnat.dg/predicate4_pkg.ads: New + testcase. + +2019-07-03 Jakub Jelinek + + * c-c++-common/gomp/scan-3.c (f1): Don't expect a sorry message. + * c-c++-common/gomp/scan-5.c (foo): Likewise. + + * c-c++-common/gomp/scan-5.c: New test. + + * c-c++-common/gomp/lastprivate-conditional-5.c: New test. + +2019-07-02 Jeff Law + + PR tree-optimization/90883 + * g++.dg/tree-ssa/pr90883.c: Add -Os. Check dse2 for the + deleted store on some targets. + +2019-07-02 Joern Rennecke + + PR testsuite/91065 + * gcc.dg/plugin/start_unit_plugin.c: Register a root tab + to reference fake_var. + +2019-07-02 qing zhao + + PR preprocessor/90581 + * c-c++-common/cpp/fmax-include-depth-1a.h: New test. + * c-c++-common/cpp/fmax-include-depth-1b.h: New test. + * c-c++-common/cpp/fmax-include-depth.c: New test. + +2019-07-02 Jan Hubicka + + * gcc.dg/tree-ssa/alias-access-path-7.c: New testcase. + +2019-07-02 Jan Hubicka + + * g++.dg/lto/pr90990_0.C: New testcase. + +2019-07-02 Richard Biener + + PR tree-optimization/58483 + * gcc.dg/tree-ssa/ssa-dom-cse-8.c: New testcase. + +2019-07-01 Joern Rennecke + + PR middle-end/66726 + * gcc.dg/tree-ssa/pr66726-4.c: New testcase. + +2019-07-01 Andreas Krebbel + + * gcc.target/s390/vector/vec-shift-2.c: New test. + +2019-07-01 Ed Schonberg + + * gnat.dg/generic_inst3.adb, + gnat.dg/generic_inst3_kafka_lib-topic.ads, + gnat.dg/generic_inst3_kafka_lib.ads, + gnat.dg/generic_inst3_markets.ads, + gnat.dg/generic_inst3_traits-encodables.ads, + gnat.dg/generic_inst3_traits.ads: New testcase. + +2019-07-01 Ed Schonberg + + * gnat.dg/enum_rep.adb, gnat.dg/enum_rep.ads: New testcase. + +2019-07-01 Ed Schonberg + + * gnat.dg/derived_type6.adb, gnat.dg/derived_type6.ads: New + testcase. + +2019-07-01 Ed Schonberg + + * gnat.dg/weak3.adb, gnat.dg/weak3.ads: New testcase. + +2019-07-01 Ed Schonberg + + * gnat.dg/prot7.adb, gnat.dg/prot7.ads: New testcase. + +2019-07-01 Richard Biener + + * gcc.dg/gimplefe-42.c: New testcase. + +2019-07-01 Hristian Kirtchev + + * gnat.dg/sets1.adb: Update. + +2019-07-01 Hristian Kirtchev + + * gnat.dg/linkedlist.adb: Update. + +2019-07-01 Hristian Kirtchev + + * gnat.dg/dynhash.adb, gnat.dg/dynhash1.adb: Update. + +2019-07-01 Hristian Kirtchev + + * gnat.dg/freezing1.adb, gnat.dg/freezing1.ads, + gnat.dg/freezing1_pack.adb, gnat.dg/freezing1_pack.ads: New + testcase. + +2019-07-01 Jan Hubicka + + PR lto/91028 + PR lto/90720 + * g++.dg/lto/alias-1_0.C: Add loop to make inlining happen with + -fno-use-linker-plugin + * g++.dg/lto/alias-2_0.C: Likewise. + +2019-07-01 Dominique d'Humieres + + * g++.dg/cpp0x/gen-attrs-67.C: Add error for darwin. + +2019-07-01 Richard Biener + + * gcc.dg/tree-ssa/pr77445-2.c: Adjust. + +2019-07-01 Hongtao Liu + + * lib/target-supports.exp + (check_effective_target_avx512vp2intersect): New proc. + * gcc.target/i386/avx512vp2intersect-2intersect-1b.c: Add + dg-require-effective-target avx512vp2intersect. + * gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c: Ditto. + +2019-06-29 Eric Botcazou + + * gnat.dg/specs/array5.ads: New test. + * gnat.dg/specs/array5_pkg1.ads: New helper. + * gnat.dg/specs/array5_pkg2.ads: Likewise. + * gnat.dg/specs/array5_pkg2-g.ads: Likewise. + +2019-06-29 Eric Botcazou + + * gnat.dg/specs/unchecked_convert1.ads: New test. + * gnat.dg/specs/unchecked_convert2.ads: Likewise. + +2019-06-29 Eric Botcazou + + * gnat.dg/specs/size_clause3.ads: Adjust error message. + +2019-06-29 Eric Botcazou + + * gnat.dg/specs/atomic2.ads: Adjust error message. + * gnat.dg/specs/clause_on_volatile.ads: Likewise. + * gnat.dg/specs/size_clause3.ads: Likewise. + +2019-06-29 Eric Botcazou + + * gnat.dg/array35.adb: New test. + * gnat.dg/array36.adb: Likewise. + +2019-06-28 Jan Beulich + + * gcc.target/i386/gfni-5.c: New. + +2019-06-28 Jan Beulich + + * gcc.target/i386/cvtpd2pi: New. + +2019-06-27 Jakub Jelinek + + PR c++/91024 + * g++.dg/warn/Wimplicit-fallthrough-4.C: New test. + + PR tree-optimization/91010 + * g++.dg/vect/simd-10.cc: New test. + +2019-06-27 Steven G. Kargl + + PR fortran/90987 + * match.c (gfc_match_common): Adjust parsing of fixed and free form + source code containing, e.g., COMMONI. + +2019-06-27 Jan Hubicka + + * g++.dg/lto/alias-2_0.C: New testcase. + * g++.dg/lto/alias-2_1.C: New testcase. + +2019-06-27 Jakub Jelinek + + PR target/90991 + * gcc.target/i386/avx2-pr90991-1.c: New test. + * gcc.target/i386/avx512dq-pr90991-2.c: New test. + +2019-06-27 Jan Beulich + + * gcc.target/i386/gfni-4.c: Pass -msse2. + +2019-06-27 Richard Biener + + * gcc.dg/tree-ssa/ssa-fre-69.c: New testcase. + +2019-06-27 Jun Ma + + PR tree-optimization/89772 + * gcc.dg/builtin-memchr-4.c: New test. + +2019-06-27 Martin Liska + + PR tree-optimization/91014 + * gcc.target/s390/pr91014.c: New test. + +2019-06-27 Richard Biener + + PR testsuite/91004 + * g++.dg/torture/pr34850.C: Fix overly reduced testcase. + +2019-06-27 Kewen Lin + + PR target/62147 + * gcc.target/powerpc/pr62147.c: New test. + +2019-06-26 Jeff Law + + PR tree-optimization/90883 + * g++.dg/tree-ssa/pr90883.C: New test. + * gcc.dg/tree-ssa/ssa-dse-36.c: New test. + +2019-06-26 Uroš Bizjak + + PR target/89021 + * lib/target-supports.exp (available_vector_sizes) + <[istarget i?86-*-*] || [istarget x86_64-*-*]>: Add + 64-bit vectors for !ia32. + +2019-06-26 Jeff Law + + * gcc.c-torture/execute/builtins/builtins.exp: Add -fno-tree-dse + as DSE compromises several of these tests. + * gcc.dg/builtin-stringop-chk-1.c: Similarly. + * gcc.dg/memcpy-2.c: Similarly. + * gcc.dg/pr40340-1.c: Similarly. + * gcc.dg/pr40340-2.c: Similarly. + * gcc.dg/pr40340-5.c: Similarly. + +2019-06-26 Steven G. Kargl + + PR Fortran/90988 + ChangeLog forgotten with revision 272667 + * gfortran.dg/pr90988_1.f90: New test. + * gfortran.dg/pr90988_2.f90: Ditto. + * gfortran.dg/pr90988_3.f90: Ditto. + +2019-06-26 Nathan Sidwell + + * c-c++-common/pr90927.c: New. + +2019-06-26 Richard Biener + + PR ipa/90982 + * g++.dg/torture/pr90982.C: New testcase. + +2019-06-26 Paolo Carlini + + PR c++/67184 + PR c++/69445 + * g++.dg/other/final3.C: New. + * g++.dg/other/final5.C: Likewise. + +2019-06-26 Jakub Jelinek + + PR target/90991 + * gcc.target/i386/avx512dq-pr90991-1.c: New test. + +2019-06-26 Li Jia He + + * gcc.target/powerpc/maddld-1.c: New testcase. + +2019-06-06 Hongtao Liu + Olga Makhotina + + * gcc.target/i386/avx512-check.h: Handle bit_AVX512VP2INTERSECT. + * gcc.target/i386/avx512vp2intersect-2intersect-1a.c: New test. + * gcc.target/i386/avx512vp2intersect-2intersect-1b.c: Likewise. + * gcc.target/i386/avx512vp2intersect-2intersectvl-1a.c: Likewise. + * gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c: Likewise. + * gcc.target/i386/sse-12.c: Add -mavx512vp2intersect. + * gcc.target/i386/sse-13.c: Likewsie. + * gcc.target/i386/sse-14.c: Likewise. + * gcc.target/i386/sse-22.c: Likewise. + * gcc.target/i386/sse-23.c: Likewise. + * g++.dg/other/i386-2.C: Likewise. + * g++.dg/other/i386-3.C: Likewise. + +2019-06-25 Jakub Jelinek + + PR c++/90969 + * g++.dg/ext/vector38.C: New test. + +2019-06-25 Martin Jambor + + PR ipa/90939 + * g++.dg/lto/pr90939_[01].C: New test. + +2019-06-25 Richard Biener + + PR tree-optimization/90930 + * gcc.dg/tree-ssa/reassoc-24.c: Adjust. + * gcc.dg/tree-ssa/reassoc-25.c: Likewise. + +2019-06-25 Claudiu Zissulescu + + * gcc.target/arc/pr89838.c: New file. + +2019-06-25 Jozef Lawrynowicz + + * gcc.target/msp430/mlarge-pedwarns.c: New test. + +2019-06-25 Jakub Jelinek + + PR sanitizer/90954 + * c-c++-common/gomp/pr90954.c: New test. + +2019-06-24 Iain Sandoe + + * gcc.target/powerpc/safe-indirect-jump-1.c: Skip for Darwin. + * gcc.target/powerpc/safe-indirect-jump-7.c: Likewise. + +2019-06-24 Iain Sandoe + + * gcc.target/powerpc/spec-barr-1.c: Adjust scan assembler regex + to recognise Darwin's register names. + +2019-06-24 Iain Sandoe + + * gcc.dg/cpp/isysroot-1.c: Use as the test header. + * gcc.dg/cpp/usr/include/stdio.h: Rename... + * gcc.dg/cpp/usr/include/example.h: ... to this. + +2019-06-24 Richard Biener + + PR tree-optimization/90972 + * gcc.dg/torture/pr90972.c: New testcase. + +2019-06-24 Martin Sebor + + * gcc.dg/Wfloat-equal-1.c: Adjust text of expected diagnostic. + * gcc.dg/misc-column.c: Ditto. + +2019-06-23 Ian Lance Taylor + + * go.test/test/blank1.go: Update for diagnostic message changes. + +2019-06-23 Iain Sandoe + + * gcc.target/powerpc/builtins-2.c: Require VSX hardware support. + +2019-06-23 Iain Sandoe + + * gcc.target/powerpc/pr80125.c (foo): Use an unsigned char + vector explicitly for the vec_perm. + +2019-06-23 Iain Sandoe + + * gcc.target/powerpc/builtins-1.c: Account for Darwin's use of + __USER_LABEL_PREFIX__. + +2019-06-23 Iain Sandoe + + * gcc.target/powerpc/pr71785.c: For Darwin, make test non-PIC, + expect the out-of-line GPR restore, and test specifically for + absence of branches to local labels. + +2019-06-22 Jerry DeLisle + + PR fortran/89782 + * gfortran.dg/io_constraints_14.f90: New test. + +2019-06-22 Iain Sandoe + + * gcc.target/powerpc/pr64205.c: Require effective target dfp. + * gcc.target/powerpc/pr79909.c: Likewise. + +2019-06-22 Iain Sandoe + + * gcc.target/powerpc/darwin-bool-1.c: Suppress the pedantic + warning about _Bool. + +2019-06-22 Marek Polacek + + PR c++/65707 + PR c++/89480 + PR c++/58836 + * g++.dg/cpp0x/nondeduced5.C: New test. + * g++.dg/cpp0x/nondeduced6.C: New test. + * g++.dg/cpp0x/nondeduced7.C: New test. + + PR c++/66256 + * g++.dg/cpp0x/noexcept54.C: New test. + +2019-06-22 Jan Hubicka + + * gcc.dg/tree-ssa/alias-access-path-6.c: New testcase. + +2019-06-22 Marek Polacek + + PR c++/86476 - noexcept-specifier is a complete-class context. + PR c++/52869 + * g++.dg/cpp0x/noexcept45.C: New test. + * g++.dg/cpp0x/noexcept46.C: New test. + * g++.dg/cpp0x/noexcept47.C: New test. + * g++.dg/cpp0x/noexcept48.C: New test. + * g++.dg/cpp0x/noexcept49.C: New test. + * g++.dg/cpp0x/noexcept50.C: New test. + * g++.dg/cpp0x/noexcept51.C: New test. + * g++.dg/cpp0x/noexcept52.C: New test. + * g++.dg/cpp0x/noexcept53.C: New test. + * g++.dg/eh/shadow1.C: Adjust dg-error. + + PR c++/90881 - bogus -Wunused-value in unevaluated context. + * g++.dg/cpp0x/Wunused-value1.C: New test. + +2019-06-22 Paolo Carlini + + * g++.dg/diagnostic/auto-storage-1.C: New. + * g++.dg/diagnostic/no-type-1.C: Likewise. + * g++.dg/diagnostic/no-type-2.C: Likewise. + * g++.dg/diagnostic/top-level-auto-1.C: Likewise. + * g++.dg/cpp0x/auto9.C: Test some locations too. + * g++.dg/cpp1z/register1.C: Likewise. + * g++.dg/cpp1z/register2.C: Likewise. + * g++.dg/cpp1z/register3.C: Likewise. + * g++.dg/other/error34.C: Likewise. + +2019-06-21 Paolo Carlini + + PR c++/90909 + * g++.dg/other/final7.C: New. + +2019-06-21 Jakub Jelinek + + * g++.dg/vect/simd-2.cc: Don't xfail, instead expect vectorization on + x86. + * g++.dg/vect/simd-5.cc: Likewise. + +2019-06-21 Paolo Carlini + + PR c++/90909 + Revert: + 2019-05-21 Paolo Carlini + + PR c++/67184 + PR c++/69445 + * g++.dg/other/final3.C: New. + * g++.dg/other/final4.C: Likewise. + * g++.dg/other/final5.C: Likewise. + + * g++.dg/other/final6.C: New. + +2019-06-21 Marek Polacek + + PR c++/61490 - qualified-id in friend function definition. + * g++.dg/diagnostic/friend2.C: New test. + * g++.dg/diagnostic/friend3.C: New test. + + PR c++/60223 - ICE with T{} in non-deduced context. + * g++.dg/cpp0x/nondeduced1.C: New test. + * g++.dg/cpp0x/nondeduced2.C: New test. + * g++.dg/cpp0x/nondeduced3.C: New test. + * g++.dg/cpp0x/nondeduced4.C: New test. + + PR c++/64235 - missing syntax error with invalid alignas. + * g++.dg/parse/alignas1.C: New test. + +2019-06-21 Steven G. Kargl + + PR fortran/67884 + * gfortran.dg/dummy_procedure_8.f90: Remove a test that is ... + * gfortran.dg/pr67884.f90: ... covered here. New test. + +2019-06-21 Marek Polacek + + PR c++/90490 - fix decltype issues in noexcept-specifier. + * g++.dg/cpp0x/noexcept43.C: New test. + * g++.dg/cpp0x/noexcept44.C: New test. + +2019-06-21 Matthew Beliveau + + PR c++/90875 - added -Wswitch-outside-range option + * c-c++-common/Wswitch-outside-range-1.c: New test. + * c-c++-common/Wswitch-outside-range-2.c: New test. + * c-c++-common/Wswitch-outside-range-3.c: New test. + * c-c++-common/Wswitch-outside-range-4.c: New test. + +2019-06-21 Steven G. Kargl + + PR fortran/51991 + gfortran.dg/pr51991.f90 + +2019-06-21 Jeff Law + + PR tree-optimization/90949 + * gcc.c-torture/execute/pr90949.c: New test. + +2019-06-21 Marek Polacek + + PR c++/90953 - ICE with -Wmissing-format-attribute. + * g++.dg/warn/miss-format-7.C: New test. + +2019-06-21 Richard Biener + + PR debug/90914 + * g++.dg/debug/pr90914.C: New testcase. + +2019-06-21 Richard Biener + + PR tree-optimization/90913 + * gfortran.dg/vect/pr90913.f90: New testcase. + +2019-06-21 Jakub Jelinek + + * gcc.dg/vect/vect-simd-12.c: New test. + * gcc.dg/vect/vect-simd-13.c: New test. + * gcc.dg/vect/vect-simd-14.c: New test. + * gcc.dg/vect/vect-simd-15.c: New test. + * gcc.target/i386/sse2-vect-simd-12.c: New test. + * gcc.target/i386/sse2-vect-simd-13.c: New test. + * gcc.target/i386/sse2-vect-simd-14.c: New test. + * gcc.target/i386/sse2-vect-simd-15.c: New test. + * gcc.target/i386/avx2-vect-simd-12.c: New test. + * gcc.target/i386/avx2-vect-simd-13.c: New test. + * gcc.target/i386/avx2-vect-simd-14.c: New test. + * gcc.target/i386/avx2-vect-simd-15.c: New test. + * gcc.target/i386/avx512f-vect-simd-12.c: New test. + * gcc.target/i386/avx512f-vect-simd-13.c: New test. + * gcc.target/i386/avx512f-vect-simd-14.c: New test. + * gcc.target/i386/avx512bw-vect-simd-15.c: New test. + * g++.dg/vect/simd-6.cc: New test. + * g++.dg/vect/simd-7.cc: New test. + * g++.dg/vect/simd-8.cc: New test. + * g++.dg/vect/simd-9.cc: New test. + * c-c++-common/gomp/scan-2.c: Don't expect any diagnostics. + + PR c++/90950 + * g++.dg/gomp/lastprivate-1.C: New test. + + * gcc.dg/vect/vect-simd-11.c: New test. + * gcc.target/i386/sse2-vect-simd-11.c: New test. + * gcc.target/i386/avx2-vect-simd-11.c: New test. + * gcc.target/i386/avx512bw-vect-simd-11.c: New test. + +2019-06-20 Marek Polacek + + PR c++/79781 + * g++.dg/ext/goto1.C: New test. + +2019-06-20 Steven G. Kargl + + PR fortran/77632 + * gfortran.dg/pr77632_1.f90: New test. + +2019-06-20 Marek Polacek + + PR c++/68265 + * g++.dg/parse/error62.C: New test. + +2019-06-20 Steven G. Kargl + + PR fortran/86587 + * gfortran.dg/pr86587.f90: New test. + +2019-06-20 Iain Sandoe + + * obj-c++.dg/stubify-1.mm: Adjust options and scan-asm checks. + * obj-c++.dg/stubify-2.mm: Likewise. + * objc.dg/stubify-1.m: Likewise. + * objc.dg/stubify-2.m: Likewise. + +2019-06-20 Marek Polacek + + PR c++/87512 + * g++.dg/cpp1z/inline-var7.C: New test. + +2019-06-20 H.J. Lu + + PR target/54855 + * gcc.target/i386/pr54855-1.c: New test. + * gcc.target/i386/pr54855-2.c: Likewise. + * gcc.target/i386/pr54855-3.c: Likewise. + * gcc.target/i386/pr54855-4.c: Likewise. + * gcc.target/i386/pr54855-5.c: Likewise. + * gcc.target/i386/pr54855-6.c: Likewise. + * gcc.target/i386/pr54855-7.c: Likewise. + * gcc.target/i386/pr54855-8.c: Likewise. + * gcc.target/i386/pr54855-9.c: Likewise. + * gcc.target/i386/pr54855-10.c: Likewise. + +2019-06-20 Jan Hubicka + + * gcc.c-torture/execute/alias-access-path-1.c: New testcase. + +2019-06-20 Marek Polacek + + PR c++/89873 + * g++.dg/cpp1y/noexcept1.C: New test. + +2019-06-20 Thomas Koenig + + PR fortran/90937 + * gfortran.dg/external_procedure_4.f90: New test. + +2019-06-20 Tom de Vries + + * gcc.dg/pr90866-2.c: Require global_constructor. + +2019-06-20 Tom de Vries + + * gcc.c-torture/compile/pr89280.c: Require nonlocal_goto. + * gcc.dg/pr88870.c: Same. + * gcc.dg/pr90082.c: Same. + +2019-06-20 Tom de Vries + + * gcc.dg/pr89737.c: Require indirect_jumps. + * gcc.dg/torture/pr87693.c: Same. + * gcc.dg/torture/pr89135.c: Same. + * gcc.dg/torture/pr90071.c: Same. + +2019-06-20 Tom de Vries + + * gcc.c-torture/compile/pr89280.c: Require label_values. + * gcc.dg/pr89737.c: Same. + * gcc.dg/pr90082.c: Same. + * gcc.dg/torture/pr89135.c: Same. + * gcc.dg/torture/pr89247.c: Same. + * gcc.dg/torture/pr90071.c: Same. + +2019-06-20 Tom de Vries + + * gcc.c-torture/compile/pr77754-1.c: Require alloca. + * gcc.c-torture/compile/pr77754-2.c: Same. + * gcc.c-torture/compile/pr77754-3.c: Same. + * gcc.c-torture/compile/pr77754-4.c: Same. + * gcc.c-torture/compile/pr77754-5.c: Same. + * gcc.c-torture/compile/pr77754-6.c: Same. + * gcc.c-torture/compile/pr87110.c: Same. + * gcc.c-torture/execute/pr86528.c: Same. + * gcc.dg/Walloca-larger-than-2.c: Same. + * gcc.dg/Walloca-larger-than.c: Same. + * gcc.dg/Warray-bounds-41.c: Same. + * gcc.dg/Wrestrict-17.c: Same. + * gcc.dg/Wstrict-overflow-27.c: Same. + * gcc.dg/Wstringop-truncation-3.c: Same. + * gcc.dg/pr78902.c: Same. + * gcc.dg/pr87099.c: Same. + * gcc.dg/pr87320.c: Same. + * gcc.dg/pr89045.c: Same. + * gcc.dg/strlenopt-62.c: Same. + * gcc.dg/tree-ssa/alias-37.c: Same. + +2019-06-19 Marek Polacek + + PR c++/60364 - noreturn after first decl not diagnosed. + * g++.dg/warn/noreturn-8.C: New test. + * g++.dg/warn/noreturn-9.C: New test. + * g++.dg/warn/noreturn-10.C: New test. + * g++.dg/warn/noreturn-11.C: New test. + +2019-06-19 Martin Sebor + + PR tree-optimization/90626 + * gcc.dg/strlenopt-65.c: New test. + * gcc.dg/strlenopt-66.c: New test. + * gcc.dg/strlenopt.h (strcmp, strncmp): Declare. + +2019-06-19 Martin Sebor + + PR translation/90156 + * gcc.dg/format/gcc_diag-11.c: Enable. + +2019-06-19 Steven G. Kargl + + PR fortran/69499 + * gfortran.dg/pr69499.f90: New test. + * gfortran.dg/module_error_1.f90: Update dg-error string. + +2019-06-19 Steven G. Kargl + + PR fortran/69398 + * gfortran.dg/pr69398.f90: New test. + +2019-06-19 Steven G. Kargl + + PR fortran/87907 + * gfortran.dg/pr87907.f90: New testcase. + +2019-06-19 Wilco Dijkstra + + PR middle-end/84521 + * gcc.c-torture/execute/pr84521.c: New test. + +2019-06-19 Jakub Jelinek + + * gcc.dg/vect/vect-simd-8.c: If main is defined, don't include + tree-vect.h nor call check_vect. + * gcc.dg/vect/vect-simd-9.c: Likewise. + * gcc.dg/vect/vect-simd-10.c: New test. + * gcc.target/i386/sse2-vect-simd-8.c: New test. + * gcc.target/i386/sse2-vect-simd-9.c: New test. + * gcc.target/i386/sse2-vect-simd-10.c: New test. + * gcc.target/i386/avx2-vect-simd-8.c: New test. + * gcc.target/i386/avx2-vect-simd-9.c: New test. + * gcc.target/i386/avx2-vect-simd-10.c: New test. + * gcc.target/i386/avx512f-vect-simd-8.c: New test. + * gcc.target/i386/avx512f-vect-simd-9.c: New test. + * gcc.target/i386/avx512f-vect-simd-10.c: New test. + + * g++.dg/vect/simd-3.cc: New test. + * g++.dg/vect/simd-4.cc: New test. + * g++.dg/vect/simd-5.cc: New test. + +2019-06-19 Jakub Jelinek + + * g++.dg/ubsan/pr63956.C: Adjust expected diagnostics. + +2019-06-19 Jim MacArthur + Mark Eggleston + + PR fortran/89103 + * gfortran.dg/dec_format_empty_item_1.f: New test. + * gfortran.dg/dec_format_empty_item_2.f: New test. + * gfortran.dg/dec_format_empty_item_3.f: New test. + +2019-06-19 Kugan Vivekanandarajah + + * gcc.target/aarch64/pr88834.c: Move from here... + * gcc.target/aarch64/sve/pr88834.c: ...to here. + +2019-06-18 Cherry Zhang + + * go.dg/concatstring.go: New test. + +2019-06-18 Thomas Schwinge + + PR fortran/90921 + * gfortran.dg/goacc/declare-3.f95: Update. + + PR fortran/85221 + * gfortran.dg/goacc/declare-3.f95: New file. + + PR middle-end/90859 + * c-c++-common/goacc/firstprivate-mappings-1.c: Update. + + * c-c++-common/goacc/firstprivate-mappings-1.c: New file. + * g++.dg/goacc/firstprivate-mappings-1.C: Likewise. + + PR testsuite/90861 + * c-c++-common/goacc/declare-pr90861.c: New file. + + PR testsuite/90868 + * c-c++-common/goacc/declare-1.c: Update. + * c-c++-common/goacc/declare-2.c: Likewise. + + PR middle-end/90862 + * c-c++-common/goacc/declare-1.c: Update. + * c-c++-common/goacc/declare-2.c: Likewise. + +2019-06-18 Marek Polacek + + PR c++/84698 + * g++.dg/cpp0x/noexcept42.C: New test. + + PR c++/71548 + * g++.dg/cpp0x/variadic177.C: New test. + +2019-06-18 Richard Sandiford + + * gcc.target/aarch64/sve/struct_vect_18.c: Allow branches to + contain dots. + * gcc.target/aarch64/sve/struct_vect_19.c: Likewise. + * gcc.target/aarch64/sve/struct_vect_20.c: Likewise. + * gcc.target/aarch64/sve/struct_vect_21.c: Likewise. + * gcc.target/aarch64/sve/struct_vect_22.c: Likewise. + * gcc.target/aarch64/sve/struct_vect_23.c: Likewise. + * gcc.target/aarch64/sve/unroll-1.c: Likewise. + * gcc.target/aarch64/sve/while_1.c: Check for b.any. + +2019-06-18 Uroš Bizjak + + * gcc.target/i386/pr81563.c (dg-final): Check that no + registers are restored from %esp. + +2019-06-18 Richard Biener + + PR debug/90900 + * gcc.dg/gomp/pr90900.c: New testcase. + +2019-06-18 Martin Sebor + + * gcc.dg/pr90866-2.c: Remove a pointless declaration + to avoid compilation errors on arm-none-eabi. + +2019-06-18 Szabolcs Nagy + + * gcc.target/aarch64/pcs_attribute-2.c: Remove ifunc usage. + * gcc.target/aarch64/pcs_attribute-3.c: New test. + +2019-06-18 Alejandro Martinez + * gcc.target/aarch64/sve/fadda_1.c: New test. + +2019-06-17 Jakub Jelinek + + * gcc.dg/vect/vect-simd-8.c: New test. + * gcc.dg/vect/vect-simd-9.c: New test. + * g++.dg/vect/simd-2.cc: New test. + * g++.dg/gomp/scan-1.C: New test. + +2019-06-17 Uroš Bizjak + + PR target/62055 + * gcc.target/i386/fnabs.c: New test. + +2019-06-17 Marek Polacek + + PR c++/83820 - excessive attribute arguments not detected. + * g++.dg/cpp0x/gen-attrs-67.C: New test. + +2019-06-17 Nathan Sidwell + + PR c++/90754 + * g++.dg/lookup/pr90754.C: New. + +2019-06-17 Wilco Dijkstra + + PR middle-end/64242 + * gcc.c-torture/execute/pr64242.c: Improve test. + +2019-06-16 Jozef Lawrynowicz + + * gcc.target/msp430/mspabi_sllll.c: New test. + * gcc.target/msp430/mspabi_srall.c: New test. + * gcc.target/msp430/mspabi_srlll.c: New test. + * gcc.c-torture/execute/shiftdi-2.c: New test. + +2019-06-16 Jozef Lawrynowicz + + * lib/target-supports.exp: Add check_effective_target_longlong64. + +2019-06-16 Jan Hubicka + + * gcc.dg/tree-ssa/alias-access-path-4.c: New testcase. + * gcc.dg/tree-ssa/alias-access-path-5.c: New testcase. + +2019-06-15 Iain Buclaw + + PR d/90650 + * gdc.dg/pr90650a.d: New test. + * gdc.dg/pr90650b.d: New test. + +2019-06-15 Steven G. Kargl + + * gfortran.dg/dummy_derived_typed.f90: New test. + +2019-06-15 Jan Hubicka + + * gcc.dg/tree-ssa/alias-access-path-2.c: New testcase. + +2019-06-15 Steven G. Kargl + + * gfortran.dg/ieee/ieee_4.f90: Un-xfail on i?86-*-freebsd. + +2019-06-15 Iain Sandoe + + PR objc/90709 + * obj-c++.dg/proto-lossage-7.mm: Use proxy headers. + * obj-c++.dg/strings/const-cfstring-2.mm: Likewise. + * obj-c++.dg/strings/const-cfstring-5.mm: Likewise. + * obj-c++.dg/strings/const-str-12.mm: Likewise. + * obj-c++.dg/syntax-error-1.mm: Likewise. + * obj-c++.dg/torture/strings/const-cfstring-1.mm: Likewise. + * obj-c++.dg/torture/strings/const-str-10.mm: Likewise. + * obj-c++.dg/torture/strings/const-str-11.mm: Likewise. + * obj-c++.dg/torture/strings/const-str-9.mm: Likewise. + * obj-c++.dg/cxx-ivars-3.mm: Skip on later Darwin, where the 10.4 API + in no longer supported, also on m64 where there's no meaning to it. + * obj-c++.dg/isa-field-1.mm: Suppress unwanted warning, add comment why. + * obj-c++.dg/objc-gc-3.mm: Skip for Darwin > 16, the API use is an error + there. + * obj-c++.dg/qual-types-1.mm: Prune a spurious l64 warning. + * obj-c++.dg/stubify-1.mm: Tidy up after better compiler warnings. + * obj-c++.dg/stubify-2.mm: Likewise. + * obj-c++.dg/try-catch-1.mm: Likewise. + * obj-c++.dg/try-catch-3.mm: Likewise. + +2019-06-15 Iain Sandoe + + PR objc/90709 + * objc.dg/encode-7-next-64bit.m: Use proxy headers. + * objc.dg/image-info.m: Likewise. + * objc.dg/method-6.m: Likewise. + * objc.dg/no-extra-load.m: Likewise. + * objc.dg/objc-foreach-4.m: Likewise. + * objc.dg/objc-foreach-5.m: Likewise. + * objc.dg/proto-lossage-7.m: Likewise. + * objc.dg/strings/const-cfstring-2.m: Likewise. + * objc.dg/strings/const-cfstring-5.m: Likewise. + * objc.dg/strings/const-str-12b.m: Likewise. + * objc.dg/symtab-1.m: Likewise. + * objc.dg/torture/strings/const-cfstring-1.m: Likewise. + * objc.dg/torture/strings/const-str-10.m: Likewise. + * objc.dg/torture/strings/const-str-11.m: Likewise. + * objc.dg/torture/strings/const-str-9.m: Likewise. + * objc.dg/zero-link-1.m: Likewise. + * objc.dg/zero-link-2.m: Likewise. + * objc.dg/zero-link-3.m: Likewise. + * objc.dg/isa-field-1.m: Suppress unwanted warning, add comment why. + * objc.dg/headers.m: XFAIL for Darwin14-19. + * objc.dg/objc-gc-4.m: Skip for Darwin > 16, the API use is an error + there. + +2019-06-15 Iain Sandoe + + PR objc/90709 + * objc-obj-c++-shared/CF-CFString.h: New. + * objc-obj-c++-shared/F-NSArray.h: New. + * objc-obj-c++-shared/F-NSAutoreleasePool.h: New. + * objc-obj-c++-shared/F-NSObject.h: New. + * objc-obj-c++-shared/F-NSString.h: New. + * objc-obj-c++-shared/F-NSValue.h: New. + * objc-obj-c++-shared/GNUStep/CoreFoundation/CFArray.h: New. + * objc-obj-c++-shared/GNUStep/CoreFoundation/CFAvailability.h: New. + * objc-obj-c++-shared/GNUStep/CoreFoundation/CFBase.h: New. + * objc-obj-c++-shared/GNUStep/CoreFoundation/CFCharacterSet.h: New. + * objc-obj-c++-shared/GNUStep/CoreFoundation/CFData.h: New. + * objc-obj-c++-shared/GNUStep/CoreFoundation/CFDictionary.h: New. + * objc-obj-c++-shared/GNUStep/CoreFoundation/CFLocale.h: New. + * objc-obj-c++-shared/GNUStep/CoreFoundation/CFString.h: New. + * objc-obj-c++-shared/GNUStep/Foundation/NSArray.h: New. + * objc-obj-c++-shared/GNUStep/Foundation/NSAutoreleasePool.h: New. + * objc-obj-c++-shared/GNUStep/Foundation/NSDate.h: New. + * objc-obj-c++-shared/GNUStep/Foundation/NSEnumerator.h: New. + * objc-obj-c++-shared/GNUStep/Foundation/NSGeometry.h: New. + * objc-obj-c++-shared/GNUStep/Foundation/NSObjCRuntime.h: New. + * objc-obj-c++-shared/GNUStep/Foundation/NSObject.h: New. + * objc-obj-c++-shared/GNUStep/Foundation/NSRange.h: New. + * objc-obj-c++-shared/GNUStep/Foundation/NSString.h: New. + * objc-obj-c++-shared/GNUStep/Foundation/NSValue.h: New. + * objc-obj-c++-shared/GNUStep/Foundation/NSZone.h: New. + * objc-obj-c++-shared/GNUStep/GNUstepBase/GNUstep.h: New. + * objc-obj-c++-shared/GNUStep/GNUstepBase/GSBlocks.h: New. + * objc-obj-c++-shared/GNUStep/GNUstepBase/GSConfig.h: New. + * objc-obj-c++-shared/GNUStep/GNUstepBase/GSObjCRuntime.h: New. + * objc-obj-c++-shared/GNUStep/GNUstepBase/GSVersionMacros.h: New. + * objc-obj-c++-shared/GNUStep/GNUstepBase/NSArray+GNUstepBase.h: New. + * objc-obj-c++-shared/GNUStep/GNUstepBase/NSMutableString+GNUstepBase.h: + New. + * objc-obj-c++-shared/GNUStep/GNUstepBase/NSNumber+GNUstepBase.h: New. + * objc-obj-c++-shared/GNUStep/GNUstepBase/NSObject+GNUstepBase.h: New. + * objc-obj-c++-shared/GNUStep/GNUstepBase/NSString+GNUstepBase.h: New. + +2019-06-15 Jakub Jelinek + + PR middle-end/90779 + * c-c++-common/goacc/routine-5.c (func2): Don't expect error for + static block scope variable in #pragma acc routine. + +2019-06-14 Steven G. Kargl + + * gfortran.dg/integer_exponentiation_4.f90: Update test. + * gfortran.dg/integer_exponentiation_5.F90: Ditto. + * gfortran.dg/no_range_check_1.f90: Ditto. + +2019-06-14 Harald Anlauf + + PR fortran/90577 + PR fortran/90578 + * gfortran.dg/lrshift_1.f90: Adjust testcase. + * gfortran.dg/shiftalr_3.f90: New testcase. + +2019-06-14 Steven G. Kargl + + PR fortran/89646 + * gfortran.dg/pr89646.f90: New test. + +2019-06-14 H.J. Lu + + PR rtl-optimization/90765 + * gcc.target/i386/pr90765-1.c: New test. + * gcc.target/i386/pr90765-2.c: Likewise. + +2019-06-14 Marek Polacek + + PR c++/90884 - stray note with -Wctor-dtor-privacy. + * g++.dg/warn/ctor-dtor-privacy-4.C: New. + * g++.dg/warn/ctor-dtor-privacy-4.h: New. + +2019-06-14 Richard Biener + + * gcc.dg/tree-ssa/ldist-26.c: Adjust. + +2019-06-14 Feng Xue + + PR ipa/90401 + * gcc.dg/ipa/ipcp-agg-10.c: New test. + +2019-06-13 Martin Sebor + + PR tree-optimization/90662 + * gcc.dg/pr90866-2.c: New test. + * gcc.dg/pr90866.c: Ditto. + +2019-06-13 Jiufu Guo + Lijia He + + PR tree-optimization/77820 + * gcc.dg/tree-ssa/phi_on_compare-1.c: New testcase. + * gcc.dg/tree-ssa/phi_on_compare-2.c: New testcase. + * gcc.dg/tree-ssa/phi_on_compare-3.c: New testcase. + * gcc.dg/tree-ssa/phi_on_compare-4.c: New testcase. + * gcc.dg/tree-ssa/split-path-6.c: Update testcase. + * gcc.target/sh/pr51244-20.c: Update testcase. + +2019-06-13 Iain Sandoe + + * gcc.dg/darwin-minversion-link.c: New test. + +2019-06-13 Steven G. Kargl + + PR fortran/68544 + * gfortran.dg/pr68544.f90: New test. + * gfortran.dg/pr85687.f90: Modify test for new error message. + +2019-06-13 Iain Sandoe + + * g++.dg/pr71694.C: Use non-PIC codegen for Darwin m32. + +2019-06-13 Steven G. Kargl + + PR fortran/89344 + * gfortran.dg/pr89344.f90: New test. + +2019-06-13 Iain Sandoe + + * gcc.dg/darwin-minversion-1.c: Use compile rather than link/run. + * gcc.dg/darwin-minversion-2.c: Likewise. + +2019-06-13 Paolo Carlini + + PR target/90871 + * g++.dg/ext/altivec-15.C: Add dg-error directive. + +2019-06-13 Iain Sandoe + + * gcc.dg/pr90760.c: Require alias support. + +2019-06-13 Jan Hubicka + + PR tree-optimization/90869 + * g++.dg/tree-ssa/alias-access-path-1.C: New testcase. + +2019-06-13 Richard Biener + + PR tree-optimization/90856 + * gcc.target/i386/pr90856.c: New testcase. + +2019-06-13 Jakub Jelinek + + * g++.dg/tree-ssa/ssa-dse-1.C: Don't match exact number of chars of + = {} store. + * g++.dg/tree-ssa/pr31146.C: Change -fdump-tree-forwprop to + -fdump-tree-forwprop1 in dg-options. Expect in MEM. + +2019-06-13 Richard Biener + + * gcc.dg/vect/vect-version-1.c: New testcase. + * gcc.dg/vect/vect-version-2.c: Likewise. + +2019-06-13 Paolo Carlini + + * g++.dg/diagnostic/variably-modified-type-1.C: New. + * g++.dg/cpp0x/alias-decl-1.C: Test the location too. + * g++.dg/other/pr84792-1.C: Likewise. + * g++.dg/other/pr84792-2.C: Likewise. + * g++.dg/parse/error24.C: Likewise. + * g++.dg/parse/error32.C: Likewise. + * g++.dg/parse/error33.C: Likewise. + * g++.dg/parse/saved1.C: Likewise. + * g++.dg/template/operator6.C: Likewise. + * g++.dg/template/pr61745.C: Likewise. + * g++.dg/template/typedef41.C: Likewise. + * g++.old-deja/g++.jason/crash10.C: Likewise. + +2019-06-13 Paolo Carlini + + * g++.dg/diagnostic/conflicting-specifiers-1.C: New. + * g++.dg/diagnostic/two-or-more-data-types-1.C: Likewise. + * g++.dg/parse/error10.C: Adjust location. + * g++.dg/parse/pragma2.C: Likewise. + +2019-06-13 Feng Xue + + PR tree-optimization/89713 + * g++.dg/tree-ssa/empty-loop.C: New test. + * gcc.dg/tree-ssa/dce-2.c: New test. + * gcc.dg/const-1.c: Add -fno-finite-loops option. + * gcc.dg/graphite/graphite.exp: Likewise. + * gcc.dg/loop-unswitch-1.c: Likewise. + * gcc.dg/predict-9.c: Likewise. + * gcc.dg/pure-2.c: Likewise. + * gcc.dg/tree-ssa/20040211-1.c: Likewise. + * gcc.dg/tree-ssa/loop-10.c: Likewise. + * gcc.dg/tree-ssa/split-path-6.c: Likewise. + * gcc.dg/tree-ssa/ssa-thread-12.c: Likewise. + +2019-06-13 Kugan Vivekanandarajah + + PR target/88838 + * gcc.target/aarch64/pr88838.c: New test. + * gcc.target/aarch64/sve/while_1.c: Adjust. + +2019-06-13 Kugan Vivekanandarajah + + PR target/88834 + * gcc.target/aarch64/pr88834.c: New test. + * gcc.target/aarch64/sve/struct_vect_1.c: Adjust. + * gcc.target/aarch64/sve/struct_vect_14.c: Likewise. + * gcc.target/aarch64/sve/struct_vect_15.c: Likewise. + * gcc.target/aarch64/sve/struct_vect_16.c: Likewise. + * gcc.target/aarch64/sve/struct_vect_17.c: Likewise. + * gcc.target/aarch64/sve/struct_vect_7.c: Likewise. + +2019-06-12 Marek Polacek + + PR c++/87410 + * g++.dg/cpp1y/pr87410.C: New test. + +2019-06-12 Marek Polacek + + PR c++/66999 - 'this' captured by reference. + * g++.dg/cpp0x/lambda/lambda-this21.C: New test. + + PR c++/90825 - endless recursion when evaluating sizeof. + PR c++/90832 - endless recursion when evaluating sizeof. + * g++.dg/cpp0x/constexpr-sizeof2.C: New test. + * g++.dg/cpp0x/constexpr-sizeof3.C: New test. + +2019-06-12 Martin Sebor + + PR middle-end/90676 + * gcc.dg/tree-ssa/pr30375.c: Adjust and simplify expected test + output some more. + * gcc.dg/tree-ssa/slsr-27.c: Ditto. + * gcc.dg/tree-ssa/slsr-28.c: Ditto. + * gcc.dg/tree-ssa/slsr-29.c: Ditto. + * gcc.dg/tree-ssa/ssa-dse-24.c: Ditto. + +2019-06-12 Marek Polacek + + PR c++/90736 - bogus error with alignof. + * g++.dg/cpp0x/alignof5.C: New test. + +2019-06-12 Dimitar Dimitrov + + * gcc.dg/builtin-apply2.c: Skip for PRU. + * gcc.dg/torture/stackalign/builtin-apply-2.c: Ditto. + +2019-06-12 Dimitar Dimitrov + + * g++.old-deja/g++.abi/ptrmem.C: Add PRU to list. + +2019-06-12 Dimitar Dimitrov + + * gcc.dg/tree-ssa/20040204-1.c: XFAIL on pru. + * gcc.dg/tree-ssa/reassoc-33.c: Ditto. + * gcc.dg/tree-ssa/reassoc-34.c: Ditto. + * gcc.dg/tree-ssa/reassoc-35.c: Ditto. + * gcc.dg/tree-ssa/reassoc-36.c: Ditto. + +2019-06-12 Dimitar Dimitrov + + * gcc.dg/stack-usage-1.c: Define PRU stack usage. + +2019-06-12 Dimitar Dimitrov + + * gcc.c-torture/execute/20101011-1.c: Define DO_TEST to 0 for PRU. + * gcc.dg/20020312-2.c: No PIC register for PRU. + +2019-06-12 Dimitar Dimitrov + + * lib/gcc-dg.exp: Filter unsupported features in PRU's TI ABI mode. + * lib/target-utils.exp: Ditto. + * lib/target-supports.exp (check_effective_target_function_pointers, + check_effective_target_large_return_values): New. + +2019-06-12 Dimitar Dimitrov + + * lib/gcc-dg.exp: Bail on region overflow for tiny targets. + * lib/target-utils.exp: Ditto. + * lib/target-supports.exp: Declare PRU target as tiny. + +2019-06-12 Dimitar Dimitrov + + * gcc.target/pru/abi-arg-struct.c: New test. + * gcc.target/pru/ashiftrt.c: New test. + * gcc.target/pru/builtins-1.c: New test. + * gcc.target/pru/builtins-error.c: New test. + * gcc.target/pru/clearbit.c: New test. + * gcc.target/pru/loop-asm.c: New test. + * gcc.target/pru/loop-dowhile.c: New test. + * gcc.target/pru/loop-hi-1.c: New test. + * gcc.target/pru/loop-hi-2.c: New test. + * gcc.target/pru/loop-qi-1.c: New test. + * gcc.target/pru/loop-qi-2.c: New test. + * gcc.target/pru/loop-short-1.c: New test. + * gcc.target/pru/loop-short-2.c: New test. + * gcc.target/pru/loop-si-1.c: New test. + * gcc.target/pru/loop-si-2.c: New test. + * gcc.target/pru/loop-u8_pcrel_overflow.c: New test. + * gcc.target/pru/loop-ubyte-1.c: New test. + * gcc.target/pru/loop-ubyte-2.c: New test. + * gcc.target/pru/lra-framepointer-fragmentation-1.c: New test. + * gcc.target/pru/lra-framepointer-fragmentation-2.c: New test. + * gcc.target/pru/mabi-ti-1.c: New test. + * gcc.target/pru/mabi-ti-2.c: New test. + * gcc.target/pru/mabi-ti-3.c: New test. + * gcc.target/pru/mabi-ti-4.c: New test. + * gcc.target/pru/mabi-ti-5.c: New test. + * gcc.target/pru/mabi-ti-6.c: New test. + * gcc.target/pru/mabi-ti-7.c: New test. + * gcc.target/pru/pr64366.c: New test. + * gcc.target/pru/pragma-ctable_entry.c: New test. + * gcc.target/pru/pru.exp: New file. + * gcc.target/pru/qbbc-1.c: New test. + * gcc.target/pru/qbbc-2.c: New test. + * gcc.target/pru/qbbc-3.c: New test. + * gcc.target/pru/qbbs-1.c: New test. + * gcc.target/pru/qbbs-2.c: New test. + * gcc.target/pru/setbit.c: New test. + * gcc.target/pru/zero_extend-and-hisi.c: New test. + * gcc.target/pru/zero_extend-and-qihi.c: New test. + * gcc.target/pru/zero_extend-and-qisi.c: New test. + * gcc.target/pru/zero_extend-hisi.c: New test. + * gcc.target/pru/zero_extend-qihi.c: New test. + * gcc.target/pru/zero_extend-qisi.c: New test. + * lib/target-supports.exp: Add PRU to feature filters. + +2019-06-12 Steven G. Kargl + + PR fortran/90002 + * gfortran.dg/pr90002.f90: New test. + +2019-06-12 Martin Sebor + + PR middle-end/90676 + * gcc.dg/tree-ssa/dump-6.c: New test. + * g++.dg/tree-ssa/pr19807.C: Adjust expected output. + * g++.dg/tree-ssa/ssa-dse-1.C: Same. + * gcc.dg/store_merging_5.c: Same. + * gcc.dg/tree-prof/stringop-2.c: Same. + * gcc.dg/tree-ssa/pr30375.c: Same. + * gcc.dg/tree-ssa/slsr-27.c: Same. + * gcc.dg/tree-ssa/slsr-28.c: Same. + * gcc.dg/tree-ssa/slsr-29.c: Same. + * gcc.dg/tree-ssa/ssa-dse-24.c: Same. + +2019-06-12 Martin Sebor + + PR tree-optimization/90662 + * gcc.dg/strlenopt-62.c: New test. + * gcc.dg/strlenopt-63.c: New test. + * gcc.dg/strlenopt-64.c: New test. + +2019-06-12 Przemyslaw Wirkus + + * gcc.target/arm/ssadv16qi.c: New test. + * gcc.target/arm/usadv16qi.c: Likewise. + +2019-06-12 Jakub Jelinek + + PR c/90760 + * gcc.dg/pr90760.c: New test. + +2019-06-11 Faraz Shahbazker + + * gcc.target/mips/data-sym-pool.c: Update expected output. + * gcc.target/mips/data-sym-multi-pool.c: New test. + +2019-06-11 Iain Sandoe + + PR testsuite/65364 + * gcc.dg/uninit-19.c (fn1): Adjust target condition for Darwin. + (fn2): Likewise. + +2019-06-11 Michael Meissner + + * gcc.target/powerpc/localentry-1.c: Add -mpcrel option. + * gcc.target/powerpc/localentry-detect-1.c: Explicitly set and + unset -mpcrel in the target pragmas. + * gcc.target/powerpc/notoc-direct-1.c: Add -mpcrel option. + * gcc.target/powerpc/pcrel-sibcall-1.c: Explicitly set and + unset -mpcrel in the target pragmas. + +2019-06-11 Marc Glisse + + * gcc.dg/tree-ssa/cmpexactdiv-5.c: New file. + +2019-06-11 Matthew Beliveau + + PR c++/90449 - add -Winaccessible-base option. + * g++.dg/warn/Winaccessible-base-1.C: New file. + * g++.dg/warn/Winaccessible-base-2.C: New file. + * g++.dg/warn/Winaccessible-virtual-base-1.C: New file. + * g++.dg/warn/Winaccessible-virtual-base-2.C: New file. + +2019-06-11 Jakub Jelinek + + PR c++/90810 + * g++.dg/ext/vector37.C: New test. + +2019-06-10 Matthew Beliveau + + PR c++/87250 + * g++.dg/cpp0x/pr87250.C: New test. + +2019-06-10 Jakub Jelinek + + PR testsuite/90772 + * g++.dg/cpp1y/feat-cxx14.C: Use std::size_t instead of size_t. + * g++.dg/cpp1z/feat-cxx1z.C: Likewise. + * g++.dg/cpp2a/feat-cxx2a.C: Likewise. + * g++.dg/cpp1z/pr85569.C: Include . + * g++.dg/tree-ssa/pr80293.C: Include . + * g++.dg/tree-ssa/pr69336.C: Include . + +2019-06-10 Jonathan Wakely + + PR other/90695 + * g++.dg/cpp0x/noexcept15.C: Remove dependency on library header. + +2019-06-10 Jakub Jelinek + + * c-c++-common/gomp/scan-1.c: New test. + * c-c++-common/gomp/scan-2.c: New test. + * c-c++-common/gomp/scan-3.c: New test. + * c-c++-common/gomp/scan-4.c: New test. + +2019-06-10 Martin Liska + + * gcc.dg/no_profile_instrument_function-attr-1.c: Fix + function name. + +2019-06-10 Claudiu Zissulescu + + * gcc.target/arc/jumptables.c: Update test. + +2019-06-10 Claudiu Zissulescu + + * gcc.target/arc/and-cnst-size.c: New test. + * gcc.target/arc/mov-cnst-size.c: Likewise. + * gcc.target/arc/or-cnst-size.c: Likewise. + * gcc.target/arc/store-merge-1.c: Update test. + * gcc.target/arc/arc700-stld-hazard.c: Likewise. + * gcc.target/arc/cmem-1.c: Likewise. + * gcc.target/arc/cmem-2.c: Likewise. + * gcc.target/arc/cmem-3.c: Likewise. + * gcc.target/arc/cmem-4.c: Likewise. + * gcc.target/arc/cmem-5.c: Likewise. + * gcc.target/arc/cmem-6.c: Likewise. + * gcc.target/arc/loop-4.c: Likewise. + * gcc.target/arc/movh_cl-1.c: Likewise. + * gcc.target/arc/sdata-3.c: Likewise. + +2019-06-10 Martin Liska + + * gcc.dg/ipa/pr68035.c: Update scanned pattern. + +2019-06-10 Iain Sandoe + + * gcc.dg/attr-copy-6.c: Require alias support. + +2019-06-09 Marek Polacek + + PR c++/65175 + * g++.dg/cpp0x/alias-decl-69.C: New test. + + PR c++/60366 + * g++.dg/cpp0x/lambda/lambda-ice32.C: New test. + +019-06-09 Paul Thomas + + PR fortran/89365 + * gfortran.dg/assumed_rank_bounds_3.f90 : New test. + +2019-06-08 Paul Thomas + + PR fortran/90786 + * gfortran.dg/proc_ptr_51.f90 : New test. + +2019-06-08 Marek Polacek + + PR c++/52269 + * g++.dg/cpp0x/constexpr-decltype4.C: New test. + +2019-06-08 Thomas Koenig + Tomáš Trnka + + PR fortran/90744 + * gfortran.dg/deferred_character_33.f90: New test. + * gfortran.dg/deferred_character_33a.f90: New test. + +2019-06-08 Marek Polacek + + PR c++/77548 + * g++.dg/other/pr77548.C: New test. + + PR c++/72845 + * g++.dg/cpp0x/noexcept41.C: New test. + +2019-06-08 Prathamesh Kulkarni + + * gcc.target/aarch64/sve/init_1.c: Remove options + -O2 -fno-schedule-insns and instead pass -O. + Update assembly in comments. + * gcc.target/aarch64/sve/init_2.c: Likewise. + * gcc.target/aarch64/sve/init_3.c: Likewise. + * gcc.target/aarch64/sve/init_4.c: Likewise. + * gcc.target/aarch64/sve/init_5.c: Likewise and additionally + adjust dg-scan. + * gcc.target/aarch64/sve/init_6.c: Likewise. + * gcc.target/aarch64/sve/init_7.c: Likewise. + * gcc.target/aarch64/sve/init_8.c: Likewise. + * gcc.target/aarch64/sve/init_9.c: Likewise. + * gcc.target/aarch64/sve/init_10.c: Likewise. + * gcc.target/aarch64/sve/init_11.c: Likewise. + * gcc.target/aarch64/sve/init_12.c: Likewise. + +2019-06-07 Marek Polacek + + PR c++/77747 + * g++.dg/cpp0x/inh-ctor33.C: New test. + + PR c++/77967 + * g++.dg/cpp0x/alias-decl-68.C: New test. + + PR c++/77771 + * g++.dg/cpp0x/constexpr-77771.C: New test. + +2019-06-07 John David Anglin + + * lib/scanasm.exp (dg-function-on-line): Add pattern for hppa*-*-linux*. + +2019-06-07 Mark Eggleston + + PR fortran/89100 + * gfortran.dg/fmt_f_default_field_width_3.f90: Modify dg-error + to allow use when kind=16 is not supported. + * gfortran.dg/fmt_g_default_field_width_3.f90: Modify dg-error + to allow use when kind=16 is not supported. + +2019-06-07 Richard Biener + + PR debug/90574 + * gcc.misc-tests/gcov-pr90574-1.c: New testcase. + * gcc.misc-tests/gcov-pr90574-2.c: Likewise. + +2019-06-07 Jan Hubicka + + * gcc.dg/lto/alias-access-path-2.0.c: New testcase. + +2019-06-07 Martin Liska + + PR tree-optimization/78902 + * c-c++-common/asan/alloca_loop_unpoisoning.c: Use result + of __builtin_alloca. + * c-c++-common/asan/pr88619.c: Likewise. + * g++.dg/overload/using2.C: Likewise for malloc. + * gcc.dg/attr-alloc_size-5.c: Add new dg-warning. + * gcc.dg/nonnull-3.c: Use result of __builtin_strdup. + * gcc.dg/pr43643.c: Likewise. + * gcc.dg/pr59717.c: Likewise for calloc. + * gcc.dg/torture/pr71816.c: Likewise. + * gcc.dg/tree-ssa/pr78886.c: Likewise. + * gcc.dg/tree-ssa/pr79697.c: Likewise. + * gcc.dg/pr78902.c: New test. + +2019-06-06 Iain Sandoe + + * g++.dg/cpp0x/alignas4.C: Amend test to check for zerofill syntax + on Darwin. + +2019-06-06 Martin Jambor + + * gcc.dg/tree-ssa/alias-access-path-1.c: Remove -fno-tree-sra option. + * gcc.dg/tree-ssa/ssa-dse-26.c: Disable FRE. + * gnat.dg/opt39.adb: Adjust scan dump. + +2019-06-06 Jozef Lawrynowicz + + * gcc.target/msp430/size-optimized-shifts.c: New test. + +2019-06-06 Jozef Lawrynowicz + + * gcc.target/msp430/emulate-slli.c: New test. + * gcc.target/msp430/emulate-srai.c: New test. + * gcc.target/msp430/emulate-srli.c: New test. + +2019-06-06 Martin Liska + + PR tree-optimization/87954 + * gcc.dg/pr87954.c: New test. + +2019-06-06 Richard Biener + + * gcc.dg/tree-ssa/alias-37.c: New testcase. + * gcc.dg/torture/20190604-1.c: Likewise. + * gcc.dg/tree-ssa/pta-callused.c: Adjust. + +2019-06-06 Claudiu Zissulescu + + * gcc.target/arc/tmac-1.c: Reoreder dg-directives. + * gcc.target/arc/tmac-2.c: Likewise. + +2019-06-05 Martin Sebor + + PR c/90737 + * c-c++-common/Wreturn-local-addr.c: New test. + * g++.dg/warn/Wreturn-local-addr-6.C: New test. + +2019-06-05 Hongtao Liu + + * gcc.target/i386/avx512dq-vfpclasspd-1.c: Adjust scan assember + for {x,y,z} suffix. + * gcc.target/i386/avx512dq-vfpclassps-1.c: Ditto. + +2019-06-05 Martin Sebor + + * gcc.dg/format/gcc_diag-11.c: Skip until -Wformat-diag has + been committed. + +2019-06-05 Paolo Carlini + + * g++.dg/diagnostic/return-type-invalid-1.C: New. + * g++.old-deja/g++.brendan/crash16.C: Adjust. + * g++.old-deja/g++.law/ctors5.C: Likewise. + +2019-06-05 Paolo Carlini + + * g++.dg/other/friend4.C: Test locations too. + * g++.dg/other/friend5.C: Likewise. + * g++.dg/other/friend7.C: Likewise. + +2019-06-05 Segher Boessenkool + + * g++.target/powerpc/undef-bool-3.C: Add -maltivec to dg-options. + +2019-06-05 Martin Sebor + + * gcc.dg/weak/weak-19.c: New test. + +2019-06-05 Eric Botcazou + + * gnat.dg/specs/discr6.ads: New test. + +2019-06-05 Sam Tebbs + + * gcc.target/aarch64/return_address_sign_b_1.c: New file. + * gcc.target/aarch64/return_address_sign_b_2.c: New file. + * gcc.target/aarch64/return_address_sign_b_3.c: New file. + * gcc.target/aarch64/return_address_sign_builtin.c: New file. + * g++.target/aarch64/return_address_sign_ab_exception.C: New file. + * g++.target/aarch64/return_address_sign_b_exception.C: New file. + +2019-06-05 Jakub Jelinek + + PR debug/90733 + * gcc.dg/pr90733.c: New test. + +2019-06-05 Richard Biener + + PR middle-end/90726 + * gcc.dg/pr90726.c: Enable IVOPTs. + +2019-06-05 Jakub Jelinek + + * g++.dg/vect/simd-1.cc: New test. + +2019-06-05 Hongtao Liu + + PR target/89803 + * gcc.target/i386/avx-1.c (__builtin_ia32_fpclasssss, + __builtin_ia32_fpclasssd): Removed. + (__builtin_ia32_fpclassss_mask, __builtin_ia32_fpclasssd_mask): Define. + * gcc.target/i386/sse-13.c (__builtin_ia32_fpclasssss, + __builtin_ia32_fpclasssd): Removed. + (__builtin_ia32_fpclassss_mask, __builtin_ia32_fpclasssd_mask): Define. + * gcc.target/i386/sse-23.c (__builtin_ia32_fpclasssss, + __builtin_ia32_fpclasssd): Removed. + (__builtin_ia32_fpclassss_mask, __builtin_ia32_fpclasssd_mask): Define. + * gcc.target/i386/avx512dq-vfpclassss-2.c: New. + * gcc.target/i386/avx512dq-vfpclasssd-2.c: New. + * gcc.target/i386/avx512dq-vfpclassss-1.c (avx512f_test): + Add test for _mm_mask_fpclass_ss_mask. + * gcc.target/i386/avx512dq-vfpclasssd-1.c (avx512f_test): + Add test for _mm_mask_fpclass_sd_mask. + +2019-06-04 Segher Boessenkool + + * gcc.target/powerpc/direct-move-double1.c (VSX_REG_ATTR): Delete. + * gcc.target/powerpc/direct-move-double2.c: Ditto. + * gcc.target/powerpc/direct-move-float1.c: Ditto. + * gcc.target/powerpc/direct-move-float2.c: Ditto. + * gcc.target/powerpc/direct-move-vint1.c: Ditto. + * gcc.target/powerpc/direct-move-vint2.c: Ditto. + +2019-06-04 Segher Boessenkool + + * gcc.target/powerpc/direct-move-float1.c: Use "wa" instead of "ww" + constraint. + +2019-06-04 Paolo Carlini + + * g++.dg/concepts/pr60573.C: Test locations too. + * g++.dg/cpp0x/deleted13.C: Likewise. + * g++.dg/parse/error29.C: Likewise. + * g++.dg/parse/qualified4.C: Likewise. + * g++.dg/template/crash96.C Likewise. + * g++.old-deja/g++.brendan/crash22.C Likewise. + * g++.old-deja/g++.brendan/crash23.C Likewise. + * g++.old-deja/g++.law/visibility10.C Likewise. + * g++.old-deja/g++.other/decl5.C: Likewise. + +2019-06-04 Bill Schmidt + + PR target/78263 + * g++.target/powerpc: New directory. + * g++.target/powerpc/powerpc.exp: New test driver. + * g++.target/powerpc/undef-bool-3.C: New. + +2019-06-04 Jakub Jelinek + + * c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect + a sorry_at on any of the clauses. + +2019-06-04 Richard Biener + + PR middle-end/90726 + * gcc.dg/pr90726.c: New testcase. + +2019-06-04 Richard Biener + + PR tree-optimization/90738 + * gcc.dg/torture/pr90738.c: New testcase. + + Revert + 2019-06-03 Richard Biener + + * gcc.dg/tree-ssa/alias-access-path-1.c: Scan fre1. + +2019-06-04 Martin Liska + + * c-c++-common/goacc/acc-icf.c: Change scanned pattern. + * gfortran.dg/goacc/pr78027.f90: Likewise. + +2019-06-03 Segher Boessenkool + + * gcc.target/powerpc/mmfpgpr.c: Delete. + +2019-06-03 David Edelsohn + + * gcc.dg/debug/enum-1.c: Add -fno-eliminate-unused-debug-symbols + on AIX. + * g++.dg/debug/enum-1.C: Same. + +2019-06-03 Wilco Dijkstra + + PR middle-end/64242 + * gcc.c-torture/execute/pr64242.c: Update test. + +2019-06-03 Szabolcs Nagy + + * gcc.target/aarch64/pcs_attribute-2.c: New test. + * gcc.target/aarch64/torture/simd-abi-4.c: Check .variant_pcs support. + * lib/target-supports.exp (check_effective_target_aarch64_variant_pcs): + New. + +2019-06-03 Kyrylo Tkachov + + * gcc.target/aarch64/ssadv16qi.c: Add +nodotprod to pragma. + * gcc.target/aarch64/usadv16qi.c: Likewise. + * gcc.target/aarch64/ssadv16qi-dotprod.c: New test. + * gcc.target/aarch64/usadv16qi-dotprod.c: Likewise. + +2019-06-03 Prathamesh Kulkarni + + * lib/target-supports.exp (add_options_for_aarch64_sve): New procedure. + (aarch64_sve_hw_bits): Call add_options_for_aarch64_sve. + (check_effective_target_aarch64_sve_hw): Likewise. + +2019-06-03 Richard Biener + + * gcc.dg/tree-ssa/alias-access-path-1.c: Scan fre1. + +2019-06-03 Richard Biener + + PR tree-optimization/90716 + * gcc.dg/guality/pr90716.c: New testcase. + +2019-06-03 Prathamesh Kulkarni + + PR target/88837 + * gcc.target/aarch64/sve/init_1.c: New test. + * gcc.target/aarch64/sve/init_1_run.c: Likewise. + * gcc.target/aarch64/sve/init_2.c: Likewise. + * gcc.target/aarch64/sve/init_2_run.c: Likewise. + * gcc.target/aarch64/sve/init_3.c: Likewise. + * gcc.target/aarch64/sve/init_3_run.c: Likewise. + * gcc.target/aarch64/sve/init_4.c: Likewise. + * gcc.target/aarch64/sve/init_4_run.c: Likewise. + * gcc.target/aarch64/sve/init_5.c: Likewise. + * gcc.target/aarch64/sve/init_5_run.c: Likewise. + * gcc.target/aarch64/sve/init_6.c: Likewise. + * gcc.target/aarch64/sve/init_6_run.c: Likewise. + * gcc.target/aarch64/sve/init_7.c: Likewise. + * gcc.target/aarch64/sve/init_7_run.c: Likewise. + * gcc.target/aarch64/sve/init_8.c: Likewise. + * gcc.target/aarch64/sve/init_8_run.c: Likewise. + * gcc.target/aarch64/sve/init_9.c: Likewise. + * gcc.target/aarch64/sve/init_9_run.c: Likewise. + * gcc.target/aarch64/sve/init_10.c: Likewise. + * gcc.target/aarch64/sve/init_10_run.c: Likewise. + * gcc.target/aarch64/sve/init_11.c: Likewise. + * gcc.target/aarch64/sve/init_11_run.c: Likewise. + * gcc.target/aarch64/sve/init_12.c: Likewise. + * gcc.target/aarch64/sve/init_12_run.c: Likewise. + +2019-06-03 Alejandro Martinez + + PR tree-optimization/90681 + * gfortran.dg/vect/pr90681.f: New test. + +2019-06-03 Richard Biener + + PR testsuite/90713 + * gcc.dg/gimplefe-40.c: Add -maltivec for powerpc. + +2019-06-02 Thomas Koenig + + PR fortran/90539 + * gfortran.dg/internal_pack_24.f90: New test. + +2019-06-01 Iain Sandoe + + PR target/90698 + * gcc.target/i386/pr49866.c: XFAIL for Darwin. + * gcc.target/i386/pr63538.c: Likewise. + * gcc.target/i386/pr61599-1.c: Skip for Darwin. + +2019-06-01 Martin Sebor + + PR middle-end/90694 + * gcc.dg/tree-ssa/dump-5.c: New test. + +2019-05-31 Jan Hubicka + + * g++.dg/lto/alias-1_0.C: New testcase. + * g++.dg/lto/alias-1_1.C: New testcase. + +2019-05-31 H.J. Lu + + PR target/89355 + * gcc.target/i386/cet-label-3.c: New test. + * gcc.target/i386/cet-label-4.c: Likewise. + * gcc.target/i386/cet-label-5.c: Likewise. + +2019-05-31 Dragan Mladjenovic + + * gcc.target/mips/msa-fmadd.c: New. + +2019-05-31 Jakub Jelinek + + * c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect + a sorry on lastprivate conditional on simd construct. + * gcc.dg/vect/vect-simd-6.c: New test. + * gcc.dg/vect/vect-simd-7.c: New test. + + * gcc.dg/vect/vect-simd-5.c: New test. + +2019-05-31 Xiong Hu Luo + + PR c/43673 + * gcc.dg/format-dfp-printf-1.c: New test. + * gcc.dg/format-dfp-scanf-1.c: Likewise. + +2019-05-31 Marc Glisse + + * g++.dg/tree-ssa/cprop-vcond.C: New file. + +2019-05-31 Marc Glisse + + * gcc.dg/tree-ssa/cmpexactdiv-3.c: New file. + * gcc.dg/tree-ssa/cmpexactdiv-4.c: New file. + * gcc.dg/Walloca-13.c: Xfail. + +2019-05-31 Bill Schmidt + Michael Meissner + + * gcc.target/powerpc/cpu-future.c: Require powerpc_future_ok. + * gcc.target/powerpc/localentry-1.c: Likewise. + * gcc.target/powerpc/localentry-direct-1.c: Likewise. + * gcc.target/powerpc/notoc-direct-1.c: Likewise. + * gcc.target/powerpc/pcrel-sibcall-1.c: Likewise. + * lib/target-supports.exp (check_powerpc_future_hw_available): New. + (check_effective_target_powerpc_future_ok): New. + +2019-05-31 Thomas De Schampheleire + + PR debug/86964 + * g++.dg/debug/dwarf2/fesd-any.C: Use + -fno-eliminate-unused-debug-symbols. + * g++.dg/debug/dwarf2/fesd-baseonly.C: Likewise. + * g++.dg/debug/dwarf2/fesd-none.C: Likewise. + * g++.dg/debug/dwarf2/fesd-reduced.C: Likewise. + * g++.dg/debug/dwarf2/fesd-sys.C: Likewise. + * g++.dg/debug/dwarf2/inline-var-1.C: Likewise. + * g++.dg/debug/enum-2.C: Likewise. + * gcc.dg/debug/dwarf2/fesd-any.c: Likewise. + * gcc.dg/debug/dwarf2/fesd-baseonly.c: Likewise. + * gcc.dg/debug/dwarf2/fesd-none.c: Likewise. + * gcc.dg/debug/dwarf2/fesd-reduced.c: Likewise. + * gcc.dg/debug/dwarf2/fesd-sys.c: Likewise. + +2019-05-31 Jakub Jelinek + + PR tree-optimization/90671 + * gcc.dg/torture/pr90671.c: New test. + +2019-05-31 Iain Sandoe + + * g++.dg/cpp0x/pr84497.C: Require alias support. + +2019-05-31 Iain Sandoe + + * gcc.target/i386/falign-functions-3.c: Adjust align syntax + and label for Darwin. + * gcc.target/i386/attr-aligned-2.c: Adjust align syntax for + Darwin. + +2019-05-30 Sylvia Taylor + + * gcc.target/aarch64/sve/fabd_1.c: New. + +2019-05-30 Iain Sandoe + + * gcc.target/i386/pr86257.c: Require native TLS support. + * gcc.target/i386/stack-prot-sym.c: Likewise. + +2019-05-30 Paolo Carlini + + * g++.dg/cpp0x/alias-decl-18.C: Test location too. + * g++.dg/cpp0x/udlit-nofunc-neg.C: Likewise. + * g++.dg/parse/crash59.C: Likewise. + * g++.dg/parse/error38.C: Likewise. + * g++.dg/parse/error39.C: Likewise. + * g++.dg/template/crash31.C: Likewise. + * g++.dg/template/operator8.C: Likewise. + * g++.dg/template/operator9.C: Likewise. + +2019-05-29 Bill Schmidt + + * gcc.target/powerpc/notoc-direct-1.c: New. + * gcc.target/powerpc/pcrel-sibcall-1.c: New. + +2019-05-29 Jakub Jelinek + + PR c++/90598 + * g++.dg/cpp0x/pr90598.C: New test. + +2019-05-29 Thomas Koenig + + PR fortran/90539 + * gfortran.dg/internal_pack_21.f90: Adjust scan patterns. + * gfortran.dg/internal_pack_22.f90: New test. + * gfortran.dg/internal_pack_23.f90: New test. + +2019-05-29 Jan Hubicka + + * tree-ssa/alias-access-spath-1.c: new testcase. + +2019-05-29 Paolo Carlini + + PR c++/89875 + * g++.dg/cpp0x/decltype-pr66548.C: Remove xfail. + * g++.dg/template/sizeof-template-argument.C: Adjust expected error. + +2019-05-29 Alejandro Martinez + + * gcc.target/aarch64/sve2/aarch64-sve2.exp: New file, regression + driver for AArch64 SVE2. + * gcc.target/aarch64/sve2/average_1.c: New test. + * lib/target-supports.exp (check_effective_target_aarch64_sve2): New + helper. + (check_effective_target_aarch64_sve1_only): Likewise. + (check_effective_target_aarch64_sve2_hw): Likewise. + (check_effective_target_vect_avg_qi): Check for SVE1 only. + +2019-05-29 Sam Tebbs + + * gcc.target/aarch64/return_address_sign_b_1.c: New file. + * gcc.target/aarch64/return_address_sign_b_2.c: New file. + * gcc.target/aarch64/return_address_sign_b_3.c: New file. + * gcc.target/aarch64/return_address_sign_b_exception.c: New file. + * gcc.target/aarch64/return_address_sign_ab_exception.c: New file. + * gcc.target/aarch64/return_address_sign_builtin.c: New file + +2019-05-29 Jakub Jelinek + + * c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect + sorry on lastprivate conditional on parallel for. + * c-c++-common/gomp/lastprivate-conditional-3.c (foo): Add tests for + lastprivate conditional warnings on parallel for constructs. + * c-c++-common/gomp/lastprivate-conditional-4.c: New test. + + PR c/90628 + * c-c++-common/builtin-arith-overflow-3.c: New test. + + P1091R3 - Extending structured bindings to be more like var decls + P1381R1 - Reference capture of structured bindings + * g++.dg/cpp1z/decomp3.C (test): For static, expect only warning + instead of error and only for c++17_down. Add a thread_local test. + (z2): Add a __thread test. + * g++.dg/cpp2a/decomp1.C: New test. + * g++.dg/cpp2a/decomp1-aux.cc: New file. + * g++.dg/cpp2a/decomp2.C: New test. + * g++.dg/cpp2a/decomp3.C: New test. + +2019-05-29 Martin Liska + + PR testsuite/90657 + * gcc.dg/ipa/pr90555.c: Remove duplicite dg-compile. + +2019-05-28 Bill Schmidt + + * gcc.target/powerpc/localentry-detect-1.c: New file. + +2019-05-28 Marek Polacek + + PR c++/90548 - ICE with generic lambda and empty pack. + * g++.dg/cpp1y/lambda-generic-90548.C: New test. + +2019-05-28 Alejandro Martinez + + * gcc.target/aarch64/sve/mask_load_slp_1.c: New test for SLP + vectorized masked loads. + +2019-05-28 Jeff Law + + * gcc.target/sh/pr50749-qihisi-predec-3.c: Disable + loop distribution. + +2019-05-28 Segher Boessenkool + + * gcc.target/powerpc/p9-dimode1.c: Don't restrict to -m64. Check for + all mtvsr*, not just mtvsrd. Use "wa" instead of "wi" constraints. + * gcc.target/powerpc/p9-dimode2.c: Ditto. + +2019-05-28 Martin Liska + + PR ipa/90555 + * gcc.dg/ipa/pr90555.c: New test. + +2019-05-28 Eric Botcazou + + * gnat.dg/machine_attr1.ad[sb]: New test. + +2019-05-28 Eric Botcazou + + * gnat.dg/opt79.ad[sb]: New test. + +2019-05-28 Eric Botcazou + + * gnat.dg/specs/discr5.ads: New test. + +2019-05-28 Eric Botcazou + + * gnat.dg/prefetch1.ad[sb]: New test. + +2019-05-27 Iain Sandoe + + * gcc.target/i386/pr22076.c: Adjust options to + match codegen expected by the scan-asms. + +2019-05-27 Eric Botcazou + + * gnat.dg/specs/array4.ads: New test. + +2019-05-27 Christophe Lyon + + PR tree-optimization/88440 + * gcc.target/aarch64/sve/index_offset_1.c: Add + -fno-tree-loop-distribute-patterns. + * gcc.target/aarch64/sve/single_1.c: Likewise. + * gcc.target/aarch64/sve/single_2.c: Likewise. + * gcc.target/aarch64/sve/single_3.c: Likewise. + * gcc.target/aarch64/sve/single_4.c: Likewise. + * gcc.target/aarch64/sve/vec_init_1.c: Likewise. + * gcc.target/aarch64/vect-fmovd-zero.c: Likewise. + * gcc.target/aarch64/vect-fmovf-zero.c: Likewise. + * gcc.target/arm/ivopts.c: Likewise. + +2019-05-27 Richard Biener + + PR tree-optimization/90637 + * gcc.dg/gomp/pr90637.c: New testcase. + +2019-05-27 Eric Botcazou + + * gnat.dg/expect2.adb: New test. + * gnat.dg/expect2_pkg.ads: New helper. + +2019-05-27 Eric Botcazou + + * gnat.dg/aliased2.adb: New test. + +2019-05-27 Eric Botcazou + + * gnat.dg/limited_with7.ad[sb]: New test. + * gnat.dg/limited_with7_pkg.ads: New helper. + +2019-05-27 Eric Botcazou + + * gnat.dg/unchecked_convert13.adb: New test. + +2019-05-27 Richard Biener + + PR testsuite/90615 + * gcc.dg/vect/costmodel/ppc/costmodel-vect-31b.c: Add + -fno-tree-loop-distribute-patterns. + * gcc.dg/vect/costmodel/ppc/costmodel-vect-33.c: Likewise. + * gcc.dg/vect/costmodel/ppc/costmodel-vect-76a.c: Likewise. + * gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c: Likewise. + * gcc.dg/vect/costmodel/ppc/costmodel-vect-76c.c: Likewise. + * gcc.target/powerpc/vsx-vectorize-1.c: Likewise. + +2019-05-26 Iain Sandoe + + * gcc.target/i386/pr39013-1.c: Adjust scan-asms for PIE to + account for PIC code on Darwin. + * gcc.target/i386/pr39013-2.c: Likewise. + * gcc.target/i386/pr64317.c: Likewise. + +2019-05-25 Iain Sandoe + + * gcc.target/i386/pr59874-3.c: Use the spelling of popcnt + expected for Darwin. + +2019-05-25 Iain Sandoe + + * gcc.target/i386/pr89261.c: Test that the alignment required + by the test correctly produces the expected error on Darwin. + +2019-05-25 Iain Sandoe + + * gcc.target/i386/pr82659-3.c: Require alias support. + +2019-05-25 Marek Polacek + + PR c++/90572 - wrong disambiguation in friend declaration. + * g++.dg/cpp2a/typename16.C: New test. + * g++.dg/parse/friend13.C: New test. + +2019-05-24 Jakub Jelinek + + * c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect + sorry for omp for. + * c-c++-common/gomp/lastprivate-conditional-3.c: New test. + +2019-05-24 Richard Biener + + PR testsuite/90607 + * gcc.dg/pr53265.c: Amend for new expected diagnostic. + +2019-05-24 Jakub Jelinek + + PR tree-optimization/90106 + PR testsuite/90517 + * gcc.dg/cdce1.c: Don't scan-assembler, instead -fdump-tree-optimized + and scan-tree-dump for tail call. + * gcc.dg/cdce2.c: Likewise. + +2019-05-24 Iain Sandoe + + * gcc.target/i386/pconfig-1.c: Scan for the string in the generated + code, not in comments or miscellaneous directives. + * gcc.target/i386/pr18041-1.c: Likewise. + * gcc.target/i386/pr18041-2.c: Likewise. + * gcc.target/i386/wbinvd-1.c: Likewise. + * gcc.target/i386/wbnoinvd-1.c: Likewise. + * gcc.target/i386/pr66819-3.c: Specifically, check that there is no + call to "bar". + * gcc.target/i386/pr66819-4.c: Likewise. + * gcc.target/i386/pr82662.c + * gcc.target/i386/ptwrite2.c: Make the checks look for the specific + destination register, don't try the m32 test on m64 targets. + +2019-05-24 Iain Sandoe + + * gcc.target/i386/pr67985-2.c: Adjust label checks for + Darwin. + * gcc.target/i386/pr77881.c: Likewise. + +2019-05-24 Iain Sandoe + + * gcc.target/i386/falign-functions-2.c: Skip for Darwin. + * gcc.target/i386/pr70738-7.c: Likewise. + * gcc.target/i386/pr24414.c: Likewise. + +2019-05-23 Iain Sandoe + + * lib/target-supports.exp (check_effective_target_mfentry): New. + * gcc.target/i386/fentry-override.c: Require effective target mfentry. + * gcc.target/i386/fentry.c: Likewise. + * gcc.target/i386/fentryname1.c: Likewise. + * gcc.target/i386/fentryname2.c: Likewise. + * gcc.target/i386/fentryname3.c: Likewise. + * gcc.target/i386/nop-mcount.c: Likewise. + * gcc.target/i386/pr82699-2.c: Likewise. + * gcc.target/i386/pr82699-4.c: Likewise. + * gcc.target/i386/pr82699-5.c: Likewise. + * gcc.target/i386/pr82699-6.c: Likewise. + * gcc.target/i386/returninst1.c: Likewise. + * gcc.target/i386/returninst2.c: Likewise. + * gcc.target/i386/returninst3.c : Likewise. + +2019-05-23 Bill Schmidt + + * gcc.target/powerpc/localentry-1.c: New file. + +2019-05-23 Uroš Bizjak + + PR target/90552 + * gcc.target/i386/pr90552.c: New test. + +2019-05-23 Mark Eggleston + + * gfortran.dg/fmt_f_default_field_width_1.f90: Hide REAL(16) behind + __GFC_REAL_16__. Add -cpp to dg-options. + * gfortran.dg/fmt_f_default_field_width_2.f90: Ditto. + * gfortran.dg/fmt_f_default_field_width_3.f90: Ditto. + * gfortran.dg/fmt_g_default_field_width_1.f90: Ditto. + * gfortran.dg/fmt_g_default_field_width_2.f90: Ditto. + * gfortran.dg/fmt_g_default_field_width_3.f90: Ditto. + +2019-05-23 Bill Schmidt + + * gcc.target/powerpc/cpu-future.c: New test. + +2019-05-23 Richard Biener + + PR tree-optimization/88440 + * gcc.dg/tree-ssa/ldist-37.c: New testcase. + * gcc.dg/tree-ssa/ldist-38.c: Likewise. + * gcc.dg/vect/vect.exp: Add -fno-tree-loop-distribute-patterns. + * gcc.dg/tree-ssa/ldist-37.c: Adjust. + * gcc.dg/tree-ssa/ldist-38.c: Likewise. + * g++.dg/tree-ssa/pr78847.C: Likewise. + * gcc.dg/autopar/pr39500-1.c: Likewise. + * gcc.dg/autopar/reduc-1char.c: Likewise. + * gcc.dg/autopar/reduc-7.c: Likewise. + * gcc.dg/tree-ssa/ivopts-lt-2.c: Likewise. + * gcc.dg/tree-ssa/ivopts-lt.c: Likewise. + * gcc.dg/tree-ssa/predcom-dse-1.c: Likewise. + * gcc.dg/tree-ssa/predcom-dse-2.c: Likewise. + * gcc.dg/tree-ssa/predcom-dse-3.c: Likewise. + * gcc.dg/tree-ssa/predcom-dse-4.c: Likewise. + * gcc.dg/tree-ssa/prefetch-7.c: Likewise. + * gcc.dg/tree-ssa/prefetch-8.c: Likewise. + * gcc.dg/tree-ssa/prefetch-9.c: Likewise. + * gcc.dg/tree-ssa/scev-11.c: Likewise. + * gcc.dg/vect/costmodel/i386/costmodel-vect-31.c: Likewise. + * gcc.dg/vect/costmodel/i386/costmodel-vect-33.c: Likewise. + * gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c: Likewise. + * gcc.dg/vect/costmodel/x86_64/costmodel-vect-33.c: Likewise. + * gcc.target/i386/pr30970.c: Likewise. + * gcc.target/i386/vect-double-1.c: Likewise. + * gcc.target/i386/vect-double-2.c: Likewise. + * gcc.dg/tree-ssa/gen-vect-2.c: Likewise. + * gcc.dg/tree-ssa/gen-vect-26.c: Likewise. + * gcc.dg/tree-ssa/gen-vect-28.c: Likewise. + * gcc.dg/tree-ssa/gen-vect-32.c: Likewise. + * gfortran.dg/vect/vect-5.f90: Likewise. + * gfortran.dg/vect/vect-8.f90: Likewise. + +2019-05-23 Martin Liska + + PR sanitizer/90570 + * g++.dg/asan/pr90570.C: New test. + +2019-05-23 Eric Botcazou + + * gnat.dg/opt78.ad[sb]: New test. + +2019-05-23 Iain Sandoe + + PR rtl-optimisation/64895 + * gcc.target/i386/fuse-caller-save-rec.c: Remove XFAILs. + * gcc.target/i386/fuse-caller-save.c: Likewise. + * gcc.target/i386/fuse-caller-save-xmm.c: Adjust tests for + PIC cases, remove XFAILs. + +2019-05-23 Thomas Schwinge + + PR middle-end/90510 + * brig.dg/test/gimple/packed.hsail: Adjust. + +2019-05-23 Jakub Jelinek + + * g++.dg/cpp2a/is-constant-evaluated8.C: New test. + +2019-05-23 Hans-Peter Nilsson + + * gfortran.dg/dec_io_1.f90, gfortran.dg/dtio_1.f90, + gfortran.dg/dtio_12.f90, gfortran.dg/fmt_en.f90, + gfortran.dg/namelist_89.f90: Gate test on effective_target + fd_truncate. + +2019-05-22 David Malcolm + + PR c++/90462 + * g++.dg/pr90462.C: New test. + +2019-05-22 Marek Polacek + + * g++.dg/cpp1y/udlit-char-template-neg.C: Expect the error on a + different line. Check the column number too. + +2019-05-22 Uroš Bizjak + + * gcc.target/i386/vect-signbitf.c (dg-final): Improve + scan-assembler-not string to avoid false matching on 32bit targets. + +2019-05-22 H.J. Lu + + PR target/88483 + * gcc.target/i386/stackalign/pr88483-1.c: New test. + * gcc.target/i386/stackalign/pr88483-2.c: Likewise. + +2019-05-22 Andrew Stubbs + + * gfortran.dg/coarray_lock_7.f90: Fix output patterns. + +2019-05-22 Mark Eggleston + + PR fortran/89100 + * gfortran.dg/fmt_f_default_field_width_1.f90: New test. + * gfortran.dg/fmt_f_default_field_width_2.f90: New test. + * gfortran.dg/fmt_f_default_field_width_3.f90: New test. + * gfortran.dg/fmt_g_default_field_width_1.f90: New test. + * gfortran.dg/fmt_g_default_field_width_2.f90: New test. + * gfortran.dg/fmt_g_default_field_width_3.f90: New test. + * gfortran.dg/fmt_i_default_field_width_1.f90: New test. + * gfortran.dg/fmt_i_default_field_width_2.f90: New test. + * gfortran.dg/fmt_i_default_field_width_3.f90: New test. + +2019-05-22 Martin Liska + + PR testsuite/90564 + * gcc.target/powerpc/pr80315-1.c: Remove usage of quotes. + * gcc.target/powerpc/pr80315-2.c: Likewise. + * gcc.target/powerpc/pr80315-3.c: Likewise. + * gcc.target/powerpc/pr80315-4.c: Likewise. + +2019-05-22 Martin Liska + + PR testsuite/90564 + * gcc.target/powerpc/pr80315-1.c: Add one extra \ to escape brackets. + * gcc.target/powerpc/pr80315-2.c: Likewise. + * gcc.target/powerpc/pr80315-3.c: Likewise. + * gcc.target/powerpc/pr80315-4.c: Likewise. + +2019-05-22 Iain Sandoe + + PR testsuite/27221 + * g++.dg/ext/alignof2.C: XFAIL for 32bit Darwin. + +2019-05-22 Martin Liska + + PR lto/90500 + * gcc.target/i386/pr90500-1.c: Make the test-case valid now. + +2019-05-22 Richard Biener + + * gcc.dg/tree-ssa/ssa-lim-13.c: New testcase. + +2019-05-22 Alan Modra + + * gcc.target/powerpc/ppc32-abi-dfp-1.c: Don't use + power mnemonics. + * gcc.dg/vect/O3-pr70130.c: Disable default options + added by check_vect_support_and_set_flags. + * gcc.dg/vect/pr48765.c: Likewise. + * gfortran.dg/vect/pr45714-b.f: Likewise. + +2019-05-22 Hans-Peter Nilsson + + PR middle-end/90553 + * gcc.dg/torture/pr90553.c: New test. + +2019-05-21 Paolo Carlini + + * g++.dg/cpp0x/udlit-tmpl-arg-neg2.C: Check locations too. + * g++.dg/cpp0x/udlit-tmpl-parms-neg.C: Likewise. + +2019-05-21 Paolo Carlini + + PR c++/67184 + PR c++/69445 + * g++.dg/other/final3.C: New. + * g++.dg/other/final4.C: Likewise. + * g++.dg/other/final5.C: Likewise. + +2019-05-21 Marek Polacek + + DR 1940 - static_assert in anonymous unions. + * g++.dg/DRs/dr1940.C: New test. + +2019-05-21 Uroš Bizjak + + PR target/90547 + * gcc.target/i386/pr90547.c: New test. + +2019-05-21 Rainer Orth + + * gcc.dg/Wattribute-alias.c: Pass emtpy arg to dg-require-ifunc. + + * gcc.c-torture/execute/20030125-1.c: Pass emtpy arg to dg-require-weak. + + * gcc.dg/torture/ftrapv-2.c: Pass empty arg to dg-require-fork. + + * gcc.target/i386/pr84723-1.c: Remove dg-require-ifunc. + * gcc.target/i386/pr84723-2.c: Likewise. + * gcc.target/i386/pr84723-3.c: Likewise. + * gcc.target/i386/pr84723-4.c: Likewise. + * gcc.target/i386/pr84723-5.c: Likewise. + +2019-05-21 Iain Sandoe + + PR testsuite/67958 + * gcc.target/i386/pr32219-1.c: Adjust scan-asms for Darwin, comment + the differences. + * gcc.target/i386/pr32219-2.c: Likewise. + * gcc.target/i386/pr32219-3.c: Likewise. + * gcc.target/i386/pr32219-4.c: Likewise. + * gcc.target/i386/pr32219-5.c: Likewise. + * gcc.target/i386/pr32219-6.c: Likewise. + * gcc.target/i386/pr32219-7.c: Likewise. + * gcc.target/i386/pr32219-8.c: Likewise. + +2019-05-21 Iain Sandoe + + PR target/63891 + * gcc.dg/darwin-weakimport-3.c: Adjust options and explain + the reasons. + +2019-05-21 Uroš Bizjak + + * gcc.target/i386/vect-signbitf.c: New test. + +2019-05-21 Nathan Sidwell + + * g++.dg/lookup/using53.C: Adjust diagnostic. + +2019-05-21 Alan Modra + + PR target/90545 + * gcc.target/powerpc/fold-vec-splats-floatdouble.c: Correct comments + and rename functions to suit parameters. + +2019-05-21 Richard Biener + + PR middle-end/90510 + * gcc.target/i386/pr90510.c: New testcase. + +2019-05-21 Martin Liska + + * gcc.target/i386/pr90500-1.c: Add missing '""'. + * gcc.target/i386/pr90500-2.c: Likewise. + +2019-05-21 Vladislav Ivanishin + + * gcc.dg/uninit-28-gimple.c: New test. + * gcc.dg/uninit-29-gimple.c: New test. + * gcc.dg/uninit-30-gimple.c: New test. + * gcc.dg/uninit-31-gimple.c: New test. + +2019-05-21 Martin Liska + + * gcc.dg/pr90263.c: Add -O2. + +2019-05-21 Martin Liska + + * gcc.target/powerpc/ppc64-abi-warn-1.c: Wrap a type. + * gcc.target/powerpc/pr80315-1.c: Use new interval format. + * gcc.target/powerpc/pr80315-2.c: Likewise. + * gcc.target/powerpc/pr80315-3.c: Likewise. + * gcc.target/powerpc/pr80315-4.c: Likewise. + * gcc.target/powerpc/warn-lvsl-lvsr.c: Wrap builtin names. + +2019-05-21 Martin Liska + + PR testsuite/90551 + * pr90263.c: Move from gcc.c-torture/compile + into gcc.dg. + +2019-05-20 Uroš Bizjak + + PR testsuite/90503 + * gcc.target/i386/pr22076.c (dg-options): Add -mno-sse2. + Remove -flax-vector-conversions. + (dg-additional-options): Remove. + (test): Change to void. Declare m0 and m1 as __m64 and + cast initializer in a proper way. Do not return result. + (dg-final): Scan for 2 instances of movq. + +2019-05-20 Marek Polacek + + CWG 2094 - volatile scalars are trivially copyable. + PR c++/85679 + * g++.dg/ext/is_trivially_constructible1.C: Change the expected result + for volatile int. + * g++.dg/ext/is_trivially_copyable.C: New test. + +2019-05-20 Marek Polacek + + * g++.dg/ext/utf8-2.C: Accept both "char" and "char8_t" in aka. + + * g++.dg/cpp2a/nontype-class17.C: New test. + + * g++.dg/lookup/strong-using2.C: New test. + +2019-05-20 Jeff Law + + * gcc.dg/Wtype-limits-Wextra.c: Adjust expected output after + recent diagnostic cleanups. + +2019-05-20 Christophe Lyon + + PR tree-optimization/90106 + * gcc.dg/cdce3.c: Add hard_float effective target. + +2019-05-20 Marc Glisse + + * gcc.dg/torture/pta-ptrarith-3.c: Relax the matched pattern. + +2019-05-20 Iain Sandoe + + PR testsuite/58321 + * gcc.target/i386/memcpy-strategy-3.c: Adjust count for Darwin and + add a comment as to the reason for the difference. + * gcc.target/i386/memset-strategy-1.c: Likewise. + +2019-05-20 Jonathan Wakely + + PR c++/90532 Ensure __is_constructible(T[]) is false + * g++.dg/ext/90532.C: New test. + +2019-05-20 Jakub Jelinek + + * gcc.target/i386/avx512f-simd-1.c: New test. + +2019-05-20 Christophe Lyon + + * gcc.target/aarch64/target_attr_10.c: Add quotes to expected + error message. + * gcc.target/arm/attr-neon-builtin-fail.c: Likewise. + +2019-05-20 Martin Liska + + PR middle-end/90263 + * gcc.c-torture/compile/pr90263.c: New test. + * lib/target-supports.exp: Add check_effective_target_glibc. + +2019-05-20 Richard Biener + + PR testsuite/90518 + * gcc.dg/gimplefe-40.c: Restrict to targets with appropriate + vector support. + * gcc.dg/gimplefe-41.c: Likewise. + +2019-05-19 Andrew Pinski + + PR pch/81721 + * g++.dg/pch/operator-1.C: New testcase. + * g++.dg/pch/operator-1.Hs: New file. + +2019-05-19 Paul Thomas + + PR fortran/90498 + * gfortran.dg/associate_48.f90 : New test. + +2019-05-19 Thomas Koenig + + PR fortran/78290 + * gfortran.dg/pr78290.f90: New test. + +2019-05-19 Thomas Koenig + + PR fortran/88821 + * gfortran.dg/alloc_comp_auto_array_3.f90: Add -O0 to dg-options + to make sure the test for internal_pack is retained. + * gfortran.dg/assumed_type_2.f90: Split compile and run time + tests into this and + * gfortran.dg/assumed_type_2a.f90: New file. + * gfortran.dg/c_loc_test_22.f90: Likewise. + * gfortran.dg/contiguous_3.f90: Likewise. + * gfortran.dg/internal_pack_11.f90: Likewise. + * gfortran.dg/internal_pack_12.f90: Likewise. + * gfortran.dg/internal_pack_16.f90: Likewise. + * gfortran.dg/internal_pack_17.f90: Likewise. + * gfortran.dg/internal_pack_18.f90: Likewise. + * gfortran.dg/internal_pack_4.f90: Likewise. + * gfortran.dg/internal_pack_5.f90: Add -O0 to dg-options + to make sure the test for internal_pack is retained. + * gfortran.dg/internal_pack_6.f90: Split compile and run time + tests into this and + * gfortran.dg/internal_pack_6a.f90: New file. + * gfortran.dg/internal_pack_8.f90: Likewise. + * gfortran.dg/missing_optional_dummy_6: Split compile and run time + tests into this and + * gfortran.dg/missing_optional_dummy_6a.f90: New file. + * gfortran.dg/no_arg_check_2.f90: Split compile and run time tests + into this and + * gfortran.dg/no_arg_check_2a.f90: New file. + * gfortran.dg/typebound_assignment_5.f90: Split compile and run time + tests into this and + * gfortran.dg/typebound_assignment_5a.f90: New file. + * gfortran.dg/typebound_assignment_6.f90: Split compile and run time + tests into this and + * gfortran.dg/typebound_assignment_6a.f90: New file. + * gfortran.dg/internal_pack_19.f90: New file. + * gfortran.dg/internal_pack_20.f90: New file. + * gfortran.dg/internal_pack_21.f90: New file. + +2019-05-18 Iain Sandoe + + * objc.dg/instancetype-0.m: New. + +2019-05-17 Martin Sebor + + * gcc.dg/gcc_diag-11.c: Remove accidentally committed test. + + * g++.dg/overload/conv-op1.C: Adjust text of expected messages. + * g++.dg/ubsan/pr63956.C: Same. + * g++.old-deja/g++.pt/assign1.C: Same. + +2019-05-17 Thomas Schwinge + + PR testsuite/89433 + * c-c++-common/goacc/routine-5.c: Update. + * c-c++-common/goacc/routine-level-of-parallelism-1.c: Likewise. + * c-c++-common/goacc/routine-level-of-parallelism-2.c: New file. + + PR testsuite/89433 + * c-c++-common/goacc/routine-2.c: Update, and move some test + into... + * c-c++-common/goacc/routine-level-of-parallelism-1.c: ... this + new file. + + PR testsuite/89433 + * c-c++-common/goacc/classify-routine.c: Update. + * gfortran.dg/goacc/classify-routine.f95: Likewise. + +2019-05-16 Martin Sebor + + * c-c++-common/Wbool-operation-1.c: Adjust text of expected diagnostics. + * c-c++-common/Wvarargs-2.c: Same. + * c-c++-common/Wvarargs.c: Same. + * c-c++-common/pr51768.c: Same. + * c-c++-common/tm/inline-asm.c: Same. + * c-c++-common/tm/safe-1.c: Same. + * g++.dg/asm-qual-1.C: Same. + * g++.dg/asm-qual-3.C: Same. + * g++.dg/conversion/dynamic1.C: Same. + * g++.dg/cpp0x/constexpr-89599.C: Same. + * g++.dg/cpp0x/constexpr-cast.C: Same. + * g++.dg/cpp0x/constexpr-shift1.C: Same. + * g++.dg/cpp0x/lambda/lambda-conv11.C: Same. + * g++.dg/cpp0x/nullptr04.C: Same. + * g++.dg/cpp0x/static_assert12.C: Same. + * g++.dg/cpp0x/static_assert8.C: Same. + * g++.dg/cpp1y/lambda-conv1.C: Same. + * g++.dg/cpp1y/pr79393-3.C: Same. + * g++.dg/cpp1y/static_assert1.C: Same. + * g++.dg/cpp1z/constexpr-if4.C: Same. + * g++.dg/cpp1z/constexpr-if5.C: Same. + * g++.dg/cpp1z/constexpr-if9.C: Same. + * g++.dg/eh/goto2.C: Same. + * g++.dg/eh/goto3.C: Same. + * g++.dg/expr/static_cast8.C: Same. + * g++.dg/ext/flexary5.C: Same. + * g++.dg/ext/utf-array-short-wchar.C: Same. + * g++.dg/ext/utf-array.C: Same. + * g++.dg/ext/utf8-2.C: Same. + * g++.dg/gomp/loop-4.C: Same. + * g++.dg/gomp/macro-4.C: Same. + * g++.dg/gomp/udr-1.C: Same. + * g++.dg/init/initializer-string-too-long.C: Same. + * g++.dg/other/offsetof9.C: Same. + * g++.dg/ubsan/pr63956.C: Same. + * g++.dg/warn/Wbool-operation-1.C: Same. + * g++.dg/warn/Wtype-limits-Wextra.C: Same. + * g++.dg/warn/Wtype-limits.C: Same. + * g++.dg/wrappers/pr88680.C: Same. + * g++.old-deja/g++.mike/eh55.C: Same. + * gcc.dg/Wsign-compare-1.c: Same. + * gcc.dg/Wtype-limits-Wextra.c: Same. + * gcc.dg/Wtype-limits.c: Same. + * gcc.dg/Wunknownprag.c: Same. + * gcc.dg/Wunsuffixed-float-constants-1.c: Same. + * gcc.dg/asm-6.c: Same. + * gcc.dg/asm-qual-1.c: Same. + * gcc.dg/cast-1.c: Same. + * gcc.dg/cast-2.c: Same. + * gcc.dg/cast-3.c: Same. + * gcc.dg/cpp/source_date_epoch-2.c: Same. + * gcc.dg/debug/pr85252.c: Same. + * gcc.dg/dfp/cast-bad.c: Same. + * gcc.dg/format/gcc_diag-1.c: Same. + * gcc.dg/format/gcc_diag-11.c: Same. + * gcc.dg/gcc_diag-11.c: Same. + * gcc.dg/gnu-cond-expr-2.c: Same. + * gcc.dg/gnu-cond-expr-3.c: Same. + * gcc.dg/gomp/macro-4.c: Same. + * gcc.dg/init-bad-1.c: Same. + * gcc.dg/init-bad-2.c: Same. + * gcc.dg/init-bad-3.c: Same. + * gcc.dg/pr27528.c: Same. + * gcc.dg/pr48552-1.c: Same. + * gcc.dg/pr48552-2.c: Same. + * gcc.dg/pr59846.c: Same. + * gcc.dg/pr61096-1.c: Same. + * gcc.dg/pr8788-1.c: Same. + * gcc.dg/pr90082.c: Same. + * gcc.dg/simd-2.c: Same. + * gcc.dg/spellcheck-params-2.c: Same. + * gcc.dg/spellcheck-params.c: Same. + * gcc.dg/strlenopt-49.c: Same. + * gcc.dg/tm/pr52141.c: Same. + * gcc.dg/torture/pr51106-1.c: Same. + * gcc.dg/torture/pr51106-2.c: Same. + * gcc.dg/utf-array-short-wchar.c: Same. + * gcc.dg/utf-array.c: Same. + * gcc.dg/utf8-2.c: Same. + * gcc.dg/warn-sprintf-no-nul.c: Same. + * gcc.target/i386/asm-flag-0.c: Same. + * gcc.target/i386/inline_error.c: Same. + * gcc.target/i386/pr30848.c: Same. + * gcc.target/i386/pr39082-1.c: Same. + * gcc.target/i386/pr39678.c: Same. + * gcc.target/i386/pr57756.c: Same. + * gcc.target/i386/pr68843-1.c: Same. + * gcc.target/i386/pr79804.c: Same. + * gcc.target/i386/pr82673.c: Same. + * obj-c++.dg/class-protocol-1.mm: Same. + * obj-c++.dg/exceptions-3.mm: Same. + * obj-c++.dg/exceptions-4.mm: Same. + * obj-c++.dg/exceptions-5.mm: Same. + * obj-c++.dg/exceptions-6.mm: Same. + * obj-c++.dg/method-12.mm: Same. + * obj-c++.dg/method-13.mm: Same. + * obj-c++.dg/method-6.mm: Same. + * obj-c++.dg/method-7.mm: Same. + * obj-c++.dg/method-9.mm: Same. + * obj-c++.dg/method-lookup-1.mm: Same. + * obj-c++.dg/proto-lossage-4.mm: Same. + * obj-c++.dg/protocol-qualifier-2.mm: Same. + * objc.dg/call-super-2.m: Same. + * objc.dg/class-protocol-1.m: Same. + * objc.dg/desig-init-1.m: Same. + * objc.dg/exceptions-3.m: Same. + * objc.dg/exceptions-4.m: Same. + * objc.dg/exceptions-5.m: Same. + * objc.dg/exceptions-6.m: Same. + * objc.dg/method-19.m: Same. + * objc.dg/method-2.m: Same. + * objc.dg/method-5.m: Same. + * objc.dg/method-6.m: Same. + * objc.dg/method-7.m: Same. + * objc.dg/method-lookup-1.m: Same. + * objc.dg/proto-hier-1.m: Same. + * objc.dg/proto-lossage-4.m: Same. + +2019-05-17 Dragan Mladjenovic + + * g++.dg/eh/o32-fp.C: New. + * gcc.target/mips/dwarfregtable-1.c: New. + * gcc.target/mips/dwarfregtable-2.c: New. + * gcc.target/mips/dwarfregtable-3.c: New. + * gcc.target/mips/dwarfregtable-4.c: New. + * gcc.target/mips/dwarfregtable.h: New. + +2019-05-17 H.J. Lu + + * gcc.target/x86_64/abi/test_varargs-m128.c: New file. + * gcc.target/x86_64/abi/avx/test_varargs-m256.c: Likewise. + * gcc.target/x86_64/abi/avx512f/test_varargs-m512.c: Likewise. + +2019-05-17 H.J. Lu + + PR target/90497 + * gcc.target/i386/pr90497-1.c: New test. + * gcc.target/i386/pr90497-2.c: Likewise. + +2019-05-17 Robin Dapp + + * gcc.target/s390/global-array-element-pic.c: Add -march=z900. + * gcc.target/s390/global-array-element-pic2.c: New test for z10+. + +2019-05-17 Richard Biener + + * gcc.dg/gimplefe-41.c: New testcase. + +2019-05-17 Jun Ma + + PR tree-optimization/90106 + * gcc.dg/cdce3.c: New test. + +2019-05-17 Andreas Krebbel + + * gcc.target/s390/zvector/vec-sldw.c: New test. + +2019-05-17 Martin Liska + + PR middle-end/90478 + * gcc.dg/tree-ssa/pr90478-2.c: Remove. + +2019-05-16 Jakub Jelinek + + * gcc.dg/vect/vect-simd-1.c: New test. + * gcc.dg/vect/vect-simd-2.c: New test. + * gcc.dg/vect/vect-simd-3.c: New test. + * gcc.dg/vect/vect-simd-4.c: New test. + +2019-05-16 Martin Liska + + PR lto/90500 + * gcc.target/i386/pr90500-1.c: New test. + * gcc.target/i386/pr90500-2.c: New test. + +2019-05-16 Vladislav Ivanishin + + PR tree-optimization/90394 + * gcc.dg/uninit-pr90394-1-gimple.c: New test. + * gcc.dg/uninit-pr90394.c: New test. + +2019-05-16 Richard Biener + + PR testsuite/90502 + * gcc.dg/tree-ssa/vector-6.c: Adjust for half of the + transforms happening earlier now. + +2019-05-16 Iain Sandoe + + * lib/target-supports.exp (check_effective_target_cet): Add the + -fcf-protection flag to the build conditions. + +2019-05-16 Jun Ma + + PR tree-optimization/90106 + * gcc.dg/cdce1.c: Check tailcall code generation after cdce pass. + * gcc.dg/cdce2.c: Likewise. + +2019-05-16 Richard Biener + + PR tree-optimization/90424 + * g++.target/i386/pr90424-1.C: New testcase. + * g++.target/i386/pr90424-2.C: Likewise. + +2019-05-16 Richard Biener + + * gcc.dg/gimplefe-40.c: Amend again. + +2019-05-15 Cherry Zhang + + * go.test/test/nilptr2.go: Change use function to actually do + something. + +2019-05-16 Jakub Jelinek + + PR middle-end/90478 + * gcc.dg/tree-ssa/pr90478.c: Add empty dg-options. Use long long type + instead of long. + + * c-c++-common/gomp/simd8.c: New test. + +2019-05-15 Marek Polacek + + CWG 2096 - constraints on literal unions. + * g++.dg/cpp0x/literal-type1.C: New test. + +2019-05-15 Janne Blomqvist + + PR fortran/90461 + * gfortran.dg/open_errors_2.f90: Add -std=f2008, adjust line number. + * gfortran.dg/open_errors_3.f90: New test. + +2019-05-15 H.J. Lu + + PR target/89021 + * gcc.target/i386/mmx-vals.h: New file. + * gcc.target/i386/sse2-mmx-2.c: Likewise. + * gcc.target/i386/sse2-mmx-3.c: Likewise. + * gcc.target/i386/sse2-mmx-4.c: Likewise. + * gcc.target/i386/sse2-mmx-5.c: Likewise. + * gcc.target/i386/sse2-mmx-6.c: Likewise. + * gcc.target/i386/sse2-mmx-7.c: Likewise. + * gcc.target/i386/sse2-mmx-8.c: Likewise. + * gcc.target/i386/sse2-mmx-9.c: Likewise. + * gcc.target/i386/sse2-mmx-10.c: Likewise. + * gcc.target/i386/sse2-mmx-11.c: Likewise. + * gcc.target/i386/sse2-mmx-12.c: Likewise. + * gcc.target/i386/sse2-mmx-13.c: Likewise. + * gcc.target/i386/sse2-mmx-14.c: Likewise. + * gcc.target/i386/sse2-mmx-15.c: Likewise. + * gcc.target/i386/sse2-mmx-16.c: Likewise. + * gcc.target/i386/sse2-mmx-17.c: Likewise. + * gcc.target/i386/sse2-mmx-18a.c: Likewise. + * gcc.target/i386/sse2-mmx-18b.c: Likewise. + * gcc.target/i386/sse2-mmx-18c.c: Likewise. + * gcc.target/i386/sse2-mmx-19a.c: Likewise. + * gcc.target/i386/sse2-mmx-18b.c: Likewise. + * gcc.target/i386/sse2-mmx-19c.c: Likewise. + * gcc.target/i386/sse2-mmx-19d.c: Likewise. + * gcc.target/i386/sse2-mmx-19e.c: Likewise. + * gcc.target/i386/sse2-mmx-20.c: Likewise. + * gcc.target/i386/sse2-mmx-21.c: Likewise. + * gcc.target/i386/sse2-mmx-22.c: Likewise. + * gcc.target/i386/sse2-mmx-cvtpi2ps.c: Likewise. + * gcc.target/i386/sse2-mmx-cvtps2pi.c: Likewise. + * gcc.target/i386/sse2-mmx-cvttps2pi.c: Likewise. + * gcc.target/i386/sse2-mmx-maskmovq.c: Likewise. + * gcc.target/i386/sse2-mmx-packssdw.c: Likewise. + * gcc.target/i386/sse2-mmx-packsswb.c: Likewise. + * gcc.target/i386/sse2-mmx-packuswb.c: Likewise. + * gcc.target/i386/sse2-mmx-paddb.c: Likewise. + * gcc.target/i386/sse2-mmx-paddd.c: Likewise. + * gcc.target/i386/sse2-mmx-paddq.c: Likewise. + * gcc.target/i386/sse2-mmx-paddsb.c: Likewise. + * gcc.target/i386/sse2-mmx-paddsw.c: Likewise. + * gcc.target/i386/sse2-mmx-paddusb.c: Likewise. + * gcc.target/i386/sse2-mmx-paddusw.c: Likewise. + * gcc.target/i386/sse2-mmx-paddw.c: Likewise. + * gcc.target/i386/sse2-mmx-pand.c: Likewise. + * gcc.target/i386/sse2-mmx-pandn.c: Likewise. + * gcc.target/i386/sse2-mmx-pavgb.c: Likewise. + * gcc.target/i386/sse2-mmx-pavgw.c: Likewise. + * gcc.target/i386/sse2-mmx-pcmpeqb.c: Likewise. + * gcc.target/i386/sse2-mmx-pcmpeqd.c: Likewise. + * gcc.target/i386/sse2-mmx-pcmpeqw.c: Likewise. + * gcc.target/i386/sse2-mmx-pcmpgtb.c: Likewise. + * gcc.target/i386/sse2-mmx-pcmpgtd.c: Likewise. + * gcc.target/i386/sse2-mmx-pcmpgtw.c: Likewise. + * gcc.target/i386/sse2-mmx-pextrw.c: Likewise. + * gcc.target/i386/sse2-mmx-pinsrw.c: Likewise. + * gcc.target/i386/sse2-mmx-pmaddwd.c: Likewise. + * gcc.target/i386/sse2-mmx-pmaxsw.c: Likewise. + * gcc.target/i386/sse2-mmx-pmaxub.c: Likewise. + * gcc.target/i386/sse2-mmx-pminsw.c: Likewise. + * gcc.target/i386/sse2-mmx-pminub.c: Likewise. + * gcc.target/i386/sse2-mmx-pmovmskb.c: Likewise. + * gcc.target/i386/sse2-mmx-pmulhuw.c: Likewise. + * gcc.target/i386/sse2-mmx-pmulhw.c: Likewise. + * gcc.target/i386/sse2-mmx-pmullw.c: Likewise. + * gcc.target/i386/sse2-mmx-pmuludq.c: Likewise. + * gcc.target/i386/sse2-mmx-por.c: Likewise. + * gcc.target/i386/sse2-mmx-psadbw.c: Likewise. + * gcc.target/i386/sse2-mmx-pshufw.c: Likewise. + * gcc.target/i386/sse2-mmx-pslld.c: Likewise. + * gcc.target/i386/sse2-mmx-pslldi.c: Likewise. + * gcc.target/i386/sse2-mmx-psllq.c: Likewise. + * gcc.target/i386/sse2-mmx-psllqi.c: Likewise. + * gcc.target/i386/sse2-mmx-psllw.c: Likewise. + * gcc.target/i386/sse2-mmx-psllwi.c: Likewise. + * gcc.target/i386/sse2-mmx-psrad.c: Likewise. + * gcc.target/i386/sse2-mmx-psradi.c: Likewise. + * gcc.target/i386/sse2-mmx-psraw.c: Likewise. + * gcc.target/i386/sse2-mmx-psrawi.c: Likewise. + * gcc.target/i386/sse2-mmx-psrld.c: Likewise. + * gcc.target/i386/sse2-mmx-psrldi.c: Likewise. + * gcc.target/i386/sse2-mmx-psrlq.c: Likewise. + * gcc.target/i386/sse2-mmx-psrlqi.c: Likewise. + * gcc.target/i386/sse2-mmx-psrlw.c: Likewise. + * gcc.target/i386/sse2-mmx-psrlwi.c: Likewise. + * gcc.target/i386/sse2-mmx-psubb.c: Likewise. + * gcc.target/i386/sse2-mmx-psubd.c: Likewise. + * gcc.target/i386/sse2-mmx-psubq.c: Likewise. + * gcc.target/i386/sse2-mmx-psubusb.c: Likewise. + * gcc.target/i386/sse2-mmx-psubusw.c: Likewise. + * gcc.target/i386/sse2-mmx-psubw.c: Likewise. + * gcc.target/i386/sse2-mmx-punpckhbw.c: Likewise. + * gcc.target/i386/sse2-mmx-punpckhdq.c: Likewise. + * gcc.target/i386/sse2-mmx-punpckhwd.c: Likewise. + * gcc.target/i386/sse2-mmx-punpcklbw.c: Likewise. + * gcc.target/i386/sse2-mmx-punpckldq.c: Likewise. + * gcc.target/i386/sse2-mmx-punpcklwd.c: Likewise. + * gcc.target/i386/sse2-mmx-pxor.c: Likewise. + +2019-05-15 H.J. Lu + + PR target/89021 + * config/i386/i386-builtins.c (bdesc_tm): Enable MMX intrinsics + with SSE2. + +2019-05-15 H.J. Lu + + PR target/89021 + * gcc.target/i386/pr82483-1.c: Error only on ia32. + * gcc.target/i386/pr82483-2.c: Likewise. + +2019-05-15 Martin Liska + + PR middle-end/90478 + * gcc.dg/tree-ssa/pr90478-2.c: New test. + * gcc.dg/tree-ssa/pr90478.c: New test. + +2019-05-15 Richard Biener + + * gcc.dg/gimplefe-40.c: Amend. + +2019-05-15 Iain Sandoe + + * lib/target-supports.exp + (check_effective_target_powerpc_p8vector_ok): No support for Darwin. + (check_effective_target_powerpc_p9vector_ok): Likewise. + (check_effective_target_powerpc_float128_sw_ok): Likewise. + (check_effective_target_powerpc_float128_hw_ok): Likewise. + (check_effective_target_powerpc_vsx_ok): Likewise. + * gcc.target/powerpc/bfp/bfp.exp: Don't try to run this for Darwin. + * gcc.target/powerpc/dfp/dfp.exp: Likewise. + +2019-05-15 Iain Sandoe + + * gcc.dg/pr87600.h: Add __POWERPC__ as an alternate test + for PowerPC platforms. + +2019-05-15 Iain Sandoe + + PR target/82920 + * g++.dg/cet-notrack-1.C: Adjust scan assembler for Darwin. + * gcc.target/i386/cet-notrack-5a.c: Likewise. + * gcc.target/i386/cet-notrack-5b.c: Likewise. + * gcc.target/i386/cet-notrack-6b.c: Likewise. + * gcc.target/i386/cet-notrack-icf-1.c: Likewise. + * gcc.target/i386/cet-notrack-icf-2.c: Likewise. + * gcc.target/i386/cet-notrack-icf-3.c: Likewise. + * gcc.target/i386/cet-notrack-icf-4.c: Likewise. + * gcc.target/i386/cet-sjlj-3.c: Likewise. + * gcc.target/i386/cet-sjlj-5.c: Likewise. + +2019-05-14 Marek Polacek + + PR c++/68918 + * g++.dg/cpp0x/decltype71.C: New test. + + PR c++/70156 + * g++.dg/init/static5.C: New test. + +2019-05-14 Iain Sandoe + + PR target/82920 + * gcc.target/i386/cet-sjlj-6b.c: Require effective target x32. + * gcc.target/i386/pr52146.c: Likewise. + * gcc.target/i386/pr52698.c: Likewise. + * gcc.target/i386/pr52857-1.c: Likewise. + * gcc.target/i386/pr52857-2.c: Likewise. + * gcc.target/i386/pr52876.c: Likewise. + * gcc.target/i386/pr53698.c: Likewise. + * gcc.target/i386/pr54157.c: Likewise. + * gcc.target/i386/pr55049-1.c: Likewise. + * gcc.target/i386/pr55093.c: Likewise. + * gcc.target/i386/pr55116-1.c: Likewise. + * gcc.target/i386/pr55116-2.c: Likewise. + * gcc.target/i386/pr55597.c: Likewise. + * gcc.target/i386/pr59929.c: Likewise. + * gcc.target/i386/pr66470.c: Likewise. + +2019-05-14 Rainer Orth + + * gcc.dg/atomic/c11-atomic-exec-4.c: Simplify triplet to + *-*-solaris2*. + * gcc.dg/atomic/c11-atomic-exec-5.c: Likewise. + * gcc.dg/c99-math-double-1.c: Likewise. + * gcc.dg/c99-math-float-1.c: Likewise. + * gcc.dg/c99-math-long-double-1.c: Likewise. + * gcc.misc-tests/linkage.exp: Simplify triplet to + x86_64-*-solaris2*. + + * gcc.target/i386/mcount_pic.c: Remove *-*-solaris2.10* && !gld + xfail. + * gcc.target/i386/pr63620.c: Likewise. + + * lib/target-supports.exp (check_sse_os_support_available): Remove + Solaris 9/x86 workaround. + +2019-05-14 Richard Biener + + * gcc.dg/gimplefe-40.c: New testcase. + +2019-05-14 Paolo Carlini + + PR preprocessor/90382 + * g++.dg/diagnostic/trailing1.C: New test. + +2019-05-14 marxin + + PR middle-end/90340 + * gcc.dg/tree-ssa/pr90340-2.c: Add case-values-threshold + param. + +2019-05-14 Richard Biener + H.J. Lu + + PR tree-optimization/88828 + * gcc.target/i386/pr88828-1.c: New test. + * gcc.target/i386/pr88828-1a.c: Likewise. + * gcc.target/i386/pr88828-1b.c: Likewise. + * gcc.target/i386/pr88828-1c.c: Likewise. + * gcc.target/i386/pr88828-4a.c: Likewise. + * gcc.target/i386/pr88828-4b.c: Likewise. + * gcc.target/i386/pr88828-5a.c: Likewise. + * gcc.target/i386/pr88828-5b.c: Likewise. + * gcc.target/i386/pr88828-7.c: Likewise. + * gcc.target/i386/pr88828-7a.c: Likewise. + * gcc.target/i386/pr88828-7b.c: Likewise. + * gcc.target/i386/pr88828-8.c: Likewise. + * gcc.target/i386/pr88828-8a.c: Likewise. + * gcc.target/i386/pr88828-8b.c: Likewise. + * gcc.target/i386/pr88828-9.c: Likewise. + * gcc.target/i386/pr88828-9a.c: Likewise. + * gcc.target/i386/pr88828-9b.c: Likewise. + +2019-05-14 Przemyslaw Wirkus + + * gcc.target/aarch64/signbitv4sf.c: New test. + * gcc.target/aarch64/signbitv2sf.c: New test. + +2019-05-13 Jonathan Wakely + + * g++.dg/cpp0x/Wattributes1.C: Adjust dg-error line number to fix + regression, by matching a note on any line. + * g++.dg/cpp0x/Wattributes2.C: Add another copy that checks the + correct line number is matched without depending on a library header. + +2019-05-13 Richard Biener + + PR tree-optimization/90402 + * gcc.dg/torture/pr90402-1.c: New testcase. + +2019-05-12 Iain Sandoe + Dominique d'Humieres + + PR target/82920 + * gcc.target/i386/indirect-thunk-1.c: Adjust scan-asms for Darwin, + do not use -fno-pic on Darwin. + * gcc.target/i386/indirect-thunk-2.c: Likewise. + * gcc.target/i386/indirect-thunk-3.c: Likewise. + * gcc.target/i386/indirect-thunk-4.c: Likewise. + * gcc.target/i386/indirect-thunk-7.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-1.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-2.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-3.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-4.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-5.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-6.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-7.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-8.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-1.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-2.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-3.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-4.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-7.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-1.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-2.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-3.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-4.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-7.c: Likewise. + * gcc.target/i386/indirect-thunk-register-1.c: Likewise. + * gcc.target/i386/indirect-thunk-register-2.c: Likewise. + * gcc.target/i386/indirect-thunk-register-3.c: Likewise. + * gcc.target/i386/indirect-thunk-register-4.c: Likewise. + * gcc.target/i386/ret-thunk-1.c: Likewise. + * gcc.target/i386/ret-thunk-10.c: Likewise. + * gcc.target/i386/ret-thunk-11.c: Likewise. + * gcc.target/i386/ret-thunk-12.c: Likewise. + * gcc.target/i386/ret-thunk-13.c: Likewise. + * gcc.target/i386/ret-thunk-14.c: Likewise. + * gcc.target/i386/ret-thunk-15.c: Likewise. + * gcc.target/i386/ret-thunk-16.c: Likewise. + * gcc.target/i386/ret-thunk-2.c: Likewise. + * gcc.target/i386/ret-thunk-22.c: Likewise. + * gcc.target/i386/ret-thunk-23.c: Likewise. + * gcc.target/i386/ret-thunk-24.c: Likewise. + * gcc.target/i386/ret-thunk-3.c: Likewise. + * gcc.target/i386/ret-thunk-4.c: Likewise. + * gcc.target/i386/ret-thunk-5.c: Likewise. + * gcc.target/i386/ret-thunk-6.c: Likewise. + * gcc.target/i386/ret-thunk-7.c: Likewise. + * gcc.target/i386/ret-thunk-8.c: Likewise. + * gcc.target/i386/ret-thunk-9.c: Likewise. + +2019-05-11 Iain Sandoe + + PR testsuite/81058 + * gcc.target/i386/avx512bw-vpmovswb-1.c: Use regular data section + for variables on Darwin, rather than common. + * gcc.target/i386/avx512bw-vpmovuswb-1.c: Likewise. + * gcc.target/i386/avx512bw-vpmovwb-1.c: Likewise. + +2019-05-11 Paolo Carlini + + * g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C: New. + * g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C: Likewise. + +2019-05-10 Thomas Koenig + + PR fortran/61968 + * gfortran.dg/assumed_type_10.f90: New test case. + * gfortran.dg/assumed_type_11.f90: New test case. + +2019-05-10 Iain Sandoe + + * gcc.target/x86_64/abi/avx512f/abi-avx512f.exp: Darwin is + now tested. + * gcc.target/x86_64/abi/avx512f/asm-support-darwin.s: New. + +2019-05-10 Paolo Carlini + + * g++.dg/diagnostic/main1.C: New. + +2019-05-10 Marek Polacek + + PR c++/78010 - bogus -Wsuggest-override warning on final function. + * g++.dg/warn/Wsuggest-override-2.C: New test. + +2019-05-10 Jakub Jelinek + + PR tree-optimization/90385 + * gfortran.dg/pr90385.f90: New test. + + PR c++/90383 + * g++.dg/cpp1y/constexpr-90383-1.C: New test. + * g++.dg/cpp1y/constexpr-90383-2.C: New test. + +2019-05-10 Paul Thomas + + PR fortran/90093 + * gfortran.dg/ISO_Fortran_binding_12.f90: New test. + * gfortran.dg/ISO_Fortran_binding_12.c: Supplementary code. + + PR fortran/90352 + * gfortran.dg/iso_c_binding_char_1.f90: New test. + + PR fortran/90355 + * gfortran.dg/ISO_Fortran_binding_4.f90: Add 'substr' to test + the direct passing of substrings as descriptors to bind(C). + * gfortran.dg/assign_10.f90: Increase the tree_dump count of + 'atmp' to account for the setting of the 'span' field. + * gfortran.dg/transpose_optimization_2.f90: Ditto. + +2019-05-10 Jakub Jelinek + + PR tree-optimization/88709 + PR tree-optimization/90271 + * gcc.dg/store_merging_29.c: Allow 4 stores to replace 6 stores on + arm*-*-*. + + PR pch/90326 + * g++.dg/pch/pr90326.C: New test. + * g++.dg/pch/pr90326.Hs: New file. + +2019-05-10 Martin Liska + + PR middle-end/90340 + * gcc.dg/tree-ssa/pr90340-2.c: New test. + * gcc.dg/tree-ssa/pr90340.c: New test. + +2019-05-09 Cherry Zhang + + * go.dg/mapstring.go: New test. + +2019-05-09 Richard Earnshaw + + PR target/90405 + * gcc.target/arm/pr90405.c: New test. + +2019-05-09 Martin Liska + + * gcc.dg/gimplefe-39.c: New test. + +2019-05-09 Martin Liska + + * gcc.dg/gimplefe-37.c: New test. + * gcc.dg/gimplefe-33.c: Likewise. + +2019-05-09 Paolo Carlini + + PR c++/90382 + Revert: + 2018-04-26 Paolo Carlini + + * g++.dg/diagnostic/trailing1.C: New. + +2019-05-09 Richard Biener + + PR tree-optimization/90395 + * gcc.dg/torture/pr90395.c: New testcase. + +2019-05-08 Cherry Zhang + + * go.dg/cmpstring.go: New test. + +2019-05-08 Jakub Jelinek + + PR c++/59813 + PR tree-optimization/89060 + * gcc.dg/tree-ssa/pr89060.c: New test. + +2019-05-08 Mihail Ionescu + Richard Earnshaw + + PR target/88167 + * gcc.target/arm/pr88167-1.c: New test. + * gcc.target/arm/pr88167-2.c: New test. + +2018-05-08 Bin Cheng + + PR tree-optimization/90078 + * g++.dg/tree-ssa/pr90078.C: New test. + +2018-05-08 Bin Cheng + + PR tree-optimization/90240 + * gfortran.dg/graphite/pr90240.f: New test. + +2019-05-08 Li Jia He + + PR other/90381 + * gcc.dg/tree-ssa/pr88676-2.c: Add 'target le' option to limit the + test case to run on the little endian machine. + +2019-05-08 Jakub Jelinek + + PR tree-optimization/90356 + * gcc.dg/tree-ssa/pr90356-1.c: New test. + * gcc.dg/tree-ssa/pr90356-2.c: New test. + * gcc.dg/tree-ssa/pr90356-3.c: New test. + * gcc.dg/tree-ssa/pr90356-4.c: New test. + +2019-05-07 Wei Xiao + + * gcc.target/i386/avx512bf16-vcvtne2ps2bf16-1.c: New test. + * gcc.target/i386/avx512bf16-vcvtneps2bf16-1.c: New test. + * gcc.target/i386/avx512bf16-vdpbf16ps-1.c: New test. + * gcc.target/i386/avx512bf16vl-vcvtne2ps2bf16-1.c: New test. + * gcc.target/i386/avx512bf16vl-vcvtneps2bf16-1.c: New test. + * gcc.target/i386/avx512bf16vl-vdpbf16ps-1.c: New test. + * gcc.target/i386/builtin_target.c: Handle avx512bf16. + * gcc.target/i386/sse-12.c: Add -mavx512bf16. + * gcc.target/i386/sse-13.c: Ditto. + * gcc.target/i386/sse-14.c: Ditto. + * gcc.target/i386/sse-22.c: Ditto. + * gcc.target/i386/sse-23.c: Ditto. + * g++.dg/other/i386-2.C: Ditto. + * g++.dg/other/i386-3.C: Ditto. + +2019-05-07 Cherry Zhang + + * go.dg/arrayclear.go: New test. + * go.dg/mapclear.go: New test. + +2019-05-07 Kelvin Nilsen + + PR target/89765 + * gcc.target/powerpc/pr89765-mc.c: New test. + * gcc.target/powerpc/vsx-builtin-10c.c: New test. + * gcc.target/powerpc/vsx-builtin-10d.c: New test. + * gcc.target/powerpc/vsx-builtin-11c.c: New test. + * gcc.target/powerpc/vsx-builtin-11d.c: New test. + * gcc.target/powerpc/vsx-builtin-12c.c: New test. + * gcc.target/powerpc/vsx-builtin-12d.c: New test. + * gcc.target/powerpc/vsx-builtin-13c.c: New test. + * gcc.target/powerpc/vsx-builtin-13d.c: New test. + * gcc.target/powerpc/vsx-builtin-14c.c: New test. + * gcc.target/powerpc/vsx-builtin-14d.c: New test. + * gcc.target/powerpc/vsx-builtin-15c.c: New test. + * gcc.target/powerpc/vsx-builtin-15d.c: New test. + * gcc.target/powerpc/vsx-builtin-16c.c: New test. + * gcc.target/powerpc/vsx-builtin-16d.c: New test. + * gcc.target/powerpc/vsx-builtin-17c.c: New test. + * gcc.target/powerpc/vsx-builtin-17d.c: New test. + * gcc.target/powerpc/vsx-builtin-18c.c: New test. + * gcc.target/powerpc/vsx-builtin-18d.c: New test. + * gcc.target/powerpc/vsx-builtin-19c.c: New test. + * gcc.target/powerpc/vsx-builtin-19d.c: New test. + * gcc.target/powerpc/vsx-builtin-20c.c: New test. + * gcc.target/powerpc/vsx-builtin-20d.c: New test. + * gcc.target/powerpc/vsx-builtin-9c.c: New test. + * gcc.target/powerpc/vsx-builtin-9d.c: New test. + +2019-05-07 Alejandro Martinez + + * gcc.target/aarch64/sve/sad_1.c: New test for sum of absolute + differences. + +2019-05-07 Uroš Bizjak + + * gcc.target/i386/asm-7.c: New test. + * gcc.target/i386/asm-1.c: Update expected error string. + * gcc.target/i386/pr62120.c: Ditto. + +2019-05-07 Li Jia He + + * gcc.dg/tree-ssa/pr37508.c: Add the no-ssa-phiopt option to skip phi + optimization. + * gcc.dg/tree-ssa/pr88676-2.c: New testcase. + +2019-05-06 H.J. Lu + Hongtao Liu + + PR target/89750 + PR target/86444 + * gcc.target/i386/avx512f-vcomisd-2.c: New. + * gcc.target/i386/avx512f-vcomisd-2.c: Likewise. + +2019-05-06 Steven G. Kargl + + PR fortran/90290 + * gfortran.dg/pr90290.f90: New test. + +2019-05-06 Jakub Jelinek + + PR tree-optimization/88709 + PR tree-optimization/90271 + * gcc.dg/store_merging_26.c: New test. + * gcc.dg/store_merging_27.c: New test. + * gcc.dg/store_merging_28.c: New test. + * gcc.dg/store_merging_29.c: New test. + +2019-05-06 Kelvin Nilsen + + PR target/89424 + * gcc.target/powerpc/pr89424-0.c: New test. + * gcc.target/powerpc/vsx-builtin-13a.c: Define macro PR89424 to + enable testing of newly patched capability. + * gcc.target/powerpc/vsx-builtin-13b.c: Likewise. + * gcc.target/powerpc/vsx-builtin-20a.c: Likewise. + * gcc.target/powerpc/vsx-builtin-20b.c: Likewise. + +2019-05-06 Marek Polacek + + PR c++/90265 - ICE with generic lambda. + * g++.dg/cpp1y/lambda-generic-90265.C: New test. + +2019-05-06 Richard Biener + + PR tree-optimization/90358 + * gcc.target/i386/pr90358.c: New testcase. + +2019-05-06 Richard Biener + + PR tree-optimization/88828 + * gcc.target/i386/pr88828-0.c: New testcase. + +2019-05-06 Richard Biener + + PR tree-optimization/90328 + * gcc.dg/torture/pr90328.c: New testcase. + +2019-05-06 Richard Biener + + PR testsuite/90331 + * gcc.dg/pr87314-1.c: Align the substring to open up + string merging for targets aligning strings to 8 bytes. + +2019-05-06 Martin Liska + + PR sanitizer/90312 + * gcc.dg/asan/pr87930.c: Run the test only on *linux or *gnu + systems. + * gcc.dg/tsan/pr88017.c: Likewise. + +2019-05-05 Thomas Koenig + + PR fortran/90344 + * gfortran.dg/pr90344.f90: New test + +2019-05-03 Marc Glisse + + PR tree-optimization/90269 + * g++.dg/tree-ssa/ldist-1.C: New file. + +2019-05-03 Richard Biener + + * gcc.dg/vect/slp-reduc-sad-2.c: New testcase. + +2019-05-03 Richard Biener + + PR middle-end/89518 + * gcc.dg/pr89518.c: New testcase. + +2019-05-03 Richard Biener + + PR middle-end/87314 + * gcc.dg/pr87314-1.c: New testcase. + +2019-05-03 Richard Biener + + PR tree-optimization/88963 + * gcc.dg/tree-ssa/ssa-fre-31.c: Disable forwprop. + * gcc.target/i386/pr88963-1.c: New testcase. + * gcc.target/i386/pr88963-2.c: Likewise. + +2019-05-03 Dominique d'Humieres + + PR target/88809 + * gcc.target/i386/pr88809.c: Adjust for darwin. + * gcc.target/i386/pr88809-2.c: Adjust for i386 and darwin. + +2019-05-03 Jakub Jelinek + + PR tree-optimization/90303 + * g++.target/i386/pr90303.C: New test. + +2019-05-03 Richard Biener + + PR tree-optimization/89698 + * g++.dg/tree-ssa/pr89698.C: New testcase. + +2019-05-02 Iain Sandoe + + * g++.dg/ext/instantiate2.C: Remove special-casing for Darwin. + +2019-05-02 Richard Biener + + PR tree-optimization/89653 + * g++.dg/vect/pr89653.cc: New testcase. + +2019-05-02 Richard Biener + + PR tree-optimization/89509 + * gcc.dg/torture/restrict-8.c: New testcase. + +2019-05-02 Iain Sandoe + + * gcc.dg/tree-prof/section-attr-1.c: Update scan-asm regex + for cold section label. + * gcc.dg/tree-prof/section-attr-2.c: Likewise. + * gcc.dg/tree-prof/section-attr-3.c: Likewise. + +2019-05-02 Rainer Orth + + * gcc.target/i386/spellcheck-options-5.c: Restrict to Linux and + GNU targets. + +2019-05-02 Alejandro Martinez + + * gcc.target/aarch64/sve/dot_1.c: New test for dot product. + +2019-05-02 Martin Liska + + * gcc.target/i386/funcspec-4.c: Update scanned pattern. + * g++.target/i386/pr57362.C: Likewise. + +2019-05-02 Martin Liska + + PR target/88809 + * gcc.target/i386/pr88809.c: New test. + * gcc.target/i386/pr88809-2.c: New test. + +2019-05-01 Dominique d'Humieres + + PR fortran/60144 + * gfortran.dg/block_name_2.f90: Adjust dg-error. + * gfortran.dg/dec_type_print_3.f90.f90: Likewise. + * gfortran.dg/pr60144.f90: New test. + +2019-05-01 Jeff Law + + PR tree-optimization/90037 + * g++.dg/tree-ssa/pr88797.C: New test. + +2019-05-01 Nathan Sidwell + + * g++.dg/cpp0x/decltype9.C: Adjust expected diagnostics. + +2019-04-30 Jakub Jelinek + + PR target/89093 + * gcc.target/aarch64/return_address_sign_3.c: Remove extra space in + target attribute. + +2019-04-30 Giuliano Belinassi + + * gcc.dg/sinhatanh-2.c: Count the number of functions. + * gcc.dg/sinhatanh-3.c: Likewise. + +2019-04-30 Martin Liska + + * gcc.dg/Werror-13.c: Add new tests for it. + * gcc.dg/pragma-diag-6.c: Likewise. + +2019-04-30 Jakub Jelinek + + PR target/89093 + * gcc.target/aarch64/pr89093.c: New test. + * gcc.target/aarch64/pr63304_1.c: Remove space from target string. + + PR tree-optimization/89475 + * gcc.dg/tree-ssa/pr89475.c: New test. + +2019-04-30 Bin Cheng + + PR tree-optimization/90240 + Revert: + 2019-04-23 Bin Cheng + + PR tree-optimization/90078 + * g++.dg/tree-ssa/pr90078.C: New test. + +2019-04-29 Vladislav Ivanishin + + * gcc.dg/uninit-25-gimple.c: New test. + * gcc.dg/uninit-25.c: New test. + * gcc.dg/uninit-26.c: New test. + * gcc.dg/uninit-27-gimple.c: New test. + +2019-04-29 Richard Biener + + PR tree-optimization/90278 + * gcc.dg/torture/pr90278.c: New testcase. + +2019-04-27 Jakub Jelinek + + PR c++/90173 + * g++.dg/cpp1z/class-deduction66.C: Use dg-do compile instead of + dg-do run. + +2019-04-27 Uroš Bizjak + + PR target/89261 + * gcc.target/i386/pr89261.c: New test. + +2019-04-27 Martin Liska + + PR middle-end/90258 + * gcc.dg/completion-5.c: New test. + * gcc.target/i386/spellcheck-options-5.c: New test. + +2019-04-26 Jim Wilson + + * gcc.target/riscv/load-immediate.c: New. + +2019-04-26 Jonathan Wakely + + PR c++/90243 + * g++.dg/diagnostic/pr90243.C: New test. + +2019-04-26 Paolo Carlini + + PR c++/90173 + * g++.dg/cpp1z/class-deduction66.C: New. + +2019-04-26 Paolo Carlini + + * g++.dg/diagnostic/trailing1.C: New. + +2019-04-26 Richard Sandiford + + * gcc.dg/alias-16.c: New test. + +2019-04-25 Martin Liska + H.J. Lu + + PR target/89929 + * g++.target/i386/mv28.C: New test. + * gcc.target/i386/mvc14.c: Likewise. + * g++.target/i386/pr57362.C: Updated. + +2019-04-24 Jeff Law + + PR tree-optimization/90037 + * gcc.dg/tree-ssa/20030710-1.c: Update dump file to scan. + * gcc.dg/isolate-2.c: Likewise. + * gcc.dg/isolate-4.c: Likewise. + * gcc.dg/pr19431.c: Accept either ordering of PHI args. + * gcc.dg/pr90037.c: New test. + +2019-04-25 Jakub Jelinek + + PR c++/44648 + * g++.dg/warn/Wunused-var-35.C: Remove xfail. + +2019-04-25 Richard Biener + + PR middle-end/90194 + * g++.dg/torture/pr90194.C: New testcase. + +2019-04-24 Marek Polacek + + PR c++/90236 + * g++.dg/cpp1z/nontype-auto16.C: New test. + +2019-04-24 Jakub Jelinek + + PR target/90193 + * gcc.target/i386/pr90193.c: New test. + +2019-04-24 Andreas Krebbel + + PR target/89952 + * gcc.target/s390/pr89952.c: New test. + +2019-04-24 Jakub Jelinek + + PR target/90187 + * g++.target/i386/pr90187.C: New test. + +2019-04-24 Iain Buclaw + + * gdc.test/README.gcc: New file. + +2019-04-24 Jakub Jelinek + + PR tree-optimization/90208 + * gcc.dg/tsan/pr90208-1.c: New test. + * gcc.dg/tsan/pr90208-2.c: New test. + + PR tree-optimization/90211 + * gcc.dg/autopar/pr90211.c: New test. + +2019-04-23 Iain Buclaw + Robin Dapp + + * gdc.dg/link.d: Test if target d_runtime. + * gdc.dg/runnable.d: Fix tests to work on BigEndian. + * gdc.dg/simd.d: Likewise. + +2019-04-23 Iain Buclaw + + * gdc.test/fail_compilation/fail2456.d: New test. + * gdc.test/fail_compilation/test18312.d: New test. + * gdc.test/gdc-test.exp (gdc-convert-args): Handle -betterC. + +2018-04-23 Sudakshina Das + + * gcc.target/aarch64/bti-1.c: Add scan directive for gnu note section + for linux targets. + * gcc.target/aarch64/va_arg_1.c: Update scan directive to not clash + with GNU note section. + +2019-04-23 Jeff Law + + * lib/target-supports.exp + (check_effective_target_keeps_null_pointer_checks): Add cr16. + +2019-04-23 Roman Zhuykov + + PR rtl-optimization/87979 + * gcc.dg/pr87979.c: New test. + +2019-04-23 Roman Zhuykov + + PR rtl-optimization/84032 + * gcc.dg/pr84032.c: New test. + +2018-04-23 Bin Cheng + + PR tree-optimization/90078 + * g++.dg/tree-ssa/pr90078.C: New test. + +2018-04-23 Bin Cheng + + PR tree-optimization/90021 + * gfortran.dg/pr90021.f90: New test. + +2019-04-22 Steven G. Kargl + + PR fortran/90166 + * gfortran.dg/submodule_22.f08: Add additional dg-error comments. + +2019-04-22 Paul Thomas + + PR fortran/57284 + * gfortran.dg/class_70.f03 + +2019-04-21 H.J. Lu + + PR target/90178 + * gcc.target/i386/pr90178.c: New test. + +2019-04-20 Sandra Loosemore + + * g++.dg/ipa/pr89009.C: Add dg-require-effective-target fpic. + +2019-04-19 Paolo Carlini + + PR c++/89900 + * g++.dg/cpp0x/pr89900-1.C: New. + * g++.dg/cpp0x/pr89900-2.C: Likewise. + * g++.dg/cpp0x/pr89900-3.C: Likewise. + * g++.dg/cpp0x/pr89900-4.C: Likewise. + +2019-04-19 Jakub Jelinek + + PR middle-end/90139 + * gcc.c-torture/compile/pr90139.c: New test. + + PR c++/90138 + * g++.dg/template/pr90138.C: New test. + + PR c/89888 + * c-c++-common/pr89888.c: New test. + * g++.dg/torture/pr40335.C: Change dg-bogus into dg-warning. + Don't expect -Wswitch-unreachable warning. + + PR c++/90108 + * c-c++-common/pr90108.c: New test. + +2019-04-18 Richard Sandiford + + PR middle-end/85164 + * gcc.dg/pr85164-1.c, gcc.dg/pr85164-2.c: New tests. + +2019-04-18 Richard Biener + + PR debug/90131 + * gcc.dg/guality/pr90131.c: New testcase. + +2019-04-17 Jakub Jelinek + + PR c++/89325 + * g++.dg/ext/attrib58.C: New test. + * g++.dg/ext/attrib59.C: New test. + * g++.dg/ext/attrib60.C: New test. + + PR target/90125 + * gcc.target/i386/avx512f-vfmsubXXXss-2.c (avx512f_test): Adjust + constants to ensure precise result even when not using fma. + * gcc.target/i386/avx512f-vfnmaddXXXss-2.c (avx512f_test): Likewise. + * gcc.target/i386/avx512f-vfmaddXXXsd-3.c: New test. + * gcc.target/i386/avx512f-vfmaddXXXss-3.c: New test. + * gcc.target/i386/avx512f-vfmsubXXXsd-3.c: New test. + * gcc.target/i386/avx512f-vfmsubXXXss-3.c: New test. + * gcc.target/i386/avx512f-vfnmaddXXXsd-3.c: New test. + * gcc.target/i386/avx512f-vfnmaddXXXss-3.c: New test. + * gcc.target/i386/avx512f-vfnmsubXXXsd-3.c: New test. + * gcc.target/i386/avx512f-vfnmsubXXXss-3.c: New test. + +2019-04-17 Marek Polacek + + PR c++/90124 - bogus error with incomplete type in decltype. + * g++.dg/cpp0x/decltype70.C: New test. + +2019-04-17 Jakub Jelinek + + PR middle-end/90095 + * gcc.dg/pr90095-1.c: New test. + * gcc.dg/pr90095-2.c: New test. + +2019-04-17 Thomas Schwinge + + PR fortran/90048 + * gfortran.dg/goacc/private-explicit-kernels-1.f95: New file. + * gfortran.dg/goacc/private-explicit-parallel-1.f95: Likewise. + * gfortran.dg/goacc/private-explicit-routine-1.f95: Likewise. + + PR fortran/90067 + PR fortran/90114 + * gfortran.dg/goacc/private-1.f95: Remove file. + * gfortran.dg/goacc/private-2.f95: Likewise. + * gfortran.dg/goacc/private-predetermined-kernels-1.f95: New file. + * gfortran.dg/goacc/private-predetermined-parallel-1.f95: + Likewise. + * gfortran.dg/goacc/private-predetermined-routine-1.f95: Likewise. + +2019-04-17 Jakub Jelinek + + PR target/89093 + * gcc.target/arm/pr89093-2.c: New test. + +2019-04-16 Jakub Jelinek + + PR c++/86953 + * g++.dg/cpp0x/constexpr-86953.C: New test. + +2019-04-16 Dominique d'Humieres + + * g++.dg/lto/pr89358_0.C: Replace dg-* with dg-lto-*. + +2019-04-16 Alexandre Oliva + + PR debug/89528 + * gcc.dg/guality/pr89528.c: New. + + PR rtl-optimization/86438 + * gcc.dg/torture/pr86438.c: Split up too-wide shift. + +2019-04-16 Jakub Jelinek + + PR target/90096 + * gcc.target/i386/pr90096.c: New test. + * gcc.target/i386/pr69255-1.c: Adjust expected diagnostics. + * gcc.target/i386/pr69255-2.c: Likewise. + * gcc.target/i386/pr69255-3.c: Likewise. + + PR rtl-optimization/90082 + * gcc.dg/pr90082.c: New test. + + PR tree-optimization/90090 + * g++.dg/opt/pr90090.C: New test. + +2019-04-16 Richard Biener + + PR tree-optimization/56049 + * gfortran.dg/pr56049.f90: New testcase. + +2019-04-15 Richard Biener + + PR debug/90074 + * gcc.dg/guality/pr90074.c: New testcase. + +2019-04-15 Richard Biener + + PR tree-optimization/90071 + * gcc.dg/torture/pr90071.c: New testcase. + +2019-04-15 Segher Boessenkool + + PR rtl-optimization/89794 + * gcc.dg/torture/pr89794.c: New testcase. + +2019-04-15 Richard Biener + + PR ipa/88936 + * gcc.dg/torture/pr88936-1.c: New testcase. + * gcc.dg/torture/pr88936-2.c: Likewise. + * gcc.dg/torture/pr88936-3.c: Likewise. + +2019-04-15 Martin Jambor + + PR ipa/pr89693 + * g++.dg/ipa/pr89693.C: New test. + +2019-04-15 Dominique d'Humieres + + PR tree-optimization/90020 + * gcc.dg/torture/pr90020.c: Add linker options for darwin. + +2019-04-14 Jan Hubicka + + PR lto/89358 + * g++.dg/lto/pr89358_0.C: New testcase. + * g++.dg/lto/pr89358_1.C: New testcase. + +2019-04-14 Thomas Koenig + + PR fortran/85448 + * gfortran.dg/bind_c_usage_33.f90: New test and... + * gfortran.dg/bind_c_usage_33_c.c: Additional source. + +2019-04-14 Paul Thomas + + PR fortran/89843 + * gfortran.dg/ISO_Fortran_binding_4.f90: Modify the value of x + in ctg. Test the conversion of the descriptor types in the main + program. + * gfortran.dg/ISO_Fortran_binding_10.f90: New test. + * gfortran.dg/ISO_Fortran_binding_10.c: Called by it. + + PR fortran/89846 + * gfortran.dg/ISO_Fortran_binding_11.f90: New test. + * gfortran.dg/ISO_Fortran_binding_11.c: Called by it. + + PR fortran/90022 + * gfortran.dg/ISO_Fortran_binding_1.c: Correct the indexing for + the computation of 'ans'. Also, change the expected results for + CFI_is_contiguous to comply with standard. + * gfortran.dg/ISO_Fortran_binding_1.f90: Correct the expected + results for CFI_is_contiguous to comply with standard. + * gfortran.dg/ISO_Fortran_binding_9.f90: New test. + * gfortran.dg/ISO_Fortran_binding_9.c: Called by it. + +2019-04-13 Jakub Jelinek + + PR target/89093 + * gcc.target/arm/pr89093.c: New test. + +2019-04-12 Jakub Jelinek + + PR c/89933 + * c-c++-common/pr89933.c: New test. + +2019-04-12 Martin Sebor + + PR c/88383 + PR c/89288 + PR c/89798 + PR c/89797 + * c-c++-common/attributes-1.c: Adjust. + * c-c++-common/builtin-has-attribute-4.c: Adjust expectations. + * c-c++-common/builtin-has-attribute-6.c: New test. + * c-c++-common/builtin-has-attribute-7.c: New test. + * c-c++-common/pr71574.c: Adjust. + * gcc.dg/pr25559.c: Adjust. + * gcc.dg/attr-vector_size.c: New test. + +2019-04-12 Jakub Jelinek + + PR rtl-optimization/89965 + * gcc.target/i386/pr89965.c: New test. + +2019-04-12 Marek Polacek + + PR c++/87603 - constexpr functions are no longer noexcept. + * g++.dg/cpp0x/constexpr-noexcept.C: Adjust the expected result. + * g++.dg/cpp0x/constexpr-noexcept3.C: Likewise. + * g++.dg/cpp0x/constexpr-noexcept4.C: Likewise. + * g++.dg/cpp0x/constexpr-noexcept8.C: New test. + * g++.dg/cpp0x/inh-ctor32.C: Remove dg-message. + * g++.dg/cpp1y/constexpr-noexcept1.C: New test. + +2019-04-12 Marek Polacek + + * g++.dg/cpp0x/noexcept30.C: Tweak dg-error. + * g++.dg/cpp0x/pr86397-1.C: Likewise. + * g++.dg/cpp0x/pr86397-2.C: Likewise. + +2019-04-12 Matthew Malcomson + + * g++.target/arm/arm.exp: Change format of default prune regex. + * gcc.target/arm/arm.exp: Change format of default prune regex. + +2019-04-12 Martin Liska + + PR middle-end/89970 + * gcc.target/i386/mvc15.c: New test. + * gcc.target/i386/mvc3.c: Quote target in error pattern. + * gcc.target/i386/mvc4.c: Remove duplicit 'default'. + +2019-04-12 Kelvin Nilsen + + PR target/87532 + * gcc.target/powerpc/fold-vec-extract-char.p8.c: Adjust expected + instruction counts. + * gcc.target/powerpc/fold-vec-extract-int.p8.c: Likewise. + * gcc.target/powerpc/fold-vec-extract-short.p8.c: Likewise. + +2019-04-12 Jakub Jelinek + + PR c/89946 + * c-c++-common/pr89946.c: New test. + + PR rtl-optimization/90026 + * g++.dg/opt/pr90026.C: New test. + +2018-04-11 Steve Ellcey + + PR rtl-optimization/87763 + * gcc.target/aarch64/combine_bfxil.c: Change some bfxil checks + to bfi. + +2019-04-11 Richard Biener + + PR tree-optimization/90020 + * gcc.dg/torture/pr90020.c: New testcase. + +2019-04-11 Richard Biener + + PR tree-optimization/90018 + * gcc.dg/vect/pr90018.c: New testcase. + +2018-04-10 Steve Ellcey + + PR rtl-optimization/87763 + * gcc.target/aarch64/combine_bfxil.c: Change some bfxil checks + to bfi. + * gcc.target/aarch64/combine_bfi_2.c: New test. + +2019-04-10 Jakub Jelinek + + PR middle-end/90025 + * gcc.c-torture/execute/pr90025.c: New test. + + PR c++/90010 + * gcc.dg/pr90010.c: New test. + +2019-04-09 Uroš Bizjak + + * gcc.target/i386/ifcvt-onecmpl-abs-1.c + (dg-options): Use -O2 -fdump-rtl-ce1. + (dg-final): Scan ce1 RTL dump instead of asm dump. + +2019-04-09 Matthew Malcomson + + PR target/90024 + * gcc.dg/torture/neon-immediate-timode.c: New test. + +2019-04-09 Jakub Jelinek + + PR tree-optimization/89998 + * gcc.c-torture/compile/pr89998-1.c: New test. + * gcc.c-torture/compile/pr89998-2.c: New test. + + PR target/90015 + * gcc.target/riscv/interrupt-conflict-mode.c (foo): Adjust expected + diagnostics. + +2019-04-08 Richard Biener + + PR tree-optimization/90006 + * gcc.dg/vect/bb-slp-pr90006.c: New testcase. + +2019-04-08 Jakub Jelinek + + PR rtl-optimization/89865 + * gcc.target/i386/pr49095.c: Don't expect any RMW sequences. + + PR rtl-optimization/89865 + * gcc.target/i386/pr49095.c: Adjust number of expected RMW spots + on ia32. + +2019-04-01 Bin Cheng + + PR tree-optimization/89725 + * gcc.dg/tree-ssa/pr89725.c: New test. + +2019-04-08 Martin Liska + + * gcc.target/riscv/arch-1.c: Fix expected scanned pattern. + +2019-04-08 Paolo Carlini + + PR c++/89914 + * g++.dg/ext/has_nothrow_constructor-3.C: New. + +2019-04-07 Uroš Bizjak + + PR target/89945 + * gcc.target/i386/pr89945.c: New test. + +2019-04-06 Thomas Koenig + + PR fortran/87352 + * gfortran.dg/finalize_28.f90: Adjust count of __builtin_free. + * gfortran.dg/finalize_33.f90: Likewise. + * gfortran.dg/finalize_34.f90: New test. + +2019-04-06 Thomas Koenig + + PR fortran/89981 + * gfortran.dg/entry_22.f90: New test. + +2019-04-05 Marek Polacek + + PR c++/87145 - bogus error converting class type in template arg list. + * g++.dg/cpp0x/constexpr-conv3.C: New test. + * g++.dg/cpp0x/constexpr-conv4.C: New test. + +2019-04-05 Martin Sebor + + PR bootstrap/89980 + * g++.dg/init/array52.C: New test. + +2019-04-05 David Malcolm + + PR c/89985 + * c-c++-common/pr89985.c: New test. + +2019-04-05 Christophe Lyon + + PR c/71598 + * gcc.dg/torture/pr71598-1.c: dg-prune arm linker messages about + size of enums. + * gcc.dg/torture/pr71598-2.c: Likewise. + +2019-04-05 Marek Polacek + + PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion. + * g++.dg/warn/Waddress-of-packed-member2.C: New test. + +2019-04-05 Richard Biener + + PR debug/89892 + PR debug/89905 + * gcc.dg/guality/pr89892.c: New testcase. + * gcc.dg/guality/pr89905.c: Likewise. + * gcc.dg/guality/loop-1.c: Likewise. + +2019-04-05 Richard Sandiford + + PR tree-optimization/89956 + * gfortran.dg/pr89956.f90: New test. + +2019-04-04 Martin Sebor + + PR c++/89974 + PR c++/89878 + PR c++/89833 + PR c++/47488 + * g++.dg/abi/mangle69.C: New test. + * g++.dg/abi/mangle70.C: New test. + * g++.dg/abi/mangle71.C: New test. + * g++.dg/abi/mangle72.C: New test. + * g++.dg/cpp0x/constexpr-array19.C: New test. + * g++.dg/cpp2a/nontype-class15.C: New test. + * g++.dg/cpp2a/nontype-class16.C: New test. + * g++.dg/init/array51.C: New test. + * g++.dg/template/nontype29.C: New test. + +2019-04-04 Martin Sebor + + PR middle-end/89957 + PR middle-end/89911 + * gcc.dg/Wstringop-overflow-13.c: New test. + +2019-04-04 Martin Sebor + + PR middle-end/89934 + * gcc.dg/Wrestrict-19.c: New test. + * gcc.dg/Wrestrict-5.c: Add comment. Remove unused code. + +2019-04-04 Jeff Law + + PR rtl-optimization/89399 + * gcc.c-torture/compile/pr89399.c: New test. + +2019-04-04 Harald Anlauf + + PR fortran/89904 + * gfortran.dg/pr85797.f90: Adjust testcase. + +2019-04-04 Paolo Carlini + + PR c++/65619 + * g++.dg/template/friend67.C: New. + +2019-04-04 Paolo Carlini + + PR c++/61327 + * g++.dg/cpp0x/friend4.C: New. + * g++.dg/cpp0x/friend5.C: Likewise. + +2019-04-04 Paolo Carlini + + PR c++/56643 + * g++.dg/cpp0x/noexcept40.C: New. + +2019-04-03 Dominique d'Humieres + + PR fortran/68567 + * gfortran.dg/parameter_array_error_1.f90: New test. + +2019-04-03 qing zhao + + PR tree-optimization/89730 + * gcc.dg/live-patching-4.c: New test. + +2019-04-03 Clément Chigot + + * lib/go-torture.exp: Only add lto to TORTURE_OPTIONS if it is + supported. + +2019-04-03 Christophe Lyon + + PR c/71598 + * gcc.dg/torture/pr71598-1.c: Skip if short_enums target. + * gcc.dg/torture/pr71598-2.c: Skip if not short_enums target. + +2019-04-03 Richard Biener + + PR tree-optimization/84101 + * gcc.target/i386/pr84101.c: New testcase. + +2019-04-02 Jeff Law + + * gcc.target/visium/bit_shift.c: xfail. + +2019-04-02 Uroš Bizjak + + PR target/89902 + PR target/89903 + * gcc.target/i386/pr70799-4.c: Remove. + * gcc.target/i386/pr70799-5.c: Remove. + * gcc.target/i386/pr89902.c: New test. + * gcc.target/i386/pr89903.c: Ditto. + +2019-04-02 Andrey Belevantsev + + PR rtl-optimization/84206 + * gcc.dg/pr84206.c: New test. + +2019-04-02 Andrey Belevantsev + + PR rtl-optimization/85876 + * gcc.dg/pr85876.c: New test. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/zvector/vec-double-compile.c: New test. + * gcc.target/s390/zvector/vec-float-compile.c: New test. + * gcc.target/s390/zvector/vec-signed-compile.c: New test. + * gcc.target/s390/zvector/vec-unsigned-compile.c: New test. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/zvector/vec-search-string-cc-1.c: New test. + * gcc.target/s390/zvector/vec-search-string-cc-compile.c: New test. + * gcc.target/s390/zvector/vec-search-string-until-zero-cc-1.c: New test. + * gcc.target/s390/zvector/vec-search-string-until-zero-cc-compile.c: New test. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/zvector/vec-shift-left-double-by-bit-1.c: New test. + * gcc.target/s390/zvector/vec-shift-right-double-by-bit-1.c: New test. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/zvector/replicate-bswap-1.c: New test. + * gcc.target/s390/zvector/replicate-bswap-2.c: New test. + +2019-04-02 Alexander Monakov + + PR testsuite/89916 + * gcc.dg/pr86928.c: Do not attempt to add -m32. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/zvector/bswap-and-replicate-1.c: New test. + * gcc.target/s390/zvector/get-element-bswap-1.c: New test. + * gcc.target/s390/zvector/get-element-bswap-2.c: New test. + * gcc.target/s390/zvector/get-element-bswap-3.c: New test. + * gcc.target/s390/zvector/get-element-bswap-4.c: New test. + * gcc.target/s390/zvector/set-element-bswap-1.c: New test. + * gcc.target/s390/zvector/set-element-bswap-2.c: New test. + * gcc.target/s390/zvector/set-element-bswap-3.c: New test. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/zvector/vec-reve-load-byte-z14.c: New test. + * gcc.target/s390/zvector/vec-reve-load-byte.c: New test. + * gcc.target/s390/zvector/vec-reve-load-halfword-z14.c: New test. + * gcc.target/s390/zvector/vec-reve-load-halfword.c: New test. + * gcc.target/s390/zvector/vec-reve-store-byte-z14.c: New test. + * gcc.target/s390/zvector/vec-reve-store-byte.c: New test. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/zvector/vec-revb-load-double-z14.c: New test. + * gcc.target/s390/zvector/vec-revb-load-double.c: New test. + * gcc.target/s390/zvector/vec-revb-store-double-z14.c: New test. + * gcc.target/s390/zvector/vec-revb-store-double.c: New test. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/arch13/fp-signedint-convert-1.c: New test. + * gcc.target/s390/arch13/fp-unsignedint-convert-1.c: New test. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/arch13/sel-1.c: New test. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/arch13/popcount-1.c: New test. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/arch13/bitops-1.c: New test. + * gcc.target/s390/arch13/bitops-2.c: New test. + * gcc.target/s390/md/andc-splitter-1.c: Add -march=z14 build + option and adjust line numbers. + * gcc.target/s390/md/andc-splitter-2.c: Likewise. + +2019-04-02 Andreas Krebbel + + * gcc.target/s390/s390.exp: Run tests in arch13 subdir. + * lib/target-supports.exp (check_effective_target_s390_vxe2): New + runtime check for the vxe2 hardware feature on IBM Z. + +2019-04-01 H.J. Lu + + PR testsuite/89907 + * lib/target-supports.exp (check_avx2_available): Replace + avx_available with avx2_available. + +2019-04-01 Andrey Belevantsev + + PR rtl-optimization/85412 + * gcc.dg/pr85412.c: New test. + +2019-04-01 Paolo Carlini + + PR c++/62207 + * g++.dg/template/crash130.C: New. + * g++.dg/template/crash131.C: Likewise. + +2019-04-01 Martin Sebor + + PR c/89685 + * gcc.dg/attr-copy-8.c: New test. + * g++.dg/ext/attr-copy-2.C: New test. + +2019-04-01 Andrey Belevantsev + + PR rtl-optimization/86928 + * gcc.dg/pr86928.c: New test. + +2019-04-01 Andrey Belevantsev + + PR rtl-optimization/87273 + * gcc.dg/pr87273.c: New test. + +2019-04-01 Martin Liska + + PR driver/89861 + * gcc.dg/spellcheck-options-18.c: New test. + * gcc.dg/spellcheck-options-19.c: New test. + * gcc.dg/spellcheck-options-20.c: New test. + * gcc.dg/spellcheck-options-13.c: Adjust expected output. + * gcc.dg/completion-2.c: Add one variant with no argument. + +2019-04-01 Richard Biener + + PR c/71598 + * gcc.dg/torture/pr71598-1.c: New testcase. + * gcc.dg/torture/pr71598-2.c: Likewise. + * gcc.dg/torture/pr71598-3.c: Likewise. + +2019-03-31 Marek Polacek + + PR c++/89852 - ICE with C++11 functional cast with { }. + * g++.dg/cpp0x/initlist115.C: New test. + +2019-03-31 Harald Anlauf + + PR fortran/83515 + PR fortran/85797 + * gfortran.dg/pr85797.f90: New test. + +2019-03-31 Rainer Orth + + * gcc.dg/attr-aligned-3.c: Enable on *-*-solaris2.*. + +2019-03-30 Iain Buclaw + + * gdc.test/gdc-test.exp (gdc-copy-extra): Append copied files to + cleanup_extra_files. + (dmd2dg): Copy additional files after test is translated. + (gdc-do-test): Remove all copied files after test. + +2019-03-30 Paul Thomas + + PR fortran/89841 + * gfortran.dg/ISO_Fortran_binding_1.f90: Change the interfaces + for c_deallocate, c_allocate and c_assumed_size so that the + attributes of the array arguments are correct and are typed. + * gfortran.dg/ISO_Fortran_binding_7.f90: New test. + * gfortran.dg/ISO_Fortran_binding_7.c: Additional source. + + PR fortran/89842 + * gfortran.dg/ISO_Fortran_binding_8.f90: New test. + * gfortran.dg/ISO_Fortran_binding_8.c: Additional source. + +2019-03-30 Thomas Koenig + + PR fortran/89866 + * gfortran.dg/pointer_intent_8.f90: New test. + +2019-03-29 Jim Wilson + + * gcc.target/riscv/predef-1.c: New. + * gcc.target/riscv/predef-2.c: New. + * gcc.target/riscv/predef-3.c: New. + * gcc.target/riscv/predef-4.c: New. + * gcc.target/riscv/predef-5.c: New. + * gcc.target/riscv/predef-6.c: New. + * gcc.target/riscv/predef-7.c: New. + * gcc.target/riscv/predef-8.c: New. + +2019-03-29 Jakub Jelinek + + PR rtl-optimization/89865 + * gcc.target/i386/pr49095.c: Include in scan-assembler-times patterns + the first argument register, so that occassional spills/fills are + ignored. + + PR sanitizer/89869 + * g++.dg/ubsan/vptr-14.C: New test. + + PR c/89872 + * gcc.dg/tree-ssa/pr89872.c: New test. + +2019-03-29 Roman Zhuykov + + * gcc.dg/diag-sanity.c: New test. + +2019-03-29 Marek Polacek + + PR c++/89871 + * g++.dg/cpp2a/desig14.C: New test. + + PR c++/89876 - ICE with deprecated conversion. + * g++.dg/warn/conv5.C: New test. + +2019-03-29 Martin Liska + + * gcc.dg/ipa/ipa-icf-39.c: Prine '***dbgcnt' output. + * gcc.dg/pr68766.c: Likewise. + +2019-03-29 Jakub Jelinek + + PR rtl-optimization/87485 + * gcc.dg/pr87485.c: New test. + +2019-03-28 Jakub Jelinek + + PR middle-end/89621 + * gfortran.dg/gomp/pr89621.f90: New test. + +2019-03-28 Martin Sebor + + PR c++/66548 + * g++.dg/cpp0x/decltype-pr66548.C: New test. + + PR c++/81506 + * g++.dg/cpp0x/decltype-pr81506.C: New test. + +2019-03-28 Marek Polacek + + PR c++/89612 - ICE with member friend template with noexcept. + * g++.dg/cpp0x/noexcept38.C: New test. + * g++.dg/cpp0x/noexcept39.C: New test. + * g++.dg/cpp1z/noexcept-type21.C: New test. + +2019-03-28 Uroš Bizjak + + PR target/89848 + * gcc.target/i386/pr89848.c: New test. + +2019-03-28 Marek Polacek + + PR c++/89836 - bool constant expression and explicit conversions. + * g++.dg/cpp2a/explicit15.C: New test. + +2019-03-28 Jakub Jelinek + + PR c/89812 + * gcc.dg/attr-aligned-3.c: Limit the test to known ELF targets + other than AVR. Add dg-options "". + + PR c++/89785 + * g++.dg/cpp1y/constexpr-89785-1.C: New test. + * g++.dg/cpp1y/constexpr-89785-2.C: New test. + +2019-03-27 Janus Weil + + PR fortran/85537 + * gfortran.dg/dummy_procedure_11.f90: Fix test case. + * gfortran.dg/pointer_init_11.f90: New test case. + +2019-03-27 Mateusz B + + PR target/85667 + * gcc.target/i386/pr85667-5.c: New testcase. + * gcc.target/i386/pr85667-6.c: New testcase. + +2019-03-27 Bill Schmidt + + PR testsuite/89834 + * gcc.dg/vect/pr81740-2.c: Require vect_hw_misalign. + +2019-03-27 Peter Bergner + + PR rtl-optimization/89313 + * gcc.dg/pr89313.c: New test. + +2019-03-26 Jeff Law + + PR rtl-optimization/87761 + PR rtl-optimization/89826 + * gcc.c-torture/execute/pr89826.c: New test. + +2019-03-27 Richard Biener + + * gcc.dg/torture/20190327-1.c: New testcase. + +2019-03-27 Paul Thomas + + PR fortran/88247 + * gfortran.dg/associate_47.f90: New test. + +2019-03-27 Richard Biener + + PR tree-optimization/89463 + * gcc.dg/guality/pr89463.c: New testcase. + +2019-03-26 Uroš Bizjak + + PR target/89827 + * gcc.target/i386/pr89827.c: New test. + +2019-03-26 Rainer Orth + + * g++.dg/abi/lambda-static-1.C: Handle Solaris as comdat group + syntax. + +2019-03-26 Bin Cheng + + PR tree-optimization/81740 + * gcc.dg/vect/pr81740-1.c: New testcase. + * gcc.dg/vect/pr81740-2.c: Likewise. + +2019-03-26 Iain Buclaw + + * gdc.test/gdc-test.exp (gdc-do-test): Sort and remove duplicate + options in permute args tests. + +2019-03-26 Paolo Carlini + + PR c++/84598 + * g++.dg/ext/pr84598.C: New. + +2019-03-26 Jakub Jelinek + + PR c++/89796 + * g++.dg/gomp/pr89796.C: New test. + * gcc.dg/gomp/pr89796.c: New test. + +2019-03-25 David Malcolm + + PR rtl-optimization/88347 + PR rtl-optimization/88423 + * gcc.c-torture/compile/pr88347.c: New test. + * gcc.c-torture/compile/pr88423.c: New test. + +2019-03-25 Martin Sebor + + PR c/89812 + * gcc.dg/attr-aligned-3.c: New test. + +2019-03-25 Johan Karlsson + + PR debug/86964 + * gcc.dg/debug/dwarf2/pr86964.c: New testcase. + +2019-03-25 Paolo Carlini + + PR c++/84661 + PR c++/85013 + * g++.dg/concepts/pr84661.C: New. + * g++.dg/torture/pr85013.C: Likewise. + +2019-03-25 Marek Polacek + + PR c++/89214 - ICE when initializing aggregates with bases. + * g++.dg/cpp1z/aggr-base8.C: New test. + * g++.dg/cpp1z/aggr-base9.C: New test. + + PR c++/89705 - ICE with reference binding with conversion function. + * g++.dg/cpp0x/rv-conv2.C: New test. + +2019-03-25 Richard Biener + + PR tree-optimization/89789 + * gcc.dg/torture/pr89789.c: New testcase. + +2019-03-25 Nathan Sidwell + + * g++.dg/abi/lambda-static-1.C: New. + +2019-03-25 Richard Biener + + PR tree-optimization/89802 + * g++.dg/tree-ssa/pr89802.C: New testcase. + +2019-03-25 Jakub Jelinek + + PR c++/60702 + * g++.dg/tls/thread_local11.C: Remove scan-tree-dump-times directives + for _ZTH* calls. + * g++.dg/tls/thread_local11a.C: New test. + +2019-03-25 Richard Biener + + PR middle-end/89790 + * g++.dg/pr89790.C: New testcase. + +2019-03-24 Uroš Bizjak + + * gcc.target/i386/pr82281.c: Compile only for ia32 effective target. + (dg-options): Remove -m32. Add -msse2 -mtune=znver1. + * gcc.target/i386/pr89676.c: Compile only for ia32 effective target. + (dg-options): Remove -m32 and -march=i686. Add -mno-stv. + +2019-03-24 Thomas Koenig + + PR fortran/78865 + * gfortran.dg/altreturn_10.f90: New test. + * gfortran.dg/whole_file_3.f90: Change dg-warning to dg-error. + +2019-03-22 Vladimir Makarov + + PR rtl-optimization/89676 + * gcc.target/i386/pr89676.c: New. + +2019-03-22 Jakub Jelinek + + PR c++/60702 + * g++.dg/tls/thread_local11.C: New test. + * g++.dg/tls/thread_local11.h: New test. + * g++.dg/tls/thread_local12a.C: New test. + * g++.dg/tls/thread_local12b.C: New test. + * g++.dg/tls/thread_local12c.C: New test. + * g++.dg/tls/thread_local12d.C: New test. + * g++.dg/tls/thread_local12e.C: New test. + * g++.dg/tls/thread_local12f.C: New test. + * g++.dg/tls/thread_local12g.C: New test. + * g++.dg/tls/thread_local12h.C: New test. + * g++.dg/tls/thread_local12i.C: New test. + * g++.dg/tls/thread_local12j.C: New test. + * g++.dg/tls/thread_local12k.C: New test. + * g++.dg/tls/thread_local12l.C: New test. + + PR c++/87481 + * g++.dg/cpp1y/constexpr-87481.C: New test. + +2019-03-22 Simon Wright + + PR ada/89583 + * gnat.dg/socket2.adb: New. + +2019-03-22 Bill Schmidt + + * gcc.target/powerpc/mmx-psubd-2.c: Test _m_psubd. + +2019-03-22 Hongtao Liu + + PR target/89784 + * gcc.target/i386/avx512f-vfmaddXXXsd-1.c (avx512f_test): Add tests + for _mm_mask{,3,z}_*. + * gcc.target/i386/avx512f-vfmaddXXXss-1.c (avx512f_test): Likewise. + * gcc.target/i386/avx512f-vfmsubXXXsd-1.c (avx512f_test): Likewise. + * gcc.target/i386/avx512f-vfmsubXXXss-1.c (avx512f_test): Likewise. + * gcc.target/i386/avx512f-vfnmaddXXXsd-1.c (avx512f_test): Likewise. + * gcc.target/i386/avx512f-vfnmaddXXXss-1.c (avx512f_test): Likewise. + * gcc.target/i386/avx512f-vfnmsubXXXsd-1.c (avx512f_test): Likewise. + * gcc.target/i386/avx512f-vfnmsubXXXss-1.c (avx512f_test): Likewise. + * gcc.target/i386/avx512f-vfmaddXXXsd-2.c: New test. + * gcc.target/i386/avx512f-vfmaddXXXss-2.c: New test. + * gcc.target/i386/avx512f-vfmsubXXXsd-2.c: New test. + * gcc.target/i386/avx512f-vfmsubXXXss-2.c: New test. + * gcc.target/i386/avx512f-vfnmaddXXXsd-2.c: New test. + * gcc.target/i386/avx512f-vfnmaddXXXss-2.c: New test. + * gcc.target/i386/avx512f-vfnmsubXXXsd-2.c: New test. + * gcc.target/i386/avx512f-vfnmsubXXXss-2.c: New test. + +2019-03-22 Jakub Jelinek + + PR target/89784 + * gcc.target/i386/sse-13.c (__builtin_ia32_vfmaddsd3_mask, + __builtin_ia32_vfmaddsd3_mask3, __builtin_ia32_vfmaddsd3_maskz, + __builtin_ia32_vfmsubsd3_mask3, __builtin_ia32_vfmaddss3_mask, + __builtin_ia32_vfmaddss3_mask3, __builtin_ia32_vfmaddss3_maskz, + __builtin_ia32_vfmsubss3_mask3): Define. + * gcc.target/i386/sse-23.c (__builtin_ia32_vfmaddsd3_mask, + __builtin_ia32_vfmaddsd3_mask3, __builtin_ia32_vfmaddsd3_maskz, + __builtin_ia32_vfmsubsd3_mask3, __builtin_ia32_vfmaddss3_mask, + __builtin_ia32_vfmaddss3_mask3, __builtin_ia32_vfmaddss3_maskz, + __builtin_ia32_vfmsubss3_mask3): Define. + * gcc.target/i386/avx-1.c (__builtin_ia32_vfmaddsd3_mask, + __builtin_ia32_vfmaddsd3_mask3, __builtin_ia32_vfmaddsd3_maskz, + __builtin_ia32_vfmsubsd3_mask3, __builtin_ia32_vfmaddss3_mask, + __builtin_ia32_vfmaddss3_mask3, __builtin_ia32_vfmaddss3_maskz, + __builtin_ia32_vfmsubss3_mask3): Define. + * gcc.target/i386/sse-14.c: Add tests for + _mm_mask{,3,z}_f{,n}m{add,sub}_round_s{s,d} builtins. + * gcc.target/i386/sse-22.c: Likewise. + +2019-03-21 Martin Sebor + + PR tree-optimization/89350 + * gcc.dg/Warray-bounds-40.c: Remove an xfail. + * gcc.dg/Wstringop-overflow.c: Xfail overly ambitious tests. + * gcc.dg/Wstringop-overflow-11.c: New test. + * gcc.dg/Wstringop-overflow-12.c: New test. + * gcc.dg/pr89350.c: New test. + * gcc.dg/pr40340-1.c: Adjust expected warning. + * gcc.dg/pr40340-2.c: Same. + * gcc.dg/pr40340-4.c: Same. + * gcc.dg/pr40340-5.c: Same. + +2019-03-21 Jakub Jelinek + + PR lto/89692 + * g++.dg/other/pr89692.C: New test. + + PR c++/89767 + * g++.dg/cpp1y/lambda-init18.C: New test. + * g++.dg/cpp1y/lambda-init19.C: New test. + * g++.dg/cpp1y/pr89767.C: New test. + +2019-03-21 Thomas Schwinge + Cesar Philippidis + + PR fortran/72741 + * gfortran.dg/goacc/routine-external-level-of-parallelism-1.f: New + file. + * gfortran.dg/goacc/routine-external-level-of-parallelism-2.f: + Likewise. + +2019-03-21 Thomas Schwinge + + PR fortran/72741 + * c-c++-common/goacc/routine-3-extern.c: New file. + * c-c++-common/goacc/routine-3.c: Adjust. + * c-c++-common/goacc/routine-4-extern.c: New file. + * c-c++-common/goacc/routine-4.c: Adjust. + * gfortran.dg/goacc/routine-module-3.f90: New file. + + PR fortran/89773 + * gfortran.dg/goacc/pr89773.f90: New file. + * gfortran.dg/goacc/pr77765.f90: Adjust. + * gfortran.dg/goacc/routine-6.f90: Adjust, and extend. + + PR fortran/72741 + * gfortran.dg/goacc/routine-module-mod-1.f90: Update. + + PR fortran/72741 + * gfortran.dg/goacc/routine-module-1.f90: New file. + * gfortran.dg/goacc/routine-module-2.f90: Likewise. + * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise. + + * gfortran.dg/goacc/goacc.exp (dg-compile-aux-modules): New proc. + + PR fortran/56408 + * gcc.target/powerpc/ppc-fortran/ppc-fortran.exp + (dg-compile-aux-modules): Fix diagnostic. + * gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Likewise. + * gfortran.dg/dg.exp (dg-compile-aux-modules): Likewise. + + PR fortran/56408 + * gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Workaround + missing nexted dg-test call support in dejaGNU 1.4.4. + + PR fortran/29383 + * gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in + other '*.exp' files. + +2019-03-21 Richard Biener + + PR tree-optimization/89779 + * gcc.dg/torture/pr89779.c: New testcase. + +2019-03-21 Paolo Carlini + + PR c++/78645 + * g++.dg/cpp0x/constexpr-ice20.C: New. + +2019-03-21 Paolo Carlini + + PR c++/89571 + * g++.dg/cpp0x/noexcept37.C: New. + +2019-03-21 Iain Buclaw + + PR d/89017 + * gdc.dg/pr89017.d: New test. + +2019-03-20 Janus Weil + + PR fortran/71861 + * gfortran.dg/interface_abstract_5.f90: New test case. + +2019-03-20 Jakub Jelinek + + PR target/89775 + * gcc.target/s390/pr89775-1.c: New test. + * gcc.target/s390/pr89775-2.c: New test. + +2019-03-20 Jakub Jelinek + + PR target/89752 + * g++.target/aarch64/aarch64.exp: New file. + * g++.target/aarch64/pr89752.C: New test. + +2019-03-19 Martin Sebor + + PR tree-optimization/89688 + * gcc.dg/strlenopt-61.c: New test. + * g++.dg/warn/Wstringop-overflow-2.C: New test. + +2019-03-19 Jim Wilson + + PR target/89411 + * gcc.target/riscv/losum-overflow.c: New test. + +2019-03-19 Martin Sebor + + PR tree-optimization/89644 + * gcc.dg/Wstringop-truncation-8.c: New test. + +2019-03-19 Martin Liska + + PR middle-end/89737 + * gcc.dg/pr89737.c: New test. + +2019-03-19 Jan Hubicka + + PR lto/87809 + PR lto/89335 + * g++.dg/lto/pr87089_0.C: New testcase. + * g++.dg/lto/pr87089_1.C: New testcase. + * g++.dg/lto/pr89335_0.C: New testcase. + +2019-03-19 Kelvin Nilsen + + PR target/89736 + * gcc.target/powerpc/pr87532-mc.c: Modify dejagnu directives to + restrict this test to vsx targets. + +2019-03-19 Jakub Jelinek + + PR target/89752 + * g++.dg/ext/asm15.C: Check for particular diagnostic wording. + * g++.dg/ext/asm16.C: Likewise. + * g++.dg/ext/asm17.C: New test. + +2019-03-19 Eric Botcazou + + * c-c++-common/unroll-7.c: New test. + +2019-03-19 Jakub Jelinek + + PR target/89726 + * gcc.target/i386/fpprec-1.c (x): Add 6 new constants. + (expect_round, expect_rint, expect_floor, expect_ceil, expect_trunc): + Add expected results for them. + + PR c/89734 + * gcc.dg/pr89734.c: New test. + +2019-03-18 Martin Sebor + + PR tree-optimization/89720 + * gcc.dg/Warray-bounds-42.c: New test. + +2019-03-19 H.J. Lu + + PR c++/89630 + * g++.target/i386/pr89630.C: New test. + +2019-03-18 Kito Cheng + + * gcc.target/riscv/arch-1.c: Add quotes around march in dg-error. + +2019-03-18 Segher Boessenkool + + * gcc.target/powerpc/bswap16.c: Use a pointer instead of a global for + the "store" test as well. + * gcc.target/powerpc/bswap32.c: Ditto. + +2019-03-18 Segher Boessenkool + + * gcc.target/powerpc/bswap16.c: Use a pointer instead of a global for + the "store" test as well. + * gcc.target/powerpc/bswap32.c: Ditto. + +2019-03-18 Segher Boessenkool + + * gcc.target/powerpc/pr18096-1.c: Allow an error message that says + "exceeds" instead of just one that talks about "too large". + +2019-03-18 Richard Sandiford + + * gcc.target/aarch64/sve/cost_model_1.c: New test. + +2019-03-18 Martin Jambor + + PR tree-optimization/89546 + * gcc.dg/tree-ssa/pr89546.c: New test. + +2019-03-18 Andrew Burgess + + PR target/89627 + * g++.target/riscv/call-with-empty-struct-float.C: New file. + * g++.target/riscv/call-with-empty-struct-int.C: New file. + * g++.target/riscv/call-with-empty-struct.H: New file. + * g++.target/riscv/riscv.exp: New file. + +2019-03-18 Paolo Carlini + + PR c++/85014 + * g++.dg/cpp0x/pr85014.C: New. + +2019-03-18 Jakub Jelinek + + PR middle-end/86979 + * gcc.dg/pr86979.c: New test. + +2019-03-17 Thomas Koenig + + PR fortran/88008 + * gfortran.dg/typebound_call_31.f90: New test. + +2019-03-03-17 John David Anglin + + * gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on + hppa*-*-hpux*. + * gcc.dg/compat/pr83487-1_y.c: Likewise. + + * gfortran.dg/pointer_init_10.f90: Require visibility support. + * gfortran.dg/temporary_3.f90: Likewise. + + * gcc.dg/pr88074.c: Require c99_runtime. + * gcc.dg/warn-abs-1.c: Likewise. + * gfortran.dg/ISO_Fortran_binding_1.f90: Likewise. + + PR testsuite/89666 + * c-c++-common/builtin-has-attribute-3.c: Define SKIP_ALIAS on + hppa*-*-hpux*. + * gcc.dg/attr-copy.c: Require alias support. + * gcc.dg/ipa/ipa-icf-39.c: Likewise. + +2019-03-16 Jakub Jelinek + + PR fortran/89724 + * gfortran.dg/continuation_15.f90: New test. + * gfortran.dg/continuation_16.f90: New test. + +2019-03-16 John David Anglin + + * g++.dg/cpp0x/pr84497.C: Restore dg-require-weak. + + PR testsuite/89393 + * g++.dg/abi/ref-temp1.C: Skip on 32-bit hppa*-*-hpux*. + * g++.dg/cpp0x/pr84497.C: Likewise. + + * c-c++-common/builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*. + * gcc.dg/attr-copy-6.c: Likewise. + * gcc.dg/pr87793.c: Likewise. + + PR testsuite/89471 + * gcc.dg/pr84941.c: Skip on hppa*-*-*. + + * gcc.dg/Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*. + * gcc.dg/gimplefe-34.c: Likewise. + * gcc.dg/compat/pr83487-2_x.c: Use -fno-common option on hppa*-*-hpux*. + * gcc.dg/compat/pr83487-2_y.c: Likewise. + + PR testsuite/84174 + * gcc.dg/Wattributes-6.c: Skip warning check at line 404 on + hppa*64*-*-*. + + PR testsuite/83453 + * c-c++-common/Wattributes.c: Skip a warning check on hppa*64*-*-*. + + * lib/target-supports.exp (check_ascii_locale_available): Remove + hppa*-*-hpux*. + +2019-03-16 Thomas Koenig + + PR fortran/84394 + * gfortran.dg/blockdata_11.f90: New test. + +2019-03-15 Harald Anlauf + + PR fortran/60091 + * gfortran.dg/pointer_remapping_3.f08: Adjust error messages. + * gfortran.dg/pointer_remapping_7.f90: Adjust error message. + +2019-03-15 Kelvin Nilsen + + PR target/87532 + * gcc.target/powerpc/fold-vec-extract-char.p8.c: Modify expected + instruction selection. + * gcc.target/powerpc/fold-vec-extract-int.p8.c: Likewise. + * gcc.target/powerpc/fold-vec-extract-short.p8.c: Likewise. + * gcc.target/powerpc/pr87532-mc.c: New test. + * gcc.target/powerpc/pr87532.c: New test. + * gcc.target/powerpc/vec-extract-v16qiu-v2.h: New test. + * gcc.target/powerpc/vec-extract-v16qiu-v2a.c: New test. + * gcc.target/powerpc/vec-extract-v16qiu-v2b.c: New test. + * gcc.target/powerpc/vsx-builtin-10a.c: New test. + * gcc.target/powerpc/vsx-builtin-10b.c: New test. + * gcc.target/powerpc/vsx-builtin-11a.c: New test. + * gcc.target/powerpc/vsx-builtin-11b.c: New test. + * gcc.target/powerpc/vsx-builtin-12a.c: New test. + * gcc.target/powerpc/vsx-builtin-12b.c: New test. + * gcc.target/powerpc/vsx-builtin-13a.c: New test. + * gcc.target/powerpc/vsx-builtin-13b.c: New test. + * gcc.target/powerpc/vsx-builtin-14a.c: New test. + * gcc.target/powerpc/vsx-builtin-14b.c: New test. + * gcc.target/powerpc/vsx-builtin-15a.c: New test. + * gcc.target/powerpc/vsx-builtin-15b.c: New test. + * gcc.target/powerpc/vsx-builtin-16a.c: New test. + * gcc.target/powerpc/vsx-builtin-16b.c: New test. + * gcc.target/powerpc/vsx-builtin-17a.c: New test. + * gcc.target/powerpc/vsx-builtin-17b.c: New test. + * gcc.target/powerpc/vsx-builtin-18a.c: New test. + * gcc.target/powerpc/vsx-builtin-18b.c: New test. + * gcc.target/powerpc/vsx-builtin-19a.c: New test. + * gcc.target/powerpc/vsx-builtin-19b.c: New test. + * gcc.target/powerpc/vsx-builtin-20a.c: New test. + * gcc.target/powerpc/vsx-builtin-20b.c: New test. + * gcc.target/powerpc/vsx-builtin-9a.c: New test. + * gcc.target/powerpc/vsx-builtin-9b.c: New test. + +2019-03-15 Alexandre Oliva + + PR c++/88534 + PR c++/88537 + * g++.dg/cpp2a/pr88534.C: New. + * g++.dg/cpp2a/pr88537.C: New. + +2019-03-15 Robin Dapp + + * gcc.target/s390/target-attribute/tattr-1.c (htm0): -mhtm -> '-mhtm'. + * gcc.target/s390/target-attribute/tattr-2.c: Likewise. + * gcc.target/s390/target-attribute/tattr-3.c (vx0): -mvx -> '-mvx'. + * gcc.target/s390/target-attribute/tattr-4.c: Likewise. + +2019-03-15 Kyrylo Tkachov + + PR target/89719 + * gcc.target/aarch64/spellcheck_4.c: Adjust dg-error string. + * gcc.target/aarch64/spellcheck_5.c: Likewise. + * gcc.target/aarch64/spellcheck_6.c: Likewise. + +2019-03-15 Jakub Jelinek + + PR c++/89709 + * g++.dg/cpp0x/constexpr-89709.C: New test. + + PR debug/89704 + * gcc.dg/debug/pr89704.c: New test. + +2019-03-15 H.J. Lu + + PR target/89650 + * g++.target/i386/pr89650.C: New test. + +2019-03-14 Richard Biener + + * gcc.dg/gimplefe-13.c: Adjust. + * gcc.dg/gimplefe-14.c: Likewise. + * gcc.dg/gimplefe-17.c: Likewise. + * gcc.dg/gimplefe-18.c: Likewise. + * gcc.dg/gimplefe-7.c: Likewise. + * gcc.dg/torture/pr89595.c: Likewise. + * gcc.dg/tree-ssa/cunroll-13.c: Likewise. + * gcc.dg/tree-ssa/ivopt_mult_1g.c: Likewise. + * gcc.dg/tree-ssa/ivopt_mult_2g.c: Likewise. + * gcc.dg/tree-ssa/scev-3.c: Likewise. + * gcc.dg/tree-ssa/scev-4.c: Likewise. + * gcc.dg/tree-ssa/scev-5.c: Likewise. + * gcc.dg/vect/vect-cond-arith-2.c: Likewise. + * gcc.target/aarch64/sve/loop_add_6.c: Likewise. + +2019-03-14 Jakub Jelinek + + PR ipa/89684 + * gcc.target/i386/pr89684.c: New test. + + PR rtl-optimization/89679 + * gcc.dg/pr89679.c: New test. + +2019-03-14 Richard Biener + + PR tree-optimization/89710 + * gcc.dg/torture/pr89710.c: New testcase. + +2019-03-14 Richard Biener + + PR middle-end/89698 + * g++.dg/torture/pr89698.C: New testcase. + +2019-03-14 Jakub Jelinek + + PR tree-optimization/89703 + * gcc.c-torture/compile/pr89703-1.c: New test. + * gcc.c-torture/compile/pr89703-2.c: New test. + +2019-03-14 H.J. Lu + + PR target/89523 + * gcc.target/i386/pr89523-1a.c: New test. + * gcc.target/i386/pr89523-1b.c: Likewise. + * gcc.target/i386/pr89523-2.c: Likewise. + * gcc.target/i386/pr89523-3.c: Likewise. + * gcc.target/i386/pr89523-4.c: Likewise. + * gcc.target/i386/pr89523-5.c: Likewise. + * gcc.target/i386/pr89523-6.c: Likewise. + * gcc.target/i386/pr89523-7.c: Likewise. + * gcc.target/i386/pr89523-8.c: Likewise. + * gcc.target/i386/pr89523-9.c: Likewise. + +2019-03-14 Jakub Jelinek + + PR c++/89512 + * g++.dg/cpp1y/var-templ61.C: New test. + + PR c++/89652 + * g++.dg/cpp1y/constexpr-89652.C: New test. + +2019-03-13 Harald Anlauf + + PR fortran/87045 + * gfortran.dg/pr87045.f90: New test. + +2019-03-13 Vladimir Makarov + + PR target/85860 + * gcc.target/i386/pr85860.c: New. + +2019-03-13 Marek Polacek + + PR c++/89686 - mixing init-capture and simple-capture in lambda. + * g++.dg/cpp2a/lambda-pack-init2.C: New test. + + PR c++/89660 - bogus error with -Wredundant-move. + * g++.dg/cpp0x/Wredundant-move8.C: New test. + * g++.dg/cpp0x/Wredundant-move9.C: New test. + +2019-03-13 Janus Weil + + PR fortran/89601 + * gfortran.dg/pdt_16.f03: Modified to avoid follow-up errors. + * gfortran.dg/pdt_30.f90: New test case. + +2019-03-13 Marek Polacek + + PR c++/88979 - further P0634 fix for constructors. + * g++.dg/cpp2a/typename15.C: New test. + +2019-03-13 Martin Sebor + + PR tree-optimization/89662 + * gcc.dg/Warray-bounds-41.c: New test. + +2019-03-13 Paolo Carlini + + PR c++/63508 + * g++.dg/cpp0x/auto53.C: New. + +2019-03-13 Richard Biener + + PR middle-end/89677 + * gcc.dg/torture/pr89677.c: New testcase. + +2019-03-13 Paolo Carlini + + PR c++/85558 + * g++.dg/other/friend16.C: New. + * g++.dg/other/friend17.C: Likewise. + +2019-03-13 Jakub Jelinek + + PR middle-end/88588 + * c-c++-common/gomp/pr88588.c: New test. + +2019-03-13 Thomas Koenig + + PR fortran/66695 + PR fortran/77746 + PR fortran/79485 + * gfortran.dg/binding_label_tests_30.f90: New test. + * gfortran.dg/binding_label_tests_31.f90: New test. + * gfortran.dg/binding_label_tests_32.f90: New test. + * gfortran.dg/binding_label_tests_33.f90: New test. + +2019-03-13 Iain Buclaw + + * gdc.dg/pr88957.d: Move to gdc.dg/ubsan. + * gdc.dg/ubsan/ubsan.exp: New file. + * lib/gdc.exp (gdc_include_flags): Remove unused target variable. + Explicitly return flags from procedure. + +2019-03-13 Iain Buclaw + + PR d/88957 + * gdc.dg/pr88957.d: New test. + * gdc.dg/simd.d: Add new vector tests. + +2019-03-12 Uroš Bizjak + + PR d/87824 + * lib/gdc.exp (gdc_include_flags): Find C++ headers by calling + libstdc++v3/scripts/testsuite_flags. Filter out unsupported + -nostdinc++ flag. + +2019-03-12 Thomas Koenig + + PR fortran/87673 + * gfortran.dg/charlen_17.f90: New test. + +2019-03-12 Robin Dapp + + * gcc.target/s390/memset-1.c: Adapt test case for new scheduling. + +2019-03-12 Martin Liska + + * gfortran.dg/abstract_type_3.f03: Amend test-case scan patterns. + * gfortran.dg/binding_label_tests_4.f03: Likewise. + * gfortran.dg/c_f_pointer_tests_6.f90: Likewise. + * gfortran.dg/c_funloc_tests_6.f90: Likewise. + * gfortran.dg/c_loc_tests_17.f90: Likewise. + * gfortran.dg/constructor_9.f90: Likewise. + * gfortran.dg/dec_structure_8.f90: Likewise. + * gfortran.dg/entry_4.f90: Likewise. + * gfortran.dg/init_char_with_nonchar_ctr.f90: Likewise. + * gfortran.dg/initialization_23.f90: Likewise. + * gfortran.dg/logical_assignment_1.f90: Likewise. + * gfortran.dg/pr80752.f90: Likewise. + * gfortran.dg/pr88116_1.f90: Likewise. + * gfortran.dg/pr88467.f90: Likewise. + * gfortran.dg/typebound_call_7.f03: Likewise. + * gfortran.dg/typebound_generic_1.f03: Likewise. + * gfortran.dg/typebound_operator_2.f03: Likewise. + * gfortran.dg/typebound_operator_4.f03: Likewise. + * gfortran.dg/typebound_proc_9.f03: Likewise. + * gfortran.dg/unlimited_polymorphic_2.f03: Likewise. + +2019-03-12 Paul Thomas + + PR fortran/89363 + * gfortran.dg/assumed_rank_16.f90: New test. + + PR fortran/89364 + * gfortran.dg/assumed_rank_17.f90: New test. + +2019-03-12 Jakub Jelinek + + PR middle-end/89663 + * gcc.c-torture/compile/pr89663-1.c: New test. + * gcc.c-torture/compile/pr89663-2.c: New test. + +2019-03-12 Richard Biener + + PR tree-optimization/89664 + * gfortran.dg/pr89664.f90: New testcase. + +2019-03-11 Jakub Jelinek + + PR fortran/89651 + * gfortran.dg/gomp/pr89651.f90: New test. + + PR middle-end/89655 + PR bootstrap/89656 + * gcc.c-torture/compile/pr89655.c: New test. + +2019-03-11 Christophe Lyon + + * gcc.target/arm/f16_f64_conv_no_dp.c: Add arm_fp16_ok effective + target. + +2019-03-11 Martin Liska + + * g++.dg/conversion/simd3.C (foo): Wrap option names + with apostrophe character. + * g++.dg/cpp1z/decomp3.C (test): Likewise. + (test3): Likewise. + * g++.dg/cpp1z/decomp4.C (test): Likewise. + * g++.dg/cpp1z/decomp44.C (foo): Likewise. + * g++.dg/cpp1z/decomp45.C (f): Likewise. + * g++.dg/opt/pr34036.C: Likewise. + * g++.dg/spellcheck-c++-11-keyword.C: Likewise. + * gcc.dg/c90-fordecl-1.c (foo): Likewise. + * gcc.dg/cpp/dir-only-4.c: Likewise. + * gcc.dg/cpp/dir-only-5.c: Likewise. + * gcc.dg/cpp/pr71591.c: Likewise. + * gcc.dg/format/opt-1.c: Likewise. + * gcc.dg/format/opt-2.c: Likewise. + * gcc.dg/format/opt-3.c: Likewise. + * gcc.dg/format/opt-4.c: Likewise. + * gcc.dg/format/opt-5.c: Likewise. + * gcc.dg/format/opt-6.c: Likewise. + * gcc.dg/pr22231.c: Likewise. + * gcc.dg/pr33007.c: Likewise. + * gcc.dg/simd-1.c (hanneke): Likewise. + * gcc.dg/simd-5.c: Likewise. + * gcc.dg/simd-6.c: Likewise. + * gcc.dg/spellcheck-options-14.c: Likewise. + * gcc.dg/spellcheck-options-15.c: Likewise. + * gcc.dg/spellcheck-options-16.c: Likewise. + * gcc.dg/spellcheck-options-17.c: Likewise. + * gcc.dg/tree-ssa/pr23109.c: Likewise. + * gcc.dg/tree-ssa/recip-5.c: Likewise. + * gcc.target/i386/cet-notrack-1a.c (func): Likewise. + (__attribute__): Likewise. + * gcc.target/i386/cet-notrack-icf-1.c (fn3): Likewise. + * gcc.target/i386/cet-notrack-icf-3.c (__attribute__): Likewise. + * gcc.target/powerpc/warn-1.c: Likewise. + * gcc.target/powerpc/warn-2.c: Likewise. + +2019-03-11 Andreas Krebbel + + * gcc.target/s390/zvector/vec-addc-u128.c: New test. + +2019-03-11 Eric Botcazou + + * c-c++-common/unroll-6.c: New test. + +2019-03-11 Paolo Carlini + + PR c++/87571 + * g++.dg/template/memfriend18.C: New. + +2019-03-10 Rainer Orth + + * gdc.dg/pr89041.d: Mark as compile test. + +2019-03-10 Rainer Orth + + * gcc.target/i386/indirect-thunk-extern-7.c: Add -fjump-tables to + dg-options. + +2019-03-10 Martin Jambor + + PR tree-optimization/85762 + PR tree-optimization/87008 + PR tree-optimization/85459 + * g++.dg/tree-ssa/pr87008.C: New test. + * gcc.dg/guality/pr54970.c: Xfail tests querying a[0] everywhere. + +2019-03-10 Thomas Koenig + + PR fortran/66089 + * gfortran.dg/assumed_type_2.f90: Adapted tree dumps. + * gfortran.dg/no_arg_check_2.f90: Likewise. + +2019-03-10 Jakub Jelinek + + PR c++/89648 + * g++.dg/cpp0x/lambda/lambda-89648.C: New test. + +2019-03-10 Thomas Koenig + + PR fortran/66089 + * gfortran.dg/dependency_53.f90: New test. + +2019-03-10 Thomas Koenig + + PR fortran/87734 + * gfortran.dg/public_private_module_10.f90: New test. + +2019-03-09 John David Anglin + + PR c++/70349 + * g++.dg/abi/abi-tag18a.C: Skip on 32-bit hppa*-*-hpux*. + + PR middle-end/68733 + * c-c++-common/gomp/clauses-2.c: Skip on 32-bit hppa*-*-hpux*. + + PR testsuite/89472 + * gcc.dg/debug/dwarf2/inline5.c: XFAIL one scan-assembler-times check. + +2019-03-09 Paolo Carlini + + PR c++/87750 + * g++.dg/cpp0x/pr87750.C: New. + +2019-03-09 John David Anglin + + * c-c++-common/ident-0b.c: Also skip on 32-bit hppa*-*-hpux*. + * c-c++-common/ident-1a.c: Likewise. + * c-c++-common/ident-1b.c: Likewise. + * c-c++-common/ident-2b.c: Likewise. + + * g++.dg/tls/pr77285-2.C: Require tls_native support. + + * g++.dg/ext/visibility/lambda1.C: Require visibility. + + PR inline-asm/87010 + * gcc.dg/torture/20180712-1.c: Skip on hppa*-*-*. + + * gfortran.dg/coarray_data_1.f90: Link against libatomic if target + libatomic_available. + +2019-03-09 Iain Buclaw + + PR d/89041 + * gdc.dg/pr89041.d: New test. + +2019-03-09 Thomas Koenig + + PR fortran/71544 + * gfortran.dg/c_ptr_tests_19.f90: New test. + +2019-03-09 John David Anglin + + * gnat.dg/debug11.adb: Skip on 32-bit hppa*-*-hpux*. + * gnat.dg/debug12.adb: Likewise. + + * lib/target-supports.exp (check_effective_target_weak_undefined): + Return 0 on hppa*-*-hpux*. + (check_ascii_locale_available): Likewise. + +2019-03-09 Janus Weil + + PR fortran/84504 + * gfortran.dg/pointer_init_10.f90: New test case. + +2019-03-09 John David Anglin + + * gfortran.dg/ieee/ieee_9.f90: Fix typo. + +2019-03-09 John David Anglin + + PR fortran/89639 + * gfortran.dg/ieee/ieee_9.f90: Skip on hppa*-*-linux*. + +2019-03-09 Thomas König + + PR fortran/71203 + * gfortran.dg/array_simplify_3.f90: New test case. + +2019-03-09 Jakub Jelinek + + PR c/88568 + * g++.dg/other/pr88568.C: New test. + + PR rtl-optimization/89634 + * gcc.c-torture/execute/pr89634.c: New test. + +2019-03-08 Jakub Jelinek + + PR c/85870 + * gcc.dg/lto/pr85870_0.c: Add dg-extra-ld-options with + -r -nostdlib -flinker-output=nolto-rel. + +2019-03-08 David Malcolm + + PR target/79926 + * gcc.target/i386/interrupt-387-err-1.c: Update expected message. + * gcc.target/i386/interrupt-387-err-2.c: Likewise. + * gcc.target/i386/interrupt-mmx-err-1.c: Likewise. + * gcc.target/i386/interrupt-mmx-err-2.c: Likewise. + +2019-03-08 Paolo Carlini + + PR c++/63540 + * g++.dg/cpp0x/implicit17.C: New. + +2019-03-08 Paolo Carlini + + PR c++/22149 + * g++.dg/template/access29.C: New. + +2019-03-08 Jakub Jelinek + + PR c++/82075 + * g++.dg/cpp1z/decomp49.C: New test. + +2019-03-08 Andre Vieira + + * gcc.target/arm/f16_f64_conv_no_dp.c: New test. + +2019-03-08 Uroš Bizjak + + PR target/68924 + PR target/78782 + PR target/87558 + * gcc.target/i386/pr78782.c: New test. + * gcc.target/i386/pr87558.c: Ditto. + +2019-03-08 Jakub Jelinek + + PR c/85870 + * gcc.dg/lto/pr85870_0.c: New test. + * gcc.dg/lto/pr85870_1.c: New test. + +2019-03-08 Martin Liska + + PR target/86952 + * gcc.target/i386/pr86952.c: New test. + * gcc.target/i386/indirect-thunk-7.c: Use jump tables to match + scanned pattern. + * gcc.target/i386/indirect-thunk-inline-7.c: Likewise. + +2019-03-08 Jakub Jelinek + + PR c++/89585 + * g++.dg/asm-qual-3.C: Adjust expected diagnostics for toplevel + asm volatile. + + PR c++/89599 + * g++.dg/ubsan/vptr-4.C: Adjust expected diagnostics. + * g++.dg/parse/array-size2.C: Likewise. + * g++.dg/cpp0x/constexpr-89599.C: New test. + + PR c++/89622 + * g++.dg/warn/pr89622.C: New test. + +2019-03-07 Jakub Jelinek + + PR target/80003 + * gcc.target/i386/pr68657.c: Adjust expected diagnostics wording. + * gcc.target/i386/interrupt-6.c: Likewise. + * g++.target/i386/pr57362.C: Adjust capitalization in dg-prune-output. + +2019-03-07 Paolo Carlini + + PR c++/84518 + * g++.dg/cpp0x/lambda/lambda-ice30.C: New. + * g++.dg/cpp0x/lambda/lambda-ice31.C: Likewise. + +2019-03-07 Jakub Jelinek + + PR translation/79999 + * c-c++-common/gomp/doacross-1.c: Adjust expected diagnostics. + * c-c++-common/gomp/doacross-3.c: New test. + + PR target/89602 + * gcc.target/i386/avx512f-vmovss-1.c: New test. + * gcc.target/i386/avx512f-vmovss-2.c: New test. + * gcc.target/i386/avx512f-vmovss-3.c: New test. + * gcc.target/i386/avx512f-vmovsd-1.c: New test. + * gcc.target/i386/avx512f-vmovsd-2.c: New test. + * gcc.target/i386/avx512f-vmovsd-3.c: New test. + +2019-03-07 Martin Jambor + + PR lto/87525 + * gcc.dg/ipa/ipcp-5.c: New test. + +2019-03-07 Martin Jambor + + PR ipa/88235 + * g++.dg/ipa/pr88235.C: New test. + +2019-04-07 Richard Biener + + PR middle-end/89618 + * gcc.target/i386/pr89618.c: New testcase. + +2019-03-07 Richard Biener + + PR tree-optimization/89595 + * gcc.dg/torture/pr89595.c: New testcase. + +2019-03-07 Jakub Jelinek + + PR c++/89585 + * g++.dg/asm-qual-3.C: Adjust expected diagnostics. + +2019-03-06 Harald Anlauf + + PR fortran/71203 + * gfortran.dg/substr_8.f90: New test. + +2019-03-06 Jakub Jelinek + + PR c++/87148 + * g++.dg/ext/flexary34.C: New test. + +2019-03-06 Peter Bergner + + PR rtl-optimization/88845 + * gcc.target/powerpc/pr88845.c: New test. + +2019-03-06 Marek Polacek + + PR c++/87378 - bogus -Wredundant-move warning. + * g++.dg/cpp0x/Wredundant-move1.C (fn4): Drop dg-warning. + * g++.dg/cpp0x/Wredundant-move7.C: New test. + +2019-03-06 Richard Biener + + PR testsuite/89551 + * gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit + the way that makes the testcase PASS. + +2019-03-05 Jakub Jelinek + + PR middle-end/89590 + * gcc.dg/pr89590.c: New test. + +2019-03-05 Wilco Dijkstra + + PR target/89222 + * gcc.target/arm/pr89222.c: Add new test. + +2019-03-05 Richard Biener + + PR tree-optimization/89594 + * gcc.dg/pr89594.c: New testcase. + +2019-03-05 Jakub Jelinek + + PR tree-optimization/89487 + * gcc.dg/tree-ssa/pr89487.c: Include ../pr87600.h. + (caml_interprete): Ifdef the whole body out if REG1 or REG2 macros + aren't defined. Use REG1 instead of "%r15" and REG2 instead of + "%r14". + + PR bootstrap/89560 + * g++.dg/other/pr89560.C: New test. + + PR tree-optimization/89570 + * gcc.dg/pr89570.c: New test. + + PR tree-optimization/89566 + * c-c++-common/pr89566.c: New test. + +2019-03-04 Paolo Carlini + + PR c++/84605 + * g++.dg/parse/crash69.C: New. + +2019-03-04 Jakub Jelinek + + PR c++/71446 + * g++.dg/cpp2a/desig12.C: New test. + * g++.dg/cpp2a/desig13.C: New test. + +2019-03-04 Tamar Christina + + PR target/88530 + * gcc.target/aarch64/options_set_10.c: Add native. + +2019-03-04 Wilco Dijkstra + + PR tree-optimization/89437 + * gcc.dg/sinatan-1.c: Fix testcase. + +2019-03-04 Richard Biener + + PR middle-end/89572 + * gcc.dg/torture/pr89572.c: New testcase. + +2018-03-04 Bin Cheng + + PR tree-optimization/89487 + * gcc.dg/tree-ssa/pr89487.c: New test. + +2019-03-03 Harald Anlauf + + PR fortran/77583 + * gfortran.dg/pr77583.f90: New test. + +2019-03-03 Thomas Koenig + + PR fortran/72714 + * gfortran.dg/coarray_allocate_11.f90: New test. + +2019-03-02 Harald Anlauf + + PR fortran/89516 + * gfortran.dg/pr89492.f90: Adjust testcase. + * gfortran.dg/transfer_check_5.f90: New test. + +2019-03-02 Jakub Jelinek + + PR c++/71446 + * g++.dg/cpp2a/desig10.C: New test. + * g++.dg/cpp2a/desig11.C: New test. + * g++.dg/ext/desig4.C: Expect 4 new errors. + + PR target/89506 + * gcc.dg/pr89506.c: New test. + +2019-03-01 Kito Cheng + Monk Chiang + + * gcc.target/riscv/attribute-1.c: New. + * gcc.target/riscv/attribute-2.c: Likewise. + * gcc.target/riscv/attribute-3.c: Likewise. + * gcc.target/riscv/attribute-4.c: Likewise. + * gcc.target/riscv/attribute-5.c: Likewise. + * gcc.target/riscv/attribute-6.c: Likewise. + * gcc.target/riscv/attribute-7.c: Likewise. + * gcc.target/riscv/attribute-8.c: Likewise. + * gcc.target/riscv/attribute-9.c: Likewise. + + * gcc.target/riscv/arch-1.c: New. + * gcc.target/riscv/arch-2.c: Likewise. + * gcc.target/riscv/arch-3.c: Likewise. + * gcc.target/riscv/arch-4.c: Likewise. + +2019-03-01 Jakub Jelinek + + PR middle-end/89497 + * g++.dg/tree-prof/devirt.C: Adjust also the ilp32 + scan-tree-dump-times from dom3 to tracer pass. + +2019-03-01 Segher Boessenkool + + * gcc.target/powerpc/ throughout: Delete dg-skip-if "do not override + -mcpu". Use -mdejagnu-cpu= in dg-options instead of -mcpu=. + +2019-03-01 Alexander Monakov + + PR rtl-optimization/85899 + * gcc.dg/pr85899.c: New test. + +2019-03-01 Marek Polacek + + PR c++/89537 - missing location for error with non-static member fn. + * g++.dg/diagnostic/member-fn-1.C: New test. + + PR c++/89532 - ICE with incomplete type in decltype. + * g++.dg/cpp2a/nontype-class14.C: New test. + +2019-03-01 Jakub Jelinek + + Implement P1002R1, Try-catch blocks in constexpr functions + PR c++/89513 + * g++.dg/cpp2a/constexpr-try1.C: New test. + * g++.dg/cpp2a/constexpr-try2.C: New test. + * g++.dg/cpp2a/constexpr-try3.C: New test. + * g++.dg/cpp2a/constexpr-try4.C: New test. + * g++.dg/cpp2a/constexpr-try5.C: New test. + * g++.dg/cpp0x/constexpr-ctor10.C: Don't expect error for C++2a. + +2019-03-01 Richard Sandiford + + PR tree-optimization/89535 + * gfortran.dg/vect/pr89535.f90: New test. + +2019-03-01 Richard Biener + + PR middle-end/89541 + * gfortran.dg/pr89451.f90: New testcase. + +2019-03-01 Richard Biener + + PR middle-end/89497 + * gcc.dg/tree-ssa/reassoc-43.c: Avoid false match in regex. + * g++.dg/tree-prof/devirt.C: Scan tracer dump for foldings + that happen now earlier. + +2019-02-28 Eric Botcazou + + * gcc.c-torture/execute/20190228-1.c: New test. + +2019-02-28 Marek Polacek + + PR c++/87068 - missing diagnostic with fallthrough statement. + * c-c++-common/Wimplicit-fallthrough-37.c: New test. + +2019-02-28 Thomas Schwinge + Cesar Philippidis + + PR fortran/72741 + PR fortran/89433 + * gfortran.dg/goacc/routine-multiple-directives-1.f90: New file. + * gfortran.dg/goacc/routine-multiple-directives-2.f90: Likewise. + + PR fortran/72741 + * gfortran.dg/goacc/routine-multiple-lop-clauses-1.f90: New file. + + PR fortran/72741 + PR fortran/89433 + * gfortran.dg/goacc/routine-6.f90: Update + * gfortran.dg/goacc/routine-intrinsic-1.f: New file. + * gfortran.dg/goacc/routine-intrinsic-2.f: Likewise. + +2019-02-28 Jakub Jelinek + + PR c/89521 + * gcc.dg/pr89521-1.c: New test. + * gcc.dg/pr89521-2.c: New test. + +2019-02-28 John David Anglin + + PR testsuite/89441 + * g++.dg/ipa/pr89009.C: Update symbol visibility. + +2019-02-28 Tamar Christina + + PR target/88530 + * gcc.target/aarch64/options_set_10.c: New test. + +2019-02-28 Paolo Carlini + + PR c++/89522 + * g++.dg/cpp1y/lambda-generic-ice10.C: New. + +2019-02-28 Jakub Jelinek + + PR c/89525 + * gcc.dg/pr89525.c: New test. + + PR c/89520 + * gcc.dg/pr89520-1.c: New test. + * gcc.dg/pr89520-2.c: New test. + +2019-02-27 Marek Polacek + + PR c++/88857 - ICE with value-initialization of argument in template. + * g++.dg/cpp0x/initlist-value4.C: New test. + +2019-02-27 Marek Polacek + + PR c++/89511 - ICE with using-declaration and unscoped enumerator. + * g++.dg/cpp0x/using-enum-3.C: New test. + +2019-02-27 Jakub Jelinek + + PR tree-optimization/89280 + * gcc.dg/torture/pr57147-2.c (SetNaClSwitchExpectations): Add static + keyword. + +2019-02-27 Richard Biener + + * gcc.dg/gimplefe-36.c: New testcase. + +2019-02-27 Paolo Carlini + + PR c++/89488 + * g++.dg/cpp0x/nsdmi15.C: New. + +2019-02-27 Paolo Carlini + + PR c++/88987 + * g++.dg/cpp0x/pr88987.C: New. + +2019-02-27 Jakub Jelinek + + PR tree-optimization/89280 + * gcc.c-torture/compile/pr89280.c: New test. + * gcc.dg/torture/pr57147-2.c: Don't expect a setjmp after noreturn + function. Skip the test for -O0. + +2018-02-26 Steve Ellcey + + * gfortran.dg/simd-builtins-1.f90: Update for aarch64*-*-*. + * gfortran.dg/simd-builtins-2.f90: Ditto. + * gfortran.dg/simd-builtins-6.f90: Ditto. + * gfortran.dg/simd-builtins-8.f90: New test. + * gfortran.dg/simd-builtins-8.h: New header file. + +2019-02-26 Jakub Jelinek + + PR c++/89507 + * g++.dg/other/new2.C: New test. + + PR tree-optimization/89500 + * gcc.dg/pr89500.c: New test. + * gcc.dg/Wstringop-overflow-10.c: New test. + * gcc.dg/strlenopt-60.c: New test. + +2019-02-26 Harald Anlauf + + PR fortran/89492 + * gfortran.dg/pr89492.f90: New test. + +2019-02-26 Thomas Koenig + + PR fortran/89496 + * gfortran.dg/altreturn_9_0.f90: New file. + * gfortran.dg/altreturn_9_1.f90: New file. + +2019-02-26 Jakub Jelinek + + PR c++/89481 + * g++.dg/cpp1y/constexpr-89481.C: New test. + +2019-02-26 Richard Biener + + PR tree-optimization/89505 + * gcc.dg/torture/pr89505.c: New testcase. + +2019-02-26 Eric Botcazou + + * gnat.dg/opt77.adb: New test. + * gnat.dg/opt77_pkg.ad[sb]: New helper. + +2019-02-26 Jakub Jelinek + + PR target/89474 + * gcc.target/i386/pr89474.c: New test. + +2019-02-25 Jakub Jelinek + + PR c/77754 + * gcc.c-torture/compile/pr77754-1.c: New test. + * gcc.c-torture/compile/pr77754-2.c: New test. + * gcc.c-torture/compile/pr77754-3.c: New test. + * gcc.c-torture/compile/pr77754-4.c: New test. + * gcc.c-torture/compile/pr77754-5.c: New test. + * gcc.c-torture/compile/pr77754-6.c: New test. + +2019-02-25 Tamar Christina + + PR target/88530 + * gcc.target/aarch64/options_set_1.c: New test. + * gcc.target/aarch64/options_set_2.c: New test. + * gcc.target/aarch64/options_set_3.c: New test. + * gcc.target/aarch64/options_set_4.c: New test. + * gcc.target/aarch64/options_set_5.c: New test. + * gcc.target/aarch64/options_set_6.c: New test. + * gcc.target/aarch64/options_set_7.c: New test. + * gcc.target/aarch64/options_set_8.c: New test. + * gcc.target/aarch64/options_set_9.c: New test. + +2019-02-25 Tamar Christina + + * gcc.target/arm/simd/fp16fml_high.c (test_vfmlal_high_u32, + test_vfmlalq_high_u32, test_vfmlsl_high_u32, test_vfmlslq_high_u32): + Rename .... + (test_vfmlal_high_f16, test_vfmlalq_high_f16, test_vfmlsl_high_f16, + test_vfmlslq_high_f16): ... To this. + * gcc.target/arm/simd/fp16fml_lane_high.c (test_vfmlal_lane_high_u32, + tets_vfmlsl_lane_high_u32, test_vfmlal_laneq_high_u32, + test_vfmlsl_laneq_high_u32, test_vfmlalq_lane_high_u32, + test_vfmlslq_lane_high_u32, test_vfmlalq_laneq_high_u32, + test_vfmlslq_laneq_high_u32): Rename ... + (test_vfmlal_lane_high_f16, tets_vfmlsl_lane_high_f16, + test_vfmlal_laneq_high_f16, test_vfmlsl_laneq_high_f16, + test_vfmlalq_lane_high_f16, test_vfmlslq_lane_high_f16, + test_vfmlalq_laneq_high_f16, test_vfmlslq_laneq_high_f16): ... To this. + * gcc.target/arm/simd/fp16fml_lane_low.c (test_vfmlal_lane_low_u32, + test_vfmlsl_lane_low_u32, test_vfmlal_laneq_low_u32, + test_vfmlsl_laneq_low_u32, test_vfmlalq_lane_low_u32, + test_vfmlslq_lane_low_u32, test_vfmlalq_laneq_low_u32, + test_vfmlslq_laneq_low_u32): Rename ... + (test_vfmlal_lane_low_f16, test_vfmlsl_lane_low_f16, + test_vfmlal_laneq_low_f16, test_vfmlsl_laneq_low_f16, + test_vfmlalq_lane_low_f16, test_vfmlslq_lane_low_f16, + test_vfmlalq_laneq_low_f16, test_vfmlslq_laneq_low_f16): ... To this. + * gcc.target/arm/simd/fp16fml_low.c (test_vfmlal_low_u32, + test_vfmlalq_low_u32, test_vfmlsl_low_u32, test_vfmlslq_low_u32): + Rename ... + (test_vfmlal_low_f16, test_vfmlalq_low_f16, test_vfmlsl_low_f16, + test_vfmlslq_low_f16): ... To this. + +2019-02-25 Tamar Christina + + * gcc.target/aarch64/fp16_fmul_high.h (test_vfmlal_high_u32, + test_vfmlalq_high_u32, test_vfmlsl_high_u32, test_vfmlslq_high_u32): + Rename ... + (test_vfmlal_high_f16, test_vfmlalq_high_f16, test_vfmlsl_high_f16, + test_vfmlslq_high_f16): ... To this. + * gcc.target/aarch64/fp16_fmul_lane_high.h (test_vfmlal_lane_high_u32, + tets_vfmlsl_lane_high_u32, test_vfmlal_laneq_high_u32, + test_vfmlsl_laneq_high_u32, test_vfmlalq_lane_high_u32, + test_vfmlslq_lane_high_u32, test_vfmlalq_laneq_high_u32, + test_vfmlslq_laneq_high_u32): Rename ... + (test_vfmlal_lane_high_f16, tets_vfmlsl_lane_high_f16, + test_vfmlal_laneq_high_f16, test_vfmlsl_laneq_high_f16, + test_vfmlalq_lane_high_f16, test_vfmlslq_lane_high_f16, + test_vfmlalq_laneq_high_f16, test_vfmlslq_laneq_high_f16): ... To this. + * gcc.target/aarch64/fp16_fmul_lane_low.h (test_vfmlal_lane_low_u32, + test_vfmlsl_lane_low_u32, test_vfmlal_laneq_low_u32, + test_vfmlsl_laneq_low_u32, test_vfmlalq_lane_low_u32, + test_vfmlslq_lane_low_u32, test_vfmlalq_laneq_low_u32, + test_vfmlslq_laneq_low_u32): Rename ... + (test_vfmlal_lane_low_f16, test_vfmlsl_lane_low_f16, + test_vfmlal_laneq_low_f16, test_vfmlsl_laneq_low_f16, + test_vfmlalq_lane_low_f16, test_vfmlslq_lane_low_f16, + test_vfmlalq_laneq_low_f16, test_vfmlslq_laneq_low_f16): ... To this. + * gcc.target/aarch64/fp16_fmul_low.h (test_vfmlal_low_u32, + test_vfmlalq_low_u32, test_vfmlsl_low_u32, test_vfmlslq_low_u32): + Rename ... + (test_vfmlal_low_f16, test_vfmlalq_low_f16, test_vfmlsl_low_f16, + test_vfmlslq_low_f16): ... To This. + * lib/target-supports.exp + (check_effective_target_arm_fp16fml_neon_ok_nocache): Update test. + +2019-02-25 Dominique d'Humieres + + PR fortran/89282 + * gfortran.dg/overload_3.f90: New test. + +2019-02-25 Jakub Jelinek + + PR c++/89285 + * g++.dg/cpp1y/constexpr-89285-2.C: New test. + +2019-02-25 Dominique d'Humieres + + PR libfortran/89274 + * gfortran.dg/list_directed_large.f90: New test. + +2019-02-25 Jakub Jelinek + + PR target/89434 + * gcc.c-torture/execute/pr89434.c: New test. + + PR target/89438 + * gcc.dg/pr89438.c: New test. + +2019-02-24 Paolo Carlini + + PR c++/84585 + * g++.dg/cpp0x/pr84585.C: New. + +2019-02-24 Thomas Koenig + + PR fortran/89174 + * gfortran.dg/allocate_with_mold_3.f90: New test. + +2019-02-24 H.J. Lu + + PR target/87007 + * gcc.target/i386/pr87007-1.c: Compile with -mfpmath=sse. + * gcc.target/i386/pr87007-2.c: Likewise. + +2019-02-24 Harald Anlauf + + PR fortran/89266 + PR fortran/88326 + * gfortran.dg/pr89266.f90: New test. + * gfortran.dg/pr88326.f90: New test. + +2019-02-24 Jakub Jelinek + + PR rtl-optimization/89445 + * gcc.target/i386/avx512f-pr89445.c: New test. + +2019-02-23 Martin Sebor + + * gcc.dg/tree-ssa/builtin-sprintf-10.c: Cast remaining + wchar_t to wint_t to avoid a bogus -Wformat warning in + ILP32 (bug 77970). + +2019-02-23 H.J. Lu + + PR testsuite/89476 + * gfortran.dg/ISO_Fortran_binding_5.c: Include + "../../../libgfortran/ISO_Fortran_binding.h". + * gfortran.dg/ISO_Fortran_binding_6.c: Likewise. + +2019-02-23 H.J. Lu + + PR driver/69471 + * gcc.dg/pr69471-1.c: New test. + * gcc.dg/pr69471-2.c: Likewise. + * gcc.target/i386/pr69471-3.c: Likewise. + +2019-02-23 Jerry DeLisle + + PR fortran/84387 + * gfortran.dg/dtio_34.f90: New test. + +2019-02-23 Marek Polacek + + PR c++/88294 - ICE with non-constant noexcept-specifier. + * g++.dg/cpp0x/noexcept34.C: New test. + * g++.dg/cpp0x/noexcept35.C: New test. + + PR c++/89419 + * g++.dg/cpp1y/lambda-generic-89419.C: New test. + +2019-02-23 Paul Thomas + + PR fortran/88117 + * gfortran.dg/deferred_character_32.f90 : New test + +2019-02-23 Paul Thomas + + PR fortran/89385 + * gfortran.dg/ISO_Fortran_binding_1.f90 : Correct test for + previously incorrect lbound for allocatable expressions. Also + correct stop values to avoid repetition. + * gfortran.dg/ISO_Fortran_binding_5.f90 : New test + * gfortran.dg/ISO_Fortran_binding_5.c : Support previous test. + + PR fortran/89366 + * gfortran.dg/ISO_Fortran_binding_6.f90 : New test + * gfortran.dg/ISO_Fortran_binding_6.c : Support previous test. + * gfortran.dg/pr32599.f03 : Set standard to F2008. + +2019-02-22 David Malcolm + + PR c++/89390 + * g++.dg/diagnostic/pr89390.C: Update expected location of error, + renaming to a multicharacter name, so that start != finish. Add + tests for dtor locations. + +2019-02-22 Paolo Carlini + + PR c++/84676 + * g++.dg/cpp0x/pr84676.C: New. + +2019-02-22 Martin Sebor + + * gcc.dg/tree-ssa/builtin-sprintf-10.c: Cast wchar_t to wint_t + to avoid a bogus -Wformat warning in ILP32 (bug 77970). + +2019-02-22 Harald Anlauf + + PR fortran/83057 + * gfortran.dg/newunit_6.f90: New test. + +2019-02-22 Marek Polacek + + PR c++/89420 - ICE with CAST_EXPR in explicit-specifier. + * g++.dg/cpp2a/explicit14.C: New test. + +2019-02-22 Matthew Malcomson + + PR target/89324 + * gcc.dg/rtl/aarch64/subs_adds_sp.c: New test. + * gfortran.fortran-torture/compile/pr89324.f90: New test. + +2019-02-22 Martin Sebor + + PR c/89425 + * gcc.dg/Wabsolute-value.c: New test. + + * gcc.dg/Wbuiltin-declaration-mismatch-12.c: New test. + +2019-02-22 H.J. Lu + Hongtao Liu + Sunil K Pandey + + PR target/87007 + * gcc.target/i386/pr87007-1.c: New test. + * gcc.target/i386/pr87007-2.c: Likewise. + +2019-02-22 Richard Biener + + PR tree-optimization/89440 + * gcc.dg/vect/pr89440.c: New testcase. + +2019-02-22 Thomas Schwinge + + * lib/target-supports.exp (check_effective_target_offload_nvptx): + Remove. + + PR fortran/72741 + * gfortran.dg/goacc/classify-routine.f95: Adjust. + + * c-c++-common/goacc/routine-5.c: Revert earlier changes. + * g++.dg/goacc/template.C: Likewise. + + PR fortran/78027 + * gfortran.dg/goacc/pr78027.f90: Add 'dg-additional-options "-Wno-hsa"'. + +2019-02-22 Richard Biener + + PR middle-end/87609 + * gcc.dg/torture/restrict-7.c: New testcase. + +2019-02-21 Jakub Jelinek + + PR c++/89285 + * g++.dg/ubsan/vptr-4.C: Expect reinterpret_cast errors. + * g++.dg/cpp1y/constexpr-84192.C (f2): Adjust expected diagnostics. + * g++.dg/cpp1y/constexpr-70265-2.C (foo): Adjust expected line of + diagnostics. + * g++.dg/cpp1y/constexpr-89285.C: New test. + * g++.dg/cpp0x/constexpr-arith-overflow.C (add, sub, mul): Ifdef out + for C++11. + (TEST_ADD, TEST_SUB, TEST_MUL): Define to Assert (true) for C++11. + * g++.dg/cpp0x/constexpr-arith-overflow2.C: New test. + +2019-02-21 H.J. Lu + + PR target/87412 + * gcc.target/i386/indirect-thunk-attr-14.c: Replace + -fcf-protection with -fcf-protection=branch. + * gcc.target/i386/indirect-thunk-attr-15.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-16.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-8.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-9.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-10.c: Likewise. + +2019-02-21 Wilco Dijkstra + + * gcc.target/arm/pr88850-2.c: Block -mfloat-abi override. + * gcc.target/arm/pr88850.c: Use -mfloat-abi=softfp. + +2019-02-21 Thomas Koenig + + PR fortran/86119 + * gfortran.dg/warn_conversion_11.f90: New test. + +2019-02-21 H.J. Lu + + PR target/87412 + * gcc.target/i386/pr87412-1.c: New file. + * gcc.target/i386/pr87412-2.c: Likewise. + * gcc.target/i386/pr87412-3.c: Likewise. + * gcc.target/i386/pr87412-4.c: Likewise. + +2019-02-20 Jakub Jelinek + + PR c++/89403 + * g++.dg/cpp0x/pr89403.C: New test. + + PR c++/89405 + * g++.dg/cpp1z/inline-var5.C: New test. + + PR middle-end/89412 + * gcc.c-torture/compile/pr89412.c: New test. + +2019-02-20 Jakub Jelinek + David Malcolm + + PR middle-end/89091 + * gcc.dg/torture/pr89091.c: New test. + +2019-02-20 Jakub Jelinek + + PR middle-end/88074 + PR middle-end/89415 + * gcc.dg/pr88074-2.c: New test. + + PR c++/89336 + * g++.dg/cpp1y/constexpr-89336-3.C: New test. + +2019-02-20 David Malcolm + + PR c/89410 + * gcc.dg/pr89410-1.c: New test. + * gcc.dg/pr89410-2.c: New test. + +2019-02-20 Pat Haugen + + * lib/target-supports.exp (check_effective_target_vect_usad_char): + Add PowerPC support. + * gcc.dg/vect/slp-reduc-sad.c: Update scan string. + * gcc.dg/vect/vect-reduc-sad.c: Likewise. + +2019-02-20 Andre Vieira + + PR target/86487 + * gcc.target/arm/pr86487.c: New. + +2019-02-20 Paolo Carlini + + PR c++/84536 + * g++.dg/cpp1y/var-templ60.C: New. + +2019-02-20 Li Jia He + + PR target/88100 + * gcc.target/powerpc/pr88100.c: New testcase. + +2019-02-19 Wilco Dijkstra + + * gcc.target/arm/pr88850.c: Block -mfloat-abi override. + +2019-02-19 Thomas Koenig + + PR fortran/89384 + * gfortran.dg/ISO_Fortran_binding_4.f90 + +2019-02-19 Thomas Schwinge + + PR c/87924 + * c-c++-common/goacc/asyncwait-5.c: Remove XFAILs. + * gfortran.dg/goacc/asyncwait-5.f: Likewise. + +2019-02-19 Richard Biener + + PR middle-end/88074 + * gcc.dg/pr88074.c: New testcase. + +2019-02-19 Jakub Jelinek + + PR middle-end/89303 + * g++.dg/torture/pr89303.C: Move everything from std namespace to my + namespace. + + PR c++/89387 + * g++.dg/cpp0x/lambda/lambda-89387.C: New test. + + PR c++/89391 + * g++.dg/cpp0x/reinterpret_cast2.C: New test. + + PR c++/89390 + * g++.dg/diagnostic/pr89390.C: New test. + +2019-02-18 Sharon Dvir + + * README: Fix typos. + +2019-02-18 Rainer Orth + + * g++.dg/torture/pr89303.C (bad_weak_ptr): Rename to + bad_weak_ptr_. + +2019-02-18 Thomas Koenig + + PR fortran/87689 + * gfortran.dg/lto/20091028-1_0.f90: Add -Wno-lto-type-mismatch to + options. + * gfortran.dg/lto/20091028-2_0.f90: Likewise. + * gfortran.dg/lto/pr87689_0.f: New file. + * gfortran.dg/lto/pr87689_1.f: New file. + +2019-02-18 Wilco Dijkstra + + * g++.dg/wrappers/pr88680.C: Add -fno-short-enums. + +2019-02-18 Rainer Orth + + * gdc.dg/dg.exp: Tabify. + * gdc.dg/lto/lto.exp: Likewise. + * gdc.test/gdc-test.exp: Likewise. + * lib/gdc-dg.exp: Likewise. + * lib/gdc.exp: Likewise. + +2019-02-18 Richard Biener + + PR tree-optimization/89296 + * gcc.dg/uninit-pr89296.c: New testcase. + +2019-02-18 Jakub Jelinek + + PR target/89369 + * gcc.c-torture/execute/pr89369.c: New test. + * gcc.target/s390/md/rXsbg_mode_sXl.c (rosbg_si_srl, + rxsbg_si_srl): Expect last 3 operands 32,63,62 rather than + 34,63,62. + +2019-02-18 Martin Jambor + + PR tree-optimization/89209 + * gcc.dg/tree-ssa/pr89209.c: New test. + +2019-02-18 Martin Liska + + * gfortran.dg/simd-builtins-7.f90: New test. + * gfortran.dg/simd-builtins-7.h: New test. + +2019-02-17 Harald Anlauf + + PR fortran/88299 + * gfortran.dg/pr88299.f90: New test. + +2019-02-17 Harald Anlauf + + PR fortran/89077 + * gfortran.dg/transfer_simplify_12.f90: New test. + +2019-02-17 Marek Polacek + + PR c++/89217 - ICE with list-initialization in range-based for loop. + * g++.dg/cpp0x/range-for37.C: New test. + + * g++.old-deja/g++.robertl/eb82.C: Tweak dg-error. + + PR c++/89315 + * g++.dg/cpp0x/initlist114.C: New test. + + PR c++/89356 + * g++.dg/abi/mangle68.C: New test. + * g++.dg/cpp0x/decltype69.C: New test. + +2019-02-16 David Malcolm + + PR c++/88680 + * g++.dg/wrappers/pr88680.C: New test. + +2019-02-17 Thomas Koenig + + PR fortran/71066 + * gfortran.dg/coarray_data_1.f90: New test. + +2019-02-16 Eric Botcazou + + * c-c++-common/patchable_function_entry-decl.c: Add -fno-pie on SPARC. + * c-c++-common/patchable_function_entry-default.c: Likewise. + * c-c++-common/patchable_function_entry-definition.c: Likewise. + +2019-02-16 Jakub Jelinek + + PR rtl-optimization/66152 + * gcc.target/i386/pr66152.c: New test. + +2019-02-15 Eric Botcazou + + * g++.dg/asan/asan_oob_test.cc: Skip OOB_int on SPARC. + * g++.dg/asan/function-argument-3.C: Tweak for 32-bit SPARC. + +2019-02-15 Tamar Christina + + * lib/target-supports.exp + (check_effective_target_arm_neon_softfp_fp16_ok_nocache): Drop non-fpu + checking alternative. + +2019-02-15 Eric Botcazou + + * gcc.target/sparc/struct-ret-check-1.c: Add -fno-pie option. + +2019-02-15 Eric Botcazou + + * c-c++-common/patchable_function_entry-decl.c: Do not run on Visium. + * c-c++-common/patchable_function_entry-default.c: Likewise. + * c-c++-common/patchable_function_entry-definition.c: Likewise. + * gcc.dg/tree-ssa/pr84859.c: Add -ftree-cselim switch. + +2019-02-15 Jakub Jelinek + + PR other/69006 + PR testsuite/88920 + * lib/gcc-dg.exp: If llvm_binutils effective target, set + allow_blank_lines to 2 during initialization. + (dg-allow-blank-lines-in-output): Set allow_blank_lines to 1 only if + it was previously zero. + (gcc-dg-prune): Don't check for llvm_binutils effective target here. + Clear allow_blank_lines afterwards whenever it was 1. + * gdc.test/gdc-test.exp (dmd2dg): Don't call + dg-allow-blank-lines-in-output here. + (gdc-do-test): Set allow_blank_lines to 3 if it is 0 before running + the tests and restore it back at the end. + + * c-c++-common/ubsan/opts-1.c: New test. + * c-c++-common/ubsan/opts-2.c: New test. + * c-c++-common/ubsan/opts-3.c: New test. + * c-c++-common/ubsan/opts-4.c: New test. + +2019-02-15 Richard Biener + Jakub Jelinek + + PR tree-optimization/89278 + * gcc.dg/pr89278.c: New test. + +2019-02-15 Jakub Jelinek + + PR c/89340 + * gcc.dg/pr89340.c: New test. + * gcc.dg/torture/pr57036-2.c (jpgDecode_convert): Expect a warning + that leaf attribute on nested function is useless. + + PR other/89342 + * gcc.dg/pr89342.c: New test. + +2019-02-14 Jakub Jelinek + + PR rtl-optimization/89354 + * gcc.dg/pr89354.c: New test. + +2019-02-14 Uroš Bizjak + + * gcc.target/i386/ssse3-pabsb.c: Re-enable 64-bit form on AVX targets. + * gcc.target/i386/ssse3-pabsd.c: Ditto. + * gcc.target/i386/ssse3-pabsw.c: Ditto. + * gcc.target/i386/ssse3-palignr.c: Ditto. + * gcc.target/i386/ssse3-phaddd.c: Ditto. + * gcc.target/i386/ssse3-phaddsw.c: Ditto. + * gcc.target/i386/ssse3-phaddw.c: Ditto. + * gcc.target/i386/ssse3-phsubd.c: Ditto. + * gcc.target/i386/ssse3-phsubsw.c: Ditto. + * gcc.target/i386/ssse3-phsubw.c: Ditto. + * gcc.target/i386/ssse3-pmaddubsw.c: Ditto. + * gcc.target/i386/ssse3-pmulhrsw.c: Ditto. + * gcc.target/i386/ssse3-pshufb.c: Ditto. + * gcc.target/i386/ssse3-psignb.c: Ditto. + * gcc.target/i386/ssse3-psignd.c: Ditto. + * gcc.target/i386/ssse3-psignw.c: Ditto. + +2018-02-14 Steve Ellcey + + * gcc.target/aarch64/pcs_attribute.c: New test. + +2019-02-14 Harald Anlauf + + PR fortran/88248 + * gfortran.dg/pr88248.f90: New test. + * gfortran.dg/f2018_obs.f90: Updated test. + +2019-02-14 Tamar Christina + + * gcc.target/arm/pr88850.c: change options to additional option. + +2019-02-14 Rainer Orth + + PR d/87864 + * lib/gdc.exp (gdc_link_flags): Add path to drtbegin.o/drtend.o if + present. + +2019-02-14 Tamar Christina + + PR target/88850 + * gcc.target/arm/pr88850-2.c: New test. + * lib/target-supports.exp + (check_effective_target_arm_neon_softfp_fp16_ok_nocache, + check_effective_target_arm_neon_softfp_fp16_ok, + add_options_for_arm_neon_softfp_fp16): New. + +2019-02-14 Matthew Malcomson + + * gcc.dg/rtl/arm/ldrd-peepholes.c: Restrict testcase. + * lib/target-supports.exp: Add procedure to check for ldrd. + +2019-02-14 Cesar Philippidis + + PR fortran/72715 + * gfortran.dg/goacc/loop-3-2.f95: Error on do concurrent loops. + * gfortran.dg/goacc/loop-3.f95: Likewise. + * gfortran.dg/goacc/pr72715.f90: New test. + +2019-02-14 Martin Liska + + PR rtl-optimization/89242 + * g++.dg/pr89242.C: New test. + +2019-02-14 Jakub Jelinek + + PR tree-optimization/89314 + * gcc.dg/pr89314.c: New test. + + PR middle-end/89284 + * gcc.dg/ubsan/pr89284.c: New test. + +2019-02-13 Ian Lance Taylor + + * gcc.dg/func-attr-1.c: New test. + +2019-02-13 Uroš Bizjak + + * gcc.target/i386/sse2-init-v2di-2.c (dg-final): Update scan string. + +2019-02-13 Marek Polacek + + PR c++/89297 - ICE with OVERLOAD in template. + * g++.dg/cpp0x/initlist113.C: New test. + +2019-02-13 Alexandre Oliva + + PR c++/86379 + * g++.dg/cpp0x/pr86379.C: New. + + PR c++/87322 + * g++.dg/cpp1y/pr87322.C: New. + * g++.dg/cpp0x/lambda/lambda-variadic5.C: Test that we + instantiate the expected number of lambda functions. + +2019-02-13 Marek Polacek + + PR c++/77304 + * g++.dg/cpp2a/nontype-class13.C: New test. + +2019-02-13 Wilco Dijkstra + + PR target/89190 + * gcc.target/arm/pr89190.c: New test. + +2019-02-13 David Malcolm + + PR c++/89036 + * g++.dg/concepts/pr89036.C: New test. + +2019-02-13 Tamar Christina + + PR target/88847 + * gcc.target/aarch64/sve/pr88847.c: New test. + +2019-02-13 Jonathan Wakely + Jakub Jelinek + + PR middle-end/89303 + * g++.dg/torture/pr89303.C: New test. + +2019-02-13 Paolo Carlini + + PR c++/88986 + * g++.dg/cpp1z/using4.C: New. + * g++.dg/cpp1z/using5.C: Likewise. + * g++.dg/cpp1z/using6.C: Likewise. + +2019-02-13 Jakub Jelinek + + PR target/89290 + * gcc.target/i386/pr89290.c: New test. + +2019-01-23 Xuepeng Guo + + * gcc.target/i386/enqcmd.c: New test. + * gcc.target/i386/enqcmds.c: Likewise. + * g++.dg/other/i386-2.C: Add -menqcmd. + * g++.dg/other/i386-3.C: Likewise. + * gcc.target/i386/sse-12.c: Likewise. + * gcc.target/i386/sse-13.c: Likewise. + * gcc.target/i386/sse-14.c: Likewise. + * gcc.target/i386/sse-23.c: Likewise. + +2019-01-23 Xiong Hu Luo + + * gcc.target/powerpc/crypto-builtin-1.c + (crypto1_be, crypto2_be, crypto3_be, crypto4_be, crypto5_be): + New testcases. + +2019-02-12 H.J. Lu + + PR target/89229 + * gcc.target/i386/pr89229-1.c: New test. + +2019-02-12 Ilya Leoshkevich + + PR target/89233 + * gcc.target/s390/pr89233.c: New test. + +2018-01-12 Bill Schmidt + + * gcc.target/powerpc/vec-sld-modulo.c: Require p8vector_hw. + * gcc.target/powerpc/vec-srad-modulo.c: Likewise. + * gcc.target/powerpc/vec-srd-modulo.c: Likewise. + +2019-02-12 Richard Biener + + PR tree-optimization/89253 + * gfortran.dg/pr89253.f: New testcase. + +2019-02-11 Marek Polacek + + PR c++/89212 - ICE converting nullptr to pointer-to-member-function. + * g++.dg/cpp0x/nullptr40.C: New test. + * g++.dg/cpp0x/nullptr41.C: New test. + +2019-02-11 Jakub Jelinek + + PR c++/88977 + * g++.dg/cpp2a/is-constant-evaluated7.C: New test. + +2019-02-12 Wilco Dijkstra + + PR tree-optimization/86637 + * gcc.c-torture/compile/pr86637-2.c: Test pthread and graphite target. + +2019-02-11 Martin Sebor + + PR tree-optimization/88771 + * gcc.dg/Wstringop-overflow-8.c: New test. + * gcc.dg/Wstringop-overflow-9.c: New test. + * gcc.dg/Warray-bounds-40.c: New test. + * gcc.dg/builtin-stpncpy.c: Adjust. + * gcc.dg/builtin-stringop-chk-4.c: Adjust. + * g++.dg/opt/memcpy1.C: Adjust. + +2019-02-11 Martin Sebor + + PR c++/87996 + * c-c++-common/array-5.c: New test. + * c-c++-common/pr68107.c: Adjust text of diagnostics. + * g++.dg/init/new38.C: Same. + * g++.dg/init/new43.C: Same. + * g++.dg/init/new44.C: Same. + * g++.dg/init/new46.C: Same. + * g++.dg/other/large-size-array.C: Same. + * g++.dg/other/new-size-type.C: Same. + * g++.dg/template/array30.C: Same. + * g++.dg/template/array32.C: New test. + * g++.dg/template/dependent-name3.C: Adjust. + * gcc.dg/large-size-array-3.c: Same. + * gcc.dg/large-size-array-5.c: Same. + * gcc.dg/large-size-array.c: Same. + * g++.old-deja/g++.brendan/array1.C: Same. + * g++.old-deja/g++.mike/p6149.C: Same. + +2019-02-11 Martin Sebor + + * gcc.dg/tree-prof/inliner-1.c: Correct comments. + +2019-02-11 Tamar Christina + + PR middle-end/88560 + * gcc.target/arm/armv8_2-fp16-move-1.c: Update assembler scans. + * gcc.target/arm/fp16-aapcs-3.c: Likewise. + * gcc.target/arm/fp16-aapcs-1.c: Likewise. + +2019-02-11 Bill Schmidt + + * gcc.target/powerpc/vec-sld-modulo.c: New. + * gcc.target/powerpc/vec-srad-modulo.c: New. + * gcc.target/powerpc/vec-srd-modulo.c: New. + +2019-02-11 Martin Liska + + PR ipa/89009 + * g++.dg/ipa/pr89009.C: New test. + +2019-02-10 Thomas Koenig + + PR fortran/71723 + * gfortran.dg/pointer_init_2.f90: Adjust error messages. + * gfortran.dg/pointer_init_6.f90: Likewise. + * gfortran.dg/pointer_init_9.f90: New test. + +2019-02-10 Thomas Koenig + + PR fortran/67679 + * gfortran.dg/warn_undefined_1.f90: New test.o + +2019-02-10 Jakub Jelinek + + PR tree-optimization/89268 + * gcc.dg/vect/pr89268.c: New test. + +2019-02-10 Rainer Orth + + * gnat.dg/lto19.adb: Remove dg-excess-errors. + +2019-02-09 Harald Anlauf + + PR fortran/89077 + * gfortran.dg/substr_simplify.f90: New test. + +2019-02-09 Jan Hubicka + + PR ipa/88711 + * gfortran.dg/pr79966.f90: Xfail everwyhere. + +2019-02-09 Paul Thomas + + PR fortran/89200 + * gfortran.dg/array_reference_2.f90 : New test. + +2019-02-09 Jakub Jelinek + + PR middle-end/89246 + * gcc.dg/gomp/pr89246-1.c: New test. + * gcc.dg/gomp/pr89246-2.c: New test. + +2019-02-08 Jakub Jelinek + + PR tree-optimization/88739 + * gcc.c-torture/execute/pr88739.c: New test. + +2019-02-08 Jozef Lawrynowicz + + PR testsuite/89258 + * gcc.dg/tree-ssa/pr80887.c: Require int32plus. + +2019-02-08 Robin Dapp + + * gcc.target/s390/vector/vec-copysign-execute.c: New test. + * gcc.target/s390/vector/vec-copysign.c: New test. + +2019-02-08 Richard Biener + + PR tree-optimization/89247 + * gcc.dg/torture/pr89247.c: New testcase. + +2019-02-08 Ilya Leoshkevich + + * gcc.target/s390/jump-label.c: New test. + +2019-02-08 Richard Biener + + PR testsuite/89250 + * gcc.dg/vect/vect-24.c: Remove XFAIL on vect_condition targets. + +2019-02-08 Jakub Jelinek + + PR rtl-optimization/89234 + * g++.dg/ubsan/pr89234.C: New test. + +2019-02-08 Richard Biener + + PR middle-end/89223 + * gcc.dg/torture/pr89223.c: New testcase. + +2019-02-07 David Malcolm + + PR tree-optimization/86637 + PR tree-optimization/89235 + * gcc.c-torture/compile/pr86637-1.c: New test. + * gcc.c-torture/compile/pr86637-2.c: New test. + * gcc.c-torture/compile/pr86637-3.c: New test. + * gcc.c-torture/compile/pr89235.c: New test. + +2019-02-07 Kyrylo Tkachov + + * gcc.target/aarch64/abd_1.c: New test. + * gcc.dg/sabd_1.c: Likewise. + +2019-02-07 Dominique d'Humieres + + PR fortran/52789 + * gfortran.dg/wunused-parameter_2.f90: New test. + +2019-02-07 Matthew Malcomson + + * gcc.dg/rtl/arm/ldrd-peepholes.c: Only run on arm + +2019-02-07 Andreas Krebbel + + * gcc.target/s390/zvector/xl-xst-align-1.c: New test. + * gcc.target/s390/zvector/xl-xst-align-2.c: New test. + +2019-02-07 Matthew Malcomson + Jakub Jelinek + + PR bootstrap/88714 + * gcc.c-torture/execute/pr88714.c: New test. + * gcc.dg/rtl/arm/ldrd-peepholes.c: New test. + +2019-02-07 Tamar Christina + + PR/target 88850 + * gcc.target/arm/pr88850.c: New test. + +2019-02-07 Alexandre Oliva + + PR c++/86218 + * g++.dg/cpp0x/pr86218.C: New. + +2019-02-06 Vladimir Makarov + + PR rtl-optimization/89225 + * gcc.target/powerpc/pr89225.c: New. + +2019-02-06 Eric Botcazou + + * gnat.dg/opt76.adb: New test. + +2019-02-06 Thomas Koenig + + PR fortran/71860 + * gfortran.dg/null_10.f90: New test. + +2019-02-06 David Malcolm + + PR c++/71302 + * g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C: Add expected + column numbers to dg-warning directives where they are correct. + * g++.dg/warn/Wzero-as-null-pointer-constant-5.C: Likewise. + * g++.dg/warn/Wzero-as-null-pointer-constant-7.C: Likewise. + * g++.dg/warn/Wzero-as-null-pointer-constant-8.C: New test. + +2019-02-06 Rainer Orth + + PR debug/87451 + * gcc.dg/debug/dwarf2/inline5.c: Allow for non-comment before + "(DIE (0x[0-9a-f]*) DW_TAG_variable". + xfail scan-assembler-not with Solaris as. + +2019-02-06 Bill Seurer + + * gcc.target/powerpc/vsx-vector-6.p7.c: Update instruction + counts and target. + * gcc.target/powerpc/vsx-vector-6.p8.c: Update instruction + counts and target. + * gcc.target/powerpc/vsx-vector-6.p9.c: Update instruction + counts and target. + +2019-02-06 Richard Biener + + PR tree-optimization/89182 + * gfortran.dg/graphite/pr89182.f90: New testcase. + +2019-02-06 Jakub Jelinek + + PR c/89211 + * gcc.dg/pr89211.c: New test. + + PR middle-end/89210 + * c-c++-common/builtin-convertvector-2.c: New test. + +2019-02-05 Nikhil Benesch + + PR go/89019 + * lib/go-torture.exp: Test compiling with -flto. + +2019-02-06 Joseph Myers + + PR c/88584 + * gcc.dg/redecl-18.c: New test. + +2019-02-05 Jakub Jelinek + + PR c++/89187 + * g++.dg/opt/pr89187.C: New test. + +2019-02-05 Andrea Corallo + + * jit.dg/add-driver-options-testlib.c: Add support file for + test-add-driver-options.c testcase. + * jit.dg/all-non-failing-tests.h: Add note about + test-add-driver-options.c + * jit.dg/jit.exp (jit-dg-test): Update to support + add-driver-options-testlib.c compilation. + * jit.dg/test-add-driver-options.c: New testcase. + +2019-02-05 Jakub Jelinek + + PR rtl-optimization/11304 + * gcc.target/i386/call-1.c (set_eax): Add "eax" clobber. + * gcc.target/i386/call-2.c: New test. + +2019-02-05 Marek Polacek + + PR c++/89158 - by-value capture of constexpr variable broken. + * g++.dg/cpp0x/lambda/lambda-89158.C: New test. + +2019-02-05 Segher Boessenkool + + * gcc.dg/vect/pr84711.c: Use -Wno-psabi. + +2019-02-05 Jakub Jelinek + + * gcc.target/powerpc/vec-extract-sint128-1.c: Require int128 effective + target. + * gcc.target/powerpc/vec-extract-uint128-1.c: Likewise. + + PR target/89188 + * g++.dg/opt/pr89188.C: New test. + + PR rtl-optimization/89195 + * gcc.c-torture/execute/pr89195.c: New test. + +2019-02-05 Kelvin Nilsen + + * gcc.target/powerpc/vec-extract-slong-1.c: Require p8 execution + hardware. + * gcc.target/powerpc/vec-extract-schar-1.c: Likewise. + * gcc.target/powerpc/vec-extract-sint128-1.c: Likewise. + * gcc.target/powerpc/vec-extract-sshort-1.c: Likewise. + * gcc.target/powerpc/vec-extract-ulong-1.c: Likewise. + * gcc.target/powerpc/vec-extract-uchar-1.c: Likewise. + * gcc.target/powerpc/vec-extract-sint-1.c: Likewise. + * gcc.target/powerpc/vec-extract-uint128-1.c: Likewise. + * gcc.target/powerpc/vec-extract-ushort-1.c: Likewise. + * gcc.target/powerpc/vec-extract-uint-1.c: Likewise. + +2019-02-05 Jakub Jelinek + + PR target/89186 + * g++.dg/ext/vector36.C: New test. + +2019-02-05 Alexandre Oliva + + PR c++/87770 + * g++.dg/pr87770.C: New. + +2019-02-04 Harald Anlauf + + PR fortran/89077 + * gfortran.dg/pr89077.f90: New test. + +2019-02-04 Martin Liska + + PR ipa/88985 + * gcc.dg/ipa/pr88985.c: New test. + +2019-02-04 Jakub Jelinek + + * gcc.dg/debug/dwarf2/inline5.c: Handle also @, ; or | comment + characters or extra spaces after the comment character. + +2019-02-04 Jakub Jelinek + + * g++.dg/torture/alias-1.C: New test. + +2019-02-03 Martin Sebor + + PR c/69661 + * c-c++-common/Wsequence-point-2.c: New test. + + PR c++/44648 + * g++.dg/warn/Wunused-var-35.C: New test. + +2019-02-03 Richard Biener + + PR debug/87295 + * g++.dg/debug/dwarf2/pr87295.C: New testcase. + +2019-02-02 Thomas Koenig + + PR fortran/88298 + * gfortran.dg/warn_conversion_10.f90: New test. + +2019-02-02 Paul Thomas + + PR fortran/88393 + * gfortran.dg/alloc_comp_assign_16.f03 : New test. + +2019-02-02 Paul Thomas + + PR fortran/88980 + * gfortran.dg/realloc_on_assign_32.f90 : New test. + +2019-02-02 Paul Thomas + + PR fortran/88685 + * gfortran.dg/pointer_array_component_3.f90 : New test. + +2019-02-02 Jakub Jelinek + + PR middle-end/87887 + * gcc.dg/gomp/pr87887-1.c: New test. + * gcc.dg/gomp/pr87887-2.c: New test. + +2019-02-01 Jakub Jelinek + + PR fortran/83246 + PR fortran/89084 + * gfortran.dg/pr89084.f90: New test. + * gfortran.dg/lto/pr89084_0.f90: New test. + * gfortran.dg/pr83246.f90: New test. + +2019-02-01 Marek Polacek + + PR c++/88325 - ICE with invalid out-of-line template member definition. + * g++.dg/cpp2a/typename14.C: New test. + +2019-02-01 Richard Biener + + PR middle-end/88597 + * gcc.dg/torture/pr88597.c: New testcase. + +2019-02-01 Richard Biener + + PR tree-optimization/85497 + * gcc.dg/graphite/pr85497.c: New testcase. + +2019-02-01 Richard Biener + + PR testsuite/87451 + * gcc.dg/debug/dwarf2/inline5.c: Allow more comment variants. + +2019-02-01 Jakub Jelinek + + PR tree-optimization/89143 + * gcc.dg/tree-ssa/vrp121.c: New test. + + PR tree-optimization/88107 + * gcc.dg/gomp/pr88107.c: New test. + + PR c++/87175 + * g++.dg/ext/attrib57.C: New test. + +2018-02-01 Bin Cheng + + PR tree-optimization/88932 + * gfortran.dg/pr88932.f90: New test. + +2019-01-31 Marek Polacek + + PR c++/88983 - ICE with switch in constexpr function. + * g++.dg/cpp1y/constexpr-88983.C: New test. + +2019-01-31 Thomas Koenig + + PR fortran/88669 + * gfortran.dg/contiguous_9.f90: New test. + +2019-01-31 Marek Polacek + + PR c++/89083, c++/80864 - ICE with list initialization in template. + * g++.dg/cpp0x/initlist107.C: New test. + * g++.dg/cpp0x/initlist108.C: New test. + * g++.dg/cpp0x/initlist109.C: New test. + * g++.dg/cpp0x/initlist110.C: New test. + * g++.dg/cpp0x/initlist111.C: New test. + * g++.dg/cpp0x/initlist112.C: New test. + * g++.dg/init/ptrfn4.C: New test. + +2019-01-31 David Malcolm + + PR c/89122 + * g++.dg/spellcheck-stdlib.C (test_FLT_MAX): New test. + * gcc.dg/spellcheck-stdlib.c (test_FLT_MAX): New test. + +2019-01-31 Richard Biener + + PR tree-optimization/89135 + * gcc.dg/torture/pr89135.c: New testcase. + +2019-01-31 Jakub Jelinek + + PR sanitizer/89124 + * c-c++-common/asan/pr89124.c: New test. + +2019-01-30 Jerry DeLisle + + PR fortran/52564 + * gfortran.dg/print_2.f90: New test. + +2019-01-30 Vladimir Makarov + + PR rtl-optimization/87246 + * gcc.target/i386/pr87246.c: New. + +2019-01-30 Marek Polacek + + PR c++/89119 - ICE with value-initialization in template. + * g++.dg/cpp0x/initlist-value3.C: New test. + +2019-01-30 Kelvin Nilsen + + * gcc.target/powerpc/vec-extract-schar-1.c: New test. + * gcc.target/powerpc/vec-extract-sint-1.c: New test. + * gcc.target/powerpc/vec-extract-sint128-1.c: New test. + * gcc.target/powerpc/vec-extract-slong-1.c: New test. + * gcc.target/powerpc/vec-extract-sshort-1.c: New test. + * gcc.target/powerpc/vec-extract-uchar-1.c: New test. + * gcc.target/powerpc/vec-extract-uint-1.c: New test. + * gcc.target/powerpc/vec-extract-uint128-1.c: New test. + * gcc.target/powerpc/vec-extract-ulong-1.c: New test. + * gcc.target/powerpc/vec-extract-ushort-1.c: New test. + +2019-01-30 Richard Biener + + PR tree-optimization/89111 + * gcc.dg/torture/pr89111.c: New testcase. + +2019-01-30 Andrew Stubbs + + PR testsuite/88920 + * lib/target-supports.exp: Cache result. + +2019-01-30 Jakub Jelinek + + PR c++/89105 + * g++.target/i386/pr89105.C: New test. + + PR c/89061 + * gcc.dg/pr89061.c: New test. + +2019-01-29 Martin Sebor + + PR c/88956 + * gcc.dg/Warray-bounds-39.c: New test. + +2019-01-29 Marek Polacek + + PR testsuite/89110 + * g++.dg/other/nontype-1.C: Expect error in all modes. + * g++.dg/parse/crash13.C: Likewise. + * g++.dg/parse/error36.C: Likewise. + * g++.dg/template/error29.C: Likewise. + +2019-01-29 Thomas Koenig + + PR fortran/57048 + * gfortran.dg/c_funptr_1.f90: New file. + * gfortran.dg/c_funptr_1_mod.f90: New file. + +2019-01-29 Jakub Jelinek + + PR c++/66676 + PR ipa/89104 + * gcc.dg/gomp/pr89104.c: New test. + +2019-01-29 Rainer Orth + + * gdc.dg/pr89042a.d: Mark as compile test. + * gdc.dg/pr89042b.d: Likewise. + +2019-01-29 Richard Biener + + PR debug/87295 + * g++.dg/lto/pr87295_0.C: New testcase. + +2019-01-29 Jakub Jelinek + + PR c/89045 + * gcc.dg/pr89045.c: New test. + + PR c/86125 + * gcc.dg/Wbuiltin-declaration-mismatch-7.c: Guard testcase for + lp64, ilp32 and llp64 only. + (fputs): Use unsigned long long instead of size_t for return type. + (vfprintf, vfscanf): Accept arbitrary target specific type for + va_list. + +2019-01-28 Marek Polacek + + PR c++/88358 - name wrongly treated as type. + * g++.dg/cpp2a/typename1.C: Add dg-error. + * g++.dg/cpp2a/typename13.C: New test. + * g++.dg/cpp2a/typename6.C: Make a function name qualified. + Add typename. + +2019-01-28 Marek Polacek + + * g++.dg/cpp0x/enum37.C: Add dg-error. + +2019-01-28 Bernd Edlinger + + * c-c++-common/Waddress-of-packed-member-1.c: Extended test case. + * c-c++-common/Waddress-of-packed-member-2.c: New test case. + +2019-01-28 Bernd Edlinger + + * gcc.dg/Wattribute-alias.c: Add test for #pragma GCC diagnostic ignored + "-Wattribute-alias". + +2019-01-27 Uroš Bizjak + + PR fortran/70696 + * gfortran.dg/coarray/event_3.f0: Add save attribue to x. + +2019-01-27 Marek Polacek + + PR c++/88815 - narrowing conversion lost in decltype. + PR c++/78244 - narrowing conversion in template not detected. + * g++.dg/cpp0x/Wnarrowing15.C: New test. + * g++.dg/cpp0x/Wnarrowing16.C: New test. + * g++.dg/cpp0x/constexpr-decltype3.C: New test. + * g++.dg/cpp1y/Wnarrowing1.C: New test. + + PR c++/89024 - ICE with incomplete enum type. + * g++.dg/cpp0x/enum37.C: New test. + +2019-01-27 Eric Botcazou + + * gnat.dg/opt75.adb: New test. + * gnat.dg/opt75_pkg.ad[sb]: New helper. + +2019-01-27 Jakub Jelinek + + PR target/87214 + * gcc.target/i386/avx512vl-pr87214-1.c: New test. + * gcc.target/i386/avx512vl-pr87214-2.c: New test. + +2019-01-26 Martin Jambor + + PR ipa/88933 + * gfortran.dg/gomp/pr88933.f90: New test. + +2019-01-26 Iain Buclaw + + PR d/89042 + * gdc.dg/pr89042a.d: New test. + * gdc.dg/pr89042b.d: New test. + +2019-01-26 Harald Anlauf + + PR fortran/57553 + * gfortran.dg/pr57553.f90: New test. + +2019-01-26 Eric Botcazou + + * gnat.dg/array34.adb: New test. + +2019-01-26 Jakub Jelinek + + PR preprocessor/88974 + * c-c++-common/cpp/pr88974.c: New test. + +2019-01-25 Paolo Carlini + + PR c++/88969 + * g++.dg/cpp2a/destroying-delete2.C: New. + * g++.dg/cpp2a/destroying-delete3.C: Likewise. + +2019-01-25 Steven G. Kargl + + PR fortran/85780 + * gfortran.dg/pr85780.f90: Update testcase for error message. + +2019-01-25 Richard Earnshaw + + PR target/88469 + * gcc.target/aarch64/aapcs64/test_align-10.c: New test. + * gcc.target/aarch64/aapcs64/test_align-11.c: New test. + * gcc.target/aarch64/aapcs64/test_align-12.c: New test. + +2019-01-25 Richard Sandiford + + PR middle-end/89037 + * gcc.dg/pr89037.c: New test. + +2019-01-25 Christophe Lyon + + * lib/target-supports.exp (check_effective_target_fenv): New. + * gcc.dg/torture/fp-int-convert-float128-timode-3.c: Add missing + fenv effective target. + * gcc.dg/torture/fp-int-convert-timode-1.c: Likewise. + * gcc.dg/torture/fp-int-convert-timode-2.c: Likewise. + * gcc.dg/torture/fp-int-convert-timode-3.c: Likewise. + * gcc.dg/torture/fp-int-convert-timode-4.c: Likewise. + +2019-01-25 Richard Biener + + PR tree-optimization/86865 + * gcc.dg/graphite/pr86865.c: New testcase. + * gcc.dg/graphite/pr69728.c: XFAIL. + * gcc.dg/graphite/scop-21.c: Likewise. + +2019-01-24 Martin Sebor + + PR c/86125 + PR c/88886 + PR middle-end/86308 + * gcc.dg/Wbuiltin-declaration-mismatch-6.c: New test. + * gcc.dg/Wbuiltin-declaration-mismatch-7.c: New test. + * gcc.dg/Wbuiltin-declaration-mismatch-8.c: New test. + * gcc.dg/Wbuiltin-declaration-mismatch-9.c: New test. + * gcc.dg/Wbuiltin-declaration-mismatch-10.c: New test. + * gcc.dg/builtins-69.c: New test. + * gcc.dg/Wint-conversion-2.c: Add expected warning. + * gcc.c-torture/execute/eeprof-1.c: Adjust function signatures. + +2019-01-24 Uroš Bizjak + + PR rtl-optimization/88948 + * gcc.target/i386/pr88948.c: New test. + +2019-01-24 Jakub Jelinek + + PR debug/89006 + * g++.dg/debug/pr89006.C: New test. + + PR middle-end/89015 + * gcc.dg/gomp/pr89015.c: New test. + + PR c++/88976 + * c-c++-common/gomp/cancel-2.c: New test. + * gcc.dg/gomp/cancel-1.c: New test. + * g++.dg/gomp/cancel-1.C: New test. + * g++.dg/gomp/cancel-2.C: New test. + * g++.dg/gomp/cancel-3.C: New test. + +2019-01-24 Jakub Jelinek + + PR tree-optimization/89027 + * gfortran.dg/gomp/pr89027.f90: New test. + +2019-01-24 Paul Thomas + + PR fortran/88929 + * gfortran.dg/ISO_Fortran_binding_3.f90: New test. + * gfortran.dg/ISO_Fortran_binding_3.c: Subsidiary source. + +2019-01-23 H.J. Lu + + PR libgcc/88931 + * gcc.dg/torture/fp-int-convert-timode-1.c: New test. + * gcc.dg/torture/fp-int-convert-timode-2.c: Likewise. + * gcc.dg/torture/fp-int-convert-timode-3.c: Likewise. + * gcc.dg/torture/fp-int-convert-timode-4.c: Likewise. + +2019-01-23 Uroš Bizjak + + PR target/88998 + * g++.target/i386/pr88998.c: New test. + +2019-01-23 Marek Polacek + + PR c++/88757 - qualified name treated wrongly as type. + * g++.dg/cpp0x/dependent2.C: New test. + * g++.dg/cpp2a/typename10.C: Remove dg-error. + * g++.dg/cpp2a/typename12.C: New test. + * g++.dg/template/static30.C: Remove dg-error. + +2019-01-23 Jakub Jelinek + + PR c/44715 + * c-c++-common/pr44715.c: New test. + + PR c++/88984 + * c-c++-common/pr88984.c: New test. + +2019-01-23 Richard Biener + + PR tree-optimization/89008 + * gcc.dg/torture/pr89008.c: New testcase. + +2019-01-23 Eric Botcazou + + * gnat.dg/specs/opt4.ads: New test. + +2019-01-23 Jakub Jelinek + + PR tree-optimization/88964 + * gfortran.dg/pr88964.f90: New test. + +2019-01-22 Martin Sebor + + * c-c++-common/Warray-bounds-2.c: Include headers only if they exist. + * c-c++-common/Warray-bounds-3.c: Make xfails conditional on target + non_strict_align. + * c-c++-common/Wrestrict-2.c: Include headers only if they exist. + * c-c++-common/Wrestrict.c: Make xfails conditional on target + non_strict_align. + +2018-01-22 Steve Ellcey + + * c-c++-common/gomp/pr60823-1.c: Change aarch64-*-* target + to aarch64*-*-* target. + * c-c++-common/gomp/pr60823-3.c: Ditto. + * g++.dg/gomp/declare-simd-1.C: Ditto. + * g++.dg/gomp/declare-simd-3.C: Ditto. + * g++.dg/gomp/declare-simd-4.C: Ditto. + * g++.dg/gomp/declare-simd-7.C: Ditto. + * g++.dg/gomp/pr88182.C: Ditto. + * gcc.dg/gomp/declare-simd-1.c: Ditto. + * gcc.dg/gomp/declare-simd-3.c: Ditto. + * gcc.dg/gomp/pr59669-2.c: Ditto. + * gcc.dg/gomp/pr87895-1.c: Ditto. + * gcc.dg/gomp/simd-clones-2.c: Ditto. + * gfortran.dg/gomp/declare-simd-2.f90: Ditto. + * gfortran.dg/gomp/pr79154-1.f90: Ditto. + * gfortran.dg/gomp/pr83977.f90: Ditto. + +2019-01-22 Jakub Jelinek + + PR target/88965 + * gcc.target/powerpc/pr88965.c: New test. + + PR middle-end/88968 + * c-c++-common/gomp/atomic-23.c: New test. + +2019-01-22 Harald Anlauf + + PR fortran/88579 + * gfortran.dg/power_8.f90: New test. + +2019-01-22 Sandra Loosemore + + * g++.dg/lto/pr87906_0.C: Add dg-require-effective-target fpic. + * g++.dg/vec-init-1.C: Likewise. + * gcc.dg/pr87793.c: Likewise. + +2019-01-22 Sandra Loosemore + + * g++.dg/cpp0x/pr86397-1.C: Add -fdelete-null-pointer-checks. + * g++.dg/cpp0x/pr86397-2.C: Likewise. + +2019-01-22 Richard Earnshaw + + PR target/88469 + * gcc.target/arm/aapcs/bitfield2.c: New test. + * gcc.target/arm/aapcs/bitfield3.c: New test. + +2019-01-22 Wilco Dijkstra + + PR rtl-optimization/87763 + * gcc.dg/vect/vect-nop-move.c: Fix testcase on AArch64. + +2019-01-22 H.J. Lu + + PR target/88954 + * gcc.target/i386/pr88954-1.c: New test. + * gcc.target/i386/pr88954-2.c: Likewise. + +2019-01-22 Richard Earnshaw + + PR target/88469 + * gcc.target/arm/aapcs/bitfield1.c: New test. + * gcc.target/arm/aapcs/overalign_rec1.c: New test. + * gcc.target/arm/aapcs/overalign_rec2.c: New test. + * gcc.target/arm/aapcs/overalign_rec3.c: New test. + +2019-01-22 Manfred Schwarb + + * gfortran.dg/array_function_5.f90: Fix a dg directive. + * gfortran.dg/block_16.f08: Likewise. + * gfortran.dg/dec_structure_14.f90: Likewise. + * gfortran.dg/namelist_96.f90: Likewise. + * gfortran.dg/newunit_5.f90.f90: Moved to + * gfortran.dg/newunit_5.f90: here. + * gfortran.dg/pdt_28.f03: Likewise. + * gfortran.dg/spread_simplify_1.f90: Likewise. + +2019-01-22 Tamar Christina + + PR/tree-optimization 88903 + * gcc.dg/vect/pr88903-1.c: Add explicit &. + +2019-01-22 Jakub Jelinek + + PR rtl-optimization/88904 + * gcc.c-torture/execute/pr88904.c: New test. + + PR target/88905 + * gcc.dg/pr88905.c: New test. + + PR rtl-optimization/49429 + PR target/49454 + PR rtl-optimization/86334 + PR target/88906 + * gcc.target/i386/pr86334.c: New test. + * gcc.target/i386/pr88906.c: New test. + +2019-01-21 Jakub Jelinek + + PR c++/88949 + * g++.dg/gomp/pr88949.C: New test. + +2019-01-21 Manfred Schwarb + + * class_66.f90: Fix a dg directive. + * debug/pr35154-stabs.f: Likewise. + * dec_d_lines_3.f: Likewise. + * dec_d_lines_3.f: Likewise. + * dec_structure_12.f90: Likewise. + * dec_structure_15.f90: Likewise. + * deferred_character_31.f90: Likewise. + * dtio_31.f03: Likewise. + * dtio_32.f03: Likewise. + * extends_11.f03: Likewise. + * integer_plus.f90: Likewise. + * pdt_25.f03: Likewise. + * pr58968.f: Likewise. + * pr78259.f90: Likewise. + * vect/vect-2.f90: Likewise. + * matmul_const.f90: Likewise. + +2019-01-21 Uroš Bizjak + + PR target/88938 + * gcc.target/i386/pr88938.c: New test. + +2019-01-21 Jakub Jelinek + + PR sanitizer/88901 + * g++.dg/asan/pr88901.C: New test. + +2019-01-21 Tamar Christina + + * g++.dg/vect/simd-clone-7.cc: Fix assembler scan. + +2019-01-21 Bernd Edlinger + + PR c/88928 + * c-c++-common/Waddress-of-packed-member-1.c: New test case. + * gcc.dg/pr88928.c: New test case. + +2019-01-21 Jakub Jelinek + + * gcc.dg/utf-array.c: Allow wchar_t to be printed as + {long ,short ,}{unsigned ,}int. + +2019-01-21 Richard Biener + + PR tree-optimization/88934 + * gfortran.dg/pr88934.f90: New testcase. + +2019-01-20 Ulrich Drepper + + Fix after C++ P0600 implementation. + * g++.dg/init/new39.C: Don't just ignore result of new. + +2019-01-20 Iain Buclaw + + * gdc.dg/runnable.d: Add more tests for comparing complex types. + +2019-01-20 Johannes Pfau + + * gdc.dg/runnable.d: Add tests for comparing complex types. + +2019-01-20 Kewen Lin + + * gcc.target/powerpc/altivec_vld_vst_addr.c: Remove, split into + altivec_vld_vst_addr-1.c and altivec_vld_vst_addr-2.c. + * gcc.target/powerpc/altivec_vld_vst_addr-1.c: New test. + * gcc.target/powerpc/altivec_vld_vst_addr-2.c: Ditto. + +2019-01-18 Dominique d'Humieres + + PR fortran/37835 + * gfortran.dg/no-automatic.f90: New test. + +2019-01-19 Steven G. Kargl + + PR fortran/77960 + * gfortran.dg/pr77960.f90: New test. + +2018-01-19 Thomas Koenig + Paul Thomas + + PR fortran/56789 + * gfortran.dg/contiguous_3.f90: Make code compilant. Remove + scan-tree tests that fail with patch. + * gfortran.dg/contiguous_8.f90: New test. + +2019-01-19 Richard Sandiford + + * gfortran.dg/loop_versioning_1.f90: Bump the number of identified + inner strides. + * gfortran.dg/loop_versioning_9.f90: New test. + * gfortran.dg/loop_versioning_10.f90: Likewise. + +2019-01-19 Jakub Jelinek + + PR fortran/88902 + * gfortran.dg/pr88902.f90: New test. + +2019-01-18 Martin Sebor + + * c-c++-common/attr-nonstring-3.c: Remove an xfail. + +2019-01-18 Ian Lance Taylor + + * go.go-torture/execute/names-1.go: Stop using debug/xcoff, which + is no longer externally visible. + +2019-01-18 Marek Polacek + + PR c++/86926 + * g++.dg/cpp1z/constexpr-lambda23.C: New test. + +2019-01-18 H.J. Lu + + PR middle-end/88587 + * g++.target/i386/pr88587.C (dg-do): Add { target ia32 }. + (dg-options): Replace -m32 with -fno-pic. + * gcc.target/i386/mvc13.c (dg-do): Add { target ia32 }. + (dg-options): Remove -m32. + +2019-01-18 Richard Biener + + PR tree-optimization/88903 + * gcc.dg/vect/pr88903-1.c: New testcase. + * gcc.dg/vect/pr88903-2.c: Likewise. + +2019-01-18 H.J. Lu + + PR c/51628 + PR c/88664 + * c-c++-common/pr51628-33.c: New test. + * c-c++-common/pr51628-35.c: New test. + * c-c++-common/pr88664-1.c: Likewise. + * c-c++-common/pr88664-2.c: Likewise. + * gcc.dg/pr51628-34.c: Likewise. + +2019-01-18 Richard Earnshaw + + PR target/88799 + * gcc.target/arm/multilib.exp (config "aprofile"): Add tests for + mp and sec extensions to armv7-a. + +2019-01-18 Martin Liska + + * gcc.dg/no_profile_instrument_function-attr-1.c: Update + expected function name. + +2019-01-18 Jakub Jelinek + + PR tree-optimization/86214 + * g++.dg/opt/pr86214-1.C: New test. + * g++.dg/opt/pr86214-2.C: New test. + +2019-01-18 Christophe Lyon + + * gcc.target/arm/pr77904.c: Add dg-warning for sp clobber. + +2019-01-18 Jakub Jelinek + + Reapply: + 2018-12-15 Jakub Jelinek + + PR target/88489 + * gcc.target/i386/avx512vl-vfixupimmsd-2.c: New test. + * gcc.target/i386/avx512vl-vfixupimmss-2.c: New test. + +2019-01-18 Martin Liska + + PR middle-end/88587 + * g++.target/i386/pr88587.C: New test. + * gcc.target/i386/mvc13.c: New test. + +2018-01-17 Steve Ellcey + + PR fortran/88898 + * gfortran.dg/gomp/declare-simd-2.f90: Add aarch64 target specifier to + warning checks. + * gfortran.dg/gomp/pr79154-1.f90: Ditto. + * gfortran.dg/gomp/pr83977.f90: Ditto. + +2019-01-17 Martin Sebor + + PR middle-end/88273 + * gcc.dg/Warray-bounds-38.c: New test. + +2018-01-17 Steve Ellcey + + * c-c++-common/gomp/pr60823-1.c: Add aarch64 specific + warning checks and assembler scans. + * c-c++-common/gomp/pr60823-3.c: Ditto. + * c-c++-common/gomp/pr63328.c: Ditto. + * g++.dg/gomp/declare-simd-1.C: Ditto. + * g++.dg/gomp/declare-simd-3.C: Ditto. + * g++.dg/gomp/declare-simd-4.C: Ditto. + * g++.dg/gomp/declare-simd-7.C: Ditto. + * g++.dg/gomp/pr88182.C: Ditto. + * g++.dg/vect/simd-clone-7.cc: Ditto. + * gcc.dg/gomp/declare-simd-1.c: Ditto. + * gcc.dg/gomp/declare-simd-3.c: Ditto. + * gcc.dg/gomp/pr59669-2.c: Ditto. + * gcc.dg/gomp/pr87895-1.c: Ditto. + * gcc.dg/gomp/pr87895-2.c: Ditto. + * gcc.dg/gomp/simd-clones-2.c: Ditto. + * gfortran.dg/gomp/declare-simd-2.f90: Ditto. + * gfortran.dg/gomp/pr79154-1.f90: Ditto. + * gfortran.dg/gomp/pr83977.f90: Ditto. + +2019-01-17 Paolo Carlini + + * g++.dg/cpp0x/auto52.C: Test locations too. + * g++.dg/cpp0x/trailing2.C: Likewise. + * g++.dg/cpp1y/auto-fn18.C: Likewise. + * g++.dg/cpp1y/auto-fn25.C: Likewise. + * g++.dg/cpp1y/auto-fn52.C: Likewise. + * g++.dg/cpp1y/auto-fn53.C: Likewise. + * g++.dg/cpp1y/auto-fn54.C: Likewise. + +2019-01-17 David Malcolm + + PR c++/88699 + * g++.dg/template/pr88699.C: New test. + +2019-01-17 Martin Sebor + + PR tree-optimization/88800 + * c-c++-common/Wrestrict.c: Adjust. + * gcc.dg/Warray-bounds-37.c: New test. + * gcc.dg/builtin-memcpy-2.c: New test. + * gcc.dg/builtin-memcpy.c: New test. + +2019-01-17 Tamar Christina + + PR target/88850 + * gcc.target/arm/pr51968.c: Use neon intrinsics. + +2019-01-17 Andrew Stubbs + Kwok Cheung Yeung + Julian Brown + Tom de Vries + + * gcc.dg/20020312-2.c: Add amdgcn support. + * gcc.dg/Wno-frame-address.c: Disable on amdgcn. + * gcc.dg/builtin-apply2.c: Likewise. + * gcc.dg/torture/stackalign/builtin-apply-2.c: Likewise. + * gcc.dg/gimplefe-28.c: Add dg-add-options for sqrt_insn. + * gcc.dg/intermod-1.c: Add -mlocal-symbol-id on amdgcn. + * gcc.dg/memcmp-1.c: Increase timeout factor. + * gcc.dg/pr59605-2.c: Addd -DMAX_COPY=1025 on amdgcn. + * gcc.dg/sibcall-10.c: xfail on amdgcn. + * gcc.dg/sibcall-9.c: Likewise. + * gcc.dg/tree-ssa/gen-vect-11c.c: Likewise. + * gcc.dg/tree-ssa/pr84512.c: Likewise. + * gcc.dg/tree-ssa/loop-1.c: Adjust expectations for amdgcn. + * gfortran.dg/bind_c_array_params_2.f90: Likewise. + * lib/target-supports.exp (check_effective_target_trampolines): + Configure amdgcn. + (check_profiling_available): Likewise. + (check_effective_target_global_constructor): Likewise. + (check_effective_target_return_address): Likewise. + (check_effective_target_fopenacc): Likewise. + (check_effective_target_fopenmp): Likewise. + (check_effective_target_vect_int): Likewise. + (check_effective_target_vect_intfloat_cvt): Likewise. + (check_effective_target_vect_uintfloat_cvt): Likewise. + (check_effective_target_vect_floatint_cvt): Likewise. + (check_effective_target_vect_floatuint_cvt): Likewise. + (check_effective_target_vect_simd_clones): Likewise. + (check_effective_target_vect_shift): Likewise. + (check_effective_target_whole_vector_shift): Likewise. + (check_effective_target_vect_bswap): Likewise. + (check_effective_target_vect_shift_char): Likewise. + (check_effective_target_vect_long): Likewise. + (check_effective_target_vect_float): Likewise. + (check_effective_target_vect_double): Likewise. + (check_effective_target_vect_perm): Likewise. + (check_effective_target_vect_perm_byte): Likewise. + (check_effective_target_vect_perm_short): Likewise. + (check_effective_target_vect_widen_mult_qi_to_hi): Likewise. + (check_effective_target_vect_widen_mult_hi_to_si): Likewise. + (check_effective_target_vect_widen_mult_qi_to_hi_pattern): Likewise. + (check_effective_target_vect_widen_mult_hi_to_si_pattern): Likewise. + (check_effective_target_vect_natural_alignment): Likewise. + (check_effective_target_vect_fully_masked): Likewise. + (check_effective_target_vect_element_align): Likewise. + (check_effective_target_vect_masked_store): Likewise. + (check_effective_target_vect_scatter_store): Likewise. + (check_effective_target_vect_condition): Likewise. + (check_effective_target_vect_cond_mixed): Likewise. + (check_effective_target_vect_char_mult): Likewise. + (check_effective_target_vect_short_mult): Likewise. + (check_effective_target_vect_int_mult): Likewise. + (check_effective_target_sqrt_insn): Likewise. + (check_effective_target_vect_call_sqrtf): Likewise. + (check_effective_target_vect_call_btrunc): Likewise. + (check_effective_target_vect_call_btruncf): Likewise. + (check_effective_target_vect_call_ceil): Likewise. + (check_effective_target_vect_call_floorf): Likewise. + (check_effective_target_lto): Likewise. + (check_vect_support_and_set_flags): Likewise. + (check_effective_target_vect_stridedN): Enable when fully masked is + available. + (add_options_for_sqrt_insn): New procedure. + +2019-01-17 Andrew Stubbs + + * lib/file-format.exp (gcc_target_object_format): Handle AMD GCN. + * lib/gcc-dg.exp (gcc-dg-prune): Ignore blank lines from the LLVM + linker. + * lib/target-supports.exp (check_effective_target_llvm_binutils): New. + +2019-01-17 Andrew Stubbs + + * gcc.dg/graphite/scop-19.c: Check pie_enabled. + * gcc.dg/pic-1.c: Disable on amdgcn. + * gcc.dg/pic-2.c: Disable on amdgcn. + * gcc.dg/pic-3.c: Disable on amdgcn. + * gcc.dg/pic-4.c: Disable on amdgcn. + * gcc.dg/pie-3.c: Disable on amdgcn. + * gcc.dg/pie-4.c: Disable on amdgcn. + * gcc.dg/uninit-19.c: Check pie_enabled. + * lib/target-supports.exp (check_effective_target_pie): Add amdgcn. + +2019-01-17 Andrew Stubbs + Kwok Cheung Yeung + Julian Brown + Tom de Vries + + * c-c++-common/ubsan/pr71512-1.c: Require exceptions. + * c-c++-common/ubsan/pr71512-2.c: Require exceptions. + * gcc.c-torture/compile/pr34648.c: Require exceptions. + * gcc.c-torture/compile/pr41469.c: Require exceptions. + * gcc.dg/20111216-1.c: Require exceptions. + * gcc.dg/cleanup-10.c: Require exceptions. + * gcc.dg/cleanup-11.c: Require exceptions. + * gcc.dg/cleanup-12.c: Require exceptions. + * gcc.dg/cleanup-13.c: Require exceptions. + * gcc.dg/cleanup-5.c: Require exceptions. + * gcc.dg/cleanup-8.c: Require exceptions. + * gcc.dg/cleanup-9.c: Require exceptions. + * gcc.dg/gomp/pr29955.c: Require exceptions. + * gcc.dg/lto/pr52097_0.c: Require exceptions. + * gcc.dg/nested-func-5.c: Require exceptions. + * gcc.dg/pch/except-1.c: Require exceptions. + * gcc.dg/pch/valid-2.c: Require exceptions. + * gcc.dg/pr41470.c: Require exceptions. + * gcc.dg/pr42427.c: Require exceptions. + * gcc.dg/pr44545.c: Require exceptions. + * gcc.dg/pr47086.c: Require exceptions. + * gcc.dg/pr51481.c: Require exceptions. + * gcc.dg/pr51644.c: Require exceptions. + * gcc.dg/pr52046.c: Require exceptions. + * gcc.dg/pr54669.c: Require exceptions. + * gcc.dg/pr56424.c: Require exceptions. + * gcc.dg/pr64465.c: Require exceptions. + * gcc.dg/pr65802.c: Require exceptions. + * gcc.dg/pr67563.c: Require exceptions. + * gcc.dg/tree-ssa/pr41469-1.c: Require exceptions. + * gcc.dg/tree-ssa/ssa-dse-28.c: Require exceptions. + * gcc.dg/vect/pr46663.c: Require exceptions. + * lib/target-supports.exp (check_effective_target_exceptions): New. + +2019-01-17 Tamar Christina + + PR target/88851 + * gcc.target/aarch64/stack-check-cfa-3.c: Update test. + +2019-01-17 Nathan Sidwell + + PR c++/86610 + * g++.dg/cpp0x/pr86610.C: New. + +2019-01-17 Wei Xiao + + * gcc.target/i386/avx512f-vfixupimmpd-2.c: Fix the test cases for + VFIXUPIMM* intrinsics. + * gcc.target/i386/avx512f-vfixupimmps-2.c: Ditto. + * gcc.target/i386/avx512f-vfixupimmsd-2.c: Ditto. + * gcc.target/i386/avx512f-vfixupimmss-2.c: Ditto. + +2019-01-17 Wei Xiao + + PR target/88794 + Revert: + 2018-11-06 Wei Xiao + + * gcc.target/i386/avx-1.c: Update tests for VFIXUPIMM* intrinsics. + * gcc.target/i386/avx512f-vfixupimmpd-1.c: Ditto. + * gcc.target/i386/avx512f-vfixupimmpd-2.c: Ditto. + * gcc.target/i386/avx512f-vfixupimmps-1.c: Ditto. + * gcc.target/i386/avx512f-vfixupimmsd-1.c: Ditto. + * gcc.target/i386/avx512f-vfixupimmsd-2.c: Ditto. + * gcc.target/i386/avx512f-vfixupimmss-1.c: Ditto. + * gcc.target/i386/avx512f-vfixupimmss-2.c: Ditto. + * gcc.target/i386/avx512vl-vfixupimmpd-1.c: Ditto. + * gcc.target/i386/avx512vl-vfixupimmps-1.c: Ditto. + * gcc.target/i386/sse-13.c: Ditto. + * gcc.target/i386/sse-14.c: Ditto. + * gcc.target/i386/sse-22.c: Ditto. + * gcc.target/i386/sse-23.c: Ditto. + * gcc.target/i386/testimm-10.c: Ditto. + * gcc.target/i386/testround-1.c: Ditto. + +2019-01-17 Wei Xiao + + PR target/88794 + Revert: + 2018-12-15 Jakub Jelinek + + PR target/88489 + * gcc.target/i386/avx512vl-vfixupimmsd-2.c: New test. + * gcc.target/i386/avx512vl-vfixupimmss-2.c: New test. + +2019-01-17 Jakub Jelinek + + PR rtl-optimization/88870 + * gcc.dg/pr88870.c: New test. + +2019-01-17 Kewen Lin + + * gcc.target/powerpc/altivec_vld_vst_addr.c: New test. + +2019-01-17 Alexandre Oliva + + PR c++/87768 + * g++.dg/concepts/pr87768.C: New. + + PR c++/86648 + * gcc.dg/cpp1z/pr86648.C: New. + +2019-01-17 Kewen Lin + + PR target/87306 + * gcc.dg/vect/bb-slp-pow-1.c: Modify to reflect that the loop is not + vectorized on POWER unless hardware misaligned loads are available. + +2019-01-16 David Malcolm + + PR target/88861 + * g++.dg/torture/pr88861.C: New test. + +2019-01-16 Tamar Christina + + PR debug/88046 + * g++.dg/lto/pr88046_0.C: Check for shared and fPIC. + +2019-01-16 Paolo Carlini + + * g++.dg/other/pr33558.C: Test location too. + * g++.dg/other/pr33558-2.C: Likewise. + * g++.dg/parse/crash4.C: Likewise. + * g++.old-deja/g++.brendan/err-msg11.C: Likewise. + * g++.old-deja/g++.mike/p7635.C: Likewise. + * g++.old-deja/g++.other/decl6.C: Likewise. + +2019-01-16 Marek Polacek + + PR c++/78244 - narrowing conversion in template not detected. + * g++.dg/cpp0x/Wnarrowing13.C: New test. + * g++.dg/cpp0x/Wnarrowing14.C: New test. + +2019-01-16 Jakub Jelinek + + PR c/51628 + PR target/88682 + * c-c++-common/pr51628-10.c (unaligned_int128_t): Add + may_alias attribute. + +2019-01-15 Nikhil Benesch + + * gcc.misc-tests/godump-1.c: Add test case for typedef before + struct. + +2019-01-15 David Malcolm + + PR c++/88795 + * g++.dg/template/pr88795.C: New test. + +2019-01-15 Thomas Koenig + + PR fortran/43136 + * gfortran.dg/actual_array_substr_3.f90: New test. + +2019-01-15 Steven G. Kargl + + PR fortran/81849 + * gfortran.dg/pr81849.f90: New test. + +2019-01-15 Paul Thomas + + * gfortran.dg/ISO_Fortran_binding_2.c: Change reference to + ISO_Fortran_binding_2.h. + +2019-01-15 Marek Polacek + + PR c++/88866 + * g++.dg/cpp0x/variadic126.C: Tweak dg-error. + +2019-01-15 Richard Sandiford + + PR inline-asm/52813 + * gcc.target/i386/pr52813.c (test1): Turn the diagnostic into a + -Wdeprecated warning and expect a following note:. + +2019-01-15 Richard Biener + + PR debug/88046 + * g++.dg/lto/pr88046_0.C: New testcase. + +2019-01-15 Richard Biener + + PR tree-optimization/88855 + * gcc.dg/pr88855.c: New testcase. + +2019-01-15 Paolo Carlini + + * g++.dg/diagnostic/typedef-initialized.C: New. + +2019-01-15 Paolo Carlini + + * g++.dg/diagnostic/bitfld3.C: New. + +2019-01-15 Jakub Jelinek + + PR tree-optimization/88775 + * gcc.dg/tree-ssa/pr88775-1.c: New test. + * gcc.dg/tree-ssa/pr88775-2.c: New test. + +2019-01-14 Marek Polacek + + PR c++/88825 - ICE with bogus function return type deduction. + * g++.dg/cpp1y/auto-fn55.C: New test. + +2019-01-14 Jakub Jelinek + + * g++.dg/cpp1z/feat-cxx1z.C: Add tests for + __cpp_guaranteed_copy_elision and __cpp_nontype_template_parameter_auto + feature test macros. + * g++.dg/cpp2a/feat-cxx2a.C: Likewise. + +2019-01-14 Marek Polacek + + PR c++/88830 - ICE with abstract class. + * g++.dg/other/abstract7.C: New test. + +2019-01-14 Martin Sebor + + PR target/88638 + * gcc.dg/format/attr-8.c: New test. + * gcc.dg/darwin-cfstring-format-1.c: Adjust diagnostics. + * gcc.dg/format/attr-3.c: Same. + * obj-c++.dg/fsf-nsstring-format-1.mm: Same. + * objc.dg/fsf-nsstring-format-1.m: Same. + +2019-01-14 Martin Liska + + PR gcov-profile/88263 + * g++.dg/gcov/pr88263-2.C: New test. + +2019-01-14 Jakub Jelinek + + PR rtl-optimization/88796 + * gcc.target/i386/pr88796.c: New test. + +2019-01-14 Iain Buclaw + + * gdc.dg/asm1.d: New test. + * gdc.dg/asm2.d: New test. + * gdc.dg/asm3.d: New test. + * gdc.dg/asm4.d: New test. + * lib/gdc.exp (gdc_init): Set gcc_error_prefix and gcc_warning_prefix. + +2019-01-13 Jerry DeLisle + + PR libfortran/88776 + * gfortran.dg/namelist_96.f90: New test. + +2019-01-13 Thomas Koenig + + PR fortran/59345 + * gfortran.dg/internal_pack_18.f90: New test. + +2019-01-13 H.J. Lu + + * gcc.dg/pr51628-20.c: Updated. + * gcc.dg/pr51628-21.c: Likewise. + * gcc.dg/pr51628-25.c: Likewise. + +2019-01-13 Thomas Koenig + + PR fortran/59345 + * gfortran.dg/internal_pack_17.f90: New test. + * gfortran.dg/alloc_comp_auto_array_3.f90: Adjust number of calls + to builtin_free. + +2019-01-12 Steven G. Kargl + + PR fortran/61765 + * gfortran.dg/pr61765.f90: New test. + +2019-01-12 Paolo Carlini + + * g++.dg/cpp0x/pr62101.C: Test locations too. + * g++.dg/inherit/pure1.C: Likewise. + +2019-01-12 Paul Thomas + + * gfortran.dg/ISO_Fortran_binding_2.f90: Remove because of + reports of ICEs. + * gfortran.dg/ISO_Fortran_binding_2.c: Ditto. + +2019-01-12 Paul Thomas + + * gfortran.dg/ISO_Fortran_binding_1.f90: New test. + * gfortran.dg/ISO_Fortran_binding_1.c: Auxilliary file for test. + * gfortran.dg/ISO_Fortran_binding_2.f90: New test. + * gfortran.dg/ISO_Fortran_binding_2.c: Auxilliary file for test. + * gfortran.dg/bind_c_array_params_2.f90: Change search string + for dump tree scan. + +2019-01-11 Steven G. Kargl + + PR fortran/35031 + * gfortran.dg/pr35031.f90: new test. + +2019-01-11 Marek Polacek + + PR c++/88692, c++/87882 - -Wredundant-move false positive with *this. + * g++.dg/cpp0x/Wredundant-move5.C: New test. + * g++.dg/cpp0x/Wredundant-move6.C: New test. + +2019-01-11 Jakub Jelinek + + PR middle-end/85956 + PR lto/88733 + * c-c++-common/gomp/pr85956.c: New test. + * g++.dg/gomp/pr88733.C: New test. + +2019-01-11 Tobias Burnus + + PR C++/88114 + * g++.dg/cpp0x/defaulted61.C: New + * g++.dg/cpp0x/defaulted62.C: New. + +2019-01-11 Jakub Jelinek + + PR tree-optimization/88693 + * gcc.c-torture/execute/pr88693.c: New test. + +2019-01-11 Tamar Christina + + * gcc.target/aarch64/advsimd-intrinsics/vector-complex_f16.c: Require neon + and add options. + +2019-01-11 Martin Liska + + PR middle-end/88758 + * g++.dg/lto/pr88758_0.C: New test. + * g++.dg/lto/pr88758_1.C: New test. + +2019-01-11 Jan Beulich + + * gcc.target/i386/avx512f-vcvtsd2si-1.c, + gcc.target/i386/avx512f-vcvtss2si-1.c, + gcc.target/i386/avx512f-vcvttsd2si-1.c, + gcc.target/i386/avx512f-vcvttss2si-1.c: Permit l suffix. + * gcc.target/i386/avx512f-vcvtsi2ss-1.c, + gcc.target/i386/avx512f-vcvtusi2sd-1.c, + gcc.target/i386/avx512f-vcvtusi2ss-1.c: Expect l suffix. + * gcc.target/i386/avx512f-vcvtusi2sd-2.c, + gcc.target/i386/avx512f-vcvtusi2sd64-2.c, + gcc.target/i386/avx512f-vcvtusi2ss-2.c, + gcc.target/i386/avx512f-vcvtusi2ss64-2.c: Add asm volatile(). + gcc.target/i386/pr19398.c: Permit l or q suffix. + +2019-01-11 Jakub Jelinek + + PR rtl-optimization/88296 + * gcc.target/i386/pr88296.c: New test. + +2019-01-11 Paolo Carlini + + * g++.dg/diagnostic/extern-initialized.C: New. + * g++.dg/ext/dllimport-initialized.C: Likewise. + +2019-01-11 Thomas Koenig + + PR fortran/59345 + * gfortran.dg/internal_pack_16.f90: New test. + +2019-01-10 Jakub Jelinek + + PR target/88785 + * g++.target/i386/pr88785.C: New test. + +2019-01-10 Vladimir Makarov + + PR rtl-optimization/87305 + * gcc.target/aarch64/pr87305.c: New. + +2019-01-10 Richard Biener + + PR tree-optimization/88792 + * gcc.dg/torture/pr88792.c: New testcase. + +2019-01-10 Steven G. Kargl + + PR fortran/86322 + * gfortran.dg/pr86322_1.f90: New test. + * gfortran.dg/pr86322_2.f90: Ditto. + * gfortran.dg/pr86322_3.f90: Ditto. + +2019-01-10 Sudakshina Das + + * gcc.target/aarch64/bti-1.c: Exempt for ilp32. + * gcc.target/aarch64/bti-2.c: Likewise. + * gcc.target/aarch64/bti-3.c: Likewise. + +2019-01-10 Stefan Agner + + PR target/88648 + * gcc.target/arm/pr88648-asm-syntax-unified.c: Add test to + check if -masm-syntax-unified gets applied properly. + +2019-01-10 Jakub Jelinek + + PR c/88568 + * gcc.dg/pr88568.c: New test. + +2019-01-10 Tamar Christina + + * gcc.target/aarch64/advsimd-intrinsics/vector-complex.c: Add AArch32 regexpr. + * gcc.target/aarch64/advsimd-intrinsics/vector-complex_f16.c: Likewise. + +2019-01-10 Tamar Christina + + * gcc.target/aarch64/advsimd-intrinsics/vector-complex.c: New test. + * gcc.target/aarch64/advsimd-intrinsics/vector-complex_f16.c: New test. + +2019-01-10 Tamar Christina + + * lib/target-supports.exp + (check_effective_target_arm_v8_3a_complex_neon_ok_nocache, + check_effective_target_arm_v8_3a_complex_neon_ok, + add_options_for_arm_v8_3a_complex_neon, + check_effective_target_arm_v8_3a_complex_neon_hw, + check_effective_target_vect_complex_rot_N): New. + +2019-01-09 Steven G. Kargl + + PR fortran/88376 + * gfortran.dg/pr88376.f90: New test. + +2019-01-09 Sandra Loosemore + + PR other/16615 + * g++.dg/lto/odr-1_1.C: Update diagnostic message patterns to replace + "can not" with "cannot". + * gfortran.dg/common_15.f90: Likewise. + * gfortran.dg/derived_result_2.f90: Likewise. + * gfortran.dg/do_check_6.f90: Likewise. + * gfortran.dg/namelist_args.f90: Likewise. + * gfortran.dg/negative_unit_check.f90: Likewise. + * gfortran.dg/pure_formal_3.f90: Likewise. + * obj-c++.dg/attributes/method-attribute-2.mm: Likewise. + * obj-c++.dg/exceptions-3.mm: Likewise. + * obj-c++.dg/exceptions-4.mm: Likewise. + * obj-c++.dg/exceptions-5.mm: Likewise. + * obj-c++.dg/property/at-property-23.mm: Likewise. + * obj-c++.dg/property/dotsyntax-17.mm: Likewise. + * obj-c++.dg/property/property-neg-7.mm: Likewise. + * objc.dg/attributes/method-attribute-2.m: Likewise. + * objc.dg/exceptions-3.m: Likewise. + * objc.dg/exceptions-4.m: Likewise. + * objc.dg/exceptions-5.m: Likewise. + * objc.dg/param-1.m: Likewise. + * objc.dg/property/at-property-23.m: Likewise. + * objc.dg/property/dotsyntax-17.m: Likewise. + * objc.dg/property/property-neg-7.m: Likewise. + +2019-01-09 Thomas Koenig + + PR fortran/68426 + * gfortran.dg/spread_simplify_1.f90: New test. + +2019-01-09 Uroš Bizjak + + * lib/target-supports.exp + (check_effective_target_xorsign): Add i?86-*-* and x86_64-*-* targets. + * gcc.target/i386/xorsign.c: New test. + +2019-01-09 Eric Botcazou + + * gcc.target/sparc/tls-ld-int8.c: New test. + * gcc.target/sparc/tls-ld-int16.c: Likewise. + * gcc.target/sparc/tls-ld-int32.c: Likewise. + * gcc.target/sparc/tls-ld-uint8.c: Likewise. + * gcc.target/sparc/tls-ld-uint16.c: Likewise. + * gcc.target/sparc/tls-ld-uint32.c: Likewise. + +2018-01-09 Sudakshina Das + + * gcc.target/aarch64/bti-1.c: Update test to not add command line + option when configure with bti. + * gcc.target/aarch64/bti-2.c: Likewise. + * lib/target-supports.exp + (check_effective_target_default_branch_protection): + Add configure check for --enable-standard-branch-protection. + +2018-01-09 Sudakshina Das + + * gcc.target/aarch64/bti-1.c: New test. + * gcc.target/aarch64/bti-2.c: New test. + * gcc.target/aarch64/bti-3.c: New test. + * lib/target-supports.exp + (check_effective_target_aarch64_bti_hw): Add new check for BTI hw. + +2018-01-09 Sudakshina Das + + * gcc.target/aarch64/test_frame_17.c: Update to check for EP0_REGNUM + instead of IP0_REGNUM and add test case. + +2019-01-09 Alejandro Martinez + + * gcc.target/aarch64/sve/copysign_1.c: New test for SVE vectorized + copysign. + * gcc.target/aarch64/sve/copysign_1_run.c: Likewise. + * gcc.target/aarch64/sve/xorsign_1.c: New test for SVE vectorized + xorsign. + * gcc.target/aarch64/sve/xorsign_1_run.c: Likewise. + +2019-01-09 Jakub Jelinek + + PR rtl-optimization/88331 + * gcc.target/i386/pr88331.c: New test. + +2019-01-08 Paolo Carlini + + * g++.dg/diagnostic/constexpr2.C: New. + * g++.dg/diagnostic/ref3.C: Likewise. + +2019-01-08 Marek Polacek + + PR c++/88538 - braced-init-list in template-argument-list. + * g++.dg/cpp2a/nontype-class11.C: New test. + + PR c++/88744 + * g++.dg/cpp2a/nontype-class12.C: New test. + +2019-01-08 Jakub Jelinek + + PR target/88457 + * gcc.target/powerpc/pr88457.c: Remove -m32, -c and -mcpu=e300c3 from + dg-options. Require ppc_cpu_supports_hw effective target instead of + powerpc64*-*-*. + +2019-01-08 Janus Weil + + PR fortran/88047 + * gfortran.dg/class_69.f90: New test case. + +2019-01-08 H.J. Lu + + PR target/88717 + * gcc.target/i386/pr88717.c: New test. + +2019-01-08 Marek Polacek + + PR c++/88548 - this accepted in static member functions. + * g++.dg/cpp0x/this1.C: New test. + +2019-01-08 Martin Liska + + PR tree-optimization/88753 + * gcc.dg/tree-ssa/pr88753.c: New test. + +2019-01-08 Richard Biener + + PR tree-optimization/86554 + * gcc.dg/torture/pr86554-1.c: New testcase. + * gcc.dg/torture/pr86554-2.c: Likewise. + +2019-01-08 Paolo Carlini + + * g++.dg/diagnostic/thread1.C: Tweak expected error #line 13 to + cover target variance. + +2019-01-08 Richard Biener + + PR fortran/88611 + * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_* + directly build the expected GENERIC tree. + +2019-01-08 Sam Tebbs + + * gcc.target/aarch64/(return_address_sign_1.c, + return_address_sign_2.c, return_address_sign_3.c (__attribute__)): + Change option to -mbranch-protection. + * gcc.target/aarch64/(branch-protection-option.c, + branch-protection-option-2.c, branch-protection-attr.c, + branch-protection-attr-2.c): New file. + +2019-01-08 Paolo Carlini + + * g++.dg/diagnostic/out-of-class-redeclaration.C: New. + +2019-01-08 Iain Sandoe + + * c-c++-common/builtin-has-attribute-3.c: Skip tests requiring symbol + alias support. + * c-c++-common/builtin-has-attribute-4.c: Likewise. + Append match for warning that ‘protected’ attribute is not supported. + +2019-01-08 Iain Sandoe + + * gcc.dg/Wmissing-attributes.c: Require alias support. + * gcc.dg/attr-copy-2.c: Likewise. + * gcc.dg/attr-copy-5.c: Likewise. + +2019-01-08 Jonathan Wakely + Jakub Jelinek + + PR c++/88554 + * g++.dg/warn/Wreturn-type-11.C: New test. + +2019-01-07 David Malcolm + + PR jit/88747 + * jit.dg/test-sum-of-squares.c (verify_code): Update expected vrp + dump to reflect r266077. + +2019-01-07 Jakub Jelinek + + PR c/88701 + * gcc.dg/pr88701.c: New test. + +2019-01-07 Joseph Myers + + PR c/88720 + PR c/88726 + * gcc.dg/inline-40.c, gcc.dg/inline-41.c: New tests. + +2019-01-07 Paolo Carlini + + * g++.dg/diagnostic/constexpr1.C: New. + * g++.dg/diagnostic/thread1.C: Likewise. + +2019-01-07 Thomas Koenig + Harald Anlauf + Tobias Burnus + + * gfortran.dg/is_contiguous_1.f90: New test. + * gfortran.dg/is_contiguous_2.f90: New test. + * gfortran.dg/is_contiguous_3.f90: New test. + +2019-01-07 Marek Polacek + + PR c++/88741 - wrong error with initializer-string. + * g++.dg/init/array50.C: New test. + +2019-01-07 Bernd Edlinger + + PR c++/88261 + PR c++/69338 + PR c++/69696 + PR c++/69697 + * gcc.dg/array-6.c: Move from here ... + * c-c++-common/array-6.c: ... to here and add some more test coverage. + * g++.dg/pr69338.C: New test. + * g++.dg/pr69697.C: Likewise. + * g++.dg/ext/flexary32.C: Likewise. + * g++.dg/ext/flexary3.C: Adjust test. + * g++.dg/ext/flexary12.C: Likewise. + * g++.dg/ext/flexary13.C: Likewise. + * g++.dg/ext/flexary15.C: Likewise. + * g++.dg/warn/Wplacement-new-size-1.C: Likewise. + * g++.dg/warn/Wplacement-new-size-2.C: Likewise. + * g++.dg/warn/Wplacement-new-size-6.C: Likewise. + +2019-01-07 Richard Earnshaw + + * gcc.target/aarch64/subs_compare_2.c: Make '#' immediate prefix + optional in scan pattern. + +2019-01-07 Richard Sandiford + + PR tree-optimization/88598 + * gcc.dg/vect/pr88598-1.c: New test. + * gcc.dg/vect/pr88598-2.c: Likewise. + * gcc.dg/vect/pr88598-3.c: Likewise. + * gcc.dg/vect/pr88598-4.c: Likewise. + * gcc.dg/vect/pr88598-5.c: Likewise. + * gcc.dg/vect/pr88598-6.c: Likewise. + +2019-01-07 Richard Sandiford + + PR tree-optimization/88598 + * gcc.dg/pr88598-1.c: New test. + * gcc.dg/pr88598-2.c: Likewise. + * gcc.dg/pr88598-3.c: Likewise. + * gcc.dg/pr88598-4.c: Likewise. + * gcc.dg/pr88598-5.c: Likewise. + +2019-01-07 Jakub Jelinek + + PR tree-optimization/88676 + * gcc.dg/tree-ssa/pr88676.c: New test. + * gcc.dg/pr88676.c: New test. + * gcc.dg/tree-ssa/pr15826.c: Just verify there is no goto, + allow &. + + PR sanitizer/88619 + * c-c++-common/asan/pr88619.c: New test. + + PR c++/85052 + * c-c++-common/builtin-convertvector-1.c: New test. + * c-c++-common/torture/builtin-convertvector-1.c: New test. + * g++.dg/ext/builtin-convertvector-1.C: New test. + * g++.dg/cpp0x/constexpr-builtin4.C: New test. + +2018-12-26 Mateusz B + + PR target/88521 + * gcc.target/i386/pr88521.c: New testcase. + +2019-01-06 Thomas Koenig + + PR fortran/88658 + * gfortran.dg/min_max_type_2.f90: New test. + +2019-01-06 Jakub Jelinek + + PR c/88363 + * c-c++-common/attributes-4.c (falloc_align_int128, + falloc_size_int128): Guard with #ifdef __SIZEOF_INT128__. + +2019-01-05 Jan Hubicka + + * gcc.dg/ipa/ipcp-2.c: Update bounds. + +2019-01-05 Dominique d'Humieres + + * gcc.dg/plugin/plugindir1.c: Adjust dg-prune-output for Darwin. + * gcc.dg/plugin/plugindir2.c: Likewise. + * gcc.dg/plugin/plugindir3.c: Likewise. + * gcc.dg/plugin/plugindir4.c: Likewise. + +2019-01-05 Janus Weil + + PR fortran/88009 + * gfortran.dg/blockdata_10.f90: New test case. + +2019-01-05 Jakub Jelinek + + PR middle-end/82564 + PR target/88620 + * gcc.dg/nested-func-12.c: New test. + * gcc.c-torture/compile/pr82564.c: New test. + + PR debug/88635 + * gcc.dg/debug/dwarf2/pr88635.c: New test. + +2019-01-05 Dominique d'Humieres + + PR target/60563 + * g++.dg/ext/sync-4.C: Add dg-xfail-run-if for darwin. + +2019-01-04 Martin Sebor + + PR c/88546 + * g++.dg/ext/attr-copy.C: New test. + * gcc.dg/attr-copy-4.c: Disable macro expansion tracking. + * gcc.dg/attr-copy-6.c: New test. + * gcc.dg/attr-copy-7.c: New test. + +2019-01-04 Martin Sebor + + PR c/88363 + * c-c++-common/attributes-4.c: New test. + +2019-01-04 Sam Tebbs + + PR gcc/87763 + * gcc.target/aarch64/combine_bfxil.c: Change scan-assembler-times bfxil + count to 18. + +2019-01-04 Thomas Koenig + + PR fortran/48543 + * gfortran.dg/const_chararacter_merge.f90: Actually remove. + * gfortran.dg/merge_char_const.f90: Restore. + +2019-01-04 Jakub Jelinek + + PR target/88594 + * gcc.dg/pr88594.c: New test. + +2019-01-04 Jan Beulich + + * gcc.target/i386/avx512bitalg-vpshufbitqmb.c, + gcc.target/i386/avx512bw-vpcmpeqb-1.c, + gcc.target/i386/avx512bw-vpcmpequb-1.c, + gcc.target/i386/avx512bw-vpcmpequw-1.c, + gcc.target/i386/avx512bw-vpcmpeqw-1.c, + gcc.target/i386/avx512bw-vpcmpgeb-1.c, + gcc.target/i386/avx512bw-vpcmpgeub-1.c, + gcc.target/i386/avx512bw-vpcmpgeuw-1.c, + gcc.target/i386/avx512bw-vpcmpgew-1.c, + gcc.target/i386/avx512bw-vpcmpgtb-1.c, + gcc.target/i386/avx512bw-vpcmpgtub-1.c, + gcc.target/i386/avx512bw-vpcmpgtuw-1.c, + gcc.target/i386/avx512bw-vpcmpgtw-1.c, + gcc.target/i386/avx512bw-vpcmpleb-1.c, + gcc.target/i386/avx512bw-vpcmpleub-1.c, + gcc.target/i386/avx512bw-vpcmpleuw-1.c, + gcc.target/i386/avx512bw-vpcmplew-1.c, + gcc.target/i386/avx512bw-vpcmpltb-1.c, + gcc.target/i386/avx512bw-vpcmpltub-1.c, + gcc.target/i386/avx512bw-vpcmpltuw-1.c, + gcc.target/i386/avx512bw-vpcmpltw-1.c, + gcc.target/i386/avx512bw-vpcmpneqb-1.c, + gcc.target/i386/avx512bw-vpcmpnequb-1.c, + gcc.target/i386/avx512bw-vpcmpnequw-1.c, + gcc.target/i386/avx512bw-vpcmpneqw-1.c, + gcc.target/i386/avx512bw-vpmovb2m-1.c, + gcc.target/i386/avx512bw-vpmovm2b-1.c, + gcc.target/i386/avx512bw-vpmovm2w-1.c, + gcc.target/i386/avx512bw-vpmovw2m-1.c, + gcc.target/i386/avx512bw-vptestmb-1.c, + gcc.target/i386/avx512bw-vptestmw-1.c, + gcc.target/i386/avx512bw-vptestnmb-1.c, + gcc.target/i386/avx512bw-vptestnmw-1.c, + gcc.target/i386/avx512cd-vpbroadcastmb2q-1.c, + gcc.target/i386/avx512cd-vpbroadcastmw2d-1.c, + gcc.target/i386/avx512dq-vfpclasssd-1.c, + gcc.target/i386/avx512dq-vfpclassss-1.c, + gcc.target/i386/avx512dq-vpmovd2m-1.c, + gcc.target/i386/avx512dq-vpmovm2d-1.c, + gcc.target/i386/avx512dq-vpmovm2q-1.c, + gcc.target/i386/avx512dq-vpmovq2m-1.c, + gcc.target/i386/avx512vl-vpbroadcastmb2q-1.c, + gcc.target/i386/avx512vl-vpbroadcastmw2d-1.c, + gcc.target/i386/avx512vl-vpcmpeqd-1.c, + gcc.target/i386/avx512vl-vpcmpeqq-1.c, + gcc.target/i386/avx512vl-vpcmpequd-1.c, + gcc.target/i386/avx512vl-vpcmpequq-1.c, + gcc.target/i386/avx512vl-vpcmpged-1.c, + gcc.target/i386/avx512vl-vpcmpgeq-1.c, + gcc.target/i386/avx512vl-vpcmpgeud-1.c, + gcc.target/i386/avx512vl-vpcmpgeuq-1.c, + gcc.target/i386/avx512vl-vpcmpgtd-1.c, + gcc.target/i386/avx512vl-vpcmpgtq-1.c, + gcc.target/i386/avx512vl-vpcmpgtud-1.c, + gcc.target/i386/avx512vl-vpcmpgtuq-1.c, + gcc.target/i386/avx512vl-vpcmpled-1.c, + gcc.target/i386/avx512vl-vpcmpleq-1.c, + gcc.target/i386/avx512vl-vpcmpleud-1.c, + gcc.target/i386/avx512vl-vpcmpleuq-1.c, + gcc.target/i386/avx512vl-vpcmpltd-1.c, + gcc.target/i386/avx512vl-vpcmpltq-1.c, + gcc.target/i386/avx512vl-vpcmpltud-1.c, + gcc.target/i386/avx512vl-vpcmpltuq-1.c, + gcc.target/i386/avx512vl-vpcmpneqd-1.c, + gcc.target/i386/avx512vl-vpcmpneqq-1.c, + gcc.target/i386/avx512vl-vpcmpnequd-1.c, + gcc.target/i386/avx512vl-vpcmpnequq-1.c, + gcc.target/i386/avx512vl-vptestmd-1.c, + gcc.target/i386/avx512vl-vptestmq-1.c, + gcc.target/i386/avx512vl-vptestnmd-1.c, + gcc.target/i386/avx512vl-vptestnmq-1.c: Permit %k0 as ordinary + operand. + * gcc.target/i386/avx512bw-vpcmpb-1.c, + gcc.target/i386/avx512bw-vpcmpub-1.c, + gcc.target/i386/avx512bw-vpcmpuw-1.c, + gcc.target/i386/avx512bw-vpcmpw-1.c, + gcc.target/i386/avx512dq-vfpclasspd-1.c, + gcc.target/i386/avx512dq-vfpclassps-1.c, + gcc.target/i386/avx512f-vcmppd-1.c, + gcc.target/i386/avx512f-vcmpps-1.c, + gcc.target/i386/avx512f-vcmpsd-1.c, + gcc.target/i386/avx512f-vcmpss-1.c, + gcc.target/i386/avx512f-vpcmpd-1.c, + gcc.target/i386/avx512f-vpcmpq-1.c, + gcc.target/i386/avx512f-vpcmpud-1.c, + gcc.target/i386/avx512f-vpcmpuq-1.c, + gcc.target/i386/avx512f-vptestmd-1.c, + gcc.target/i386/avx512f-vptestmq-1.c, + gcc.target/i386/avx512f-vptestnmd-1.c, + gcc.target/i386/avx512f-vptestnmq-1.c, + gcc.target/i386/avx512vl-vcmppd-1.c, + gcc.target/i386/avx512vl-vcmpps-1.c, + gcc.target/i386/avx512vl-vpcmpd-1.c, + gcc.target/i386/avx512vl-vpcmpq-1.c, + gcc.target/i386/avx512vl-vpcmpud-1.c, + gcc.target/i386/avx512vl-vpcmpuq-1.c: Likewise. Don't permit %k0 + as mask operand. + +2019-01-03 Martin Sebor + + PR tree-optimization/88659 + * gcc.dg/Wstringop-truncation-6.c: New test. + +2019-01-02 Thomas Koenig + + PR fortran/48543 + * gfortran.dg/const_chararacter_merge.f90: Remove. + +2019-01-03 Jakub Jelinek + + PR debug/88644 + * gcc.dg/debug/dwarf2/pr88644.c: New test. + * gcc.dg/debug/dwarf2/pr80263.c: Remove darwin hack. + +2019-01-03 Iain Sandoe + + * gcc.dg/pubtypes-2.c: Adjust expected pubtypes length. + * gcc.dg/pubtypes-3.c: Likewise. + * gcc.dg/pubtypes-4.c: Likewise. + +2019-01-03 Jakub Jelinek + + PR c++/88636 + * g++.target/i386/pr88636.C: New test. + +2019-01-03 Paolo Carlini + + * g++.dg/cpp1z/nodiscard3.C: Test locations too. + +2019-01-03 Martin Liska + + PR testsuite/88436 + * gcc.target/powerpc/pr54240.c: Scan phiopt2. + +2019-01-02 Marek Polacek + + PR c++/88612 - ICE with -Waddress-of-packed-member. + * g++.dg/warn/Waddress-of-packed-member1.C: New test. + + PR c++/88631 - CTAD failing for value-initialization. + * g++.dg/cpp1z/class-deduction59.C: New test. + + PR c++/81486 - CTAD failing with (). + * g++.dg/cpp1z/class-deduction60.C: New test. + * g++.dg/cpp1z/class-deduction61.C: New test. + +2019-01-02 Martin Sebor + Jeff Law + + * gcc.dg/strlenopt-36.c: Update. + * gcc.dg/strlenopt-45.c: Update. + * gcc.c-torture/execute/strlen-5.c: New test. + * gcc.c-torture/execute/strlen-6.c: New test. + * gcc.c-torture/execute/strlen-7.c: New test. + +2019-01-02 Jakub Jelinek + + PR testsuite/87304 + * gcc.dg/vect/bb-slp-over-widen-1.c: Expect basic block vectorized + messages only on vect_hw_misalign targets. + +2019-01-02 Steven G. Kargl + + * gfortran.dg/argument_checking_7.f90: Remove run-on error message. + * gfortran.dg/dec_d_lines_3.f: Ditto. + * gfortran.dg/dec_structure_24.f90: Ditto. + * gfortran.dg/dec_structure_26.f90: Ditto. + * gfortran.dg/dec_structure_27.f90: Ditto. + * gfortran.dg/dec_type_print_3.f90: Ditto. + * gfortran.dg/derived_name_1.f90: Ditto. + * gfortran.dg/error_recovery_1.f90: Ditto. + * gfortran.dg/gomp/pr29759.f90: Ditto. + * gfortran.dg/pr36192.f90: Ditto. + * gfortran.dg/pr56007.f90: Ditto. + * gfortran.dg/pr56520.f90: Ditto. + * gfortran.dg/pr78741.f90: Ditto. + * gfortran.dg/print_fmt_2.f90: Ditto. + * gfortran.dg/select_type_20.f90: Ditto. + +2019-01-02 Marek Polacek + + PR c++/86875 + * g++.dg/cpp1y/lambda-generic-86875.C: New test. + +2019-01-02 Thomas Koenig + + PR fortran/48543 + * gfortran.dg/const_chararacter_merge.f90: New test. + +2019-01-02 Jan Hubicka + + PR lto/88130 + * g++.dg/torture/pr88130.C: New testcase. + +2019-01-02 Martin Liska + + PR tree-optimization/88650 + * gfortran.dg/predict-3.f90: New test. + +2019-01-02 Rainer Orth + + * g++.dg/gcov/pr88263.C: Rename namespace log to logging. + +2019-01-02 Richard Biener + + PR tree-optimization/88621 + * gcc.dg/torture/pr88621.c: New testcase. + +2019-01-02 Jakub Jelinek + + PR ipa/88561 + * g++.dg/tree-prof/devirt.C: Expect _ZThn16 only for lp64 and llp64 + targets and expect _ZThn8 for ilp32 targets. + +2019-01-01 Martin Sebor + Jeff Law + + * gcc.dg/strlenopt-40.c: Update. + * gcc.dg/strlenopt-51.c: Likewise. + * gcc.dg/tree-ssa/pr79376.c: Likewise. + + * gcc.dg/strlenopt-40.c: Disable a couple tests. + * gcc.dg/strlenopt-48.c: Twiddle test slightly. + * gcc.dg/strlenopt-59.c: New test. + * gcc.dg/tree-ssa/builtin-snprintf-5.c: New test. + * g++.dg/init/strlen.C: New test. + +2019-01-01 Thomas Koenig + + PR fortran/82743 + * gfortran.dg/structure_constructor_16.f90: New test. + +2019-01-01 Jan Hubicka + + * g++.dg/ipa/devirt-36.C: Add dg-do-compile. + * g++.dg/ipa/devirt-53.C: Fix scan template. + +2019-01-01 Jan Hubicka + + * g++.dg/lto/devirt-13_0.C: Drop broken scan of ssa dump. + * g++.dg/lto/devirt-14_0.C: Drop broken scan of ssa dump. + * g++.dg/lto/devirt-23_0.C: Add -fdump-ipa-cp. + +2019-01-01 Jan Hubicka + + * g++.dg/tree-prof/devirt.C: Update testcase. + +2019-01-01 Jakub Jelinek + + Update copyright years. + +Copyright (C) 2019 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +2019-10-05 Steven G. Kargl + PR fortran/91497 * gfortran.dg/pr91497.f90: Run on i?86-*-* and x86_64-*-* only. diff --git a/gcc/testsuite/gfortran.dg/pr47054_1.f90 b/gcc/testsuite/gfortran.dg/pr47054_1.f90 new file mode 100644 index 0000000..3665edb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr47054_1.f90 @@ -0,0 +1,15 @@ +! { dg-do compile } +! { dg-options "-fcray-pointer" } +! PR fortran/47054 +subroutine host_sub + implicit none + real xg + pointer (paxg, xg) + call internal_sub + contains + subroutine internal_sub + implicit none + real xg + pointer (paxg, xg) + end subroutine internal_sub +end subroutine host_sub diff --git a/gcc/testsuite/gfortran.dg/pr47054_2.f90 b/gcc/testsuite/gfortran.dg/pr47054_2.f90 new file mode 100644 index 0000000..3b7c4aaf --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr47054_2.f90 @@ -0,0 +1,41 @@ +! { dg-do compile } +! { dg-options "-fcray-pointer" } +! PR fortran/47054 +! Code contributed by Deji Akingunola +subroutine host_sub(F_su,F_nk) + implicit none + + integer :: F_nk + real,dimension(F_nk) :: F_su + integer G_ni, G_nj + real*8 G_xg_8, G_yg_8 + pointer (paxg_8, G_xg_8(G_ni)) + pointer (payg_8, G_yg_8(G_nj)) + common / G_p / paxg_8,payg_8 + common / G / G_ni, G_nj + + call internal_sub(F_su,F_nk) + return +contains + + subroutine internal_sub(F_su,F_nk) + implicit none + integer G_ni, G_nj + real*8 G_xg_8, G_yg_8 + pointer (paxg_8, G_xg_8(G_ni)) + pointer (payg_8, G_yg_8(G_nj)) + common / G_p / paxg_8,payg_8 + common / G / G_ni, G_nj + + integer :: F_nk + real,dimension(F_nk) :: F_su + integer k,k2 + + k2 = 0 + do k = 1, F_nk, 2 + k2 = k2+1 + F_su(k) = F_su(k) + 1.0 + enddo + return + end subroutine internal_sub +end subroutine host_sub -- cgit v1.1 From 6c291ad828fcb5f01a1d2cb23f6078e9a6f958b9 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 5 Oct 2019 23:36:46 +0200 Subject: ipa-inline.c: Fix type; compute size rather than self_size for size of caller function. * ipa-inline.c: Fix type; compute size rather than self_size for size of caller function. From-SVN: r276629 --- gcc/ChangeLog | 5 +++++ gcc/ipa-inline.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e855712..d4e180d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-05 Jan Hubicka + + * ipa-inline.c: Fix type; compute size rather than self_size + for size of caller function. + 2019-10-05 Iain Sandoe PR target/59888 diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 2801cb9..681801a 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1186,7 +1186,7 @@ edge_badness (struct cgraph_edge *edge, bool dump) if (need_more_work) noninline_callee (); } - Withhout panilizing this case, we usually inline noninline_callee + Withhout penalizing this case, we usually inline noninline_callee into the inline_caller because overall_growth is small preventing further inlining of inline_caller. @@ -1243,7 +1243,7 @@ edge_badness (struct cgraph_edge *edge, bool dump) overall_growth += 256 * 256 - 256; denominator *= overall_growth; } - denominator *= ipa_fn_summaries->get (caller)->self_size + growth; + denominator *= ipa_fn_summaries->get (caller)->size + growth; badness = - numerator / denominator; -- cgit v1.1 From f24b653c39de27c89a944de264bee5eedfb951d8 Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Sat, 5 Oct 2019 22:40:07 +0000 Subject: 2019-0105 Steven G. Kargl In my previous commit, I managed to include a duplicate copy of the ChangeLog file. This commit removes the duplicate portion. From-SVN: r276630 --- gcc/testsuite/ChangeLog | 14161 ---------------------------------------------- 1 file changed, 14161 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2397eec..2c7d62a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -14164,14164 +14164,3 @@ Copyright (C) 2019 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. - -2019-10-05 Steven G. Kargl - - PR fortran/91497 - * gfortran.dg/pr91497.f90: Run on i?86-*-* and x86_64-*-* only. - -2019-10-05 Paul Thomas - - PR fortran/91926 - * gfortran.dg/ISO_Fortran_binding_13.f90 : New test. - * gfortran.dg/ISO_Fortran_binding_13.c : Additional source. - * gfortran.dg/ISO_Fortran_binding_14.f90 : New test. - -2019-10-05 Jakub Jelinek - - PR c++/91369 - Implement P0784R7: constexpr new - * g++.dg/cpp0x/constexpr-delete2.C: Adjust expected diagnostics for - c++2a. - * g++.dg/cpp0x/locations1.C: Only expect constexpr ~S() diagnostics - in c++17_down, adjust expected wording. - * g++.dg/cpp1y/constexpr-new.C: Only expect diagnostics in c++17_down. - * g++.dg/cpp2a/constexpr-dtor1.C: New test. - * g++.dg/cpp2a/constexpr-dtor2.C: New test. - * g++.dg/cpp2a/constexpr-dtor3.C: New test. - * g++.dg/cpp2a/constexpr-new1.C: New test. - * g++.dg/cpp2a/constexpr-new2.C: New test. - * g++.dg/cpp2a/constexpr-new3.C: New test. - * g++.dg/cpp2a/constexpr-new4.C: New test. - * g++.dg/cpp2a/feat-cxx2a.C: Add __cpp_constinit and - __cpp_constexpr_dynamic_alloc tests. Tweak __cpp_* tests for c++2a - features to use style like older features, including #ifdef test. - * g++.dg/ext/is_literal_type3.C: New test. - - PR tree-optimization/91734 - * gcc.dg/pr91734.c: New test. - -2019-10-04 Joseph Myers - - PR c/82752 - * gcc.dg/format/c2x-strftime-1.c: New test. - -2019-10-04 Martin Sebor - - PR middle-end/91977 - * gcc.dg/Wstringop-overflow-18.c: New test. - -2019-10-04 Martin Sebor - - * gcc.dg/Wstringop-overflow-17.c: New test. - -2019-10-04 Steven G. Kargl - - PR fortran.91959 - * gfortran.dg/pr91959.f90: New test. - -2019-10-04 Rafael Tsuha - - * gcc.dg/sinhovercosh-1.c: New test. - -2019-10-04 Joseph Myers - - * gcc.dg/c11-builtins-1.c, gcc.dg/c2x-builtins-1.c, - gcc.dg/dfp/c2x-builtins-dfp-1.c: New tests. - -2019-10-04 Mark Eggleston - - * gfortran.dg/auto_in_equiv_1.f90: Replaced. - * gfortran.dg/auto_in_equiv_2.f90: Replaced. - * gfortran.dg/auto_in_equiv_3.f90: Deleted. - -2019-10-04 Richard Sandiford - - * gcc.target/aarch64/torture/simd-abi-8.c: Use -mlittle-endian. - Check that there are no Q register saves or restores. - -2019-10-04 Richard Biener - - * gcc.c-torture/execute/loop-3.c: Fix undefined behavior. - -2019-10-04 Yuliang Wang - - * gcc.target/aarch64/sve2/shracc_1.c: Tighten scan-assembler-nots - to avoid matching scalar code. - -2019-10-04 Tobias Burnus - - * gfortran.dg/use_without_only_1.f90: Update column num in dg-warning. - -2019-10-04 Jakub Jelinek - - PR c++/71504 - * g++.dg/cpp0x/constexpr-array21.C: New test. - * g++.dg/cpp1y/constexpr-array7.C: New test. - * g++.dg/cpp1z/constexpr-array1.C: New test. - -2019-10-04 Jason Merrill - - PR c++/71504 - * g++.dg/cpp0x/constexpr-array20.C: New test. - -2019-10-04 Jakub Jelinek - - PR c++/91974 - * g++.dg/cpp1z/eval-order5.C: New test. - -2019-10-03 Steven G. Kargl - - PR fortran/91497 - * gfortran.dg/pr91497.f90: New test. - -2019-10-03 Jan Hubicka - - * g++.dg/tree-ssa/pr61034.C: Add --param max-inline-insns-single-O2=200. - -2019-10-03 Dragan Mladjenovic - - PR target/91769 - * gcc.target/mips/pr91769.c: New test. - -2019-10-03 Rainer Orth - - * g++.dg/cpp0x/gen-attrs-67.C: Expect constructor priorities error - on any !init_priority target. - -2019-10-03 Thomas Koenig - - PR fortran/84487 - * gfortran.dg/typebound_call_22.f03: xfail. - -2019-10-03 Mark Eggleston - - * gfortran.dg/bad_operands.f90: New test. - * gfortran.dg/character mismatch.f90: New test. - * gfortran.dg/compare_interfaces.f90: New test. - * gfortran.dg/hollerith_to_char_parameter_1.f90: New test. - * gfortran.dg/hollerith_to_char_parameter_2.f90: New test. - * gfortran.dg/widechar_intrinsics_1.f90: Checked for specific character - type names instead of "Type of argument". - * gfortran.dg/widechar_intrinsics_2.f90: Checked for specific character - type names instead of "Type of argument". - * gfortran.dg/widechar_intrinsics_3.f90: Checked for specific character - type names instead of "Type of argument". - -2019-10-02 Joseph Myers - - * gcc.dg/cr-decimal-dig-2.c: New test. - * gcc.dg/limits-width-2.c: New test. Based on limits-width-1.c. - * gcc.dg/stdint-width-2.c: New test. Based on stdint-width-1.c. - -2019-10-03 Paolo Carlini - - * g++.dg/diagnostic/integral-array-size-1.C: New. - * g++.dg/cpp0x/alias-decl-1.C: Test location(s) too. - * g++.dg/init/new43.C: Likewise. - * g++.dg/lookup/friend12.C: Likewise. - * g++.dg/lookup/pr79766.C: Likewise. - * g++.dg/lookup/pr84375.C: Likewise. - * g++.dg/other/new-size-type.C: Likewise. - -2019-10-03 Jakub Jelinek - - * g++.dg/ext/constexpr-attr-cleanup1.C: New test. - -2019-10-02 Martin Sebor - - PR tree-optimization/80936 - * gcc.dg/Wnonnull-2.c: New test. - * gcc.dg/Wnonnull-3.c: New test. - * gcc.dg/nonnull-3.c: Expect more warnings. - -2019-10-02 Steven G. Kargl - - PR fortran/91784 - * gfortran.dg/pr91784.f90: New test. - -2019-10-02 Steven G. Kargl - - PR fortran/91785 - * gfortran.dg/pr91785.f90: New test. - -2019-10-02 Steven G. Kargl - - PR fortran/91942 - * gfortran.dg/pr91587.f90: Update dg-error regex. - * gfortran.dg/pr91942.f90: New test. - -2019-10-02 Steven G. Kargl - - PR fortran/91943 - gfortran.dg/pr91943.f90 - -2019-10-02 Jan Hubicka - - * g++.dg/tree-ssa/pr53844.C: Add -fno-inline-functions --param - max-inline-insns-single-O2=200. - * gcc.c-torture/execute/builtins/builtins.exp: Add - -fno-inline-functions to additional_flags. - * gcc.dg/ipa/inline-7.c: Add -fno-inline-functions. - * gcc.dg/optimize-bswapsi-5.c: Add -fno-inline-functions. - * gcc.dg/tree-ssa/ssa-thread-12.c: Add --param - early-inlining-insns-O2=14 -fno-inline-functions; revert previous - change. - * gcc.dg/winline-3.c: Use --param max-inline-insns-single-O2=1 - --param inline-min-speedup-O2=100 - instead of --param max-inline-insns-single=1 --param - inline-min-speedup=100 - -2019-10-02 Alexander Monakov - - PR rtl-optimization/87047 - * gcc.dg/pr87047.c: New test. - -2019-10-02 Martin Jambor - - PR testsuite/91842 - * gcc.dg/ipa/ipa-sra-19.c: Skip on powerpc. - -2019-10-02 Eric Botcazou - - * gnat.dg/opt82.adb: New test. - * gnat.dg/opt82_pkg.ads: New helper. - -2019-10-02 Richard Sandiford - - * gcc.target/mips/call-clobbered-3.c: Remove skip for -Os. - * gcc.target/mips/call-clobbered-4.c: Delete. - -2019-10-02 Tobias Burnus - - * gfortran.dg/gomp/is_device_ptr-1.f90: New. - -2019-10-02 Richard Biener - - PR c++/91606 - * g++.dg/torture/pr91606.C: New testcase. - -2019-10-02 Tobias Burnus - - * gfortran.dg/goacc/asyncwait-1.f95: Handle new error message. - * gfortran.dg/goacc/asyncwait-2.f95: Likewise. - * gfortran.dg/goacc/asyncwait-3.f95: Likewise. - * gfortran.dg/goacc/asyncwait-4.f95: Likewise. - * gfortran.dg/goacc/default-2.f: Likewise. - * gfortran.dg/goacc/enter-exit-data.f95: Likewise. - * gfortran.dg/goacc/if.f95: Likewise. - * gfortran.dg/goacc/list.f95: Likewise. - * gfortran.dg/goacc/literal.f95: Likewise. - * gfortran.dg/goacc/loop-2-kernels-tile.f95: Likewise. - * gfortran.dg/goacc/loop-2-parallel-tile.f95: Likewise. - * gfortran.dg/goacc/loop-7.f95: Likewise. - * gfortran.dg/goacc/parallel-kernels-clauses.f95: Likewise. - * gfortran.dg/goacc/routine-6.f90: Likewise. - * gfortran.dg/goacc/several-directives.f95: Likewise. - * gfortran.dg/goacc/sie.f95: Likewise. - * gfortran.dg/goacc/tile-1.f90: Likewise. - * gfortran.dg/goacc/update-if_present-2.f90: Likewise. - * gfortran.dg/gomp/declare-simd-1.f90: Likewise. - * gfortran.dg/gomp/pr29759.f90: Likewise. - -2019-10-02 Tobias Burnus - - * libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-1.f90: New. - -2019-10-02 Jakub Jelinek - - PR tree-optimization/91940 - * gcc.dg/vect/vect-bswap16.c: Add -msse4 on x86, run on all targets, - expect vectorized 1 loops message on both vect_bswap and sse4_runtime - targets. - * gcc.dg/vect/vect-bswap16a.c: New test. - -2019-10-02 Joseph Myers - - * gcc.dg/asm-scope-1.c, gcc.dg/cpp/c11-scope-1.c, - gcc.dg/cpp/c17-scope-1.c, gcc.dg/cpp/c2x-scope-1.c, - gcc.dg/cpp/c2x-scope-2.c, gcc.dg/cpp/c90-scope-1.c, - gcc.dg/cpp/c94-scope-1.c, gcc.dg/cpp/c99-scope-1.c, - gcc.dg/cpp/gnu11-scope-1.c, gcc.dg/cpp/gnu17-scope-1.c, - gcc.dg/cpp/gnu89-scope-1.c, gcc.dg/cpp/gnu99-scope-1.c: New tests. - -2019-10-01 David Malcolm - - * gcc.dg/plugin/diagnostic_group_plugin.c (test_begin_group_cb): - Clear the prefix before emitting the "END GROUP" line. - * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c - (custom_diagnostic_finalizer): Temporarily clear prefix when - calling diagnostic_show_locus, rather than destroying it - afterwards. - -2019-10-01 Jan Hubicka - - * gcc.dg/tree-ssa/alias-access-path-10.c: New testcase. - * gcc.dg/tree-ssa/alias-access-path-11.c: New testcase. - -2019-10-01 Jan Hubicka - - * g++.dg/lto/odr-6_0.C: New testcase. - * g++.dg/lto/odr-6_1.c: New testcase. - -2019-10-01 Jan Hubicka - - * gcc.dg/tree-ssa/ssa-thread-12.c: Fix warning introduced by my - previous change. - -2019-10-01 Jan Hubicka - - * g++.dg/tree-ssa/pr61034.C: Set early-inlining-insns-O2=14. - * g++.dg/tree-ssa/pr8781.C: Likewise. - * g++.dg/warn/Wstringop-truncation-1.C: Likewise. - * gcc.dg/ipa/pr63416.c: likewise. - * gcc.dg/vect/pr66142.c: Likewise. - * gcc.dg/tree-ssa/ssa-thread-12.c: Mark compure_idf inline. - -2019-10-01 Jakub Jelinek - - PR c++/91925 - * g++.dg/conversion/packed2.C: New test. - -2019-10-01 Bill Schmidt - - * gcc.target/powerpc/pr91275.c: New. - -2019-10-01 Alexandre Oliva - - * gcc.dg/torture/pr41094.c: Introduce intermediate variable. - - PR debug/91507 - * gcc.dg/debug/dwarf2/array-0.c: New. - * gcc.dg/debug/dwarf2/array-1.c: New. - * gcc.dg/debug/dwarf2/array-2.c: New. - * gcc.dg/debug/dwarf2/array-3.c: New. - * g++.dg/debug/dwarf2/array-0.C: New. - * g++.dg/debug/dwarf2/array-1.C: New. - * g++.dg/debug/dwarf2/array-2.C: New. Based on libstdc++-v3's - src/c++98/pool_allocator.cc:__pool_alloc_base::_S_heap_size. - * g++.dg/debug/dwarf2/array-3.C: New. Based on - gcc's config/i386/i386-features.c:xlogue_layout::s_instances. - * g++.dg/debug/dwarf2/array-4.C: New. - -2019-10-01 Richard Sandiford - - * gcc.dg/diag-aka-1.c (T): Turn into a pointer typedef. - (foo): Update accordingly. - * gcc.dg/diag-aka-4.c: New test. - -2019-10-01 Richard Sandiford - - * gcc.dg/diag-aka-3.c: New test. - * gcc.target/aarch64/diag_aka_1.c: New test. - * g++.dg/diagnostic/aka4.C: New test. - -2019-10-01 Richard Sandiford - - * gcc.target/aarch64/torture/simd-abi-10.c: New test. - * gcc.target/aarch64/torture/simd-abi-11.c: Likewise. - -2019-09-30 Yuliang Wang - - * gcc.dg/vect/vect-sdiv-pow2-1.c: New test. - * gcc.target/aarch64/sve/asrdiv_1.c: As above. - * lib/target-supports.exp (check_effective_target_vect_sdiv_pow2_si): - Return true for AArch64 with SVE. - -2019-09-30 Richard Sandiford - - * gcc.target/aarch64/torture/simd-abi-9.c: New test. - -2019-09-30 Richard Sandiford - - * gcc.target/aarch64/torture/simd-abi-8.c: New test. - -2019-09-30 Richard Sandiford - - * gcc.dg/Wincompatible-pointer-types-1.c (f1): Expect only one - space between the comma and "...". - -2019-09-30 Martin Jambor - - PR ipa/91853 - * gcc.dg/ipa/pr91853.c: New test. - -2019-09-30 Jakub Jelinek - - PR target/91931 - * gcc.target/i386/pr91931.c: New test. - -2019-09-29 Steven G. Kargl - - PR fortran/91641 - * gfortran.dg/pr91641.f90: New test. - -2019-09-29 Steven G. Kargl - - PR fortran/91714 - * gfortran.dg/dec_type_print_3.f90: Update dg-error regex. - * gfortran.dg/pr91714.f90: New test. - -2019-09-29 Paul Thomas - - PR fortran/91726 - * gfortran.dg/coarray_poly_9.f90 : New test. - -2019-09-29 Kewen Lin - - * gcc.target/powerpc/conv-vectorize-1.c: New test. - * gcc.target/powerpc/conv-vectorize-2.c: New test. - -2019-09-28 Steven G. Kargl - - PR fortran/91802 - * gfortran.dg/pr91802.f90: New test. - -2019-09-28 Steven G. Kargl - - PR fortran/91864 - * gcc/testsuite/gfortran.dg/pr91864.f90 - -2019-09-28 Marek Polacek - - PR c++/91889 - follow-up fix for DR 2352. - * g++.dg/cpp0x/ref-bind3.C: Add dg-error. - * g++.dg/cpp0x/ref-bind4.C: New test. - * g++.dg/cpp0x/ref-bind5.C: New test. - * g++.dg/cpp0x/ref-bind6.C: New test. - * g++.old-deja/g++.pt/spec35.C: Revert earlier change. - - PR c++/91921 - stray warning with -Woverloaded-virtual. - * g++.dg/warn/Woverloaded-2.C: New. - * g++.dg/warn/Woverloaded-2.h: New. - * g++.dg/warn/pr61945.C: Turn dg-warning into dg-message. - * g++.old-deja/g++.mike/warn6.C: Likewise. - * g++.old-deja/g++.warn/virt1.C: Likewise. - - PR c++/91923 - failure-to-SFINAE with class type NTTP in C++17. - * g++.dg/cpp0x/nontype5.C: New test. - -2019-09-28 Alan Modra - - PR testsuite/91676 - PR rtl-optimization/91656 - * gcc.dg/torture/pr91656-1.c: Correct for big and pdp endian. - * gcc.dg/torture/pr91656-2.c: Likewise. - * gcc.dg/torture/pr91656-3.c: Likewise. - -2019-09-27 Jakub Jelinek - - PR c++/88203 - * c-c++-common/gomp/pr88203-1.c: New test. - * c-c++-common/gomp/pr88203-2.c: New test. - * c-c++-common/gomp/pr88203-3.c: New test. - - PR middle-end/91920 - * c-c++-common/gomp/pr91920.c: New test. - - PR target/91919 - * gcc.c-torture/compile/pr91919.c: New test. - -2019-09-27 Manfred Schwarb - - * gfortran.dg/associate_48.f90: Fix a dg directive. - * gfortran.dg/auto_in_equiv_1.f90: Ditto. - * gfortran.dg/auto_in_equiv_2.f90: Ditto. - * gfortran.dg/lto/pr87689_0.f: Ditto. - -2019-09-27 Jakub Jelinek - - PR tree-optimization/91885 - * gcc.dg/pr91885.c (__int64_t): Change from long to long long. - (__uint64_t): Change from unsigned long to unsigned long long. - -2019-09-27 Yuliang Wang - - * gcc.target/aarch64/sve2/shracc_1.c: New test. - -2019-09-26 Eric Botcazou - - * gcc.dg/cpp/ucs.c: Add test for new warning and adjust. - * gcc.dg/cpp/utf8-5byte-1.c: Add -w to the options. - * gcc.dg/attr-alias-5.c: Likewise. - * g++.dg/cpp/ucn-1.C: Add test for new warning. - * g++.dg/cpp2a/ucn1.C: New test. - -2019-09-26 Max Filippov - - * gcc.target/xtensa/pr91880.c: New test case. - * gcc.target/xtensa/xtensa.exp: New test suite. - -2019-09-26 Will Schmidt - - * gcc.target/powerpc/pure-builtin-redundant-load.c: New. - -2019-09-26 Richard Biener - - PR middle-end/91897 - * gcc.target/i386/pr91897.c: New testcase. - -2019-09-26 Martin Sebor - - PR tree-optimization/91914 - * gcc.dg/strlenopt-79.c: New test. - -2019-09-26 Kyrylo Tkachov - - * gcc.target/arm/acle/simd32.c: Update test. - -2019-09-26 Kyrylo Tkachov - - * lib/target-supports.exp - (check_effective_target_arm_simd32_ok_nocache): New procedure. - (check_effective_target_arm_simd32_ok): Likewise. - (add_options_for_arm_simd32): Likewise. - * gcc.target/arm/acle/simd32.c: New test. - -2019-09-26 Richard Sandiford - - * gcc.target/arm/fp16-compile-alt-3.c: Expect (__fp16) -2.0 - to be written as a negative short rather than a positive one. - * gcc.target/arm/fp16-compile-ieee-3.c: Likewise. - -2019-09-26 Martin Liska - - PR tree-optimization/91885 - * gcc.dg/pr91885.c: New test. - -2019-09-25 Marek Polacek - - PR c++/91877 - ICE with converting member of packed struct. - * g++.dg/conversion/packed1.C: New test. - -2019-09-25 Richard Biener - - PR tree-optimization/91896 - * gcc.dg/torture/pr91896.c: New testcase. - -2019-09-25 Martin Liska - - * gcc.target/s390/pr91014.c: Move to ... - * gcc.dg/pr91014.c: ... this. - -2019-09-25 Paolo Carlini - - * g++.dg/diagnostic/redeclaration-1.C: New. - * g++.dg/lookup/extern-c-hidden.C: Test location(s) too. - * g++.dg/lookup/extern-c-redecl.C: Likewise. - * g++.dg/lookup/extern-c-redecl6.C: Likewise. - * g++.old-deja/g++.other/using9.C: Likewise. - -2019-09-23 Martin Sebor - - PR tree-optimization/91570 - * gcc.dg/pr91570.c: New test. - -2019-09-24 Marek Polacek - - PR c++/91868 - improve -Wshadow location. - * g++.dg/warn/Wshadow-16.C: New test. - - PR c++/91845 - ICE with invalid pointer-to-member. - * g++.dg/cpp1y/pr91845.C: New test. - -2019-09-24 Kyrylo Tkachov - - * gcc.target/aarch64/nosplit-di-const-volatile_1.c: New test. - -2019-09-24 Jakub Jelinek - - PR middle-end/91866 - * gcc.dg/tree-ssa/pr91866.c: New test. - -2019-09-24 Martin Jambor - - PR ipa/91831 - * g++.dg/ipa/pr91831.C: New test. - -2019-09-24 Martin Jambor - - PR ipa/91832 - * gcc.dg/ipa/pr91832.c: New test. - -2019-09-24 Richard Biener - - * gcc.dg/torture/20190924-1.c: New testcase. - -2019-09-23 Maciej W. Rozycki - - * lib/gnat.exp (gnat_target_compile): Pass the `ada' option to - `target_compile'. - -2019-09-23 Paolo Carlini - - * g++.dg/cpp0x/pr68724.C: Check location(s) too. - * g++.dg/cpp0x/variadic38.C: Likewise. - * g++.dg/cpp1z/nontype2.C: Likewise. - * g++.dg/parse/explicit1.C: Likewise. - * g++.dg/template/crash11.C: Likewise. - * g++.dg/template/non-dependent8.C: Likewise. - * g++.dg/template/nontype-array1.C: Likewise. - * g++.dg/template/nontype3.C: Likewise. - * g++.dg/template/nontype8.C: Likewise. - * g++.dg/template/partial5.C: Likewise. - * g++.dg/template/spec33.C: Likewise. - * g++.old-deja/g++.pt/memtemp64.C: Likewise. - * g++.old-deja/g++.pt/spec20.C: Likewise. - * g++.old-deja/g++.pt/spec21.C: Likewise. - * g++.old-deja/g++.robertl/eb103.C: Likewise. - -2019-09-23 Sandra Loosemore - - * lib/target-supports.exp - (check_effective_target_arm_vfp_ok_nocache): New. - (check_effective_target_arm_vfp_ok): Rewrite. - (add_options_for_arm_vfp): New. - (add_options_for_sqrt_insn): Add options for arm. - * gcc.target/arm/attr-neon-builtin-fail2.c: Use dg-add-options. - * gcc.target/arm/short-vfp-1.c: Likewise. - -2019-09-23 Marek Polacek - - PR c++/91844 - Implement CWG 2352, Similar types and reference binding. - * g++.dg/cpp0x/pr33930.C: Add dg-error. - * g++.dg/cpp0x/ref-bind1.C: New test. - * g++.dg/cpp0x/ref-bind2.C: New test. - * g++.dg/cpp0x/ref-bind3.C: New test. - * g++.old-deja/g++.pt/spec35.C: Remove dg-error. - -2019-09-23 Rainer Orth - - * gcc.dg/ucnid-5-utf8.c: Skip unless ucn is supported. - -2019-09-23 Paul Thomas - - PR fortran/91729 - * gfortran.dg/select_rank_2.f90 : Add two more errors in foo2. - * gfortran.dg/select_rank_3.f90 : New test. - -2019-09-23 Rainer Orth - - * gnat.dg/system_info1.adb: Sort dg-do target list. - Add *-*-solaris2.*. - -2019-09-23 Eric Botcazou - - * gnat.dg/specs/compile_time1.ads: New test. - * gnat.dg/specs/compile_time1_pkg.ads: New helper. - -2019-09-22 Marek Polacek - - PR c++/91819 - ICE with operator++ and enum. - * g++.dg/other/operator4.C: New test. - -2019-09-21 Martin Sebor - - PR middle-end/91830 - * gcc/testsuite/gcc.dg/Warray-bounds-47.c: New test. - -2019-09-21 Jakub Jelinek - - PR c++/30277 - * g++.dg/expr/bitfield14.C (struct S): Use signed long long instead - of signed long. - (foo): Use long long instead of long. - -2019-09-21 Marek Polacek - - DR 2345 - Jumping across initializers in init-statements and conditions. - * g++.dg/cpp1z/init-statement10.C: New test. - -2019-09-21 Richard Sandiford - - * gcc.target/aarch64/sve/cond_convert_1.c: Remove XFAILs. - * gcc.target/aarch64/sve/cond_convert_4.c: Likewise. - * gcc.target/aarch64/sve/cond_unary_2.c: Likewise. - -2019-09-20 Iain Sandoe - - * gcc.target/i386/naked-1.c: Alter options to use non- - PIC codegen for m32 Darwin. - -2019-09-20 Tobias Burnus - - PR fortran/78260 - * gfortran.dg/goacc/parameter.f95: Change - dg-error as it is now detected earlier. - * gfortran.dg/goacc/pr85701.f90: Modify to - use a separate result variable. - * gfortran.dg/goacc/pr78260.f90: New. - * gfortran.dg/goacc/pr78260-2.f90: New. - * gfortran.dg/gomp/pr78260.f90: New. - * gfortran.dg/gomp/pr78260-2.f90: New. - * gfortran.dg/gomp/pr78260-3.f90: New. - -2019-09-20 Olivier Hainque - - * gnat.dg/system_info1.adb: Restrict to *-*-linux* and *-*-mingw*. - -2019-09-20 Eric Botcazou - - * gcc.dg/pr91269.c: New test. - -2019-09-20 Eric Botcazou - - * gcc.dg/typedef-var-1.c: New test. - * gcc.dg/typedef-var-2.c: Likewise. - -2019-09-20 Martin Jambor - - * g++.dg/ipa/pr81248.C: Adjust dg-options and dump-scan. - * gcc.dg/ipa/ipa-sra-1.c: Likewise. - * gcc.dg/ipa/ipa-sra-10.c: Likewise. - * gcc.dg/ipa/ipa-sra-11.c: Likewise. - * gcc.dg/ipa/ipa-sra-3.c: Likewise. - * gcc.dg/ipa/ipa-sra-4.c: Likewise. - * gcc.dg/ipa/ipa-sra-5.c: Likewise. - * gcc.dg/ipa/ipacost-2.c: Disable ipa-sra. - * gcc.dg/ipa/ipcp-agg-9.c: Likewise. - * gcc.dg/ipa/pr78121.c: Adjust scan pattern. - * gcc.dg/ipa/vrp1.c: Likewise. - * gcc.dg/ipa/vrp2.c: Likewise. - * gcc.dg/ipa/vrp3.c: Likewise. - * gcc.dg/ipa/vrp7.c: Likewise. - * gcc.dg/ipa/vrp8.c: Likewise. - * gcc.dg/noreorder.c: use noipa attribute instead of noinline. - * gcc.dg/ipa/20040703-wpa.c: New test. - * gcc.dg/ipa/ipa-sra-12.c: New test. - * gcc.dg/ipa/ipa-sra-13.c: Likewise. - * gcc.dg/ipa/ipa-sra-14.c: Likewise. - * gcc.dg/ipa/ipa-sra-15.c: Likewise. - * gcc.dg/ipa/ipa-sra-16.c: Likewise. - * gcc.dg/ipa/ipa-sra-17.c: Likewise. - * gcc.dg/ipa/ipa-sra-18.c: Likewise. - * gcc.dg/ipa/ipa-sra-19.c: Likewise. - * gcc.dg/ipa/ipa-sra-20.c: Likewise. - * gcc.dg/ipa/ipa-sra-21.c: Likewise. - * gcc.dg/ipa/ipa-sra-22.c: Likewise. - * gcc.dg/sso/ipa-sra-1.c: Likewise. - * g++.dg/ipa/ipa-sra-2.C: Likewise. - * g++.dg/ipa/ipa-sra-3.C: Likewise. - * gcc.dg/tree-ssa/ipa-cp-1.c: Make return value used. - * g++.dg/ipa/devirt-19.C: Add missing return, add -fipa-cp-clone - option. - * g++.dg/lto/devirt-19_0.C: Add -fipa-cp-clone option. - * gcc.dg/ipa/ipa-sra-2.c: Removed. - * gcc.dg/ipa/ipa-sra-6.c: Likewise. - -2019-09-19 Martin Sebor - - PR middle-end/91631 - * /c-c++-common/Warray-bounds-3.c: Correct expected offsets. - * /c-c++-common/Warray-bounds-4.c: Same. - * gcc.dg/Warray-bounds-39.c: Remove xfails. - * gcc.dg/Warray-bounds-45.c: New test. - * gcc.dg/Warray-bounds-46.c: New test. - -2019-09-19 Lewis Hyatt - - PR c/67224 - * c-c++-common/cpp/ucnid-2011-1-utf8.c: New test. - * g++.dg/cpp/ucnid-1-utf8.C: New test. - * g++.dg/cpp/ucnid-2-utf8.C: New test. - * g++.dg/cpp/ucnid-3-utf8.C: New test. - * g++.dg/cpp/ucnid-4-utf8.C: New test. - * g++.dg/other/ucnid-1-utf8.C: New test. - * gcc.dg/cpp/ucnid-1-utf8.c: New test. - * gcc.dg/cpp/ucnid-10-utf8.c: New test. - * gcc.dg/cpp/ucnid-11-utf8.c: New test. - * gcc.dg/cpp/ucnid-12-utf8.c: New test. - * gcc.dg/cpp/ucnid-13-utf8.c: New test. - * gcc.dg/cpp/ucnid-14-utf8.c: New test. - * gcc.dg/cpp/ucnid-15-utf8.c: New test. - * gcc.dg/cpp/ucnid-2-utf8.c: New test. - * gcc.dg/cpp/ucnid-3-utf8.c: New test. - * gcc.dg/cpp/ucnid-4-utf8.c: New test. - * gcc.dg/cpp/ucnid-6-utf8.c: New test. - * gcc.dg/cpp/ucnid-7-utf8.c: New test. - * gcc.dg/cpp/ucnid-9-utf8.c: New test. - * gcc.dg/ucnid-1-utf8.c: New test. - * gcc.dg/ucnid-10-utf8.c: New test. - * gcc.dg/ucnid-11-utf8.c: New test. - * gcc.dg/ucnid-12-utf8.c: New test. - * gcc.dg/ucnid-13-utf8.c: New test. - * gcc.dg/ucnid-14-utf8.c: New test. - * gcc.dg/ucnid-15-utf8.c: New test. - * gcc.dg/ucnid-16-utf8.c: New test. - * gcc.dg/ucnid-2-utf8.c: New test. - * gcc.dg/ucnid-3-utf8.c: New test. - * gcc.dg/ucnid-4-utf8.c: New test. - * gcc.dg/ucnid-5-utf8.c: New test. - * gcc.dg/ucnid-6-utf8.c: New test. - * gcc.dg/ucnid-7-utf8.c: New test. - * gcc.dg/ucnid-8-utf8.c: New test. - * gcc.dg/ucnid-9-utf8.c: New test. - -2019-09-19 Iain Sandoe - - * gcc.dg/pr89313.c: Test for __POWERPC__ in addition to - __powerpc__ in register name selection. - -2019-09-19 Richard Henderson - - * gcc.target/aarch64/atomic-op-acq_rel.c: Use -mno-outline-atomics. - * gcc.target/aarch64/atomic-comp-swap-release-acquire.c: Likewise. - * gcc.target/aarch64/atomic-op-acquire.c: Likewise. - * gcc.target/aarch64/atomic-op-char.c: Likewise. - * gcc.target/aarch64/atomic-op-consume.c: Likewise. - * gcc.target/aarch64/atomic-op-imm.c: Likewise. - * gcc.target/aarch64/atomic-op-int.c: Likewise. - * gcc.target/aarch64/atomic-op-long.c: Likewise. - * gcc.target/aarch64/atomic-op-relaxed.c: Likewise. - * gcc.target/aarch64/atomic-op-release.c: Likewise. - * gcc.target/aarch64/atomic-op-seq_cst.c: Likewise. - * gcc.target/aarch64/atomic-op-short.c: Likewise. - * gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c: Likewise. - * gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c: Likewise. - * gcc.target/aarch64/sync-comp-swap.c: Likewise. - * gcc.target/aarch64/sync-op-acquire.c: Likewise. - * gcc.target/aarch64/sync-op-full.c: Likewise. - -2019-09-19 Feng Xue - - * gcc.dg/ipa/pr91089.c: Add a new function and pattern. - -2019-09-19 Richard Biener - - PR tree-optimization/91812 - * gcc.dg/torture/pr91812.c: New testcase. - -2019-09-19 Tom Tromey - - * gnat.dg/bias1.adb: New testcase. - -2019-09-19 Steve Baird - - * gnat.dg/annotation1.adb: New testcase. - -2019-09-19 Eric Botcazou - - * gnat.dg/inline21.adb, gnat.dg/inline21_g.ads, - gnat.dg/inline21_h.adb, gnat.dg/inline21_h.ads, - gnat.dg/inline21_q.ads: New testcase. - -2019-09-19 Eric Botcazou - - * gnat.dg/inline20.adb, gnat.dg/inline20_g.adb, - gnat.dg/inline20_g.ads, gnat.dg/inline20_h.ads, - gnat.dg/inline20_i.ads, gnat.dg/inline20_q-io.ads, - gnat.dg/inline20_q.ads, gnat.dg/inline20_r.ads: New testcase. - -2019-09-19 Ed Schonberg - - * gnat.dg/generic2-child.ads, gnat.dg/generic2-io_any.adb, - gnat.dg/generic2-io_any.ads, gnat.dg/generic2.ads: New testcase. - -2019-09-19 Yannick Moy - - * gnat.dg/global2.adb, gnat.dg/global2.ads: New testcase. - -2019-09-19 Eric Botcazou - - * gnat.dg/access9.adb: New testcase. - -2019-09-19 Ed Schonberg - - * gnat.dg/predicate14.adb, gnat.dg/predicate14.ads: New - testcase. - -2019-09-19 Eric Botcazou - - * gnat.dg/generic_inst13.adb, - gnat.dg/generic_inst13_pkg-nested_g.ads, - gnat.dg/generic_inst13_pkg-ops_g.ads, - gnat.dg/generic_inst13_pkg.ads: New testcase. - -2019-09-19 Bob Duff - - * gnat.dg/concat3.adb: New testcase. - -2019-09-19 Eric Botcazou - - * gnat.dg/pack26.adb: New testcase. - -2019-09-19 Hongtao Liu - - PR target/87007 - * gcc.target/i386/pr87007-3.c: New test. - -2019-09-18 H.J. Lu - - PR target/90878 - * gcc.target/i386/pr90878.c: New test. - -2019-09-18 H.J. Lu - - PR target/91446 - * gcc.target/i386/pr91446.c: New test. - -2019-09-18 Eric Botcazou - - * gnat.dg/warn31.adb, gnat.dg/warn31.ads: New testcase. - -2019-09-18 Ed Schonberg - - * gnat.dg/fixedpnt8.adb: New testcase. - -2019-09-18 Ed Schonberg - - * gnat.dg/discr58.adb: New testcase. - -2019-09-18 Justin Squirek - - * gnat.dg/warn30.adb, gnat.dg/warn30.ads: New testcase. - -2019-09-18 Justin Squirek - - * gnat.dg/access8.adb, gnat.dg/access8_pkg.adb, - gnat.dg/access8_pkg.ads: New testcase. - -2019-09-18 Eric Botcazou - - * gnat.dg/aggr28.adb: New testcase. - -2019-09-18 Steve Baird - - * gnat.dg/ai12_0086_example.adb: New testcase. - -2019-09-18 Nicolas Roche - - * gnat.dg/float_value2.adb: New testcase. - -2019-09-18 Vadim Godunko - - * gnat.dg/expect4.adb: New testcase. - -2019-09-18 Steve Baird - - * gnat.dg/ghost7.adb, gnat.dg/ghost7.ads: New testcase. - -2019-09-18 Olivier Hainque - - * gnat.dg/system_info1.adb: New testcase. - -2019-09-18 Bob Duff - - * gnat.dg/containers1.adb, gnat.dg/containers1.ads: New - testcase. - -2019-09-18 Richard Sandiford - - * gcc.target/i386/pr82361-1.c (f1, f2, f3, f4, f5, f6): Force - "c" to be in %rax and "d" to be in %rdx. - * gcc.target/i386/pr82361-2.c: Expect 4 instances of "movl\t%edx". - -2019-19-17 Christophe Lyon - - * lib/target-supports.exp - (check_effective_target_arm_arch_FUNC_ok): Add v4t_arm, v4t_thumb, - v5t_arm, v5t_thumb, v5te_arm, v5te_thumb, v6_arm, v6_thumb, - v6k_arm, v6k_thumb, v6z_arm, v6z_thumb. - Add -mfloat-abi=softfp to v4t, v5t, v5te, v6, v6k, v6z. - Remove early exit for -marm. - * gcc.target/arm/armv6-unaligned-load-ice.c: Add arm_arch - effective-target. - * gcc.target/arm/attr-unaligned-load-ice.c: Likewise. - * gcc.target/arm/ftest-armv4-arm.c: Likewise. - * gcc.target/arm/ftest-armv4t-arm.c: Likewise. - * gcc.target/arm/ftest-armv4t-thumb.c: Likewise. - * gcc.target/arm/ftest-armv5t-arm.c: Likewise. - * gcc.target/arm/ftest-armv5t-thumb.c: Likewise. - * gcc.target/arm/ftest-armv5te-arm.c: Likewise. - * gcc.target/arm/ftest-armv5te-thumb.c: Likewise. - * gcc.target/arm/ftest-armv6-arm.c: Likewise. - * gcc.target/arm/ftest-armv6-thumb.c: Likewise. - * gcc.target/arm/ftest-armv6k-arm.c: Likewise. - * gcc.target/arm/ftest-armv6k-thumb.c: Likewise. - * gcc.target/arm/ftest-armv6m-thumb.c: Likewise. - * gcc.target/arm/ftest-armv6t2-arm.c: Likewise. - * gcc.target/arm/ftest-armv6t2-thumb.c: Likewise. - * gcc.target/arm/ftest-armv6z-arm.c: Likewise. - * gcc.target/arm/ftest-armv6z-thumb.c: Likewise. - * gcc.target/arm/g2.c: Likewise. - * gcc.target/arm/macro_defs1.c: Likewise. - * gcc.target/arm/pr59858.c: Likewise. - * gcc.target/arm/pr65647-2.c: Likewise. - * gcc.target/arm/pr79058.c: Likewise. - * gcc.target/arm/pr83712.c: Likewise. - * gcc.target/arm/pragma_arch_switch_2.c: Likewise. - * gcc.target/arm/scd42-1.c: Likewise. - * gcc.target/arm/scd42-2.c: Likewise. - * gcc.target/arm/scd42-3.c: Likewise. - * gcc.c-torture/compile/pr82096.c: Fix arm_arch effective-target. - * gcc.target/arm/attr_arm-err.c: Likewise. - * gcc.target/arm/di-longlong64-sync-withldrexd.c: Likewise. - -2019-09-17 Feng Xue - - PR ipa/91089 - * gcc.dg/ipa/pr91089.c: New test. - -2019-09-17 Paul Thomas - - PR fortran/91588 - * gfortran.dg/associate_49.f90 : New test. - -2019-09-17 Yannick Moy - - * gnat.dg/fixedpnt7.adb: New testcase. - -2019-09-17 Yannick Moy - - * gnat.dg/multfixed.adb: New testcase. - -2019-09-17 Vadim Godunko - - * gnat.dg/expect3.adb: New testcase. - -2019-09-17 Ed Schonberg - - * gnat.dg/predicate13.adb, gnat.dg/predicate13.ads: New - testcase. - -2019-09-17 Javier Miranda - - * gnat.dg/limited4.adb: New testcase. - -2019-09-17 Eric Botcazou - - * gnat.dg/pack25.adb: New testcase. - -2019-09-16 Paolo Carlini - - * g++.dg/ext/int128-6.C: New. - * c-c++-common/pr68107.c: Test location(s). - * g++.dg/other/large-size-array.C: Likewise. - * g++.dg/template/dtor2.C: Likewise. - * g++.dg/template/error9.C: Likewise. - * g++.dg/tls/diag-2.C: Likewise. - * g++.dg/tls/diag-4.C: Likewise. - * g++.dg/tls/diag-5.C: Likewise. - * g++.old-deja/g++.pt/memtemp71.C: Likewise. - -2019-09-16 Li Jia He - Qi Feng - - PR middle-end/88784 - * gcc.dg/pr88784-1.c: New testcase. - * gcc.dg/pr88784-2.c: New testcase. - * gcc.dg/pr88784-3.c: New testcase. - * gcc.dg/pr88784-4.c: New testcase. - * gcc.dg/pr88784-5.c: New testcase. - * gcc.dg/pr88784-6.c: New testcase. - * gcc.dg/pr88784-7.c: New testcase. - * gcc.dg/pr88784-8.c: New testcase. - * gcc.dg/pr88784-9.c: New testcase. - * gcc.dg/pr88784-10.c: New testcase. - * gcc.dg/pr88784-11.c: New testcase. - * gcc.dg/pr88784-12.c: New testcase. - -2019-09-16 Richard Biener - - PR tree-optimization/91756 - PR tree-optimization/87132 - * gcc.dg/tree-ssa/ssa-fre-81.c: New testcase. - -2019-09-15 Marek Polacek - - PR c++/91740 - ICE with constexpr call and ?: in ARRAY_REF. - * g++.dg/cpp1y/var-templ63.C: New test. - -2019-09-15 Sandra Loosemore - - * lib/target-supports.exp - (check_effective_target_arm_neon_fp16_hw) - (check_effective_target_arm_fp16_hw): Use check_runtime - instead of check_runtime_nocache. - -2019-09-15 Steven G. Kargl - - PR fortran/91727 - * gfortran.dg/pr91727.f90: New test. - -2019-09-15 Thomas Koenig - - PR fortran/91550 - * gfortran.dg/do_subscript_6.f90: New test. - -2019-09-15 Thomas Koenig - - PR fortran/91556 - * gfortran.dg/warn_argument_mismatch_1.f90: Remove. - -2019-09-14 Thomas Koenig - - PR fortran/91557 - PR fortran/91556 - * gfortran.dg/argument_checking_20.f90: New test. - * gfortran.dg/argument_checking_21.f90: New test. - * gfortran.dg/argument_checking_22.f90: New test. - * gfortran.dg/argument_checking_23.f90: New test. - * gfortran.dg/warn_unused_dummy_argument_5.f90: New test. - * gfortran.dg/bessel_3.f90: Add pattern for type mismatch. - * gfortran.dg/g77/20010519-1.f: Adjust dg-warning messages to new - handling. - * gfortran.dg/pr24823.f: Likewise. - * gfortran.dg/pr39937.f: Likewise. - -2019-09-14 Sandra Loosemore - - PR testsuite/83889 - * g++.dg/vect/pr87914.cc: Remove explicit dg-do run. - -2019-09-14 Kewen Lin - - PR middle-end/80791 - * gcc.dg/tree-ssa/ivopts-3.c: Adjust for doloop change. - * gcc.dg/tree-ssa/ivopts-lt.c: Likewise. - * gcc.dg/tree-ssa/pr32044.c: Likewise. - -2019-09-13 Steven G. Kargl - - PR fortran/91566 - * gfortran.dg/pr91566.f90: - -2019-09-13 Bernd Edlinger - - PR fortran/91716 - * gfortran.dg/pr91716.f90: New test. - -2019-09-13 Paul Thomas - - PR fortran/91717 - * gfortran.dg/dependency_55.f90 : New test. - -2019-09-12 Uroš Bizjak - - PR tree-optimization/89386 - * gcc.target/i386/pr89386.c: New test. - * gcc.target/i386/pr89386-1.c: Ditto. - -2019-09-12 Richard Biener - - PR tree-optimization/91750 - * gcc.dg/vect/pr91750.c: New testcase. - -2019-09-12 Yuliang Wang - - PR tree-optimization/89386 - * testsuite/gcc.target/aarch64/sve2/mulhrs_1.c: New test. - * testsuite/gcc.dg/vect/vect-mulhrs-1.c: As above. - * testsuite/gcc.dg/vect/vect-mulhrs-2.c: As above. - * testsuite/gcc.dg/vect/vect-mulhrs-3.c: As above. - * testsuite/gcc.dg/vect/vect-mulhrs-4.c: As above. - * doc/sourcebuild.texi (vect_mulhrs_hi): Document new target selector. - * testsuite/lib/target-supports.exp - (check_effective_target_vect_mulhrs_hi): Return true for AArch64 - with SVE2. - -2019-09-11 Sandra Loosemore - - PR testsuite/83889 - * gcc.dg/vect/pr81740-2.c: Remove explicit dg-do run. - * gcc.dg/vect/pr88598-1.c: Likewise. - * gcc.dg/vect/pr88598-2.c: Likewise. - * gcc.dg/vect/pr88598-3.c: Likewise. - * gcc.dg/vect/pr88598-4.c: Likewise. - * gcc.dg/vect/pr88598-5.c: Likewise. - * gcc.dg/vect/pr88598-6.c: Likewise. - * gcc.dg/vect/pr89440.c: Likewise. - * gcc.dg/vect/pr90018.c: Likewise. - * gcc.dg/vect/pr91293-1.c: Likewise. - * gcc.dg/vect/pr91293-2.c: Likewise. - * gcc.dg/vect/pr91293-3.c: Likewise. - -2019-09-11 Steven G. Kargl - - PR fortran/91553 - * gfortran.dg/pr91553.f90: New test. - -2019-09-11 Steven G. Kargl - - PR fortran/91642 - * gfortran.dg/pr91642.f90: New test. - -2019-09-11 Jakub Jelinek - - PR rtl-optimization/89435 - PR rtl-optimization/89795 - PR rtl-optimization/91720 - * gcc.dg/pr89435.c: New test. - * gcc.dg/pr89795.c: New test. - * gcc.dg/pr91720.c: New test. - -2019-09-11 Richard Biener - - PR tree-optimization/90387 - * gcc.dg/Warray-bounds-44.c: New testcase. - -2019-09-11 Eric Botcazou - - * gcc.target/sparc/20161111-1.c: XFAIL redundant zero-extension test. - -2019-09-11 Jakub Jelinek - - PR tree-optimization/91723 - * gcc.dg/vect/vect-fma-3.c: New test. - - PR middle-end/91725 - * gcc.c-torture/compile/pr91725.c: New test. - -2019-09-11 Richard Biener - - Revert - 2019-09-09 Barnaby Wilks - - * gcc.dg/fold-binary-math-casts.c: New test. - -2019-09-10 Marek Polacek - - PR c++/91673 - ICE with noexcept in alias-declaration. - * g++.dg/cpp1z/using7.C: New test. - * g++.dg/cpp1z/using8.C: New test. - -2019-09-10 Marek Polacek - - PR c++/91705 - constexpr evaluation rejects ++/-- on floats. - * g++.dg/cpp1y/constexpr-incr2.C: New test. - -2019-09-10 David Edelsohn - - * gfortran.dg/default_format_1.f90: Remove XFAIL AIX. - * gfortran.dg/default_format_denormal_1.f90: Same. - -2019-09-10 Jakub Jelinek - - PR middle-end/91680 - * gcc.dg/tree-ssa/pr91680.c: New test. - * g++.dg/torture/pr91680.C: New test. - -2019-09-10 Paolo Carlini - - * g++.dg/cpp0x/enum29.C: Test location(s) too. - * g++.dg/cpp0x/lambda/lambda-ice10.C: Likewise. - * g++.dg/cpp2a/constinit3.C: Likewise. - * g++.dg/ext/desig4.C: Likewise. - * g++.dg/ext/label10.C: Likewise. - * g++.old-deja/g++.other/dtor3.C: Likewise. - -2019-09-10 Christophe Lyon - - * lib/target-supports.exp (check_effective_target_static): Disable - for ARM FDPIC target. - -2019-09-10 Christophe Lyon - - * gcc.target/arm/pr43698.c (bswap_32): Rename as my_bswap_32. - -2019-09-10 Christophe Lyon - - * g++.dg/cpp0x/noexcept03.C: Add pie_enabled. - * g++.dg/ipa/devirt-c-7.C: Likewise. - * g++.dg/ipa/ivinline-1.C: Likewise. - * g++.dg/ipa/ivinline-2.C: Likewise. - * g++.dg/ipa/ivinline-3.C: Likewise. - * g++.dg/ipa/ivinline-4.C: Likewise. - * g++.dg/ipa/ivinline-5.C: Likewise. - * g++.dg/ipa/ivinline-7.C: Likewise. - * g++.dg/ipa/ivinline-8.C: Likewise. - * g++.dg/ipa/ivinline-9.C: Likewise. - * g++.dg/tls/pr79288.C: Likewise. - * gcc.dg/addr_equal-1.c: Likewise. - * gcc.dg/const-1.c: Likewise. - * gcc.dg/ipa/pure-const-1.c: Likewise. - * gcc.dg/noreturn-8.c: Likewise. - * gcc.dg/pr33826.c: Likewise. - * gcc.dg/torture/ipa-pta-1.c: Likewise. - * gcc.dg/tree-ssa/alias-2.c: Likewise. - * gcc.dg/tree-ssa/ipa-split-5.c: Likewise. - * gcc.dg/tree-ssa/loadpre6.c: Likewise. - * gcc.dg/uninit-19.c: Likewise. - -2019-09-10 Christophe Lyon - - * g++.dg/abi/forced.C: Add *-*-uclinux*. - * g++.dg/abi/guard2.C: Likewise. - * g++.dg/ext/cleanup-10.C: Likewise. - * g++.dg/ext/cleanup-11.C: Likewise. - * g++.dg/ext/cleanup-8.C: Likewise. - * g++.dg/ext/cleanup-9.C: Likewise. - * g++.dg/ext/sync-4.C: Likewise. - * g++.dg/ipa/comdat.C: Likewise. - * gcc.dg/20041106-1.c: Likewise. - * gcc.dg/cleanup-10.c: Likewise. - * gcc.dg/cleanup-11.c: Likewise. - * gcc.dg/cleanup-8.c: Likewise. - * gcc.dg/cleanup-9.c: Likewise. - * gcc.dg/fdata-sections-1.c: Likewise. - * gcc.dg/fdata-sections-2.c: Likewise. - * gcc.dg/pr39323-1.c: Likewise. - * gcc.dg/pr39323-2.c: Likewise. - * gcc.dg/pr39323-3.c: Likewise. - * gcc.dg/pr65780-1.c: Likewise. - * gcc.dg/pr65780-2.c: Likewise. - * gcc.dg/pr67338.c: Likewise. - * gcc.dg/pr78185.c: Likewise. - * gcc.dg/pr83100-1.c: Likewise. - * gcc.dg/pr83100-4.c: Likewise. - * gcc.dg/strlenopt-12g.c: Likewise. - * gcc.dg/strlenopt-14g.c: Likewise. - * gcc.dg/strlenopt-14gf.c: Likewise. - * gcc.dg/strlenopt-16g.c: Likewise. - * gcc.dg/strlenopt-17g.c: Likewise. - * gcc.dg/strlenopt-18g.c: Likewise. - * gcc.dg/strlenopt-1f.c: Likewise. - * gcc.dg/strlenopt-22g.c: Likewise. - * gcc.dg/strlenopt-2f.c: Likewise. - * gcc.dg/strlenopt-31g.c: Likewise. - * gcc.dg/strlenopt-33g.c: Likewise. - * gcc.dg/strlenopt-4g.c: Likewise. - * gcc.dg/strlenopt-4gf.c: Likewise. - * gcc.dg/strncmp-2.c: Likewise. - * gcc.dg/struct-ret-3.c: Likewise. - * gcc.dg/torture/pr69760.c: Likewise. - * gcc.target/arm/div64-unwinding.c: Likewise. - * gcc.target/arm/stack-checking.c: Likewise. - * gcc.target/arm/synchronize.c: Likewise. - * gcc.target/arm/pr66912.c: Add arm*-*-uclinuxfdpiceabi. - * lib/target-supports.exp (check_effective_target_pie): Likewise. - (check_effective_target_sync_long_long_runtime): Likewise. - (check_effective_target_sync_int_long): Likewise. - (check_effective_target_sync_char_short): Likewise. - -2019-09-10 Christophe Lyon - - * gcc.target/arm/eliminate.c: Accept only nonpic targets. - * g++.dg/other/anon5.C: Likewise. - -2019-09-10 Christophe Lyon - Mickaël Guêné - - * gcc.target/arm/interrupt-1.c: Add scan-assembler pattern for - arm*-*-uclinuxfdpiceabi. - * gcc.target/arm/interrupt-2.c: Likewise. - * gcc.target/arm/pr70830.c: Likewise. - -2019-09-10 Christophe Lyon - Mickaël Guêné - - * gcc.dg/20020312-2.c: Skip on arm*-*-uclinuxfdpiceabi. - * gcc.target/arm/20051215-1.c: Likewise. - * gcc.target/arm/mmx-1.c: Likewise. - * gcc.target/arm/pr19599.c: Likewise. - * gcc.target/arm/pr40887.c: Likewise. - * gcc.target/arm/pr61948.c: Likewise. - * gcc.target/arm/pr77933-1.c: Likewise. - * gcc.target/arm/pr77933-2.c: Likewise. - * gcc.target/arm/sibcall-1.c: Likewise. - * gcc.target/arm/data-rel-2.c: Likewise. - * gcc.target/arm/data-rel-3.c: Likewise. - * gcc.target/arm/tail-long-call: Likewise. - * gcc.target/arm/tlscall.c: Likewise. - * gcc.target/arm/vfp-longcall-apcs: Likewise. - * gcc.target/arm/ivopts-2.c: Skip object-size test on - arm*-*-uclinuxfdpiceabi. - * gcc.target/arm/ivopts-3.c: Likewise. - * gcc.target/arm/ivopts-4.c: Likewise. - * gcc.target/arm/ivopts-5.c: Likewise. - * gcc.target/arm/pr43597.c: Likewise. - * gcc.target/arm/pr43920-2.c: Likewise. - * gcc.target/arm/pr45701-1.c: Skip scan-assembler on - arm*-*-uclinuxfdpiceabi. - * gcc.target/arm/pr45701-2.c: Likewise. - * gcc.target/arm/stack-red-zone.c: Likewise. - -2019-09-10 Christophe Lyon - Mickaël Guêné - - * gcc.target/arm/fp16-aapcs-2.c: Adjust scan-assembler-times. - * gcc.target/arm/fp16-aapcs-4.c: Likewise. - -2019-09-09 Marek Polacek - - PR c++/84374 - diagnose invalid uses of decltype(auto). - * g++.dg/cpp1y/auto-fn57.C: New test. - -2019-09-09 Segher Boessenkool - - * gcc.target/powerpc/rlwinm-0.c: Adjust expected instruction counts. - * gcc.target/powerpc/rlwinm-1.c: Ditto. - * gcc.target/powerpc/rlwinm-2.c: Ditto. - -2019-09-09 Barnaby Wilks - - * gcc.dg/fold-binary-math-casts.c: New test. - -2019-09-09 Jakub Jelinek - - PR target/87853 - * gcc.target/i386/pr87853.c: New test. - - PR target/91704 - * gcc.target/i386/pr91704.c: New test. - -2019-09-09 Jose E. Marchesi - - * gcc.dg/builtins-config.h: eBPF doesn't support C99 standard - functions. - * gcc.c-torture/compile/20101217-1.c: Add a function prototype for - printf. - * gcc.c-torture/compile/20000211-1.c: Skip if target bpf-*-*. - * gcc.c-torture/compile/poor.c: Likewise. - * gcc.c-torture/compile/pr25311.c: Likewise. - * gcc.c-torture/compile/pr39928-1.c: Likewise. - * gcc.c-torture/compile/pr70061.c: Likewise. - * gcc.c-torture/compile/920501-7.c: Likewise. - * gcc.c-torture/compile/20000403-1.c: Likewise. - * gcc.c-torture/compile/20001226-1.c: Likewise. - * gcc.c-torture/compile/20030903-1.c: Likewise. - * gcc.c-torture/compile/20031125-1.c: Likewise. - * gcc.c-torture/compile/20040101-1.c: Likewise. - * gcc.c-torture/compile/20040317-2.c: Likewise. - * gcc.c-torture/compile/20040726-1.c: Likewise. - * gcc.c-torture/compile/20051216-1.c: Likewise. - * gcc.c-torture/compile/900313-1.c: Likewise. - * gcc.c-torture/compile/920625-1.c: Likewise. - * gcc.c-torture/compile/930421-1.c: Likewise. - * gcc.c-torture/compile/930623-1.c: Likewise. - * gcc.c-torture/compile/961004-1.c: Likewise. - * gcc.c-torture/compile/980504-1.c: Likewise. - * gcc.c-torture/compile/980816-1.c: Likewise. - * gcc.c-torture/compile/990625-1.c: Likewise. - * gcc.c-torture/compile/DFcmp.c: Likewise. - * gcc.c-torture/compile/HIcmp.c: Likewise. - * gcc.c-torture/compile/HIset.c: Likewise. - * gcc.c-torture/compile/QIcmp.c: Likewise. - * gcc.c-torture/compile/QIset.c: Likewise. - * gcc.c-torture/compile/SFset.c: Likewise. - * gcc.c-torture/compile/SIcmp.c: Likewise. - * gcc.c-torture/compile/SIset.c: Likewise. - * gcc.c-torture/compile/UHIcmp.c: Likewise. - * gcc.c-torture/compile/UQIcmp.c: Likewise. - * gcc.c-torture/compile/USIcmp.c: Likewise. - * gcc.c-torture/compile/consec.c: Likewise. - * gcc.c-torture/compile/limits-fndefn.c: Likewise. - * gcc.c-torture/compile/lll.c: Likewise. - * gcc.c-torture/compile/parms.c: Likewise. - * gcc.c-torture/compile/pass.c: Likewise. - * gcc.c-torture/compile/pp.c: Likewise. - * gcc.c-torture/compile/pr32399.c: Likewise. - * gcc.c-torture/compile/pr34091.c: Likewise. - * gcc.c-torture/compile/pr34688.c: Likewise. - * gcc.c-torture/compile/pr37258.c: Likewise. - * gcc.c-torture/compile/pr37327.c: Likewise. - * gcc.c-torture/compile/pr37381.c: Likewise. - * gcc.c-torture/compile/pr37669-2.c: Likewise. - * gcc.c-torture/compile/pr37669.c: Likewise. - * gcc.c-torture/compile/pr37742-3.c: Likewise. - * gcc.c-torture/compile/pr44063.c: Likewise. - * gcc.c-torture/compile/pr48596.c: Likewise. - * gcc.c-torture/compile/pr51856.c: Likewise. - * gcc.c-torture/compile/pr54428.c: Likewise. - * gcc.c-torture/compile/pr54713-1.c: Likewise. - * gcc.c-torture/compile/pr54713-2.c: Likewise. - * gcc.c-torture/compile/pr54713-3.c: Likewise. - * gcc.c-torture/compile/pr55921.c: Likewise. - * gcc.c-torture/compile/pr70240.c: Likewise. - * gcc.c-torture/compile/pr70355.c: Likewise. - * gcc.c-torture/compile/pr82052.c: Likewise. - * gcc.c-torture/compile/pr83487.c: Likewise. - * gcc.c-torture/compile/pr86122.c: Likewise. - * gcc.c-torture/compile/pret-arg.c: Likewise. - * gcc.c-torture/compile/regs-arg-size.c: Likewise. - * gcc.c-torture/compile/structret.c: Likewise. - * gcc.c-torture/compile/uuarg.c: Likewise. - * gcc.dg/20001009-1.c: Likewise. - * gcc.dg/20020418-1.c: Likewise. - * gcc.dg/20020426-2.c: Likewise. - * gcc.dg/20020430-1.c: Likewise. - * gcc.dg/20040306-1.c: Likewise. - * gcc.dg/20040622-2.c: Likewise. - * gcc.dg/20050603-2.c: Likewise. - * gcc.dg/20050629-1.c: Likewise. - * gcc.dg/20061026.c: Likewise. - * gcc.dg/Warray-bounds-3.c: Likewise. - * gcc.dg/Warray-bounds-30.c: Likewise. - * gcc.dg/Wframe-larger-than-2.c: Likewise. - * gcc.dg/Wframe-larger-than.c: Likewise. - * gcc.dg/Wrestrict-11.c: Likewise. - * gcc.c-torture/compile/20000804-1.c: Likewise. - -2019-09-09 Jose E. Marchesi - - * lib/target-supports.exp (check_effective_target_trampolines): - Adapt to eBPF. - (check_effective_target_indirect_jumps): Likewise. - (check_effective_target_nonlocal_goto): Likewise. - (check_effective_target_global_constructor): Likewise. - (check_effective_target_return_address): Likewise. - -2019-09-09 Jose E. Marchesi - - * gcc.target/bpf/bpf.exp: New file. - * gcc.target/bpf/builtin-load.c: Likewise. - * cc.target/bpf/constant-calls.c: Likewise. - * gcc.target/bpf/diag-funargs.c: Likewise. - * gcc.target/bpf/diag-funargs-2.c: Likewise. - * gcc.target/bpf/diag-funargs-3.c: Likewise. - * gcc.target/bpf/diag-indcalls.c: Likewise. - * gcc.target/bpf/helper-bind.c: Likewise. - * cc.target/bpf/helper-bpf-redirect.c: Likewise. - * gcc.target/bpf/helper-clone-redirect.c: Likewise. - * gcc.target/bpf/helper-csum-diff.c: Likewise. - * gcc.target/bpf/helper-csum-update.c: Likewise. - * gcc.target/bpf/helper-current-task-under-cgroup.c: Likewise. - * gcc.target/bpf/helper-fib-lookup.c: Likewise. - * gcc.target/bpf/helper-get-cgroup-classid.c: Likewise. - * gcc.target/bpf/helper-get-current-cgroup-id.c: Likewise. - * gcc.target/bpf/helper-get-current-comm.c: Likewise. - * gcc.target/bpf/helper-get-current-pid-tgid.c: Likewise. - * gcc.target/bpf/helper-get-current-task.c: Likewise. - * gcc.target/bpf/helper-get-current-uid-gid.c: Likewise. - * gcc.target/bpf/helper-get-hash-recalc.c: Likewise. - * gcc.target/bpf/helper-get-listener-sock.c: Likewise. - * gcc.target/bpf/helper-get-local-storage.c: Likewise. - * gcc.target/bpf/helper-get-numa-node-id.c: Likewise. - * gcc.target/bpf/helper-get-prandom-u32.c: Likewise. - * gcc.target/bpf/helper-get-route-realm.c: Likewise. - * gcc.target/bpf/helper-get-smp-processor-id.c: Likewise. - * gcc.target/bpf/helper-get-socket-cookie.c: Likewise. - * gcc.target/bpf/helper-get-socket-uid.c: Likewise. - * gcc.target/bpf/helper-getsockopt.c: Likewise. - * gcc.target/bpf/helper-get-stack.c: Likewise. - * gcc.target/bpf/helper-get-stackid.c: Likewise. - * gcc.target/bpf/helper-ktime-get-ns.c: Likewise. - * gcc.target/bpf/helper-l3-csum-replace.c: Likewise. - * gcc.target/bpf/helper-l4-csum-replace.c: Likewise. - * gcc.target/bpf/helper-lwt-push-encap.c: Likewise. - * gcc.target/bpf/helper-lwt-seg6-action.c: Likewise. - * gcc.target/bpf/helper-lwt-seg6-adjust-srh.c: Likewise. - * gcc.target/bpf/helper-lwt-seg6-store-bytes.c: Likewise. - * gcc.target/bpf/helper-map-delete-elem.c: Likewise. - * gcc.target/bpf/helper-map-lookup-elem.c: Likewise. - * gcc.target/bpf/helper-map-peek-elem.c: Likewise. - * gcc.target/bpf/helper-map-pop-elem.c: Likewise. - * gcc.target/bpf/helper-map-push-elem.c: Likewise. - * gcc.target/bpf/helper-map-update-elem.c: Likewise. - * gcc.target/bpf/helper-msg-apply-bytes.c: Likewise. - * gcc.target/bpf/helper-msg-cork-bytes.c: Likewise. - * gcc.target/bpf/helper-msg-pop-data.c: Likewise. - * gcc.target/bpf/helper-msg-pull-data.c: Likewise. - * gcc.target/bpf/helper-msg-push-data.c: Likewise. - * gcc.target/bpf/helper-msg-redirect-hash.c: Likewise. - * gcc.target/bpf/helper-msg-redirect-map.c: Likewise. - * gcc.target/bpf/helper-override-return.c: Likewise. - * gcc.target/bpf/helper-perf-event-output.c: Likewise. - * gcc.target/bpf/helper-perf-event-read.c: Likewise. - * gcc.target/bpf/helper-perf-event-read-value.c: Likewise. - * gcc.target/bpf/helper-perf-prog-read-value.c: Likewise. - * gcc.target/bpf/helper-probe-read.c: Likewise. - * gcc.target/bpf/helper-probe-read-str.c: Likewise. - * gcc.target/bpf/helper-probe-write-user.c: Likewise. - * gcc.target/bpf/helper-rc-keydown.c: Likewise. - * gcc.target/bpf/helper-rc-pointer-rel.c: Likewise. - * gcc.target/bpf/helper-rc-repeat.c: Likewise. - * gcc.target/bpf/helper-redirect-map.c: Likewise. - * gcc.target/bpf/helper-set-hash.c: Likewise. - * gcc.target/bpf/helper-set-hash-invalid.c: Likewise. - * gcc.target/bpf/helper-setsockopt.c: Likewise. - * gcc.target/bpf/helper-skb-adjust-room.c: Likewise. - * gcc.target/bpf/helper-skb-cgroup-id.c: Likewise. - * gcc.target/bpf/helper-skb-change-head.c: Likewise. - * gcc.target/bpf/helper-skb-change-proto.c: Likewise. - * gcc.target/bpf/helper-skb-change-tail.c: Likewise. - * gcc.target/bpf/helper-skb-change-type.c: Likewise. - * gcc.target/bpf/helper-skb-ecn-set-ce.c: Likewise. - * gcc.target/bpf/helper-skb-get-tunnel-key.c: Likewise. - * gcc.target/bpf/helper-skb-get-tunnel-opt.c: Likewise. - * gcc.target/bpf/helper-skb-get-xfrm-state.c: Likewise. - * gcc.target/bpf/helper-skb-load-bytes.c: Likewise. - * gcc.target/bpf/helper-skb-load-bytes-relative.c: Likewise. - * gcc.target/bpf/helper-skb-pull-data.c: Likewise. - * gcc.target/bpf/helper-skb-set-tunnel-key.c: Likewise. - * gcc.target/bpf/helper-skb-set-tunnel-opt.c: Likewise. - * gcc.target/bpf/helper-skb-store-bytes.c: Likewise. - * gcc.target/bpf/helper-skb-under-cgroup.c: Likewise. - * gcc.target/bpf/helper-skb-vlan-pop.c: Likewise. - * gcc.target/bpf/helper-skb-vlan-push.c: Likewise. - * gcc.target/bpf/helper-skc-lookup-tcp.c: Likewise. - * gcc.target/bpf/helper-sk-fullsock.c: Likewise. - * gcc.target/bpf/helper-sk-lookup-tcp.c: Likewise. - * gcc.target/bpf/helper-sk-lookup-upd.c: Likewise. - * gcc.target/bpf/helper-sk-redirect-hash.c: Likewise. - * gcc.target/bpf/helper-sk-redirect-map.c: Likewise. - * gcc.target/bpf/helper-sk-release.c: Likewise. - * gcc.target/bpf/helper-sk-select-reuseport.c: Likewise. - * gcc.target/bpf/helper-sk-storage-delete.c: Likewise. - * gcc.target/bpf/helper-sk-storage-get.c: Likewise. - * gcc.target/bpf/helper-sock-hash-update.c: Likewise. - * gcc.target/bpf/helper-sock-map-update.c: Likewise. - * gcc.target/bpf/helper-sock-ops-cb-flags-set.c: Likewise. - * gcc.target/bpf/helper-spin-lock.c: Likewise. - * gcc.target/bpf/helper-spin-unlock.c: Likewise. - * gcc.target/bpf/helper-strtol.c: Likewise. - * gcc.target/bpf/helper-strtoul.c: Likewise. - * gcc.target/bpf/helper-sysctl-get-current-value.c: Likewise. - * gcc.target/bpf/helper-sysctl-get-name.c: Likewise. - * gcc.target/bpf/helper-sysctl-get-new-value.c: Likewise. - * gcc.target/bpf/helper-sysctl-set-new-value.c: Likewise. - * gcc.target/bpf/helper-tail-call.c: Likewise. - * gcc.target/bpf/helper-tcp-check-syncookie.c: Likewise. - * gcc.target/bpf/helper-tcp-sock.c: Likewise. - * gcc.target/bpf/helper-trace-printk.c: Likewise. - * gcc.target/bpf/helper-xdp-adjust-head.c: Likewise. - * gcc.target/bpf/helper-xdp-adjust-meta.c: Likewise. - * gcc.target/bpf/helper-xdp-adjust-tail.c: Likewise. - * gcc.target/bpf/skb-ancestor-cgroup-id.c: Likewise. - * gcc.target/bpf/sync-fetch-and-add.c: Likewise. - -2019-09-09 Jose E. Marchesi - - * lib/target-supports.exp (check_effective_target_indirect_calls): - New proc. - * gcc.c-torture/compile/20010102-1.c: Annotate with - dg-require-effective-target indirect_calls. - * gcc.c-torture/compile/20010107-1.c: Likewise. - * gcc.c-torture/compile/20011109-1.c: Likewise. - * gcc.c-torture/compile/20011218-1.c: Likewise. - * gcc.c-torture/compile/20011229-1.c: Likewise. - * gcc.c-torture/compile/20020129-1.c: Likewise. - * gcc.c-torture/compile/20020320-1.c: Likewise. - * gcc.c-torture/compile/20020706-1.c: Likewise. - * gcc.c-torture/compile/20020706-2.c: Likewise. - * gcc.c-torture/compile/20021205-1.c: Likewise. - * gcc.c-torture/compile/20030921-1.c: Likewise. - * gcc.c-torture/compile/20031023-1.c: Likewise. - * gcc.c-torture/compile/20031023-2.c: Likewise. - * gcc.c-torture/compile/20031023-3.c: Likewise. - * gcc.c-torture/compile/20031023-4.c: Likewise. - * gcc.c-torture/compile/20040614-1.c: Likewise. - * gcc.c-torture/compile/20040909-1.c: Likewise. - * gcc.c-torture/compile/20050122-1.c: Likewise. - * gcc.c-torture/compile/20050202-1.c: Likewise. - * gcc.c-torture/compile/20060208-1.c: Likewise. - * gcc.c-torture/compile/20081108-1.c: Likewise. - * gcc.c-torture/compile/20150327.c: Likewise. - * gcc.c-torture/compile/920428-2.c: Likewise. - * gcc.c-torture/compile/920928-5.c: Likewise. - * gcc.c-torture/compile/930117-1.c: Likewise. - * gcc.c-torture/compile/930607-1.c: Likewise. - * gcc.c-torture/compile/991213-2.c: Likewise. - * gcc.c-torture/compile/callind.c: Likewise. - * gcc.c-torture/compile/calls-void.c: Likewise. - * gcc.c-torture/compile/calls.c: Likewise. - * gcc.c-torture/compile/pr21840.c: Likewise. - * gcc.c-torture/compile/pr32139.c: Likewise. - * gcc.c-torture/compile/pr35607.c: Likewise. - * gcc.c-torture/compile/pr37433-1.c: Likewise. - * gcc.c-torture/compile/pr37433.c: Likewise. - * gcc.c-torture/compile/pr39941.c: Likewise. - * gcc.c-torture/compile/pr40080.c: Likewise. - * gcc.c-torture/compile/pr43635.c: Likewise. - * gcc.c-torture/compile/pr43791.c: Likewise. - * gcc.c-torture/compile/pr43845.c: Likewise. - * gcc.c-torture/compile/pr44043.c: Likewise. - * gcc.c-torture/compile/pr51694.c: Likewise. - * gcc.c-torture/compile/pr77754-2.c: Likewise. - * gcc.c-torture/compile/pr77754-3.c: Likewise. - * gcc.c-torture/compile/pr77754-4.c: Likewise. - * gcc.c-torture/compile/pr89663-2.c: Likewise. - * gcc.c-torture/compile/pta-1.c: Likewise. - * gcc.c-torture/compile/stack-check-1.c: Likewise. - * gcc.dg/Walloc-size-larger-than-18.c: Likewise. - -2019-09-09 Jose E. Marchesi - - * gcc.c-torture/compile/20000609-1.c: Annotate with - dg-require-stack-size. - * gcc.c-torture/compile/20000804-1.c: Likewise. - * gcc.c-torture/compile/20020304-1.c: Likewise. - * gcc.c-torture/compile/20020604-1.c: Likewise. - * gcc.c-torture/compile/20021015-1.c: Likewise. - * gcc.c-torture/compile/20050303-1.c: Likewise. - * gcc.c-torture/compile/20060421-1.c: Likewise. - * gcc.c-torture/compile/20071207-1.c: Likewise. - * gcc.c-torture/compile/20080903-1.c: Likewise. - * gcc.c-torture/compile/20121027-1.c: Likewise. - * gcc.c-torture/compile/20151204.c: Likewise. - * gcc.c-torture/compile/920501-12.c: Likewise. - * gcc.c-torture/compile/920501-4.c: Likewise. - * gcc.c-torture/compile/920723-1.c: Likewise. - * gcc.c-torture/compile/921202-1.c: Likewise. - * gcc.c-torture/compile/931003-1.c: Likewise. - * gcc.c-torture/compile/931004-1.c: Likewise. - * gcc.c-torture/compile/950719-1.c: Likewise. - * gcc.c-torture/compile/951222-1.c: Likewise. - * gcc.c-torture/compile/990517-1.c: Likewise. - * gcc.c-torture/compile/bcopy.c: Likewise. - * gcc.c-torture/compile/pr23929.c: Likewise. - * gcc.c-torture/compile/pr25310.c: Likewise. - * gcc.c-torture/compile/pr34458.c: Likewise. - * gcc.c-torture/compile/pr39937.c: Likewise. - * gcc.c-torture/compile/pr41181.c: Likewise. - * gcc.c-torture/compile/pr41634.c: Likewise. - * gcc.c-torture/compile/pr43415.c: Likewise. - * gcc.c-torture/compile/pr43417.c: Likewise. - * gcc.c-torture/compile/pr44788.c: Likewise. - * gcc.c-torture/compile/sound.c: Likewise. - -2019-09-07 Bernd Edlinger - - * gcc.target/arm/pr91684.c: Use effective-target arm_prefer_ldrd_strd. - -2019-09-07 David Edelsohn - - * g++.dg/cpp2a/decomp2.C: Add TLS options. - * gcc.target/powerpc/pr88233.c: Limit to lp64. - -2019-09-07 Jakub Jelinek - - PR tree-optimization/91665 - * gcc.dg/vect/pr91665.c: New test. - -2019-09-07 Bernd Edlinger - - PR target/91684 - * gcc.target/arm/pr91684.c: New test. - -2019-09-06 Ian Lance Taylor - - * go.test/test/fixedbugs/bug369.go: Update to match libgo update - to Go 1.13beta1. - -2019-09-06 David Edelsohn - - * gcc.dg/torture/inf-compare-1.c: Skip AIX. - * gcc.dg/torture/inf-compare-2.c: Skip AIX. - * gcc.dg/torture/inf-compare-3.c: Skip AIX. - * gcc.dg/torture/inf-compare-4.c: Skip AIX. - * gcc.dg/torture/pr52451.c: Skip AIX. - * gcc.dg/torture/pr68264.c: Skip AIX - * gcc.dg/torture/pr91323.c: Skip AIX. - - * g++.dg/warn/Warray-bounds-4.C: Skip AIX. - * g++.dg/warn/Warray-bounds-8.C: Skip AIX. - * g++.dg/opt/flifetime-dse2.C: XFAIL AIX. - * g++.dg/opt/flifetime-dse4.C: XFAIL AIX. - -2019-09-06 Caroline Tice - - PR testsuite/91670 - * g++.dg/ubsan/pr59415.C: Disable LTO, since test uses - -fvtable-verify, and the two options are no longer allowed - together. - -2019-09-06 Nathan Sidwell - - * c-c++-common/cpp/line-1.c: New. - -2019-09-06 Martin Liska - - PR c++/91125 - * g++.dg/parse/repo1.C: Remove. - * g++.dg/rtti/repo1.C: Remove. - * g++.dg/template/repo1.C: Remove. - * g++.dg/template/repo10.C: Remove. - * g++.dg/template/repo11.C: Remove. - * g++.dg/template/repo2.C: Remove. - * g++.dg/template/repo3.C: Remove. - * g++.dg/template/repo4.C: Remove. - * g++.dg/template/repo5.C: Remove. - * g++.dg/template/repo6.C: Remove. - * g++.dg/template/repo7.C: Remove. - * g++.dg/template/repo8.C: Remove. - * g++.dg/template/repo9.C: Remove. - * g++.old-deja/g++.pt/instantiate4.C: Remove. - * g++.old-deja/g++.pt/instantiate6.C: Remove. - * g++.old-deja/g++.pt/repo1.C: Remove. - * g++.old-deja/g++.pt/repo2.C: Remove. - * g++.old-deja/g++.pt/repo3.C: Remove. - * g++.old-deja/g++.pt/repo4.C: Remove. - * lib/g++.exp: Remove removal of repo files. - * lib/gcc-dg.exp: Likewise. - * lib/obj-c++.exp: Likewise. - -2019-09-05 Jakub Jelinek - Jim Wilson - - PR target/91635 - * gcc.c-torture/execute/pr91635.c: New test. - * gcc.target/riscv/shift-shift-4.c: New test. - * gcc.target/riscv/shift-shift-5.c: New test. - -2019-09-05 Harald Anlauf - - PR fortran/91496 - * gfortran.dg/directive_unroll_5.f90: Adjust error message. - -2019-09-05 Steven G. Kargl - - PR fortran/91660 - * gfortran.dg/pdt_4.f03: Fix invalid code. - * gfortran.dg/pr91660_1.f90: New test. - * gfortran.dg/pr91660_2.f90: Ditto. - -2019-09-05 Marek Polacek - - PR c++/91644 - ICE with constinit in function template. - * g++.dg/cpp2a/constinit13.C: New test. - -2019-09-05 Jakub Jelinek - - PR middle-end/91001 - PR middle-end/91105 - PR middle-end/91106 - * gcc.c-torture/compile/pr91001.c: New test. - -2019-09-05 Richard Biener - - PR rtl-optimization/91656 - * gcc.dg/torture/pr91656-1.c: New testcase. - * gcc.dg/torture/pr91656-2.c: Likewise. - * gcc.dg/torture/pr91656-3.c: Likewise. - -2019-09-05 Nathan Sidwell - - PR preprocessor/91639 - * c-c++-common/cpp/pr91639.c: New. - * c-c++-common/cpp/pr91639-one.h: New. - * c-c++-common/cpp/pr91639-two.h: New. - -2019-09-05 Richard Sandiford - - PR middle-end/91577 - * gfortran.dg/pr91577.f90: New test, taken from temporary_1.f90. - -2019-09-04 Steven G. Kargl - - PR fortran/91650 - * gfortran.dg/pr91650_1.f90: New test. - * gfortran.dg/pr91650_2.f90: Ditto. - -2019-09-04 Marek Polacek - - * g++.dg/cpp0x/initlist-deduce.C: Don't use -fdeduce-init-list. Remove - dg-warning. Add dg-error. - -2019-09-04 Prathamesh Kulkarni - - PR c/78736 - * gcc.dg/Wenum-conversion.c: New test-case. - -2019-09-03 Jozef Lawrynowicz - - * gcc.target/msp430/data-attributes-2.c: New test. - * gcc.target/msp430/function-attributes-4.c: Update dg-warning - strings. - * gcc.target/msp430/region-attribute-misuse.c: Likewise. - -2019-09-03 Kamlesh Kumar - - PR tree-optimization/91504 - gcc.dg/tree-ssa/pr91504.c: New test. - -2019-09-03 Jakub Jelinek - - PR target/91604 - * gcc.target/i386/pr91604.c: New test. - -2019-09-03 Ulrich Weigand - - * lib/compat.exp: Remove references to spu. - * lib/fortran-torture.exp: Likewise. - * lib/gcc-dg.exp: Likewise. - * lib/gfortran.exp: Likewise. - * lib/target-supports.exp: Likewise. - * lib/target-utils.exp: Likewise. - - * c-c++-common/torture/complex-sign-add.c: Remove references to spu. - * c-c++-common/torture/complex-sign-mixed-add.c: Likewise. - * c-c++-common/torture/complex-sign-mixed-div.c: Likewise. - * c-c++-common/torture/complex-sign-mixed-mul.c: Likewise. - * c-c++-common/torture/complex-sign-mixed-sub.c: Likewise. - * c-c++-common/torture/complex-sign-mul-minus-one.c: Likewise. - * c-c++-common/torture/complex-sign-mul-one.c: Likewise. - * c-c++-common/torture/complex-sign-mul.c: Likewise. - * c-c++-common/torture/complex-sign-sub.c: Likewise. - - * g++.dg/opt/temp1.C: Remove references to spu. - * g++.dg/opt/vt1.C: Likewise. - * g++.dg/torture/type-generic-1.C: Likewise. - * g++.dg/warn/pr30551-2.C: Likewise. - * g++.dg/warn/pr30551.C: Likewise. - * g++.old-deja/g++.jason/thunk2.C: Likewise. - * g++.old-deja/g++.other/comdat5.C: Likewise. - * g++.old-deja/g++.other/local-alloc1.C: Likewise. - - * gcc.c-torture/compile/20001226-1.c: Remove references to spu. - * gcc.c-torture/execute/20030222-1.c: Likewise. - * gcc.c-torture/execute/20031003-1.c: Likewise. - * gcc.c-torture/execute/20101011-1.c: Likewise. - * gcc.c-torture/execute/conversion.c: Likewise. - * gcc.c-torture/execute/ieee/compare-fp-4.x: Likewise. - * gcc.c-torture/execute/ieee/fp-cmp-2.x: Likewise. - * gcc.c-torture/execute/ieee/inf-1.c: Likewise. - * gcc.c-torture/execute/ieee/inf-2.c: Likewise. - * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: Likewise. - * gcc.c-torture/execute/ieee/rbug.c: Likewise. - * gcc.c-torture/execute/pr39228.c: Likewise. - * gcc.c-torture/execute/ieee/20010114-2.x: Remove file. - * gcc.c-torture/execute/ieee/20030331-1.x: Remove file. - * gcc.c-torture/execute/ieee/920518-1.x: Remove file. - * gcc.c-torture/execute/ieee/compare-fp-1.x: Remove file. - * gcc.c-torture/execute/ieee/fp-cmp-4f.x: Remove file. - * gcc.c-torture/execute/ieee/fp-cmp-8f.x: Remove file. - - * gcc.dg/20020312-2.c: Remove references to spu. - * gcc.dg/20030702-1.c: Likewise. - * gcc.dg/and-1.c: Likewise. - * gcc.dg/builtin-inf-1.c: Likewise. - * gcc.dg/builtins-1.c: Likewise. - * gcc.dg/builtins-43.c: Likewise. - * gcc.dg/builtins-44.c: Likewise. - * gcc.dg/builtins-45.c: Likewise. - * gcc.dg/float-range-1.c: Likewise. - * gcc.dg/float-range-3.c: Likewise. - * gcc.dg/float-range-4.c: Likewise. - * gcc.dg/float-range-5.c: Likewise. - * gcc.dg/fold-overflow-1.c: Likewise. - * gcc.dg/format/ms_unnamed-1.c: Likewise. - * gcc.dg/format/unnamed-1.c: Likewise. - * gcc.dg/hex-round-1.c: Likewise. - * gcc.dg/hex-round-2.c: Likewise. - * gcc.dg/lower-subreg-1.c: Likewise. - * gcc.dg/nrv3.c: Likewise. - * gcc.dg/pr15784-3.c: Likewise. - * gcc.dg/pr27095.c: Likewise. - * gcc.dg/pr28243.c: Likewise. - * gcc.dg/pr28796-2.c: Likewise. - * gcc.dg/pr30551-3.c: Likewise. - * gcc.dg/pr30551-6.c: Likewise. - * gcc.dg/pr30551.c: Likewise. - * gcc.dg/pr70317.c: Likewise. - * gcc.dg/sms-1.c: Likewise. - * gcc.dg/sms-2.c: Likewise. - * gcc.dg/sms-3.c: Likewise. - * gcc.dg/sms-4.c: Likewise. - * gcc.dg/sms-5.c: Likewise. - * gcc.dg/sms-6.c: Likewise. - * gcc.dg/sms-7.c: Likewise. - * gcc.dg/stack-usage-1.c: Likewise. - * gcc.dg/strlenopt-73.c: Likewise. - * gcc.dg/titype-1.c: Likewise. - * gcc.dg/tls/thr-cse-1.c: Likewise. - * gcc.dg/torture/builtin-attr-1.c: Likewise. - * gcc.dg/torture/builtin-complex-1.c: Likewise. - * gcc.dg/torture/builtin-cproj-1.c: Likewise. - * gcc.dg/torture/builtin-frexp-1.c: Likewise. - * gcc.dg/torture/builtin-ldexp-1.c: Likewise. - * gcc.dg/torture/builtin-logb-1.c: Likewise. - * gcc.dg/torture/builtin-math-2.c: Likewise. - * gcc.dg/torture/builtin-math-5.c: Likewise. - * gcc.dg/torture/builtin-modf-1.c: Likewise. - * gcc.dg/torture/fp-int-convert.h: Likewise. - * gcc.dg/torture/pr25947-1.c: Likewise. - * gcc.dg/torture/type-generic-1.c: Likewise. - * gcc.dg/tree-ssa/20040204-1.c: Likewise. - * gcc.dg/tree-ssa/ivopts-1.c: Likewise. - * gcc.dg/tree-ssa/ssa-fre-3.c: Likewise. - * gcc.dg/tree-ssa/vector-6.c: Likewise. - * gcc.dg/uninit-C-O0.c: Likewise. - * gcc.dg/uninit-C.c: Likewise. - * gcc.dg/vect/no-math-errno-slp-32.c: Likewise. - * gcc.dg/vect/no-math-errno-vect-pow-1.c: Likewise. - * gcc.dg/vect/vect-float-extend-1.c: Likewise. - * gcc.dg/vect/vect-float-truncate-1.c: Likewise. - * gcc.dg/vect/vect.exp: Likewise. - * gcc.gd/vect/costmodel/spu/: Remove directory. - - * gcc.target/spu/: Remove directory. - - * gfortran.dg/bessel_6.f90: Remove references to spu. - * gfortran.dg/bessel_7.f90: Likewise. - * gfortran.dg/char4_iunit_1.f03: Likewise. - * gfortran.dg/chmod_1.f90: Likewise. - * gfortran.dg/chmod_2.f90: Likewise. - * gfortran.dg/chmod_3.f90: Likewise. - * gfortran.dg/default_format_1.f90: Likewise. - * gfortran.dg/default_format_denormal_1.f90: Likewise. - * gfortran.dg/erf_2.F90: Likewise. - * gfortran.dg/erf_3.F90: Likewise. - * gfortran.dg/init_flag_10.f90: Likewise. - * gfortran.dg/init_flag_3.f90: Likewise. - * gfortran.dg/int_conv_2.f90: Likewise. - * gfortran.dg/integer_exponentiation_3.F90: Likewise. - * gfortran.dg/integer_exponentiation_5.F90: Likewise. - * gfortran.dg/isnan_1.f90: Likewise. - * gfortran.dg/isnan_2.f90: Likewise. - * gfortran.dg/maxloc_2.f90: Likewise. - * gfortran.dg/maxlocval_2.f90: Likewise. - * gfortran.dg/maxlocval_4.f90: Likewise. - * gfortran.dg/minloc_1.f90: Likewise. - * gfortran.dg/minlocval_1.f90: Likewise. - * gfortran.dg/minlocval_4.f90: Likewise. - * gfortran.dg/module_nan.f90: Likewise. - * gfortran.dg/namelist_42.f90: Likewise. - * gfortran.dg/namelist_43.f90: Likewise. - * gfortran.dg/nan_1.f90: Likewise. - * gfortran.dg/nan_2.f90: Likewise. - * gfortran.dg/nan_3.f90: Likewise. - * gfortran.dg/nan_4.f90: Likewise. - * gfortran.dg/nan_5.f90: Likewise. - * gfortran.dg/nan_6.f90: Likewise. - * gfortran.dg/nearest_1.f90: Likewise. - * gfortran.dg/nearest_3.f90: Likewise. - * gfortran.dg/open_errors.f90: Likewise. - * gfortran.dg/pr20257.f90: Likewise. - * gfortran.dg/read_infnan_1.f90: Likewise. - * gfortran.dg/real_const_3.f90: Likewise. - * gfortran.dg/realloc_on_assign_2.f03: Likewise. - * gfortran.dg/reassoc_4.f: Likewise. - * gfortran.dg/scalar_mask_2.f90: Likewise. - * gfortran.dg/scratch_1.f90: Likewise. - * gfortran.dg/stat_1.f90: Likewise. - * gfortran.dg/stat_2.f90: Likewise. - * gfortran.dg/transfer_simplify_1.f90: Likewise. - * gfortran.dg/typebound_operator_9.f03: Likewise. - - * gfortran.fortran-torture/execute/intrinsic_nearest.x: Remove - references to spu. - * gfortran.fortran-torture/execute/intrinsic_set_exponent.x: Likewise. - * gfortran.fortran-torture/execute/nan_inf_fmt.x: Likewise. - * gfortran.fortran-torture/execute/getarg_1.x: Remove file. - -2019-09-03 Bernd Edlinger - - PR middle-end/91603 - * gcc.target/arm/pr91603.c: New test. - -2019-09-03 Ilya Leoshkevich - - * gcc.target/s390/sigfpe-eh.c: New test. - -2019-09-03 Kyrylo Tkachov - - * gcc.target/aarch64/acle/jcvt_1.c: New test. - -2019-09-03 Kyrylo Tkachov - - * gcc.target/aarch64/acle/rintnzx_1.c: New test. - * gcc.target/aarch64/simd/vrndnzx_1.c: Likewise. - -2019-09-03 Jakub Jelinek - Richard Biener - - PR tree-optimization/91597 - * gcc.c-torture/execute/pr91597.c: New test. - -2019-09-03 Alexandre Oliva - - * gcc.target/i386/20020616-1.c: Preserve full register across - main. - -2019-09-02 Paul Thomas - - PR fortran/91589 - * gfortran.dg/pr91589.f90 : New test. - -2019-09-02 Steven G. Kargl - - PR fortran/91552 - * gfortran.dg/pr91552.f90: New test. - -2019-09-02 Bernd Edlinger - - PR middle-end/91605 - * g++.target/i386/pr91605.C: New test. - -2019-09-02 Jakub Jelinek - - PR tree-optimization/91632 - * gcc.c-torture/execute/pr91632.c: New test. - -2019-09-02 Eric Botcazou - - * gcc.dg/tree-ssa/slsr-42.c: New test. - -2019-09-02 Martin Liska - - PR c++/91155 - * g++.dg/torture/pr91155.C: New test. - -2019-09-01 Marek Polacek - - PR c++/91129 - wrong error with binary op in template argument. - * g++.dg/cpp1y/nontype1.C: New test. - -2019-09-01 Iain Sandoe - - * gcc.c-torture/compile/20190827-1.c: Add dg-requires-alias. - -2019-09-01 Eric Botcazou - - * gcc.c-torture/execute/20190901-1.c: New test. - - * lib/target-supports.exp (check_effective_target_pthread): Add - #include directive to the test. - -2019-09-01 Paul Thomas - - * gfortran.dg/select_rank_1.f90 : New test. - * gfortran.dg/select_rank_2.f90 : New test. - -2019-09-01 Jakub Jelinek - - PR middle-end/91623 - * gcc.target/i386/pr91623.c: New test. - - PR lto/91572 - * g++.dg/lto/pr91572_0.C: New test. - -2019-08-30 Steven G. Kargl - - PR fortran/91587 - * gfortran.dg/pr91587.f90: New test. - -2019-08-30 Martin Sebor - - PR middle-end/91599 - * gcc.dg/Wstringop-overflow-16.c: New test. - - PR middle-end/91584 - * gfortran.dg/char_array_constructor_4.f90: New test. - -2019-08-30 Eric Botcazou - - * gnat.dg/pack24.adb: New test. - -2019-08-30 Jeff Law - - * gcc.target/mips/r10k-cache-barrier-9.c: Suppress warnings. - -2019-08-30 Martin Jambor - - tree-optimization/91579 - * gcc.dg/tree-ssa/pr91579.c: New test. - -2019-08-29 Jakub Jelinek - - PR target/91560 - * gcc.dg/torture/vshuf-8.inc: Add two further permutations. - - PR tree-optimization/91351 - * g++.dg/opt/pr91351.C: New test. - -2019-08-29 Paolo Carlini - - * g++.dg/spellcheck-typenames.C: Adjust expected locations. - * g++.dg/cpp0x/pr84676.C: Check locations. - * g++.dg/other/pr88187.C: Likewise. - * g++.dg/parse/crash13.C: Likewise. - * g++.dg/parse/crash46.C: Likewise. - * g++.dg/parse/template28.C: Likewise. - * g++.dg/parse/typename4.C: Likewise. - -2019-08-29 Richard Biener - - PR tree-optimization/91568 - * gfortran.dg/pr91568.f: New testcase. - -2019-08-28 Marek Polacek - - Implement P1152R4: Deprecating some uses of volatile. - PR c++/91361 - * c-c++-common/Wbool-operation-1.c: Use -Wno-volatile in C++. - * c-c++-common/gomp/atomic-1.c: Likewise. - * c-c++-common/gomp/atomic-9.c: Likewise. - * c-c++-common/gomp/depend-iterator-1.c: Likewise. - * c-c++-common/gomp/loop-1.c: Adjust warning location for C++. - * c-c++-common/gomp/order-3.c: Likewise. - * c-c++-common/pr69733.c: Use -Wno-volatile in C++. - * c-c++-common/spec-barrier-2.c: Likewise. - * c-c++-common/tm/pr54893.c: Likewise. - * g++.dg/cpp0x/pr65327.C: Add dg-warning. - * g++.dg/cpp0x/rv-conv2.C: Likewise. - * g++.dg/cpp0x/rv1n.C: Likewise. - * g++.dg/cpp0x/rv1p.C: Likewise. - * g++.dg/cpp0x/rv2n.C: Likewise. - * g++.dg/cpp0x/rv2p.C: Likewise. - * g++.dg/cpp0x/rv3n.C: Likewise. - * g++.dg/cpp0x/rv3p.C: Likewise. - * g++.dg/cpp0x/rv4n.C: Likewise. - * g++.dg/cpp0x/rv4p.C: Likewise. - * g++.dg/cpp0x/rv5n.C: Likewise. - * g++.dg/cpp0x/rv5p.C: Likewise. - * g++.dg/cpp0x/rv6n.C: Likewise. - * g++.dg/cpp0x/rv6p.C: Likewise. - * g++.dg/cpp0x/rv7n.C: Likewise. - * g++.dg/cpp0x/rv7p.C: Likewise. - * g++.dg/cpp0x/rv8p.C: Likewise. - * g++.dg/cpp0x/trailing14.C: Use -Wno-volatile. - * g++.dg/cpp1y/new1.C: Add dg-warning. - * g++.dg/cpp2a/volatile1.C: New test. - * g++.dg/cpp2a/volatile2.C: New test. - * g++.dg/cpp2a/volatile3.C: New test. - * g++.dg/cpp2a/volatile4.C: New test. - * g++.dg/expr/bool3.C: Add dg-warning. - * g++.dg/expr/bool4.C: Likewise. - * g++.dg/expr/cond9.C: Likewise. - * g++.dg/ext/vector25.C: Likewise. - * g++.dg/gomp/depend-iterator-1.C: Use -Wno-volatile. - * g++.dg/inherit/covariant21.C: Add dg-warning. - * g++.dg/init/ref18.C: Likewise. - * g++.dg/ipa/pr63838.C: Likewise. - * g++.dg/overload/rvalue2.C: Likewise. - * g++.dg/parse/semicolon4.C: Likewise. - * g++.dg/warn/Wreturn-type-4.C: Likewise. - * g++.dg/warn/pr36069.C: Likewise. - * g++.old-deja/g++.mike/p9506.C: Likewise. - * g++.old-deja/g++.other/volatile1.C: Likewise. - -2019-08-28 Steven G. Kargl - - PR fortran/91551 - * gfortran.dg/allocated_3.f90 - -2019-08-28 Marek Polacek - - PR c++/91360 - Implement C++20 P1143R2: constinit. - * g++.dg/cpp2a/constinit1.C: New test. - * g++.dg/cpp2a/constinit2.C: New test. - * g++.dg/cpp2a/constinit3.C: New test. - * g++.dg/cpp2a/constinit4.C: New test. - * g++.dg/cpp2a/constinit5.C: New test. - * g++.dg/cpp2a/constinit6.C: New test. - * g++.dg/cpp2a/constinit7.C: New test. - * g++.dg/cpp2a/constinit8.C: New test. - * g++.dg/cpp2a/constinit9.C: New test. - * g++.dg/cpp2a/constinit10.C: New test. - * g++.dg/cpp2a/constinit11.C: New test. - * g++.dg/cpp2a/constinit12.C: New test. - -2019-08-28 Steven G. Kargl - - PR fortran/91565 - * gfortran.dg/pr91565.f90: New test. - -2019-08-28 Steven G. Kargl - - PR fortran/91564 - * gfortran.dg/pr91564.f90: New test. - -2019-08-28 Martin Sebor - - PR tree-optimization/91457 - * c-c++-common/Wstringop-overflow-2.c: New test. - * g++.dg/warn/Warray-bounds-8.C: New test. - * g++.dg/warn/Wstringop-overflow-3.C: New test. - * gcc.dg/Wstringop-overflow-15.c: New test. - -2019-08-16 Martin Liska - - PR c++/90613 - * g++.dg/lookup/using61.C: New. - -2019-08-28 Bernd Edlinger - - PR middle-end/89544 - * gcc.target/arm/unaligned-argument-3.c: New test. - -2019-08-27 Marek Polacek - - PR c++/81676 - bogus -Wunused warnings in constexpr if. - * g++.dg/cpp1z/constexpr-if31.C: New test. - * g++.dg/cpp1z/constexpr-if32.C: New test. - - PR c++/91428 - warn about std::is_constant_evaluated in if constexpr. - * g++.dg/cpp2a/is-constant-evaluated9.C: New test. - -2019-08-27 Martin Sebor - - PR tree-optimization/91567 - * gcc.dg/tree-ssa/builtin-snprintf-6.c: Xfail a subset of assertions - on targets other than x86_64 to work around PR 83543. - * gcc.dg/tree-ssa/builtin-sprintf-warn-22.c: New test. - -2019-08-27 Jeff Law - - * gcc.c-torture/compile/20190827-1.c: New test. - -2019-08-27 Harald Anlauf - - PR fortran/91496 - * gfortran.dg/pr91496.f90: New testcase. - -2019-08-27 Uroš Bizjak - - * gcc.target/i386/sse4_1-round-roundeven-1.c (dg-options): - Add -mfpmath=sse. - * gcc.target/i386/sse4_1-round-roundeven-2.c (dg-options): Ditto. - -2019-08-27 Uroš Bizjak - - PR target/91528 - * gcc.target/i386/pr91528.c: New test. - -2019-08-27 Martin Sebor - - PR c++/83431 - PR testsuite/91562 - * gcc.dg/strlenopt-8.c: Adjust pass/dump name. - -2019-08-27 Jakub Jelinek - - PR c++/91415 - * g++.dg/warn/sequence-pt-4.C: New test. - -2019-08-27 Robin Dapp - - PR testsuite/91549 - * gcc.dg/wrapped-binop-simplify.c: Test only on x86, s390 with lp64. - -2019-08-26 Thomas Koenig - - PR fortran/91390 - PR fortran/91473 - * gfortran.dg/used_before_typed_4.f90: Change warning to error. - * gfortran.dg/argument_checking_20.f90: New test. - -2019-08-26 Marek Polacek - - PR c++/91545 - ICE in constexpr store evaluation. - * g++.dg/cpp0x/pr91545.C: New test. - -2019-08-26 Tejas Joshi - - * gcc.target/i386/sse4_1-round-roundeven-1.c: New test. - * gcc.target/i386/sse4_1-round-roundeven-2.c: New test. - -2019-08-26 Tejas Joshi - - * gcc.dg/torture/builtin-round-roundeven.c: New test. - * gcc.dg/torture/builtin-round-roundevenf128.c: Likewise. - -2019-08-26 Robin Dapp - - * gcc.dg/tree-ssa/copy-headers-5.c: Do not run vrp pass. - * gcc.dg/tree-ssa/copy-headers-7.c: Do not run vrp pass. - * gcc.dg/tree-ssa/loop-15.c: Remove XFAIL. - * gcc.dg/tree-ssa/pr23744.c: Change search pattern. - * gcc.dg/wrapped-binop-simplify.c: New test. - -2019-08-26 Kito Cheng - - * gcc.target/riscv/li.c: New test. - -2019-08-24 Nathan Sidwell - - * g++.dg/inherit/virtual14.C: New. - -2019-08-24 Thomas Koenig - - PR fortran/91390 - PR fortran/91519 - * gfortran.dg/bessel_3.f90: Add type mismatch errors. - * gfortran.dg/coarray_7.f90: Rename subroutines to avoid - additional errors. - * gfortran.dg/g77/20010519-1.f: Add -std=legacy. Remove - warnings for ASSIGN. Add warnings for type mismatch. - * gfortran.dg/goacc/acc_on_device-1.f95: Add -std=legacy. - Add catch-all warning. - * gfortran.dg/internal_pack_9.f90: Rename subroutine to - avoid type error. - * gfortran.dg/internal_pack_9.f90: Add -std=legacy. Add - warnings for type mismatch. - * gfortran.dg/pr39937.f: Add -std=legacy and type warnings. Move - here from - * gfortran.fortran-torture/compile/pr39937.f: Move to gfortran.dg. - -2019-08-24 Paolo Carlini - - * g++.dg/conversion/simd4.C: Test all the locations. - -2019-08-23 Marek Polacek - - PR c++/91521 - wrong error with operator->. - * g++.dg/parse/operator8.C: New test. - -2019-08-23 Segher Boessenkool - - PR target/91481 - * gcc.target/powerpc/darn-3.c: New testcase. - -2019-08-23 Marek Polacek - - PR c++/79817 - attribute deprecated on namespace. - * g++.dg/cpp0x/attributes-namespace1.C: New test. - * g++.dg/cpp0x/attributes-namespace2.C: New test. - * g++.dg/cpp0x/attributes-namespace3.C: New test. - * g++.dg/cpp0x/attributes-namespace4.C: New test. - * g++.dg/cpp0x/attributes-namespace5.C: New test. - * g++.dg/cpp1z/namespace-attribs.C: Adjust. - * g++.dg/cpp1z/namespace-attribs2.C: Adjust. - -2019-08-23 Mihailo Stojanovic - - * gcc.target/mips/get-fcsr-3.c: New test. - -2019-08-23 Martin Sebor - - PR c++/83431 - * gcc.dg/strlenopt-63.c: New test. - * gcc.dg/pr79538.c: Adjust text of expected warning. - * gcc.dg/pr81292-1.c: Adjust pass name. - * gcc.dg/pr81292-2.c: Same. - * gcc.dg/pr81703.c: Same. - * gcc.dg/strcmpopt_2.c: Same. - * gcc.dg/strcmpopt_3.c: Same. - * gcc.dg/strcmpopt_4.c: Same. - * gcc.dg/strlenopt-1.c: Same. - * gcc.dg/strlenopt-10.c: Same. - * gcc.dg/strlenopt-11.c: Same. - * gcc.dg/strlenopt-13.c: Same. - * gcc.dg/strlenopt-14g.c: Same. - * gcc.dg/strlenopt-14gf.c: Same. - * gcc.dg/strlenopt-15.c: Same. - * gcc.dg/strlenopt-16g.c: Same. - * gcc.dg/strlenopt-17g.c: Same. - * gcc.dg/strlenopt-18g.c: Same. - * gcc.dg/strlenopt-19.c: Same. - * gcc.dg/strlenopt-1f.c: Same. - * gcc.dg/strlenopt-2.c: Same. - * gcc.dg/strlenopt-20.c: Same. - * gcc.dg/strlenopt-21.c: Same. - * gcc.dg/strlenopt-22.c: Same. - * gcc.dg/strlenopt-22g.c: Same. - * gcc.dg/strlenopt-24.c: Same. - * gcc.dg/strlenopt-25.c: Same. - * gcc.dg/strlenopt-26.c: Same. - * gcc.dg/strlenopt-27.c: Same. - * gcc.dg/strlenopt-28.c: Same. - * gcc.dg/strlenopt-29.c: Same. - * gcc.dg/strlenopt-2f.c: Same. - * gcc.dg/strlenopt-3.c: Same. - * gcc.dg/strlenopt-30.c: Same. - * gcc.dg/strlenopt-31g.c: Same. - * gcc.dg/strlenopt-32.c: Same. - * gcc.dg/strlenopt-33.c: Same. - * gcc.dg/strlenopt-33g.c: Same. - * gcc.dg/strlenopt-34.c: Same. - * gcc.dg/strlenopt-35.c: Same. - * gcc.dg/strlenopt-4.c: Same. - * gcc.dg/strlenopt-48.c: Same. - * gcc.dg/strlenopt-49.c: Same. - * gcc.dg/strlenopt-4g.c: Same. - * gcc.dg/strlenopt-4gf.c: Same. - * gcc.dg/strlenopt-5.c: Same. - * gcc.dg/strlenopt-50.c: Same. - * gcc.dg/strlenopt-51.c: Same. - * gcc.dg/strlenopt-52.c: Same. - * gcc.dg/strlenopt-53.c: Same. - * gcc.dg/strlenopt-54.c: Same. - * gcc.dg/strlenopt-55.c: Same. - * gcc.dg/strlenopt-56.c: Same. - * gcc.dg/strlenopt-6.c: Same. - * gcc.dg/strlenopt-61.c: Same. - * gcc.dg/strlenopt-7.c: Same. - * gcc.dg/strlenopt-8.c: Same. - * gcc.dg/strlenopt-9.c: Same. - * gcc.dg/strlenopt.h (snprintf, snprintf): Declare. - * gcc.dg/tree-ssa/builtin-snprintf-6.c: New test. - * gcc.dg/tree-ssa/builtin-snprintf-7.c: New test. - * gcc.dg/tree-ssa/builtin-snprintf-8.c: New test. - * gcc.dg/tree-ssa/builtin-snprintf-9.c: New test. - * gcc.dg/tree-ssa/builtin-sprintf-warn-21.c: New test. - * gcc.dg/tree-ssa/dump-4.c: New test. - * gcc.dg/tree-ssa/pr83501.c: Adjust pass name. - -2019-08-23 Martin Sebor - - * gcc.dg/Warray-bounds-36.c: Make functions static to avoid failures - with -fpic. - * gcc.dg/Warray-bounds-41.c: Same. - * gcc.dg/pr78973.c: Same. - * gcc.dg/pr78973-2.c: Same. - -2019-08-22 Marek Polacek - - PR c++/91304 - prefix attributes ignored in condition. - * g++.dg/cpp0x/gen-attrs-70.C: New test. - -2019-08-22 Martin Sebor - - PR middle-end/91490 - * c-c++-common/Warray-bounds-7.c: New test. - * gcc.dg/Warray-bounds-39.c: Expect either -Warray-bounds or - -Wstringop-overflow. - * gcc.dg/strlenopt-78.c: New test. - -2019-08-22 Rainer Orth - - * gcc.target/i386/minmax-4.c: Add -mno-stackrealign to dg-options. - * gcc.target/i386/minmax-5.c: Likewise. - * gcc.target/i386/minmax-6.c: Likewise. - * gcc.target/i386/minmax-7.c: Likewise. - * gcc.target/i386/pr91154.c: Likewise. - -2019-08-22 Eric Botcazou - - * c-c++-common/dump-ada-spec-15.c: Check that the parameters are named. - -2019-08-22 Kyrylo Tkachov - - * gcc.target/arm/acle/crc_hf_1.c: New test. - -2019-08-22 Wilco Dijkstra - - * gcc.target/arm/neon-extend-1.c: Remove test. - * gcc.target/arm/neon-extend-2.c: Remove test. - -2019-08-22 Sylvia Taylor - - * gcc.target/aarch64/advsimd-intrinsics/vld1x4.c: New test. - * gcc.target/aarch64/advsimd-intrinsics/vst1x4.c: New test. - -2019-08-22 Prathamesh Kulkarni - Richard Sandiford - - PR target/88839 - * gcc.target/aarch64/sve/sel_1.c: New test. - * gcc.target/aarch64/sve/sel_2.c: Likewise. - * gcc.target/aarch64/sve/sel_3.c: Likewise. - * gcc.target/aarch64/sve/sel_4.c: Likewise. - * gcc.target/aarch64/sve/sel_5.c: Likewise. - * gcc.target/aarch64/sve/sel_6.c: Likewise. - -2019-08-21 Richard Sandiford - - PR c++/91505 - * g++.target/i386/crc32-4.C: New test. - -2019-08-21 Richard Biener - - PR tree-optimization/91482 - * gcc.dg/tree-ssa/pr91482.c: New testcase. - -2019-08-21 Eric Botcazou - - * c-c++-common/dump-ada-spec-15.c: New test. - -2019-08-21 Christophe Lyon - - * gcc.target/arm/cmse/cmse-9.c: Add quotes to expected - warning messages. - -2019-08-21 Eric Botcazou - - * gnat.dg/prot9.adb, gnat.dg/prot9_gen.ads, - gnat.dg/prot9_pkg1.ads, gnat.dg/prot9_pkg2.ads: New testcase. - -2019-08-21 Javier Miranda - - * gnat.dg/implicit_param.adb, gnat.dg/implicit_param_pkg.ads: - New testcase. - -2019-08-20 Martin Sebor - - PR testsuite/91458 - * g++.dg/tree-ssa/ssa-dse-1.C: Use the same search pattern - unconditionally (correcting r272199, PR middle-end/90676). - * gcc.dg/tree-prof/stringop-2.c: Same. - -2019-08-20 Ian Lance Taylor - - * go.test/test/fixedbugs/bug073.go: Update for language changes. - -2019-08-20 Matthew Beliveau - - * gcc.dg/tree-ssa/redundant-assign-zero-1.c: New test. - * gcc.dg/tree-ssa/redundant-assign-zero-2.c: New test. - -2019-08-20 Richard Biener - - PR tree-optimization/37242 - * gcc.dg/tree-ssa/ssa-fre-80.c: New testcase. - -2019-08-20 Ed Schonberg - - * gnat.dg/storage_size1.adb: New testcase. - -2019-08-20 Ed Schonberg - - * gnat.dg/loop_entry2.adb: New testcase. - -2019-08-20 Ed Schonberg - - * gnat.dg/tagged5.adb, gnat.dg/tagged5.ads: New testcase. - -2019-08-20 Gary Dismukes - - * gnat.dg/type_conv2.adb, gnat.dg/type_conv2.ads: New testcase. - -2019-08-20 Bob Duff - - * gnat.dg/unchecked_convert14.adb: New testcase. - -2019-08-20 Bob Duff - - * gnat.dg/object_size1.adb: New testcase. - -2019-08-20 Eric Botcazou - - * gcc.c-torture/execute/20190820-1.c: New test. - -2019-08-20 Richard Biener - - PR target/91498 - * gcc.target/i386/minmax-7.c: New testcase. - -2019-08-20 Lili Cui - - * gcc.target/i386/funcspec-56.inc: Handle new march. - * g++.target/i386/mv16.C: Handle new march - -2019-08-20 Bernd Edlinger - - PR middle-end/89544 - * gcc.target/arm/unaligned-argument-1.c: New test. - * gcc.target/arm/unaligned-argument-2.c: New test. - -2019-08-19 Joel Hutton - - * gcc.target/aarch64/fmul_scvtf_1.c: New test. - -2019-08-19 Marek Polacek - - PR c++/91264 - detect modifying const objects in constexpr. - * g++.dg/cpp1y/constexpr-tracking-const1.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const2.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const3.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const4.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const5.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const6.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const7.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const8.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const9.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const10.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const11.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const12.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const13.C: New test. - * g++.dg/cpp1y/constexpr-tracking-const14.C: New test. - -2019-08-19 Eric Botcazou - - * gnat.dg/elab8.adb, gnat.dg/elab8_gen.adb, - gnat.dg/elab8_gen.ads, gnat.dg/elab8_pkg.adb, - gnat.dg/elab8_pkg.ads: New testcase. - -2019-08-19 Bob Duff - - * gnat.dg/warn29.adb, gnat.dg/warn29.ads: New testcase. - -2019-08-19 Ed Schonberg - - * gnat.dg/expr_func9.adb: New testcase. - -2019-08-19 Bob Duff - - * gnat.dg/valid_scalars2.adb: New testcase. - -2019-08-19 Eric Botcazou - - * gnat.dg/generic_inst12.adb, gnat.dg/generic_inst12_pkg1.adb, - gnat.dg/generic_inst12_pkg1.ads, - gnat.dg/generic_inst12_pkg2.ads: New testcase. - -2019-08-19 Ed Schonberg - - * gnat.dg/warn28.adb, gnat.dg/warn28.ads: New testcase. - -2019-08-19 Ed Schonberg - - * gnat.dg/rep_clause9.adb: New testcase. - -2019-08-19 Olivier Hainque - - * gnat.dg/openacc1.adb: New testcase. - -2019-08-19 Kito Cheng - - PR target/91441 - * gcc.target/riscv/pr91441.c: New. - -2019-08-18 Steven G. Kargl - - PR fortran/91485 - * gfortran.dg/pr91485.f90: New test. - -2019-08-17 Steven G. Kargl - - PR fortran/82992 - * gfortran.dg/pr71649.f90: Adjust error messages. - * gfortran.dg/use_15.f90: Ditto. - * gfortran.dg/use_rename_8.f90: Ditto. - -2019-08-17 Steven G. Kargl - - PR fortran/78739 - * fortran.dg/pr78739.f90: New test. - -2019-08-17 Steven G. Kargl - - PR fortran/78719 - * gfortran.dg/pr78719_1.f90: New test. - * gfortran.dg/pr78719_2.f90: Ditto. - * gfortran.dg/pr78719_3.f90: Ditto. - -2019-08-17 Steven G. Kargl - - PR fortran/91471 - * gfortran.dg/pr91471.f90: New test. - -2019-08-16 Marek Polacek - - PR c++/85827 - * g++.dg/cpp1z/constexpr-if29.C: New test. - -2019-08-16 Jeff Law - - * gcc.target/sh/pr54236-6.c: Use -fno-tree-forwprop. - -2019-08-16 Martin Sebor - - * gcc.dg/struct-ret-1.c: Enable on all targets. - -2019-08-16 Eric Botcazou - - * gnat.dg/opt81.ad[sb]: New test. - -2019-08-16 Martin Sebor - - PR testsuite/91458 - * g++.dg/tree-ssa/pr19807.C: Use the same search pattern - unconditionally (correcting r272199, PR middle-end/90676). - -2019-08-16 Richard Biener - - PR target/91469 - * gcc.target/i386/pr91469-1.c: New testcase. - * gcc.target/i386/pr91469-2.c: Likewise. - -2019-08-16 Mark Eggleston - - * gfortran.dg/auto_in_equiv_1.f90: New test. - * gfortran.dg/auto_in_equiv_2.f90: New test. - * gfortran.dg/auto_in_equiv_3.f90: New test. - -2019-08-16 Richard Biener - - * gcc.dg/tree-ssa/forwprop-31.c: Adjust. - -2019-08-16 Martin Liska - - PR ipa/91447 - * g++.dg/ipa/ipa-icf-4.C: Add -missed for target that - don't have aliases. - -2019-08-16 Alexandre Oliva - - * gcc.target/i386/pr85044.c: Require support for trampolines. - - * gcc.target/i386/asm-4.c: Use amd64 natural addressing mode - on all __LP64__ targets. - - * gcc.target/arc/interrupt-6.c: Use __builtin_alloca, require - effective target support for alloca, drop include of alloca.h. - * gcc.target/i386/pr80969-3.c: Likewise. - * gcc.target/sparc/setjmp-1.c: Likewise. - * gcc.target/x86_64/abi/ms-sysv/gen.cc: Likewise. - * gcc.target/x86_64/abi/ms-sysv/ms-sysv.c: Likewise. - - * gcc.misc-tests/options.exp: Match /ld and -ld besides - /collect2. - -2019-08-15 Thomas Koenig - - PR fortran/91443 - * gfortran.dg/argument_checking_19.f90: New test. - * gfortran.dg/altreturn_10.f90: Change dg-warning to dg-error. - * gfortran.dg/dec_union_11.f90: Add -std=legacy. - * gfortran.dg/hollerith8.f90: Likewise. Remove warning for - Hollerith constant. - * gfortran.dg/integer_exponentiation_2.f90: New subroutine gee_i8; - use it to avoid type mismatches. - * gfortran.dg/pr41011.f: Add -std=legacy. - * gfortran.dg/whole_file_1.f90: Change warnings to errors. - * gfortran.dg/whole_file_2.f90: Likewise. - -2019-08-15 Richard Biener - - PR tree-optimization/91445 - * gcc.dg/torture/pr91445.c: New testcase. - -2019-08-15 Richard Biener - - * gcc.dg/pr80170.c: Adjust to use __SIZETYPE__. - -2019-08-15 Richard Sandiford - - * gcc.target/aarch64/sve/loop_add_4.c: Expect 10 INCWs and - INCDs rather than 8. - -2019-08-15 Richard Sandiford - - * gcc.target/aarch64/sve/revb_1.c: Restrict to little-endian targets. - Avoid including stdint.h. - * gcc.target/aarch64/sve/revh_1.c: Likewise. - * gcc.target/aarch64/sve/revw_1.c: Likewise. - * gcc.target/aarch64/sve/revb_2.c: New big-endian test. - * gcc.target/aarch64/sve/revh_2.c: Likewise. - * gcc.target/aarch64/sve/revw_2.c: Likewise. - -2019-08-15 Richard Sandiford - Kugan Vivekanandarajah - - * gcc.target/aarch64/sve/cond_mla_5.c: Allow FMAD as well as FMLA - and FMSB as well as FMLS. - -2019-08-15 Richard Sandiford - - * gcc.target/aarch64/sve/ext_2.c: Expect a MOVPRFX. - * gcc.target/aarch64/sve/ext_3.c: New test. - -2019-08-15 Richard Sandiford - Prathamesh Kulkarni - - * gcc.target/aarch64/sve/shift_1.c: Accept reversed shifts. - -2019-08-15 Richard Sandiford - Kugan Vivekanandarajah - - * gcc.target/aarch64/sve/cond_mla_1.c: New test. - * gcc.target/aarch64/sve/cond_mla_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_2.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_3.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_4.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_4_run.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_5.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_5_run.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_6.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_6_run.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_7.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_7_run.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_8.c: Likewise. - * gcc.target/aarch64/sve/cond_mla_8_run.c: Likewise. - -2019-08-15 Richard Sandiford - Kugan Vivekanandarajah - - * gcc.target/aarch64/sve/cond_fadd_1.c: New test. - * gcc.target/aarch64/sve/cond_fadd_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fadd_2.c: Likewise. - * gcc.target/aarch64/sve/cond_fadd_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fadd_3.c: Likewise. - * gcc.target/aarch64/sve/cond_fadd_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fadd_4.c: Likewise. - * gcc.target/aarch64/sve/cond_fadd_4_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fsubr_1.c: Likewise. - * gcc.target/aarch64/sve/cond_fsubr_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fsubr_2.c: Likewise. - * gcc.target/aarch64/sve/cond_fsubr_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fsubr_3.c: Likewise. - * gcc.target/aarch64/sve/cond_fsubr_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fsubr_4.c: Likewise. - * gcc.target/aarch64/sve/cond_fsubr_4_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fmaxnm_1.c: Likewise. - * gcc.target/aarch64/sve/cond_fmaxnm_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fmaxnm_2.c: Likewise. - * gcc.target/aarch64/sve/cond_fmaxnm_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fmaxnm_3.c: Likewise. - * gcc.target/aarch64/sve/cond_fmaxnm_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fmaxnm_4.c: Likewise. - * gcc.target/aarch64/sve/cond_fmaxnm_4_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fminnm_1.c: Likewise. - * gcc.target/aarch64/sve/cond_fminnm_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fminnm_2.c: Likewise. - * gcc.target/aarch64/sve/cond_fminnm_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fminnm_3.c: Likewise. - * gcc.target/aarch64/sve/cond_fminnm_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fminnm_4.c: Likewise. - * gcc.target/aarch64/sve/cond_fminnm_4_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fmul_1.c: Likewise. - * gcc.target/aarch64/sve/cond_fmul_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fmul_2.c: Likewise. - * gcc.target/aarch64/sve/cond_fmul_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fmul_3.c: Likewise. - * gcc.target/aarch64/sve/cond_fmul_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fmul_4.c: Likewise. - * gcc.target/aarch64/sve/cond_fmul_4_run.c: Likewise. - -2019-08-15 Richard Sandiford - Kugan Vivekanandarajah - - * gcc.target/aarch64/sve/cond_fabd_1.c: New test. - * gcc.target/aarch64/sve/cond_fabd_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fabd_2.c: Likewise. - * gcc.target/aarch64/sve/cond_fabd_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fabd_3.c: Likewise. - * gcc.target/aarch64/sve/cond_fabd_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fabd_4.c: Likewise. - * gcc.target/aarch64/sve/cond_fabd_4_run.c: Likewise. - * gcc.target/aarch64/sve/cond_fabd_5.c: Likewise. - * gcc.target/aarch64/sve/cond_fabd_5_run.c: Likewise. - -2019-08-15 Richard Sandiford - Kugan Vivekanandarajah - - * gcc.target/aarch64/sve/cond_abd_1.c: New test. - * gcc.target/aarch64/sve/cond_abd_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_abd_2.c: Likewise. - * gcc.target/aarch64/sve/cond_abd_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_abd_3.c: Likewise. - * gcc.target/aarch64/sve/cond_abd_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_abd_4.c: Likewise. - * gcc.target/aarch64/sve/cond_abd_4_run.c: Likewise. - * gcc.target/aarch64/sve/cond_abd_5.c: Likewise. - * gcc.target/aarch64/sve/cond_abd_5_run.c: Likewise. - -2019-08-15 Richard Sandiford - Prathamesh Kulkarni - - * gcc.target/aarch64/sve/cond_shift_1.c: New test. - * gcc.target/aarch64/sve/cond_shift_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_2.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_3.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_4.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_4_run.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_5.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_5_run.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_6.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_6_run.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_7.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_7_run.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_8.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_8_run.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_9.c: Likewise. - * gcc.target/aarch64/sve/cond_shift_9_run.c: Likewise. - -2019-08-14 Martin Sebor - - PR testsuite/91449 - * gcc.dg/strlenopt-73.c: Restrict 128-bit tests to i386. - -2019-08-14 Jonathan Wakely - - PR c++/91436 - * g++.dg/lookup/missing-std-include-5.C: Limit test to C++14 and up. - * g++.dg/lookup/missing-std-include-6.C: Don't check make_unique in - test that runs for C++11. - * g++.dg/lookup/missing-std-include-8.C: Check make_unique here. - -2019-08-14 Christophe Lyon - - * gcc.c-torture/execute/noinit-attribute.c: Fix typo. - -2019-08-14 Martin Sebor - - PR tree-optimization/91294 - * gcc.dg/strlenopt-44.c: Adjust tested result. - * gcc.dg/strlenopt-70.c: Avoid exercising unimplemnted optimization. - * gcc.dg/strlenopt-73.c: New test. - * gcc.dg/strlenopt-74.c: New test. - * gcc.dg/strlenopt-75.c: New test. - * gcc.dg/strlenopt-76.c: New test. - * gcc.dg/strlenopt-77.c: New test. - -2019-08-14 Jakub Jelinek - Marek Polacek - - PR c++/91391 - bogus -Wcomma-subscript warning. - * g++.dg/cpp2a/comma5.C: New test. - -2019-08-14 Christophe Lyon - - * lib/target-supports.exp (check_effective_target_noinit): New - proc. - * gcc.c-torture/execute/noinit-attribute.c: New test. - -2019-08-14 Richard Biener - - PR target/91154 - * gcc.target/i386/pr91154.c: New testcase. - * gcc.target/i386/minmax-3.c: Likewise. - * gcc.target/i386/minmax-4.c: Likewise. - * gcc.target/i386/minmax-5.c: Likewise. - * gcc.target/i386/minmax-6.c: Likewise. - * gcc.target/i386/minmax-1.c: Add -mno-stv. - * gcc.target/i386/minmax-2.c: Likewise. - -2019-08-14 Richard Sandiford - Kugan Vivekanandarajah - - * gcc.target/aarch64/sve/cond_logical_1.c: New test. - * gcc.target/aarch64/sve/cond_logical_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_logical_2.c: Likewise. - * gcc.target/aarch64/sve/cond_logical_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_logical_3.c: Likewise. - * gcc.target/aarch64/sve/cond_logical_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_logical_4.c: Likewise. - * gcc.target/aarch64/sve/cond_logical_4_run.c: Likewise. - * gcc.target/aarch64/sve/cond_logical_5.c: Likewise. - * gcc.target/aarch64/sve/cond_logical_5_run.c: Likewise. - -2019-08-14 Richard Sandiford - - * gcc.target/aarch64/sve/cond_uxt_1.c: New test. - * gcc.target/aarch64/sve/cond_uxt_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_uxt_2.c: Likewise. - * gcc.target/aarch64/sve/cond_uxt_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_uxt_3.c: Likewise. - * gcc.target/aarch64/sve/cond_uxt_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_uxt_4.c: Likewise. - * gcc.target/aarch64/sve/cond_uxt_4_run.c: Likewise. - -2019-08-14 Richard Sandiford - - * gcc.target/aarch64/sve/cond_convert_1.c: New test. - * gcc.target/aarch64/sve/cond_convert_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_convert_2.c: Likewise. - * gcc.target/aarch64/sve/cond_convert_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_convert_3.c: Likewise. - * gcc.target/aarch64/sve/cond_convert_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_convert_4.c: Likewise. - * gcc.target/aarch64/sve/cond_convert_4_run.c: Likewise. - * gcc.target/aarch64/sve/cond_convert_5.c: Likewise. - * gcc.target/aarch64/sve/cond_convert_5_run.c: Likewise. - * gcc.target/aarch64/sve/cond_convert_6.c: Likewise. - * gcc.target/aarch64/sve/cond_convert_6_run.c: Likewise. - -2019-08-14 Richard Sandiford - Kugan Vivekanandarajah - - * gcc.target/aarch64/sve/cond_unary_1.c: Add tests for - floating-point types. - * gcc.target/aarch64/sve/cond_unary_2.c: Likewise. - * gcc.target/aarch64/sve/cond_unary_3.c: Likewise. - * gcc.target/aarch64/sve/cond_unary_4.c: Likewise. - -2019-08-14 Richard Sandiford - Kugan Vivekanandarajah - - * gcc.target/aarch64/sve/cond_unary_1.c: New test. - * gcc.target/aarch64/sve/cond_unary_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_unary_2.c: Likewise. - * gcc.target/aarch64/sve/cond_unary_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_unary_3.c: Likewise. - * gcc.target/aarch64/sve/cond_unary_3_run.c: Likewise. - * gcc.target/aarch64/sve/cond_unary_4.c: Likewise. - * gcc.target/aarch64/sve/cond_unary_4_run.c: Likewise. - -2019-08-14 Bob Duff - - * gnat.dg/alignment15.adb: New testcase. - -2019-08-14 Bob Duff - - * gnat.dg/warn27.adb: New testcase. - -2019-08-14 Bob Duff - - * gnat.dg/inline19.adb, gnat.dg/inline19.ads: New testcase. - -2019-08-14 Gary Dismukes - - * gnat.dg/equal11.adb, gnat.dg/equal11_interface.ads, - gnat.dg/equal11_record.adb, gnat.dg/equal11_record.ads: New - testcase. - -2019-08-14 Bob Duff - - * gnat.dg/discr57.adb: New testcase. - -2019-08-14 Eric Botcazou - - * gnat.dg/generic_inst11.adb, gnat.dg/generic_inst11_pkg.adb, - gnat.dg/generic_inst11_pkg.ads: New testcase. - -2019-08-14 Ed Schonberg - - * gnat.dg/assert2.adb, gnat.dg/assert2.ads: New testcase. - -2019-08-14 Eric Botcazou - - * gnat.dg/inline18.adb, gnat.dg/inline18.ads, - gnat.dg/inline18_gen1-inner_g.ads, gnat.dg/inline18_gen1.adb, - gnat.dg/inline18_gen1.ads, gnat.dg/inline18_gen2.adb, - gnat.dg/inline18_gen2.ads, gnat.dg/inline18_gen3.adb, - gnat.dg/inline18_gen3.ads, gnat.dg/inline18_pkg1.adb, - gnat.dg/inline18_pkg1.ads, gnat.dg/inline18_pkg2-child.ads, - gnat.dg/inline18_pkg2.ads: New testcase. - -2019-08-14 Ed Schonberg - - * gnat.dg/predicate12.adb, gnat.dg/predicate12.ads: New - testcase. - -2019-08-14 Gary Dismukes - - * gnat.dg/task5.adb: New testcase. - -2019-08-14 Richard Biener - - PR testsuite/91419 - * lib/target-supports.exp (natural_alignment_32): Amend target - list based on BIGGEST_ALIGNMENT. - (natural_alignment_64): Targets not natural_alignment_32 cannot - be natural_alignment_64. - * gcc.dg/tree-ssa/pr91091-2.c: XFAIL for !natural_alignment_32. - * gcc.dg/tree-ssa/ssa-fre-77.c: Likewise. - * gcc.dg/tree-ssa/ssa-fre-61.c: Require natural_alignment_32. - -2019-08-14 Richard Sandiford - - * gcc.target/aarch64/sve/vcond_21.c: New test. - * gcc.target/aarch64/sve/vcond_21_run.c: Likewise. - -2019-08-14 Richard Sandiford - Kugan Vivekanandarajah - - * g++.target/aarch64/sve/dup_sel_1.C: New test. - * g++.target/aarch64/sve/dup_sel_2.C: Likewise. - * g++.target/aarch64/sve/dup_sel_3.C: Likewise. - * g++.target/aarch64/sve/dup_sel_4.C: Likewise. - * g++.target/aarch64/sve/dup_sel_5.C: Likewise. - * g++.target/aarch64/sve/dup_sel_6.C: Likewise. - -2019-08-14 Richard Sandiford - Kugan Vivekanandarajah - - * gcc.target/aarch64/sve/vcond_18.c: New test. - * gcc.target/aarch64/sve/vcond_18_run.c: Likewise. - * gcc.target/aarch64/sve/vcond_19.c: Likewise. - * gcc.target/aarch64/sve/vcond_19_run.c: Likewise. - * gcc.target/aarch64/sve/vcond_20.c: Likewise. - * gcc.target/aarch64/sve/vcond_20_run.c: Likewise. - -2019-08-14 Richard Sandiford - - * gcc.target/aarch64/sve/fmaxnm_1.c: New test. - * gcc.target/aarch64/sve/fminnm_1.c: Likewise. - -2019-08-14 Richard Sandiford - - * gcc.target/aarch64/sve/smax_1.c: New test. - * gcc.target/aarch64/sve/smin_1.c: Likewise. - * gcc.target/aarch64/sve/umax_1.c: Likewise. - * gcc.target/aarch64/sve/umin_1.c: Likewise. - -2019-08-14 Richard Sandiford - - * gcc.target/aarch64/sve/cnot_1.c: New test. - * gcc.target/aarch64/sve/cond_cnot_1.c: Likewise. - * gcc.target/aarch64/sve/cond_cnot_1_run.c: Likewise. - * gcc.target/aarch64/sve/cond_cnot_2.c: Likewise. - * gcc.target/aarch64/sve/cond_cnot_2_run.c: Likewise. - * gcc.target/aarch64/sve/cond_cnot_3.c: Likewise. - * gcc.target/aarch64/sve/cond_cnot_3_run.c: Likewise. - -2019-08-14 Richard Sandiford - - * gcc.target/aarch64/vect-clz.c: Force SVE off. - * gcc.target/aarch64/sve/clrsb_1.c: New test. - * gcc.target/aarch64/sve/clrsb_1_run.c: Likewise. - * gcc.target/aarch64/sve/clz_1.c: Likewise. - * gcc.target/aarch64/sve/clz_1_run.c: Likewise. - -2019-08-14 Richard Sandiford - - * gcc.target/aarch64/sve/adr_1.c: New test. - * gcc.target/aarch64/sve/adr_1_run.c: Likewise. - * gcc.target/aarch64/sve/adr_2.c: Likewise. - * gcc.target/aarch64/sve/adr_2_run.c: Likewise. - * gcc.target/aarch64/sve/adr_3.c: Likewise. - * gcc.target/aarch64/sve/adr_3_run.c: Likewise. - * gcc.target/aarch64/sve/adr_4.c: Likewise. - * gcc.target/aarch64/sve/adr_4_run.c: Likewise. - * gcc.target/aarch64/sve/adr_5.c: Likewise. - * gcc.target/aarch64/sve/adr_5_run.c: Likewise. - -2019-08-14 Paolo Carlini - - * g++.dg/conversion/simd4.C: Test locations. - -2019-08-14 Richard Sandiford - - * gcc.target/aarch64/sve/peel_ind_1.c: Look for an inverted .B VL1. - * gcc.target/aarch64/sve/peel_ind_2.c: Likewise .S VL7. - -2019-08-14 Paolo Carlini - - * g++.dg/parse/typedef9.C: Test locations too. - -2019-08-14 Martin Liska - - * c-c++-common/asan/memcmp-1.c: There's a new function in the - stack-trace on the top. So shift expected output in stack - trace. - -2019-08-14 Richard Sandiford - - * gcc.target/aarch64/sve/vcond_17.c: New test. - * gcc.target/aarch64/sve/vcond_17_run.c: Likewise. - -2019-08-14 Richard Sandiford - - * gcc.target/aarch64/sve/spill_4.c: Expect all ptrues to be .Bs. - * gcc.target/aarch64/sve/single_1.c: Likewise. - * gcc.target/aarch64/sve/single_2.c: Likewise. - * gcc.target/aarch64/sve/single_3.c: Likewise. - * gcc.target/aarch64/sve/single_4.c: Likewise. - -2019-08-13 Steven G. Kargl - - PR fortran/87991 - * gfortran.dg/pr87991.f90: New test. - -2019-08-13 Richard Sandiford - - * gcc.target/aarch64/sve/spill_2.c: Increase iteration counts - beyond the range of a PTRUE. - * gcc.target/aarch64/sve/while_6.c: New test. - * gcc.target/aarch64/sve/while_7.c: Likewise. - * gcc.target/aarch64/sve/while_8.c: Likewise. - * gcc.target/aarch64/sve/while_9.c: Likewise. - * gcc.target/aarch64/sve/while_10.c: Likewise. - -2019-08-13 Steven G. Kargl - - PR fortran/88072 - * gfortran.dg/unlimited_polymorphic_28.f90: Fix error message. Left - out of previous commit! - -2019-08-13 Steven G. Kargl - - PR fortran/88072 - * gfortran.dg/pr88072.f90: New test. - * gfortran.dg/unlimited_polymorphic_28.f90: Fix error message. - -2019-08-13 Iain Sandoe - - * obj-c++.dg/stubify-1.mm: Rename symbol stub option. - * obj-c++.dg/stubify-2.mm: Likewise. - * objc.dg/stubify-1.m: Likewise. - * objc.dg/stubify-2.m: Likewise. - -2013-08-13 Thomas Koenig - - PR fortran/90563 - * gfortran.dg/do_subsript_5.f90: New test. - -2019-08-13 Steven G. Kargl - - PR fortran/89647 - * gfortran.dg/pr89647.f90: New test. - -2019-08-13 Steven G. Kargl - - PR fortran/87993 - * gfortran.dg/pr87993.f90: New test. - -2019-08-13 Martin Sebor - - PR c/80619 - * gcc.dg/format/pr80619.c: New test. - -2019-08-13 Marek Polacek - - PR c++/90473 - wrong code with nullptr in default argument. - * g++.dg/cpp0x/nullptr42.C: New test. - -2019-08-13 Olivier Hainque - - * gnat.dg/casesi.ad[bs], test_casesi.adb: New test. - -2019-08-13 Wilco Dijkstra - - PR target/81800 - * gcc.target/aarch64/no-inline-lrint_3.c: New test. - -2019-08-13 Richard Sandiford - - * gcc.target/aarch64/sve/init_2.c: Expect ld1rd to be used - instead of a full vector load. - * gcc.target/aarch64/sve/init_4.c: Likewise. - * gcc.target/aarch64/sve/ld1r_2.c: Remove constants that no longer - need to be loaded from memory. - * gcc.target/aarch64/sve/slp_2.c: Expect the same output for - big and little endian. - * gcc.target/aarch64/sve/slp_3.c: Likewise. Expect 3 of the - doubles to be moved via integer registers rather than loaded - from memory. - * gcc.target/aarch64/sve/slp_4.c: Likewise but for 4 doubles. - * gcc.target/aarch64/sve/spill_4.c: Expect 16-bit constants to be - loaded via an integer register rather than from memory. - * gcc.target/aarch64/sve/const_1.c: New test. - * gcc.target/aarch64/sve/const_2.c: Likewise. - * gcc.target/aarch64/sve/const_3.c: Likewise. - -2019-08-13 Jozef Lawrynowicz - - * gcc.target/msp430/msp430.exp (msp430_device_permutations_runtest): - Handle csv-* and bad-devices-* tests. - * gcc.target/msp430/devices/README: Document how bad-devices-* tests - work. - * gcc.target/msp430/devices/bad-devices-1.c: New test. - * gcc.target/msp430/devices/bad-devices-2.c: Likewise. - * gcc.target/msp430/devices/bad-devices-3.c: Likewise. - * gcc.target/msp430/devices/bad-devices-4.c: Likewise. - * gcc.target/msp430/devices/bad-devices-5.c: Likewise. - * gcc.target/msp430/devices/bad-devices-6.c: Likewise. - * gcc.target/msp430/devices/csv-device-order.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_00.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_01.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_02.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_04.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_08.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_10.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_11.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_12.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_14.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_18.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_20.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_21.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_22.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_24.c: Likewise. - * gcc.target/msp430/devices/csv-msp430_28.c: Likewise. - * gcc.target/msp430/devices/csv-msp430fr5969.c: Likewise. - * gcc.target/msp430/devices/hard-foo.c: Likewise. - * gcc.target/msp430/devices/bad-devices-1.csv: New test support file. - * gcc.target/msp430/devices/bad-devices-2.csv: Likewise. - * gcc.target/msp430/devices/bad-devices-3.csv: Likewise. - * gcc.target/msp430/devices/bad-devices-4.csv: Likewise. - * gcc.target/msp430/devices/bad-devices-5.csv: Likewise. - * gcc.target/msp430/devices/bad-devices-6.csv: Likewise. - * gcc.target/msp430/devices/devices.csv: Likewise. - -2019-08-13 Jozef Lawrynowicz - - * gcc.target/msp430/msp430.exp - (check_effective_target_msp430_430_selected): New. - (check_effective_target_msp430_430x_selected): New. - (check_effective_target_msp430_mlarge_selected): New. - (check_effective_target_msp430_hwmul_not_none): New. - (check_effective_target_msp430_hwmul_not_16bit): New. - (check_effective_target_msp430_hwmul_not_32bit): New. - (check_effective_target_msp430_hwmul_not_f5): New. - (msp430_get_opts): New. - (msp430_device_permutations_runtest): New. - * gcc.target/msp430/devices/README: New file. - * gcc.target/msp430/devices-main.c: New test. - * gcc.target/msp430/devices/hard-cc430f5123.c: Likewise. - * gcc.target/msp430/devices/hard-foo.c: Likewise. - * gcc.target/msp430/devices/hard-msp430afe253.c: Likewise. - * gcc.target/msp430/devices/hard-msp430cg4616.c: Likewise. - * gcc.target/msp430/devices/hard-msp430f4783.c: Likewise. - * gcc.target/msp430/devices/hard-rf430frl154h_rom.c: Likewise. - -2019-08-13 Richard Sandiford - - * gcc.target/aarch64/asm-x-constraint-1.c: New test. - * gcc.target/aarch64/asm-y-constraint-1.c: Likewise. - -2019-08-13 Janne Blomqvist - - PR fortran/91414 - * gfortran.dg/random_seed_1.f90: Update to match new seed size. - -2019-08-13 Eric Botcazou - - * gnat.dg/discr56.adb, gnat.dg/discr56.ads, - gnat.dg/discr56_pkg1.adb, gnat.dg/discr56_pkg1.ads, - gnat.dg/discr56_pkg2.ads: New testcase. - -2019-08-13 Ed Schonberg - - * gnat.dg/tagged4.adb: New testcase. - -2019-08-13 Eric Botcazou - - * gnat.dg/generic_inst10.adb, gnat.dg/generic_inst10_pkg.ads: - New testcase. - -2019-08-13 Javier Miranda - - * gnat.dg/tagged3.adb, gnat.dg/tagged3_pkg.adb, - gnat.dg/tagged3_pkg.ads: New testcase. - -2019-08-13 Ed Schonberg - - * gnat.dg/aggr27.adb: New testcase. - -2019-08-13 Gary Dismukes - - * gnat.dg/aggr26.adb: New testcase. - -2019-08-13 Yannick Moy - - * gnat.dg/allocator2.adb, gnat.dg/allocator2.ads: New testcase. - -2019-08-13 Eric Botcazou - - * gnat.dg/generic_inst9.adb, gnat.dg/generic_inst9.ads, - gnat.dg/generic_inst9_pkg1-operator.ads, - gnat.dg/generic_inst9_pkg1.ads, gnat.dg/generic_inst9_pkg2.adb, - gnat.dg/generic_inst9_pkg2.ads: New testcase. - -2019-08-13 Justin Squirek - - * gnat.dg/anon3.adb, gnat.dg/anon3.ads: New testcase. - -2019-08-13 Eric Botcazou - - * gnat.dg/generic_inst8.adb, gnat.dg/generic_inst8.ads, - gnat.dg/generic_inst8_g.adb, gnat.dg/generic_inst8_g.ads: New - testcase. - -2019-08-13 Javier Miranda - - * gnat.dg/tag2.adb, gnat.dg/tag2_pkg.ads: New testcase. - -2019-08-13 Martin Liska - - * gcc.dg/tree-prof/ic-misattribution-1.c: Use -fdump-ipa-profile-node. - -2019-08-12 Thomas Koenig - - PR fortran/91424 - * gfortran.dg/do_subscript_3.f90: New test. - * gfortran.dg/do_subscript_4.f90: New test. - * gfortran.dg/pr70754.f90: Use indices that to not overflow. - -2019-08-12 Jakub Jelinek - - PR target/83250 - PR target/91340 - * gcc.target/i386/avx-typecast-1.c: New test. - * gcc.target/i386/avx-typecast-2.c: New test. - * gcc.target/i386/avx512f-typecast-2.c: New test. - -2019-08-12 Ed Schonberg - - * gnat.dg/null_check.adb: New testcase. - -2019-08-12 Ed Schonberg - - * gnat.dg/renaming15.adb: New testcase. - -2019-08-12 Eric Botcazou - - * gnat.dg/slice10.adb: New testcase. - -2019-08-12 Gary Dismukes - - * gnat.dg/generic_inst7.adb, gnat.dg/generic_inst7_pkg.adb, - gnat.dg/generic_inst7_pkg.ads, gnat.dg/generic_inst7_types.ads: - New testcase. - -2019-08-12 Ed Schonberg - - * gnat.dg/equal10.adb, gnat.dg/equal10.ads: New testcase. - -2019-08-12 Gary Dismukes - - * gnat.dg/suppress_initialization2.adb, - gnat.dg/suppress_initialization2.ads: New testcase. - -2019-08-12 Yannick Moy - - * gnat.dg/no_caching.adb, gnat.dg/no_caching.ads: New testcase. - -2019-08-12 Eric Botcazou - - * gnat.dg/range_check7.adb: New testcase. - -2019-08-12 Eric Botcazou - - * gnat.dg/range_check6.adb: New testcase. - -2019-08-11 Iain Buclaw - - PR d/90601 - * gdc.dg/pr90601.d: New test. - -2019-08-10 Steven G. Kargl - - * gfortran.dg/boz_8.f90: Adjust error messages. - * gfortran.dg/nan_4.f90: Ditto. - * gfortran.dg/boz_1.f90: Add -fallow-invalid-boz to dg-options, - and test for warnings. - * gfortran.dg/boz_3.f90: Ditto. - * gfortran.dg/boz_4.f90: Ditto. - * gfortran.dg/dec_structure_6.f90: Ditto. - * gfortran.dg/ibits.f90: Ditto. - -2019-08-10 Iain Buclaw - - PR d/91238 - * gdc.dg/pr91238.d: New test. - -2019-08-10 Jakub Jelinek - - * c-c++-common/gomp/declare-target-2.c: Don't expect error for - declare target with clauses in between declare target without clauses - and end declare target. - * c-c++-common/gomp/declare-target-4.c: New test. - - PR target/91408 - * gcc.target/i386/pr91408.c: New test. - -2019-08-09 Segher Boessenkool - - * gcc.target/powerpc/vec_rotate-1.c: Rename to ... - * gcc.target/powerpc/vec-rotate-1.c: ... this. Add -maltivec option. - * gcc.target/powerpc/vec_rotate-2.c: Rename to ... - * gcc.target/powerpc/vec-rotate-2.c: ... this. - * gcc.target/powerpc/vec_rotate-3.c: Rename to ... - * gcc.target/powerpc/vec-rotate-3.c: ... this. Add -maltivec option. - * gcc.target/powerpc/vec_rotate-4.c: Rename to ... - * gcc.target/powerpc/vec-rotate-4.c: ... this. - -2019-08-09 Sam Tebbs - - * lib/target-supports.exp - (check_effective_target_arm_v8_4a_bkey_directive): New proc. - * g++.target/aarch64/return_address_sign_b_exception.C, - return_address_sign_ab_exception.C: Add dg-require-effective-target - checks. - -2019-08-09 Richard Sandiford - - PR middle-end/90313 - * g++.dg/torture/pr90313.cc: New test. - -2019-08-09 Martin Liska - - * g++.dg/lto/devirt-19_0.C: Add -flto=auto. - -2019-08-09 Martin Liska - - * gcc.dg/spellcheck-options-21.c: New test. - -2019-08-09 Martin Liska - - * g++.dg/ipa/ipa-icf-2.C: Add -optimized to -fdump-ipa-icf. - * g++.dg/ipa/ipa-icf-3.C: Likewise. - * g++.dg/ipa/ipa-icf-4.C: Likewise. - * g++.dg/ipa/ipa-icf-6.C: Likewise. - * gcc.dg/ipa/ipa-icf-1.c: Likewise. - * gcc.dg/ipa/ipa-icf-10.c: Likewise. - * gcc.dg/ipa/ipa-icf-11.c: Likewise. - * gcc.dg/ipa/ipa-icf-12.c: Likewise. - * gcc.dg/ipa/ipa-icf-13.c: Likewise. - * gcc.dg/ipa/ipa-icf-16.c: Likewise. - * gcc.dg/ipa/ipa-icf-18.c: Likewise. - * gcc.dg/ipa/ipa-icf-2.c: Likewise. - * gcc.dg/ipa/ipa-icf-20.c: Likewise. - * gcc.dg/ipa/ipa-icf-21.c: Likewise. - * gcc.dg/ipa/ipa-icf-23.c: Likewise. - * gcc.dg/ipa/ipa-icf-25.c: Likewise. - * gcc.dg/ipa/ipa-icf-26.c: Likewise. - * gcc.dg/ipa/ipa-icf-27.c: Likewise. - * gcc.dg/ipa/ipa-icf-3.c: Likewise. - * gcc.dg/ipa/ipa-icf-35.c: Likewise. - * gcc.dg/ipa/ipa-icf-36.c: Likewise. - * gcc.dg/ipa/ipa-icf-37.c: Likewise. - * gcc.dg/ipa/ipa-icf-38.c: Likewise. - * gcc.dg/ipa/ipa-icf-39.c: Likewise. - * gcc.dg/ipa/ipa-icf-5.c: Likewise. - * gcc.dg/ipa/ipa-icf-7.c: Likewise. - * gcc.dg/ipa/ipa-icf-8.c: Likewise. - * gcc.dg/ipa/ipa-icf-merge-1.c: Likewise. - * gcc.dg/ipa/pr64307.c: Likewise. - * gcc.dg/ipa/pr90555.c: Likewise. - -2019-08-09 Martin Liska - - * g++.dg/tree-prof/indir-call-prof.C: Add -optimize - to -fdump-ipa-profile. - * g++.dg/tree-prof/morefunc.C: Likewise. - * g++.dg/tree-prof/reorder.C: Likewise. - * gcc.dg/tree-prof/ic-misattribution-1.c: Likewise. - * gcc.dg/tree-prof/indir-call-prof.c: Likewise. - * gcc.dg/tree-prof/stringop-1.c: Likewise. - * gcc.dg/tree-prof/stringop-2.c: Likewise. - * gcc.dg/tree-prof/val-prof-1.c: Likewise. - * gcc.dg/tree-prof/val-prof-2.c: Likewise. - * gcc.dg/tree-prof/val-prof-3.c: Likewise. - * gcc.dg/tree-prof/val-prof-4.c: Likewise. - * gcc.dg/tree-prof/val-prof-5.c: Likewise. - * gcc.dg/tree-prof/val-prof-7.c: Likewise. - -2019-08-09 Jakub Jelinek - - * c-c++-common/gomp/if-4.c: New test. - * c-c++-common/gomp/clause-dups-1.c: New test. - - PR c/91401 - * c-c++-common/gomp/pr91401-1.c: New test. - * c-c++-common/gomp/pr91401-2.c: New test. - -2019-08-09 Alexandre Oliva - - * gcc.target/i386/sse2-mul-1.c: Use rand. Drop fallback. - * gcc.target/i386/sse4_1-blendps-2.c: Likewise. - * gcc.target/i386/sse4_1-blendps.c: Likewise. - * gcc.target/i386/xop-vshift-1.c: Likewise. - * gcc.target/powerpc/direct-move.h: Likewise. - -2019-08-08 Paolo Carlini - - * g++.dg/cpp0x/enum20.C: Test location(s) too. - * g++.dg/other/friend3.C: Likewise. - * g++.dg/parse/dtor5.C: Likewise. - * g++.dg/parse/friend7.C: Likewise. - * g++.dg/template/error22.C: Likewise. - * g++.old-deja/g++.brendan/err-msg5.C: Likewise. - -2019-08-08 Jim Wilson - - PR target/91229 - * gcc.target/riscv/flattened-struct-abi-1.c: New test. - * gcc.target/riscv/flattened-struct-abi-2.c: New test. - -2019-08-08 Marek Polacek - - PR c++/79520 - * g++.dg/cpp1y/constexpr-79520.C: New test. - -2019-08-08 Richard Sandiford - - * gcc.dg/pr79983.c (enum E): Don't allow an error about nested - definitions. - * gcc.dg/enum-redef-1.c: New test. - -2019-08-08 Marek Polacek - - PR c++/87519 - bogus warning with -Wsign-conversion. - * g++.dg/warn/Wsign-conversion-5.C: New test. - - * g++.dg/cpp2a/inline-asm3.C: New test. - -2019-08-07 Steven G. Kargl - - PR fortran/91359 - * pr91359_2.f: Fix missing hyphen in dg-do - * pr91359_1.f: Ditto. Remove RESULT variable to test actual fix! - -2019-08-07 Marek Polacek - - PR c++/67533 - * g++.dg/tls/thread_local-ice5.C: New test. - -2019-08-07 Richard Sandiford - - * gcc.target/aarch64/sve/init_13.c: New test. - -2019-08-07 Richard Sandiford - - * gcc.target/aarch64/sve/init_12.c: Expect w1 to be moved into - a temporary FPR. - -2019-08-07 Richard Sandiford - - * gcc.target/aarch64/sve/clastb_8.c: New test. - -2019-08-07 Uroš Bizjak - - PR target/91385 - * gcc.target/i386/pr91385.c: New test. - -2019-08-07 Marek Polacek - - PR c++/81429 - wrong parsing of constructor with C++11 attribute. - * g++.dg/cpp0x/gen-attrs-68.C: New test. - * g++.dg/cpp0x/gen-attrs-69.C: New test. - -2019-08-07 Marek Polacek - - PR c++/91346 - Implement P1668R1, allow unevaluated asm in constexpr. - * g++.dg/cpp2a/inline-asm1.C: New test. - * g++.dg/cpp2a/inline-asm2.C: New test. - * g++.dg/cpp1y/constexpr-neg1.C: Adjust dg-error. - -2019-08-07 Janne Blomqvist - - PR fortran/53796 - * gfortran.dg/inquire_recl_f2018.f90: Test for unconnected unit - with inquire via filename. - -2019-08-07 Jakub Jelinek - - * c-c++-common/gomp/target-data-1.c (foo): Use use_device_addr clause - instead of use_device_ptr clause where required by OpenMP 5.0, add - further tests for both use_device_ptr and use_device_addr clauses. - -2019-08-07 Kewen Lin - - * gcc.target/powerpc/vec_rotate-1.c: New test. - * gcc.target/powerpc/vec_rotate-2.c: New test. - * gcc.target/powerpc/vec_rotate-3.c: New test. - * gcc.target/powerpc/vec_rotate-4.c: New test. - -2019-08-07 Alexandre Oliva - - * gcc.target/i386/math_m_pi.h: New. - * gcc.target/i386/sse4_1-round.h: Use it. - * gcc.target/i386/pr73350.c: Likewise. - * gcc.target/i386/avx512f-vfixupimmpd-2.c: Likewise. - * gcc.target/i386/avx512f-vfixupimmps-2.c: Likewise. - * gcc.target/i386/avx512f-vfixupimmsd-2.c: Likewise. - * gcc.target/i386/avx512f-vfixupimmss-2.c: Likewise. - * gcc.target/i386/avx512f-vfixupimmss-2.c: Likewise. - * gcc.target/i386/avx-ceil-sfix-2-vec.c: Likewise. Drop - dg-skip-if "no M_PI". - * gcc.target/i386/avx-cvt-2-vec.c: Likewise. - * gcc.target/i386/avx-floor-sfix-2-vec.c: Likewise. - * gcc.target/i386/avx-rint-sfix-2-vec.c: Likewise. - * gcc.target/i386/avx-round-sfix-2-vec.c: Likewise. - * gcc.target/i386/avx512f-ceil-sfix-vec-1.c: Likewise. - * gcc.target/i386/avx512f-ceil-vec-1.c: Likewise. - * gcc.target/i386/avx512f-ceilf-sfix-vec-1.c: Likewise. - * gcc.target/i386/avx512f-ceilf-vec-1.c: Likewise. - * gcc.target/i386/avx512f-floor-sfix-vec-1.c: Likewise. - * gcc.target/i386/avx512f-floor-vec-1.c: Likewise. - * gcc.target/i386/avx512f-floorf-sfix-vec-1.c: Likewise. - * gcc.target/i386/avx512f-floorf-vec-1.c: Likewise. - * gcc.target/i386/avx512f-rint-sfix-vec-1.c: Likewise. - * gcc.target/i386/avx512f-rintf-sfix-vec-1.c: Likewise. - * gcc.target/i386/avx512f-round-sfix-vec-1.c: Likewise. - * gcc.target/i386/avx512f-roundf-sfix-vec-1.c: Likewise. - * gcc.target/i386/avx512f-trunc-vec-1.c: Likewise. - * gcc.target/i386/avx512f-truncf-vec-1.c: Likewise. - * gcc.target/i386/sse2-cvt-vec.c: Likewise. - * gcc.target/i386/sse4_1-ceil-sfix-vec.c: Likewise. - * gcc.target/i386/sse4_1-ceil-vec.c: Likewise. - * gcc.target/i386/sse4_1-ceilf-sfix-vec.c: Likewise. - * gcc.target/i386/sse4_1-ceilf-vec.c: Likewise. - * gcc.target/i386/sse4_1-floor-sfix-vec.c: Likewise. - * gcc.target/i386/sse4_1-floor-vec.c: Likewise. - * gcc.target/i386/sse4_1-floorf-sfix-vec.c: Likewise. - * gcc.target/i386/sse4_1-floorf-vec.c: Likewise. - * gcc.target/i386/sse4_1-rint-sfix-vec.c: Likewise. - * gcc.target/i386/sse4_1-rint-vec.c: Likewise. - * gcc.target/i386/sse4_1-rintf-sfix-vec.c: Likewise. - * gcc.target/i386/sse4_1-rintf-vec.c: Likewise. - * gcc.target/i386/sse4_1-round-sfix-vec.c: Likewise. - * gcc.target/i386/sse4_1-round-vec.c: Likewise. - * gcc.target/i386/sse4_1-roundf-sfix-vec.c: Likewise. - * gcc.target/i386/sse4_1-roundf-vec.c: Likewise. - * gcc.target/i386/sse4_1-roundsd-4.c: Likewise. - * gcc.target/i386/sse4_1-roundss-4.c: Likewise. - * gcc.target/i386/sse4_1-trunc-vec.c: Likewise. - * gcc.target/i386/sse4_1-truncf-vec.c: Likewise. - -2019-08-06 Steven G. Kargl - - PR fortran/91359 - * gfortran.dg/pr91359_1.f: New test. - * gfortran.dg/pr91359_2.f: Ditto. - -2019-08-06 Steven G. Kargl - - PR fortran/42546 - * gfortran.dg/allocated_1.f90: New test. - * gfortran.dg/allocated_2.f90: Ditto. - -2019-08-06 Rainer Orth - - * gcc.target/i386/avx512vp2intersect-2intersect-1b.c (AVX512F): - Remove. - (AVX512VP2INTERSECT): Define. - * gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c (AVX512F): - Remove. - (AVX512VP2INTERSECT): Define. - -2019-08-06 Paolo Carlini - - * g++.dg/cpp0x/desig1.C: Check location too. - -2019-08-05 Marek Polacek - - DR 2413 - typename in conversion-function-ids. - * g++.dg/cpp2a/typename17.C: New test. - -2019-08-05 Martin Sebor - - PR middle-end/50476 - * gcc.dg/uninit-pr50476.c: New test. - - PR c++/60517 - * g++.dg/pr60517.C: New test. - -2019-08-02 Tom Honermann - - PR c++/88095 - * g++.dg/cpp2a/udlit-class-nttp-ctad.C: New test. - * g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C: New test. - * g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C: New test. - * g++.dg/cpp2a/udlit-class-nttp.C: New test. - * g++.dg/cpp2a/udlit-class-nttp-neg.C: New test. - * g++.dg/cpp2a/udlit-class-nttp-neg2.C: New test. - -2019-08-05 Steven g. Kargl - - PR fortran/91372 - * gfortran.dg/pr91372.f90: New test. - -2019-08-05 Marek Polacek - - PR c++/91338 - Implement P1161R3: Deprecate a[b,c]. - * g++.dg/cpp2a/comma1.C: New test. - * g++.dg/cpp2a/comma2.C: New test. - * g++.dg/cpp2a/comma3.C: New test. - * g++.dg/cpp2a/comma4.C: New test. - -2019-08-05 Richard Sandiford - - * gcc.target/aarch64/sve/mask_load_1.c: New test. - -2019-08-05 Jozef Lawrynowicz - - * gcc.target/msp430/pr80993.c: Add cleanup-saved-temps to final - actions. - -2019-08-05 Martin Liska - - PR c++/91334 - * g++.dg/torture/pr91334.C: New test. - -2019-08-05 Richard Biener - - PR middle-end/91169 - * gnat.dg/array37.adb: New testcase. - -2019-08-05 Jakub Jelinek - - PR target/91341 - * gcc.target/i386/avx-loadu2-m128-1.c: New test. - * gcc.target/i386/avx-loadu2-m128-2.c: New test. - * gcc.target/i386/avx-loadu2-m128d-1.c: New test. - * gcc.target/i386/avx-loadu2-m128d-2.c: New test. - * gcc.target/i386/avx-loadu2-m128i-1.c: New test. - * gcc.target/i386/avx-loadu2-m128i-2.c: New test. - * gcc.target/i386/avx-storeu2-m128-1.c: New test. - * gcc.target/i386/avx-storeu2-m128-2.c: New test. - * gcc.target/i386/avx-storeu2-m128d-1.c: New test. - * gcc.target/i386/avx-storeu2-m128d-2.c: New test. - * gcc.target/i386/avx-storeu2-m128i-1.c: New test. - * gcc.target/i386/avx-storeu2-m128i-2.c: New test. - -2019-08-05 Kito Cheng - - * gcc.target/riscv/promote-type-for-libcall.c: New. - -2019-08-02 Steven G. Kargl - - PR fortran/90985 - * gfortran.dg/pr90985.f90: New test. - -2019-08-02 Steven G. Kargl - - PR fortran/90986 - * gfortran.dg/equiv_10.f90: New test. - -2019-08-02 Marek Polacek - - PR c++/56428 - * g++.dg/cpp0x/nontype4.C: New test. - -2019-08-02 Marek Polacek - - PR c++/53009 - * g++.dg/cpp0x/nontype3.C: New test. - -2019-08-02 Marek Polacek - - PR c++/77575 - * g++.dg/cpp0x/nontype2.C: New test. - -2019-08-02 Steve Ellcey - - * gcc.target/aarch64/simd_pcs_attribute.c: New test. - * gcc.target/aarch64/simd_pcs_attribute-2.c: Ditto. - * gcc.target/aarch64/simd_pcs_attribute-3.c: Ditto. - -2019-08-02 Uroš Bizjak - - PR target/91201 - * gcc.target/i386/sse4_1-pr91201.c: New test. - -2019-08-02 Marek Polacek - - PR c++/91230 - wrong error with __PRETTY_FUNCTION__ and generic lambda. - * g++.dg/cpp1y/lambda-generic-pretty1.C: New test. - -2019-08-02 Uroš Bizjak - - PR target/91323 - * gcc.dg/torture/pr91323.c: New test. - -2019-08-02 Paolo Carlini - - * g++.dg/cpp1z/nodiscard6.C: New. - -2019-08-02 Senthil Kumar Selvaraj - - * gcc.dg/torture/ssa-fre-5.c: Add dg-require-effective-target int32. - * gcc.dg/torture/ssa-fre-7.c: Likewise. - -2019-08-02 Jakub Jelinek - - PR tree-optimization/91201 - * gcc.target/i386/sse2-pr91201-3.c: New test. - * gcc.target/i386/sse2-pr91201-4.c: New test. - * gcc.target/i386/sse2-pr91201-5.c: New test. - * gcc.target/i386/sse2-pr91201-6.c: New test. - -2019-08-02 Martin Liska - - * g++.dg/cpp1y/new2.C: New test. - -2019-08-02 Senthil Kumar Selvaraj - - * gcc.dg/torture/ssa-fre-6.c: Add dg-require-effective-target int32. - -2019-08-02 Kito Cheng - - * g++.dg/lto/pr87906_0.C: Add dg-require-effective-target shared check. - -2019-08-01 Martin Sebor - - PR c++/90947 - * c-c++-common/array-1.c: New test. - * g++.dg/abi/mangle73.C: New test. - * g++.dg/cpp2a/nontype-class23.C: New test. - * g++.dg/init/array53.C: New test. - -2019-08-01 Uroš Bizjak - - PR target/85693 - * gcc.target/i386/pr85693-1.c: New test. - -2019-08-01 Matthew Beliveau - - PR c++/90590 - * c-c++-common/pr90590-1.c: New test. - * c-c++-common/pr90590-1.h: New test. - * c-c++-common/pr90590-2.c: New test. - * c-c++-common/pr90590-2.h: New test. - -2019-08-01 Marek Polacek - - PR c++/90805 - detect narrowing in case values. - * c-c++-common/pr89888.c: Update expected dg-error. - * g++.dg/cpp0x/Wnarrowing17.C: New test. - * g++.dg/cpp0x/enum28.C: Update expected dg-error. - -2019-08-01 Wilco Dijkstra - - * g++.dg/lto/pr89330_0.C: Add effective-target shared. - -2019-08-01 Kito Cheng - - * gcc.target/riscv/attribute-10.c: Fix testcase on rv64. - -2019-07-31 Paolo Carlini - - * g++.dg/diagnostic/delete1.C: New. - -2019-07-31 Maxim Blinov - - * gcc.target/riscv/attribute-10.c: New test. - -2019-07-31 Richard Biener - - PR tree-optimization/91280 - * g++.dg/torture/pr91280.C: New testcase. - -2019-07-31 Richard Biener - - PR tree-optimization/91293 - * gcc.dg/vect/pr91293-1.c: New testcase. - * gcc.dg/vect/pr91293-2.c: Likewise. - * gcc.dg/vect/pr91293-3.c: Likewise. - -2019-07-31 Jakub Jelinek - - PR tree-optimization/91201 - * gcc.target/i386/sse2-pr91201-2.c: New test. - -2019-07-31 Richard Biener - - PR tree-optimization/91178 - * gcc.dg/torture/pr91178-2.c: New testcase. - -2019-07-31 Jakub Jelinek - - PR tree-optimization/91201 - * gcc.target/i386/sse2-pr91201.c: New test. - * gcc.target/i386/avx2-pr91201.c: New test. - * gcc.target/i386/avx512bw-pr91201.c: New test. - -2019-07-31 Sudakshina Das - - * gcc.target/aarch64/acle/tme.c: New test. - * gcc.target/aarch64/pragma_cpp_predefs_2.c: New test. - -2019-07-31 Joel Hutton - - * gcc.target/arm/cmse/cmse-17.c: New test. - -2019-07-30 Martin Sebor - - PR testsuite/91258 - * g++.dg/ubsan/vla-1.C: Suppress a valid warning. - -2019-07-30 Steven G. Kargl - - PR fortran/91296 - * gfortran.dg/pr91296.f90: New test. - -2019-07-30 Martin Liska - - PR tree-optimization/91270 - * g++.dg/torture/pr91270.C: New test. - -2019-07-30 Richard Sandiford - - * gcc.dg/vect/vect-cond-arith-7.c: New test. - -2019-07-30 Jakub Jelinek - - PR middle-end/91282 - * gcc.dg/type-convert-var.c: Add -fexcess-precision=fast to - dg-additional-options. - - PR middle-end/91216 - * gcc.dg/gomp/pr91216.c: New test. - - PR target/91150 - * gcc.target/i386/avx512bw-pr91150.c: New test. - -2019-07-29 Jozef Lawrynowicz - - * gcc.target/msp430/pr78818-data-region.c: Add -mlarge to dg-options. - * gcc.target/msp430/region-misuse-code.c: New test. - * gcc.target/msp430/region-misuse-data.c: Likewise. - * gcc.target/msp430/region-misuse-code-data.c: Likewise. - * gcc.target/msp430/region-attribute-misuse.c: Likewise. - -2019-07-29 Jozef Lawrynowicz - - PR target/70320 - * gcc.target/msp430/asm-register-names-lower-case.c: New test. - * gcc.target/msp430/asm-register-names-upper-case.c: Likewise. - -2019-07-29 Martin Liska - - * g++.dg/cpp1y/new1.C (test_unused): Add new case that causes - ICE. - -2019-07-29 Richard Biener - - PR tree-optimization/91267 - * gcc.dg/torture/pr91267.c: New testcase. - -2019-07-29 Richard Sandiford - - * c-c++-common/guality/Og-dce-1.c: New test. - * c-c++-common/guality/Og-dce-2.c: Likewise. - * c-c++-common/guality/Og-dce-3.c: Likewise. - -2019-07-29 Richard Sandiford - - * c-c++-common/guality/Og-global-dse-1.c: New test. - -2019-07-29 Richard Sandiford - - * c-c++-common/guality/Og-static-wo-1.c: New test. - * g++.dg/guality/guality.exp: Separate the c-c++-common tests into - "Og" and "general" tests. Run the latter at -O0 and -Og only. - * gcc.dg/guality/guality.exp: Likewise. - -2019-07-29 Richard Sandiford - - * lib/scanasm.exp (parse_function_bodies, check_function_body) - (check-function-bodies): New procedures. - * gcc.target/aarch64/sve/init_1.c: Use check-function-bodies - instead of scan-assembler. - * gcc.target/aarch64/sve/init_2.c: Likewise. - * gcc.target/aarch64/sve/init_3.c: Likewise. - * gcc.target/aarch64/sve/init_4.c: Likewise. - * gcc.target/aarch64/sve/init_5.c: Likewise. - * gcc.target/aarch64/sve/init_6.c: Likewise. - * gcc.target/aarch64/sve/init_7.c: Likewise. - * gcc.target/aarch64/sve/init_8.c: Likewise. - * gcc.target/aarch64/sve/init_9.c: Likewise. - * gcc.target/aarch64/sve/init_10.c: Likewise. - * gcc.target/aarch64/sve/init_11.c: Likewise. - * gcc.target/aarch64/sve/init_12.c: Likewise. - -2019-07-28 Rainer Orth - - * g++.dg/lto/pr89330_0.C (dg-lto-options): Add -fPIC. - Require fpic support. - -2019-07-27 Iain Sandoe - - * gcc.target/powerpc/bmi2-bzhi64-1a.c: Add options to enable altivec - and vsx. - -2019-07-26 Iain Sandoe - - * lib/scanasm.exp (object-size): Handle Darwin's size command. - -2018-07-26 Tamar Christina - - * gcc.dg/type-convert-var.c: New test. - -2019-07-26 Martin Jambor - - PR ipa/89330 - * g++.dg/lto/pr89330_[01].C: New test. - * g++.dg/tree-prof/devirt.C: Added -fno-profile-values to dg-options. - -2019-07-25 Martin Sebor - - PR tree-optimization/91183 - PR tree-optimization/86688 - * gcc.dg/Wstringop-overflow-14.c: Disable for stricly aligned targets. - * gcc.dg/strlenopt-70.c: Fix bugs. - * gcc.dg/strlenopt-71.c: Same. - * gcc.dg/strlenopt-72.c: Same. - -2019-07-25 Vladimir Makarov - - PR rtl-optimization/91223 - * gcc.target/i386/pr91223.c: New test. - -2019-07-25 Iain Sandoe - - PR gcov-profile/91087 - * g++.dg/gcov/pr16855.C: Xfail the count lines for the DTORs and the - "final" line for the failure summaries. Adjust source layout so that - dejagnu xfail expressions work. - -2019-07-25 Thomas Koenig - - PR fortran/65819 - * gfortran.dg/dependency_54.f90: New test. - -2019-07-25 Eric Botcazou - - * gnat.dg/case_optimization3.ad[sb]: New test. - -2019-07-25 Martin Liska - Dominik Infuhr - - PR c++/23383 - * g++.dg/cpp1y/new1.C: New test. - -2019-07-25 Eric Botcazou - - PR testsuite/91245 - * gnat.dg/float_value1.adb: Only run on x86. - -2019-07-24 Martin Sebor - - PR tree-optimization/91183 - PR tree-optimization/86688 - * c-c++-common/ubsan/object-size-9.c: Disable warnings. - * gcc.dg/Wstringop-overflow-14.c: New test. - * gcc.dg/attr-nonstring-2.c: Remove xfails. - * gcc.dg/strlenopt-70.c: New test. - * gcc.dg/strlenopt-71.c: New test. - * gcc.dg/strlenopt-72.c: New test. - * gcc.dg/strlenopt-8.c: Remove xfails. - -2019-07-24 Martin Sebor - - PR driver/80545 - * gcc.misc-tests/help.exp: Add tests. - * lib/options.exp: Handle C++. - -2019-07-24 Claudiu Zissulescu - - * gcc.target/arc/arc.exp (check_effective_target_accregs): New - predicate. - * gcc.target/arc/builtin_special.c: Update test/ - * gcc.target/arc/interrupt-1.c: Likewise. - * gcc.target/arc/interrupt-10.c: New test. - * gcc.target/arc/interrupt-11.c: Likewise. - * gcc.target/arc/interrupt-12.c: Likewise. - -2019-07-24 Andreas Krebbel - - * gcc.target/s390/addsub-signed-overflow-1.c: New test. - * gcc.target/s390/addsub-signed-overflow-2.c: New test. - * gcc.target/s390/mul-signed-overflow-1.c: New test. - * gcc.target/s390/mul-signed-overflow-2.c: New test. - -2019-07-24 Prathamesh Kulkarni - - PR middle-end/91166 - * gcc.target/aarch64/sve/pr91166.c: New test. - -2019-07-23 Steven G. Kargl - - PR fortran/54072 - * gfortran.dg/illegal_boz_arg_1.f90: New tests. - -2019-07-23 Steven G. Kargl - - * gfortran.dg/achar_5.f90: Fix for new BOZ handling. - * arithmetic_overflow_1.f90: Ditto. - * gfortran.dg/boz_11.f90: Ditto. - * gfortran.dg/boz_12.f90: Ditto. - * gfortran.dg/boz_4.f90: Ditto. - * gfortran.dg/boz_5.f90: Ditto. - * gfortran.dg/boz_6.f90: Ditto. - * gfortran.dg/boz_7.f90: Ditto. - * gfortran.dg/boz_8.f90: Ditto. - * gfortran.dg/dec_structure_6.f90: Ditto. - * gfortran.dg/dec_union_1.f90: Ditto. - * gfortran.dg/dec_union_2.f90: Ditto. - * gfortran.dg/dec_union_5.f90: Ditto. - * gfortran.dg/dshift_3.f90: Ditto. - * gfortran.dg/gnu_logical_2.f90: Ditto. - * gfortran.dg/int_conv_1.f90: Ditto. - * gfortran.dg/ishft_1.f90: Ditto. - * gfortran.dg/nan_4.f90: Ditto. - * gfortran.dg/no_range_check_3.f90: Ditto. - * gfortran.dg/pr16433.f: Ditto. - * gfortran.dg/pr44491.f90: Ditto. - * gfortran.dg/pr58027.f90: Ditto. - * gfortran.dg/pr81509_2.f90: Ditto. - * gfortran.dg/unf_io_convert_1.f90: Ditto. - * gfortran.dg/unf_io_convert_2.f90: Ditto. - * gfortran.fortran-torture/execute/intrinsic_fraction_exponent.f90: - Ditto. - * gfortran.fortran-torture/execute/intrinsic_mvbits.f90: Ditto. - * gfortran.fortran-torture/execute/intrinsic_nearest.f90: Ditto. - * gfortran.fortran-torture/execute/seq_io.f90: Ditto. - * gfortran.dg/gnu_logical_1.F: Delete test. - * gfortran.dg/merge_bits_3.f90: New test. - * gfortran.dg/merge_bits_3.f90: Ditto. - * gfortran.dg/boz_int.f90: Ditto. - * gfortran.dg/boz_bge.f90: Ditto. - * gfortran.dg/boz_complex_1.f90: Ditto. - * gfortran.dg/boz_complex_2.f90: Ditto. - * gfortran.dg/boz_complex_3.f90: Ditto. - * gfortran.dg/boz_dble.f90: Ditto. - * gfortran.dg/boz_dshift_1.f90: Ditto. - * gfortran.dg/boz_dshift_2.f90: Ditto. - * gfortran.dg/boz_float_1.f90: Ditto. - * gfortran.dg/boz_float_2.f90: Ditto. - * gfortran.dg/boz_float_3.f90: Ditto. - * gfortran.dg/boz_iand_1.f90: Ditto. - * gfortran.dg/boz_iand_2.f90: Ditto. - -2019-07-23 Jeff Law - - PR tree-optimization/86061 - * gcc.dg/tree-ssa/pr86061.c: New test. - -2019-07-23 Richard Biener - - PR tree-optimization/83518 - * gcc.dg/tree-ssa/ssa-fre-79.c: New testcase. - -2019-07-23 Ed Schonberg - - * gnat.dg/task4.adb: New testcase. - -2019-07-23 Eric Botcazou - - * gnat.dg/range_check5.adb: New testcase. - -2019-07-23 Ed Schonberg - - * gnat.dg/iter5.adb: Add an expected error. - * gnat.dg/iter6.adb: New testcase. - -2019-07-23 Yannick Moy - - * gnat.dg/ghost6.adb, gnat.dg/ghost6_pkg.ads: New testcase. - -2019-07-22 Sylvia Taylor - - * gcc.target/aarch64/simd/ssra.c: New test. - * gcc.target/aarch64/simd/usra.c: New test. - -2019-07-22 Jozef Lawrynowicz - - * gcc.target/msp430/isr-push-pop-main.c: New test. - * gcc.target/msp430/isr-push-pop-isr-430.c: Likewise. - * gcc.target/msp430/isr-push-pop-isr-430x.c: Likewise. - * gcc.target/msp430/isr-push-pop-leaf-isr-430.c: Likewise. - * gcc.target/msp430/isr-push-pop-leaf-isr-430x.c: Likewise. - -2019-07-22 Andrea Corallo - - * jit.dg/test-error-gcc_jit_context_new_unary_op-bad-res-type.c: - New testcase. - * jit.dg/test-error-gcc_jit_context_new_binary_op-bad-res-type.c: - Adjust error message. - -2019-07-22 Paul A. Clarke - - * gcc.target/powerpc/sse4_1-check.h: New. - * gcc.target/powerpc/sse4_1-pblendvb.c: New. - * gcc.target/powerpc/sse4_1-pblendw.c: New. - * gcc.target/powerpc/sse4_1-pblendw-2.c: New. - -2019-07-22 Eric Botcazou - - * gnat.dg/fixedpnt6.adb: New testcase. - -2019-07-22 Ed Schonberg - - * gnat.dg/warn26.adb: New testcase. - -2019-07-22 Javier Miranda - - * gnat.dg/class_wide5.adb: New testcase. - -2019-07-22 Ed Schonberg - - * gnat.dg/opt80.adb: New testcase. - -2019-07-22 Ed Schonberg - - * gnat.dg/warn25.adb: New testcase. - -2019-07-22 Yannick Moy - - * gnat.dg/warn24.adb: New testcase. - -2019-07-22 Eric Botcazou - - * gnat.dg/inline17.adb, gnat.dg/inline17_pkg1.adb, - gnat.dg/inline17_pkg1.ads, gnat.dg/inline17_pkg2.ads, - gnat.dg/inline17_pkg3.adb, gnat.dg/inline17_pkg3.ads: New - testcase. - -2019-07-22 Eric Botcazou - - * gnat.dg/iter5.adb, gnat.dg/iter5_pkg.ads: New testcase. - -2019-07-22 Eric Botcazou - - * gnat.dg/enum_val1.adb: New testcase. - -2019-07-22 Nicolas Roche - - * gnat.dg/float_value1.adb: New testcase. - -2019-07-22 Eric Botcazou - - * gnat.dg/encode_string1.adb, gnat.dg/encode_string1_pkg.adb, - gnat.dg/encode_string1_pkg.ads: New testcase. - -2019-07-22 Eric Botcazou - - * gnat.dg/warn23.adb: New testcase. - -2019-07-22 Javier Miranda - - * gnat.dg/cpp_constructor2.adb: New testcase. - -2019-07-22 Ed Schonberg - - * gnat.dg/warn22.adb: New testcase. - -2019-07-22 Eric Botcazou - - * gnat.dg/loop_invariant1.adb, gnat.dg/loop_invariant1.ads: New - testcase. - -2019-07-22 Richard Biener - - PR tree-optimization/91221 - * g++.dg/pr91221.C: New testcase. - -2019-07-22 Martin Liska - - PR driver/91172 - * gcc.dg/pr91172.c: New test. - -2019-07-22 Claudiu Zissulescu - - * gcc.target/arc/tls-2.c: New test. - * gcc.target/arc/tls-3.c: Likewise. - -2019-07-21 Marek Polacek - - PR c++/67853 - * g++.dg/cpp0x/decltype72.C: New test. - -2019-07-22 Stafford Horne - - * gcc.target/or1k/ror-4.c: New file. - * gcc.target/or1k/shftimm-1.c: Update test from rotate to shift - as the shftimm option no longer controls rotate. - -2019-07-22 Stafford Horne - - PR target/90362 - * gcc.target/or1k/div-mul-3.c: New test. - -2019-07-22 Stafford Horne - - PR target/90363 - * gcc.target/or1k/swap-1.c: New test. - * gcc.target/or1k/swap-2.c: New test. - -2019-07-20 Segher Boessenkool - - * gcc.target/powerpc/volatile-mem.c: New testcase. - -2019-07-20 Jakub Jelinek - - PR target/91204 - * gcc.c-torture/compile/pr91204.c: New test. - - * c-c++-common/gomp/cancel-1.c: Adjust expected diagnostic wording. - * c-c++-common/gomp/clauses-1.c (foo, baz, bar): Add order(concurrent) - clause where allowed. Add combined constructs with loop with all - possible clauses. - (qux): New function. - * c-c++-common/gomp/loop-1.c: New test. - * c-c++-common/gomp/loop-2.c: New test. - * c-c++-common/gomp/loop-3.c: New test. - * c-c++-common/gomp/loop-4.c: New test. - * c-c++-common/gomp/loop-5.c: New test. - * c-c++-common/gomp/order-3.c: Adjust expected diagnostic wording. - * c-c++-common/gomp/simd-setjmp-1.c: New test. - * c-c++-common/gomp/teams-2.c: Adjust expected diagnostic wording. - - * gcc.dg/vect/vect-simd-16.c: New test. - -2019-07-19 Jeff Law - - PR tree-optimization/86061 - * gcc.dg/tree-ssa/ssa-dse-37.c: New test. - * gcc.dg/tree-ssa/ssa-dse-38.c: New test. - -2019-07-19 Richard Biener - - PR tree-optimization/91211 - * gcc.dg/torture/pr91211.c: New testcase. - -2019-07-19 Richard Biener - - PR tree-optimization/91200 - * gcc.dg/torture/pr91200.c: New testcase. - -2019-07-19 Jakub Jelinek - - PR middle-end/91190 - * gcc.c-torture/compile/pr91190.c: New test. - -2019-07-19 Richard Biener - - PR tree-optimization/91207 - * gcc.dg/torture/pr91207.c: New testcase. - -2019-07-18 Uroš Bizjak - - PR target/91188 - * gcc.target/i386/pr91188-1a.c: New test. - * gcc.target/i386/pr91188-1b.c: Ditto. - * gcc.target/i386/pr91188-1c.c: Ditto. - * gcc.target/i386/pr91188-2a.c: Ditto. - * gcc.target/i386/pr91188-2b.c: Ditto. - * gcc.target/i386/pr91188-2c.c: Ditto. - -2019-07-18 Sylvia Taylor - - PR target/90317 - * gcc.target/arm/crypto-vsha1cq_u32.c (foo): Change return type to - uint32_t. - (GET_LANE, TEST_SHA1C_VEC_SELECT): New. - * gcc.target/arm/crypto-vsha1h_u32.c (foo): Change return type to - uint32_t. - (GET_LANE, TEST_SHA1H_VEC_SELECT): New. - * gcc.target/arm/crypto-vsha1mq_u32.c (foo): Change return type to - uint32_t. - (GET_LANE, TEST_SHA1M_VEC_SELECT): New. - * gcc.target/arm/crypto-vsha1pq_u32.c (foo): Change return type to - uint32_t. - (GET_LANE, TEST_SHA1P_VEC_SELECT): New. - -2019-07-18 Jan Hubicka - - * g++.dg/lto/alias-5_0.C: New testcase. - * g++.dg/lto/alias-5_1.C: New. - * g++.dg/lto/alias-5_2.c: New. - -2019-07-18 Bin Cheng - - PR tree-optimization/91137 - * gcc.c-torture/execute/pr91137.c: New test. - -2019-07-18 Richard Sandiford - - * c-c++-common/pr53633-2.c: New test. - -2019-07-17 Alexandre Oliva - - PR middle-end/81824 - * g++.dg/Wmissing-attributes-1.C: New. Some of its fragments - are from Martin Sebor. - -2019-07-17 Marek Polacek - - PR c++/90455 - * g++.dg/cpp0x/nsdmi-list6.C: New test. - -2019-07-17 Jan Hubicka - - * g++.dg/lto/alias-4_0.C - -2019-07-17 Richard Biener - - PR tree-optimization/91178 - * gcc.dg/torture/pr91178.c: New testcase. - -2019-07-17 Richard Biener - - PR tree-optimization/91180 - * gcc.dg/torture/pr91180.c: New testcase. - -2019-07-17 Jakub Jelinek - - PR tree-optimization/91157 - * gcc.target/i386/avx512f-pr91157.c: New test. - * gcc.target/i386/avx512bw-pr91157.c: New test. - -2019-07-17 Richard Biener - - PR tree-optimization/91181 - * gcc.dg/pr91181.c: New testcase. - -2019-07-16 Harald Anlauf - - PR fortran/90903 - * gfortran.dg/check_bits_1.f90: New testcase. - -2019-07-16 Jeff Law - - PR rtl-optimization/91173 - * g++.dg/pr91173.C: New test. - -2019-07-16 Wilco Dijkstra - - PR target/89190 - * gcc.target/arm/pr89190.c: New test. - -2019-07-16 Jakub Jelinek - - PR rtl-optimization/91164 - * g++.dg/opt/pr91164.C: New test. - -2019-07-16 Jan Hubicka - - * g++.dg/lto/alias-1_0.C: Use -O3. - * g++.dg/lto/alias-2_0.C: Use -O3. - * g++.dg/lto/alias-3_0.C: Add loop to enable inlining with - -fno-use-linker-plugin. - * g++.dg/lto/alias-3_1.C: Remove dg-lto-do and dg-lto-options. - -2019-07-16 Rainer Orth - - * gcc.dg/tree-ssa/pr84512.c: Don't xfail scan-tree-dump on - sparcv9. - -2019-07-16 Rainer Orth - - * gcc.dg/autopar/pr91162.c: Require int128 support. - -2019-07-15 Richard Biener - - PR middle-end/91162 - * gcc.dg/autopar/pr91162.c: New testcase. - -2019-07-15 Kewen Lin - - PR tree-optimization/88497 - * gcc.dg/tree-ssa/pr88497-1.c: New test. - * gcc.dg/tree-ssa/pr88497-2.c: Likewise. - * gcc.dg/tree-ssa/pr88497-3.c: Likewise. - * gcc.dg/tree-ssa/pr88497-4.c: Likewise. - * gcc.dg/tree-ssa/pr88497-5.c: Likewise. - * gcc.dg/tree-ssa/pr88497-6.c: Likewise. - * gcc.dg/tree-ssa/pr88497-7.c: Likewise. - -2019-07-14 Jerry DeLisle - - PR fortran/87233 - * gfortran.dg/initialization_14.f90: Modify to now pass by - removing two dg-error commands. Added comments. - * gfortran.dg/initialization_30.f90: New test that includes the - two tests removed above with the 'dg-options -std=f95'. - -2019-07-14 Uroš Bizjak - - * gcc.dg/tree-ssa/pr84512.c (dg-final): Remove XFAIL on alpha*-*-*. - -2019-07-14 Segher Boessenkool - - PR target/91148 - * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust. - * gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust. - * gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust. - * gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Adjust. - * gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Adjust. - * gcc.target/powerpc/byte-in-set-2.c: Adjust. - * gcc.target/powerpc/cmpb-3.c: Adjust. - * gcc.target/powerpc/vsu/vec-all-nez-7.c: Adjust. - * gcc.target/powerpc/vsu/vec-any-eqz-7.c: Adjust. - * gcc.target/powerpc/vsu/vec-xl-len-13.c: Adjust. - * gcc.target/powerpc/vsu/vec-xst-len-12.c: Adjust. - -2019-07-13 Iain Sandoe - - * gcc.target/powerpc/stabs-attrib-vect-darwin.c: Require stabs - support. - -2019-07-13 Segher Boessenkool - - PR target/91148 - * gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c: Adjust. - * gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c: Adjust. - * gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c: Adjust. - * gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c: Adjust. - * gcc.target/powerpc/bfp/scalar-extract-exp-1.c: Adjust. - * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust. - * gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Adjust. - * gcc.target/powerpc/bfp/scalar-extract-sig-1.c: Adjust. - * gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust. - * gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Adjust. - * gcc.target/powerpc/bfp/scalar-insert-exp-1.c: Adjust. - * gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Adjust. - * gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust. - * gcc.target/powerpc/bfp/scalar-insert-exp-4.c: Adjust. - * gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Adjust. - * gcc.target/powerpc/bfp/scalar-insert-exp-7.c: Adjust. - * gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Adjust. - * gcc.target/powerpc/bfp/scalar-test-data-class-11.c: Adjust. - * gcc.target/powerpc/bfp/scalar-test-data-class-6.c: Adjust. - * gcc.target/powerpc/bfp/scalar-test-data-class-7.c: Adjust. - * gcc.target/powerpc/bfp/scalar-test-neg-2.c: Adjust. - * gcc.target/powerpc/bfp/scalar-test-neg-3.c: Adjust. - * gcc.target/powerpc/bfp/scalar-test-neg-5.c: Adjust. - * gcc.target/powerpc/bfp/vec-extract-exp-2.c: Adjust. - * gcc.target/powerpc/bfp/vec-extract-exp-3.c: Adjust. - * gcc.target/powerpc/bfp/vec-extract-sig-2.c: Adjust. - * gcc.target/powerpc/bfp/vec-extract-sig-3.c: Adjust. - * gcc.target/powerpc/bfp/vec-insert-exp-2.c: Adjust. - * gcc.target/powerpc/bfp/vec-insert-exp-3.c: Adjust. - * gcc.target/powerpc/bfp/vec-insert-exp-6.c: Adjust. - * gcc.target/powerpc/bfp/vec-insert-exp-7.c: Adjust. - * gcc.target/powerpc/bfp/vec-test-data-class-2.c: Adjust. - * gcc.target/powerpc/bfp/vec-test-data-class-3.c: Adjust. - * gcc.target/powerpc/byte-in-either-range-1.c: Adjust. - * gcc.target/powerpc/byte-in-range-1.c: Adjust. - * gcc.target/powerpc/byte-in-set-1.c: Adjust. - * gcc.target/powerpc/byte-in-set-2.c: Adjust. - * gcc.target/powerpc/cmpb-3.c: Adjust. - * gcc.target/powerpc/crypto-builtin-2.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-1.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-11.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-16.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-21.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-26.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-31.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-36.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-41.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-46.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-51.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-56.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-6.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-61.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-66.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-71.c: Adjust. - * gcc.target/powerpc/dfp/dtstsfi-76.c: Adjust. - * gcc.target/powerpc/vsu/vec-all-nez-7.c: Adjust. - * gcc.target/powerpc/vsu/vec-any-eqz-7.c: Adjust. - * gcc.target/powerpc/vsu/vec-cmpnez-7.c: Adjust. - * gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Adjust. - * gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Adjust. - * gcc.target/powerpc/vsu/vec-xl-len-12.c: Adjust. - * gcc.target/powerpc/vsu/vec-xl-len-13.c: Adjust. - * gcc.target/powerpc/vsu/vec-xlx-7.c: Adjust. - * gcc.target/powerpc/vsu/vec-xrx-7.c: Adjust. - * gcc.target/powerpc/vsu/vec-xst-len-12.c: Adjust. - * gcc.target/powerpc/vsu/vec-xst-len-13.c: Adjust. - -2019-07-13 Jakub Jelinek - - PR c/91149 - * c-c++-common/gomp/reduction-task-3.c: New test. - - * c-c++-common/gomp/order-3.c: New test. - * c-c++-common/gomp/order-4.c: New test. - -2019-07-12 Bill Seurer - - * gcc.dg/tree-ssa/vector-7.c: Fix typo. - -2019-07-12 Iain Sandoe - - * gcc.dg/pr57438-2.c: Remove. - -2019-07-12 Martin Sebor - - * gcc.dg/Warray-bounds-43.c: New test. - -2019-07-12 Jan Hubicka - - * gcc.dg/tree-ssa/alias-access-path-9.c: New testcase. - -2019-07-08 Jiangning Liu - - PR tree-optimization/89430 - * gcc.dg/tree-ssa/pr89430-1.c: New test. - * gcc.dg/tree-ssa/pr89430-2.c: New test. - * gcc.dg/tree-ssa/pr89430-3.c: New test. - * gcc.dg/tree-ssa/pr89430-4.c: New test. - * gcc.dg/tree-ssa/pr89430-5.c: New test. - * gcc.dg/tree-ssa/pr89430-6.c: New test. - -2019-07-12 Richard Biener - - PR tree-optimization/91145 - * gcc.dg/torture/pr91145.c: New testcase. - -2019-07-12 Alexandre Oliva - - * gcc.dg/gimplefe-44.c: New. - * gcc.dg/gimplefe-43.c: New. - -2019-07-12 Richard Biener - - * gcc.dg/tree-ssa/vector-7.c: New testcase. - -2019-07-12 Jakub Jelinek - - * c-c++-common/gomp/order-1.c: New test. - * c-c++-common/gomp/order-2.c: New test. - -2019-07-11 Sunil K Pandey - - PR target/90980 - * gcc.target/i386/pr90980-1.c: New test. - * gcc.target/i386/pr90980-2.c: Likewise. - * gcc.target/i386/pr90980-3.c: Likewise. - -2019-07-11 Yannick Moy - - * gnat.dg/loop_entry1.adb: New testcase. - -2019-07-11 Ed Schonberg - - * gnat.dg/prot8.adb, gnat.dg/prot8.ads: New testcase. - -2019-07-11 Justin Squirek - - * gnat.dg/unreferenced2.adb: New testcase. - -2019-07-11 Hristian Kirtchev - - * gnat.dg/self_ref1.adb: New testcase. - -2019-07-11 Ed Schonberg - - * gnat.dg/predicate11.adb: New testcase. - -2019-07-11 Hristian Kirtchev - - * gnat.dg/equal9.adb: New testcase. - -2019-07-11 Thomas Quinot - - * gnat.dg/scos1.adb: New testcase. - -2019-07-11 Justin Squirek - - * gnat.dg/access7.adb: New testcase. - -2019-07-11 Yannick Moy - - * gnat.dg/warn21.adb, gnat.dg/warn21.ads: New testcase. - -2019-07-11 Richard Biener - - PR middle-end/91131 - * gcc.target/i386/pr91131.c: New testcase. - -2019-07-10 Martin Sebor - - PR testsuite/91132 - * gcc.dg/strlenopt-67.c: Removed second copy of test. - -2019-07-10 Vladimir Makarov - - PR target/91102 - * gcc.target/aarch64/pr91102.c: New test. - -2019-07-10 Richard Biener - - PR tree-optimization/91126 - * gcc.dg/torture/pr91126.c: New testcase. - -2019-07-10 Richard Biener - - * gcc.dg/torture/ssa-fre-5.c: New testcase. - * gcc.dg/torture/ssa-fre-6.c: Likewise. - * gcc.dg/torture/ssa-fre-7.c: Likewise. - -2019-07-10 Ed Schonberg - - * gnat.dg/modular5.adb: New testcase. - -2019-07-10 Ed Schonberg - - * gnat.dg/limited3.adb, gnat.dg/limited3_pkg.adb, - gnat.dg/limited3_pkg.ads: New testcase. - -2019-07-10 Hristian Kirtchev - - * gnat.dg/incomplete7.adb, gnat.dg/incomplete7.ads: New testcase. - -2019-07-10 Hristian Kirtchev - - * gnat.dg/limited2.adb, gnat.dg/limited2_pack_1.adb, - gnat.dg/limited2_pack_1.ads, gnat.dg/limited2_pack_2.adb, - gnat.dg/limited2_pack_2.ads: New testcase. - -2019-07-10 Ed Schonberg - - * gnat.dg/equal8.adb, gnat.dg/equal8.ads, - gnat.dg/equal8_pkg.ads: New testcase. - -2019-07-10 Paolo Carlini - - * g++.dg/diagnostic/complex-invalid-1.C: New. - * g++.dg/diagnostic/static-cdtor-1.C: Likewise. - * g++.dg/cpp1z/has-unique-obj-representations2.C: Test location - too. - * g++.dg/other/anon-union3.C: Adjust expected location. - * g++.dg/parse/error8.C: Likewise. - -2019-07-09 Jan Hubicka - - * g++.dg/lto/alias-3_0.C: New file. - * g++.dg/lto/alias-3_1.c: New file. - -2019-07-09 Martin Sebor - - PR tree-optimization/90989 - * gcc.dg/strlenopt-26.c: Exit with test result status. - * gcc.dg/strlenopt-67.c: New test. - -2019-07-09 Dragan Mladjenovic - - * gcc.target/mips/cfgcleanup-jalr1.c: New test. - * gcc.target/mips/cfgcleanup-jalr2.c: New test. - * gcc.target/mips/cfgcleanup-jalr3.c: New test. - -2019-07-09 Richard Biener - - PR tree-optimization/91114 - * gcc.dg/vect/pr91114.c: New testcase. - -2019-07-09 Sylvia Taylor - - * gcc.target/aarch64/crypto-fuse-1.c: Remove. - * gcc.target/aarch64/crypto-fuse-2.c: Remove. - * gcc.target/aarch64/aes-fuse-1.c: New testcase. - * gcc.target/aarch64/aes-fuse-2.c: New testcase. - -2019-07-09 Christophe Lyon - - * gcc.target/arm/cmse/bitfield-1.c: Fix address of .gnu.sgstubs - section. - * gcc.target/arm/cmse/bitfield-2.c: Likewise. - * gcc.target/arm/cmse/bitfield-3.c: Likewise. - * gcc.target/arm/cmse/struct-1.c: Likewise. - -2019-07-09 Sylvia Taylor - - * gcc.target/arm/aes-fuse-1.c: New. - * gcc.target/arm/aes-fuse-2.c: New. - * gcc.target/arm/aes_xor_combine.c: New. - -2019-07-09 Martin Liska - - * gcc.dg/predict-17.c: Test loop optimizer assumption - about loop iterations. - -2019-07-09 Richard Biener - - * gcc.dg/tree-ssa/alias-access-path-1.c: Scan fre1 dump. - * gcc.dg/tree-ssa/alias-access-path-2.c: Likewise. - * gcc.dg/tree-ssa/alias-access-path-8.c: Likewise. - -2019-07-09 Ed Schonberg - - * gnat.dg/predicate10.adb, gnat.dg/predicate10_pkg.adb, - gnat.dg/predicate10_pkg.ads: New testcase. - -2019-07-09 Justin Squirek - - * gnat.dg/image1.adb: New testcase. - -2019-07-09 Javier Miranda - - * gnat.dg/rep_clause8.adb: New testcase. - -2019-07-09 Ed Schonberg - - * gnat.dg/equal7.adb, gnat.dg/equal7_pkg.adb, - gnat.dg/equal7_pkg.ads: New testcase. - -2019-07-09 Javier Miranda - - * gnat.dg/range_check3.adb, gnat.dg/range_check3_pkg.adb, - gnat.dg/range_check3_pkg.ads: New testcase. - -2019-07-09 Ed Schonberg - - * gnat.dg/generic_inst5.adb, gnat.dg/generic_inst6.adb, - gnat.dg/generic_inst6_g1-c.adb, gnat.dg/generic_inst6_g1-c.ads, - gnat.dg/generic_inst6_g1.ads, gnat.dg/generic_inst6_i1.ads, - gnat.dg/generic_inst6_i2.ads, gnat.dg/generic_inst6_x.ads: New - testcases. - -2019-07-08 Martin Sebor - - PR middle-end/71924 - PR middle-end/90549 - * gcc.c-torture/execute/return-addr.c: New test. - * gcc.dg/Wreturn-local-addr-2.c: New test. - * gcc.dg/Wreturn-local-addr-4.c: New test. - * gcc.dg/Wreturn-local-addr-5.c: New test. - * gcc.dg/Wreturn-local-addr-6.c: New test. - * gcc.dg/Wreturn-local-addr-7.c: New test. - * gcc.dg/Wreturn-local-addr-8.c: New test. - * gcc.dg/Wreturn-local-addr-9.c: New test. - * gcc.dg/Wreturn-local-addr-10.c: New test. - * gcc.dg/Walloca-4.c: Handle expected warnings. - * gcc.dg/pr41551.c: Same. - * gcc.dg/pr59523.c: Same. - * gcc.dg/tree-ssa/pr88775-2.c: Same. - * gcc.dg/tree-ssa/alias-37.c: Same. - * gcc.dg/winline-7.c: Same. - -2019-07-08 Jakub Jelinek - - * g++.dg/vect/simd-6.cc: Replace xfail with target x86. - * g++.dg/vect/simd-9.cc: Likewise. - - PR c++/91110 - * g++.dg/gomp/pr91110.C: New test. - -2019-07-08 Segher Boessenkool - - PR rtl-optimization/88233 - * gcc.target/powerpc/pr88233.c: New testcase. - -2019-07-08 Wilco Dijkstra - - PR testsuite/91059 - PR testsuite/78529 - * gcc.c-torture/execute/builtins/builtins.exp: Add -fno-ipa-ra. - -2019-07-08 Robin Dapp - - * gcc.target/s390/rotate-truncation-mask.c: New test. - -2019-07-08 Robin Dapp - - * gcc.target/s390/combine-rotate-modulo.c: New test. - * gcc.target/s390/combine-shift-rotate-add-mod.c: New test. - * gcc.target/s390/vector/combine-shift-vec.c: New test. - -2019-07-08 Joern Rennecke - - Avoid clash with system header declaration. - * gcc.dg/vect/slp-reduc-sad.c (uint32_t): Remove unused declaration. - -2019-07-08 Richard Biener - - PR tree-optimization/91108 - * gcc.dg/tree-ssa/ssa-fre-61.c: Adjust back. - * gcc.dg/tree-ssa/ssa-fre-78.c: New testcase. - -2019-07-08 Jim Wilson - - * gcc.target/riscv/shift-shift-2.c: Add one more test. - -2019-07-08 Paolo Carlini - - PR c++/65143 - * g++.dg/tree-ssa/final2.C: New. - * g++.dg/tree-ssa/final3.C: Likewise. - -2019-07-08 Javier Miranda - - * gnat.dg/interface10.adb: New testcase. - -2019-07-08 Hristian Kirtchev - - * gnat.dg/addr13.adb, gnat.dg/addr13.ads: New testcase. - -2019-07-08 Ed Schonberg - - * gnat.dg/entry1.adb, gnat.dg/entry1.ads: New testcase. - -2019-07-08 Ed Schonberg - - * gnat.dg/fixed_delete.adb: New testcase. - -2019-07-08 Javier Miranda - - * gnat.dg/interface9.adb, gnat.dg/interface9_root-child.ads, - gnat.dg/interface9_root.ads: New testcase. - -2019-07-08 Ed Schonberg - - * gnat.dg/predicate9.adb: New testcase. - -2019-07-08 Justin Squirek - - * gnat.dg/sso16.adb: New testcase. - -2019-07-08 Ed Schonberg - - * gnat.dg/predicate8.adb, gnat.dg/predicate8_pkg.adb, - gnat.dg/predicate8_pkg.ads: New testcase. - -2019-07-08 Richard Biener - - PR tree-optimization/83518 - * gcc.dg/tree-ssa/ssa-fre-73.c: New testcase. - * gcc.dg/tree-ssa/ssa-fre-74.c: Likewise. - * gcc.dg/tree-ssa/ssa-fre-75.c: Likewise. - * gcc.dg/tree-ssa/ssa-fre-76.c: Likewise. - * g++.dg/tree-ssa/pr83518.C: Likewise. - -2019-07-08 Richard Sandiford - - * gcc.dg/guality/guality.h: Include on Linux targets. - (main): Use PR_SET_PTRACER where available. - -2019-07-07 Paul Thomas - - PR fortran/91077 - * gfortran.dg/pointer_array_11.f90 : New test. - -2019-07-06 Jakub Jelinek - - * c-c++-common/gomp/scan-4.c: Don't expect sorry message. - - PR tree-optimization/91096 - * gcc.dg/vect/vect-simd-10.c (FLT_MIN_VALUE): Define. - (bar, main): Use it instead of -__builtin_inff (). - * gcc.dg/vect/vect-simd-14.c (FLT_MIN_VALUE): Define. - (bar, main): Use it instead of -__builtin_inff (). - -2019-07-05 Paolo Carlini - - PR c++/67184 (again) - PR c++/69445 - * g++.dg/other/final4.C: New. - -2019-07-04 Marek Polacek - - DR 1813 - PR c++/83374 - __is_standard_layout wrong for a class with repeated - bases. - * g++.dg/ext/is_std_layout3.C: New test. - * g++.dg/ext/is_std_layout4.C: New test. - -2019-07-05 Richard Biener - - * gcc.dg/tree-ssa/ssa-fre-77.c: New testcase. - -2019-07-05 Richard Biener - - PR tree-optimization/91091 - * gcc.dg/tree-ssa/pr91091-2.c: New testcase. - * gcc.dg/tree-ssa/ssa-fre-70.c: Likewise. - * gcc.dg/tree-ssa/ssa-fre-71.c: Likewise. - * gcc.dg/tree-ssa/ssa-fre-72.c: Likewise. - -2019-07-05 Richard Biener - - PR tree-optimization/91091 - * gcc.dg/tree-ssa/pr91091-1.c: New testcase. - * gcc.dg/tree-ssa/ssa-fre-61.c: Adjust. - -2019-07-05 Eric Botcazou - - * gnat.dg/pack23.adb, gnat.dg/pack23_pkg.ads: New testcase. - -2019-07-05 Hristian Kirtchev - - * gnat.dg/task3.adb, gnat.dg/task3.ads, gnat.dg/task3_pkg1.ads, - gnat.dg/task3_pkg2.ads: New testcase. - -2019-07-05 Javier Miranda - - * gnat.dg/access6.adb: New testcase. - -2019-07-05 Bob Duff - - * gnat.dg/bip_export.adb, gnat.dg/bip_export.ads: New testcase. - -2019-07-05 Ed Schonberg - - * gnat.dg/aggr25.adb, gnat.dg/aggr25.ads: New testcase. - -2019-07-05 Ed Schonberg - - * gnat.dg/predicate7.adb, gnat.dg/predicate7.ads, - gnat.dg/predicate7_pkg.ads: New testcase. - -2019-07-04 Jakub Jelinek - - PR middle-end/78884 - * gcc.dg/gomp/pr78884.c: New test. - -2019-07-04 Andrea Corallo - - * jit.dg/test-error-gcc_jit_context_new_binary_op-bad-res-type.c: - New testcase. - -2019-07-04 Wilco Dijkstra - - * gcc.dg/tree-ssa/cunroll-15.c: Remove XFAIL on arm. - -2019-07-04 Andrea Corallo - - * jit.dg/all-non-failing-tests.h: Add test-accessing-bitfield.c. - * jit.dg/test-accessing-bitfield.c: New testcase. - * jit.dg/test-error-gcc_jit_context_new_bitfield-invalid-type.c: - Likewise. - * jit.dg/test-error-gcc_jit_context_new_bitfield-invalid-width.c: - Likewise. - * jit.dg/test-error-gcc_jit_lvalue_get_address-bitfield.c: - Likewise. - -2019-07-04 Jan Hubicka - - * gcc.dg/tree-ssa/alias-access-path-3.c: New testcase. - * gcc.dg/tree-ssa/alias-access-path-8.c: New testcase. - -2019-07-04 Andrew Stubbs - - * g++.dg/gomp/unmappable-1.C: New file. - -2019-07-04 Javier Miranda - - * gnat.dg/cpp_constructor.adb, gnat.dg/cpp_constructor_fp.ads, - gnat.dg/cpp_constructor_useit.ads: New testcase. - -2019-07-04 Gary Dismukes - - * gnat.dg/ghost5.adb, gnat.dg/ghost5.ads, - gnat.dg/ghost5_parent.ads: New testcase. - -2019-07-04 Yannick Moy - - * gnat.dg/spark3.adb: New testcase. - -2019-07-04 Justin Squirek - - * gnat.dg/tagged2.adb, gnat.dg/tagged2.ads: New testcase. - -2019-07-04 Ed Schonberg - - * gnat.dg/equal6.adb, gnat.dg/equal6_types.adb, - gnat.dg/equal6_types.ads: New testcase. - -2019-07-04 Justin Squirek - - * gnat.dg/allocator.adb: New testcase. - -2019-07-04 Hristian Kirtchev - - * gnat.dg/default_initial_condition.adb, - gnat.dg/default_initial_condition_pack.adb, - gnat.dg/default_initial_condition_pack.ads: New testcase. - -2019-07-04 Ed Schonberg - - * gnat.dg/aspect2.adb, gnat.dg/aspect2.ads: New testcase. - -2019-07-04 Yannick Moy - - * gnat.dg/synchronized2.adb, gnat.dg/synchronized2.ads, - gnat.dg/synchronized2_pkg.ads: New testcase. - -2019-07-04 Justin Squirek - - * gnat.dg/generic_inst4.adb, gnat.dg/generic_inst4_gen.ads, - gnat.dg/generic_inst4_inst.ads, gnat.dg/generic_inst4_typ.ads: - New testcase. - -2019-07-04 Ed Schonberg - - * gnat.dg/dimensions2.adb, gnat.dg/dimensions2_phys.ads, - gnat.dg/dimensions2_real_numbers.ads: New testcase. - -2019-07-04 Jakub Jelinek - - PR tree-optimization/91063 - * gcc.dg/gomp/pr91063.c: New test. - -2019-07-04 Prathamesh Kulkarni - - PR target/88833 - * gfortran.dg/pr88833.f90: New test. - -2019-07-04 Jakub Jelinek - - PR middle-end/91069 - * gcc.dg/pr91069.c (v2df): Use 2 * sizeof (double) instead of - hardcoded 16 for better portability. - (v2di): Change from long vector to long long vector. Use - 2 * sizeof (long long) instead of hardcoded 16. - - PR rtl-optimization/90756 - * gcc.dg/pr90756.c: New test. - -2019-07-04 Chenghua Xu - - * gcc.target/mips/mips-fmadd.c: Rename to ... - * gcc.target/mips/mips-fmadd-o32.c: ... Here; add abi=32. - * gcc.target/mips/mips-fmadd-n64.c: New. - -2019-07-03 Wilco Dijkstra - - * gcc.dg/store_merging_27.c: Fix test for Arm. - * gcc.dg/store_merging_28.c: Likewise. - * gcc.dg/store_merging_29.c: Likewise. - * gcc.dg/tree-ssa/dump-6.c: Likewise. - -2019-07-03 Mark Wielaard - - PR debug/90981 - * g++.dg/pr90981.C: New test. - -2019-07-03 Richard Biener - - PR middle-end/91069 - * gcc.dg/pr91069.c: New testcase. - -2019-07-03 Martin Liska - - * gcc.dg/tree-prof/val-prof-2.c: Update scanned pattern - as we do now better. - -2019-07-03 Eric Botcazou - - * gnat.dg/specs/debug1.ads: New test. - -2019-07-03 Martin Liska - - PR tree-optimization/90892 - * gcc.dg/pr90892.c: New test. - -2019-07-03 Martin Liska - - PR middle-end/90899 - * gcc.target/i386/pr90899.c: New test. - -2019-07-03 Jakub Jelinek - - PR tree-optimization/91033 - * gcc.target/i386/pr91033.c: New test. - -2019-07-03 Bob Duff - - * gnat.dg/task2.adb, gnat.dg/task2_pkg.adb, - gnat.dg/task2_pkg.ads: New testcase. - -2019-07-03 Ed Schonberg - - * gnat.dg/inline16.adb, gnat.dg/inline16_gen.adb, - gnat.dg/inline16_gen.ads, gnat.dg/inline16_types.ads: New - testcase. - -2019-07-03 Justin Squirek - - * gnat.dg/renaming13.adb, gnat.dg/renaming14.adb: New testcases. - -2019-07-03 Hristian Kirtchev - - * gnat.dg/inline15.adb, gnat.dg/inline15_gen.adb, - gnat.dg/inline15_gen.ads, gnat.dg/inline15_types.ads: New - testcase. - -2019-07-03 Bob Duff - - * gnat.dg/warn20.adb, gnat.dg/warn20_pkg.adb, - gnat.dg/warn20_pkg.ads: New testcase. - -2019-07-03 Ed Schonberg - - * gnat.dg/predicate6.adb, gnat.dg/predicate6.ads: New testcase. - * gnat.dg/static_pred1.adb: Remove expected error. - -2019-07-03 Ed Schonberg - - * gnat.dg/predicate5.adb, gnat.dg/predicate5.ads: New testcase. - -2019-07-03 Eric Botcazou - - * gnat.dg/alignment14.adb: New testcase. - -2019-07-03 Ed Schonberg - - * gnat.dg/predicate4.adb, gnat.dg/predicate4_pkg.ads: New - testcase. - -2019-07-03 Jakub Jelinek - - * c-c++-common/gomp/scan-3.c (f1): Don't expect a sorry message. - * c-c++-common/gomp/scan-5.c (foo): Likewise. - - * c-c++-common/gomp/scan-5.c: New test. - - * c-c++-common/gomp/lastprivate-conditional-5.c: New test. - -2019-07-02 Jeff Law - - PR tree-optimization/90883 - * g++.dg/tree-ssa/pr90883.c: Add -Os. Check dse2 for the - deleted store on some targets. - -2019-07-02 Joern Rennecke - - PR testsuite/91065 - * gcc.dg/plugin/start_unit_plugin.c: Register a root tab - to reference fake_var. - -2019-07-02 qing zhao - - PR preprocessor/90581 - * c-c++-common/cpp/fmax-include-depth-1a.h: New test. - * c-c++-common/cpp/fmax-include-depth-1b.h: New test. - * c-c++-common/cpp/fmax-include-depth.c: New test. - -2019-07-02 Jan Hubicka - - * gcc.dg/tree-ssa/alias-access-path-7.c: New testcase. - -2019-07-02 Jan Hubicka - - * g++.dg/lto/pr90990_0.C: New testcase. - -2019-07-02 Richard Biener - - PR tree-optimization/58483 - * gcc.dg/tree-ssa/ssa-dom-cse-8.c: New testcase. - -2019-07-01 Joern Rennecke - - PR middle-end/66726 - * gcc.dg/tree-ssa/pr66726-4.c: New testcase. - -2019-07-01 Andreas Krebbel - - * gcc.target/s390/vector/vec-shift-2.c: New test. - -2019-07-01 Ed Schonberg - - * gnat.dg/generic_inst3.adb, - gnat.dg/generic_inst3_kafka_lib-topic.ads, - gnat.dg/generic_inst3_kafka_lib.ads, - gnat.dg/generic_inst3_markets.ads, - gnat.dg/generic_inst3_traits-encodables.ads, - gnat.dg/generic_inst3_traits.ads: New testcase. - -2019-07-01 Ed Schonberg - - * gnat.dg/enum_rep.adb, gnat.dg/enum_rep.ads: New testcase. - -2019-07-01 Ed Schonberg - - * gnat.dg/derived_type6.adb, gnat.dg/derived_type6.ads: New - testcase. - -2019-07-01 Ed Schonberg - - * gnat.dg/weak3.adb, gnat.dg/weak3.ads: New testcase. - -2019-07-01 Ed Schonberg - - * gnat.dg/prot7.adb, gnat.dg/prot7.ads: New testcase. - -2019-07-01 Richard Biener - - * gcc.dg/gimplefe-42.c: New testcase. - -2019-07-01 Hristian Kirtchev - - * gnat.dg/sets1.adb: Update. - -2019-07-01 Hristian Kirtchev - - * gnat.dg/linkedlist.adb: Update. - -2019-07-01 Hristian Kirtchev - - * gnat.dg/dynhash.adb, gnat.dg/dynhash1.adb: Update. - -2019-07-01 Hristian Kirtchev - - * gnat.dg/freezing1.adb, gnat.dg/freezing1.ads, - gnat.dg/freezing1_pack.adb, gnat.dg/freezing1_pack.ads: New - testcase. - -2019-07-01 Jan Hubicka - - PR lto/91028 - PR lto/90720 - * g++.dg/lto/alias-1_0.C: Add loop to make inlining happen with - -fno-use-linker-plugin - * g++.dg/lto/alias-2_0.C: Likewise. - -2019-07-01 Dominique d'Humieres - - * g++.dg/cpp0x/gen-attrs-67.C: Add error for darwin. - -2019-07-01 Richard Biener - - * gcc.dg/tree-ssa/pr77445-2.c: Adjust. - -2019-07-01 Hongtao Liu - - * lib/target-supports.exp - (check_effective_target_avx512vp2intersect): New proc. - * gcc.target/i386/avx512vp2intersect-2intersect-1b.c: Add - dg-require-effective-target avx512vp2intersect. - * gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c: Ditto. - -2019-06-29 Eric Botcazou - - * gnat.dg/specs/array5.ads: New test. - * gnat.dg/specs/array5_pkg1.ads: New helper. - * gnat.dg/specs/array5_pkg2.ads: Likewise. - * gnat.dg/specs/array5_pkg2-g.ads: Likewise. - -2019-06-29 Eric Botcazou - - * gnat.dg/specs/unchecked_convert1.ads: New test. - * gnat.dg/specs/unchecked_convert2.ads: Likewise. - -2019-06-29 Eric Botcazou - - * gnat.dg/specs/size_clause3.ads: Adjust error message. - -2019-06-29 Eric Botcazou - - * gnat.dg/specs/atomic2.ads: Adjust error message. - * gnat.dg/specs/clause_on_volatile.ads: Likewise. - * gnat.dg/specs/size_clause3.ads: Likewise. - -2019-06-29 Eric Botcazou - - * gnat.dg/array35.adb: New test. - * gnat.dg/array36.adb: Likewise. - -2019-06-28 Jan Beulich - - * gcc.target/i386/gfni-5.c: New. - -2019-06-28 Jan Beulich - - * gcc.target/i386/cvtpd2pi: New. - -2019-06-27 Jakub Jelinek - - PR c++/91024 - * g++.dg/warn/Wimplicit-fallthrough-4.C: New test. - - PR tree-optimization/91010 - * g++.dg/vect/simd-10.cc: New test. - -2019-06-27 Steven G. Kargl - - PR fortran/90987 - * match.c (gfc_match_common): Adjust parsing of fixed and free form - source code containing, e.g., COMMONI. - -2019-06-27 Jan Hubicka - - * g++.dg/lto/alias-2_0.C: New testcase. - * g++.dg/lto/alias-2_1.C: New testcase. - -2019-06-27 Jakub Jelinek - - PR target/90991 - * gcc.target/i386/avx2-pr90991-1.c: New test. - * gcc.target/i386/avx512dq-pr90991-2.c: New test. - -2019-06-27 Jan Beulich - - * gcc.target/i386/gfni-4.c: Pass -msse2. - -2019-06-27 Richard Biener - - * gcc.dg/tree-ssa/ssa-fre-69.c: New testcase. - -2019-06-27 Jun Ma - - PR tree-optimization/89772 - * gcc.dg/builtin-memchr-4.c: New test. - -2019-06-27 Martin Liska - - PR tree-optimization/91014 - * gcc.target/s390/pr91014.c: New test. - -2019-06-27 Richard Biener - - PR testsuite/91004 - * g++.dg/torture/pr34850.C: Fix overly reduced testcase. - -2019-06-27 Kewen Lin - - PR target/62147 - * gcc.target/powerpc/pr62147.c: New test. - -2019-06-26 Jeff Law - - PR tree-optimization/90883 - * g++.dg/tree-ssa/pr90883.C: New test. - * gcc.dg/tree-ssa/ssa-dse-36.c: New test. - -2019-06-26 Uroš Bizjak - - PR target/89021 - * lib/target-supports.exp (available_vector_sizes) - <[istarget i?86-*-*] || [istarget x86_64-*-*]>: Add - 64-bit vectors for !ia32. - -2019-06-26 Jeff Law - - * gcc.c-torture/execute/builtins/builtins.exp: Add -fno-tree-dse - as DSE compromises several of these tests. - * gcc.dg/builtin-stringop-chk-1.c: Similarly. - * gcc.dg/memcpy-2.c: Similarly. - * gcc.dg/pr40340-1.c: Similarly. - * gcc.dg/pr40340-2.c: Similarly. - * gcc.dg/pr40340-5.c: Similarly. - -2019-06-26 Steven G. Kargl - - PR Fortran/90988 - ChangeLog forgotten with revision 272667 - * gfortran.dg/pr90988_1.f90: New test. - * gfortran.dg/pr90988_2.f90: Ditto. - * gfortran.dg/pr90988_3.f90: Ditto. - -2019-06-26 Nathan Sidwell - - * c-c++-common/pr90927.c: New. - -2019-06-26 Richard Biener - - PR ipa/90982 - * g++.dg/torture/pr90982.C: New testcase. - -2019-06-26 Paolo Carlini - - PR c++/67184 - PR c++/69445 - * g++.dg/other/final3.C: New. - * g++.dg/other/final5.C: Likewise. - -2019-06-26 Jakub Jelinek - - PR target/90991 - * gcc.target/i386/avx512dq-pr90991-1.c: New test. - -2019-06-26 Li Jia He - - * gcc.target/powerpc/maddld-1.c: New testcase. - -2019-06-06 Hongtao Liu - Olga Makhotina - - * gcc.target/i386/avx512-check.h: Handle bit_AVX512VP2INTERSECT. - * gcc.target/i386/avx512vp2intersect-2intersect-1a.c: New test. - * gcc.target/i386/avx512vp2intersect-2intersect-1b.c: Likewise. - * gcc.target/i386/avx512vp2intersect-2intersectvl-1a.c: Likewise. - * gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c: Likewise. - * gcc.target/i386/sse-12.c: Add -mavx512vp2intersect. - * gcc.target/i386/sse-13.c: Likewsie. - * gcc.target/i386/sse-14.c: Likewise. - * gcc.target/i386/sse-22.c: Likewise. - * gcc.target/i386/sse-23.c: Likewise. - * g++.dg/other/i386-2.C: Likewise. - * g++.dg/other/i386-3.C: Likewise. - -2019-06-25 Jakub Jelinek - - PR c++/90969 - * g++.dg/ext/vector38.C: New test. - -2019-06-25 Martin Jambor - - PR ipa/90939 - * g++.dg/lto/pr90939_[01].C: New test. - -2019-06-25 Richard Biener - - PR tree-optimization/90930 - * gcc.dg/tree-ssa/reassoc-24.c: Adjust. - * gcc.dg/tree-ssa/reassoc-25.c: Likewise. - -2019-06-25 Claudiu Zissulescu - - * gcc.target/arc/pr89838.c: New file. - -2019-06-25 Jozef Lawrynowicz - - * gcc.target/msp430/mlarge-pedwarns.c: New test. - -2019-06-25 Jakub Jelinek - - PR sanitizer/90954 - * c-c++-common/gomp/pr90954.c: New test. - -2019-06-24 Iain Sandoe - - * gcc.target/powerpc/safe-indirect-jump-1.c: Skip for Darwin. - * gcc.target/powerpc/safe-indirect-jump-7.c: Likewise. - -2019-06-24 Iain Sandoe - - * gcc.target/powerpc/spec-barr-1.c: Adjust scan assembler regex - to recognise Darwin's register names. - -2019-06-24 Iain Sandoe - - * gcc.dg/cpp/isysroot-1.c: Use as the test header. - * gcc.dg/cpp/usr/include/stdio.h: Rename... - * gcc.dg/cpp/usr/include/example.h: ... to this. - -2019-06-24 Richard Biener - - PR tree-optimization/90972 - * gcc.dg/torture/pr90972.c: New testcase. - -2019-06-24 Martin Sebor - - * gcc.dg/Wfloat-equal-1.c: Adjust text of expected diagnostic. - * gcc.dg/misc-column.c: Ditto. - -2019-06-23 Ian Lance Taylor - - * go.test/test/blank1.go: Update for diagnostic message changes. - -2019-06-23 Iain Sandoe - - * gcc.target/powerpc/builtins-2.c: Require VSX hardware support. - -2019-06-23 Iain Sandoe - - * gcc.target/powerpc/pr80125.c (foo): Use an unsigned char - vector explicitly for the vec_perm. - -2019-06-23 Iain Sandoe - - * gcc.target/powerpc/builtins-1.c: Account for Darwin's use of - __USER_LABEL_PREFIX__. - -2019-06-23 Iain Sandoe - - * gcc.target/powerpc/pr71785.c: For Darwin, make test non-PIC, - expect the out-of-line GPR restore, and test specifically for - absence of branches to local labels. - -2019-06-22 Jerry DeLisle - - PR fortran/89782 - * gfortran.dg/io_constraints_14.f90: New test. - -2019-06-22 Iain Sandoe - - * gcc.target/powerpc/pr64205.c: Require effective target dfp. - * gcc.target/powerpc/pr79909.c: Likewise. - -2019-06-22 Iain Sandoe - - * gcc.target/powerpc/darwin-bool-1.c: Suppress the pedantic - warning about _Bool. - -2019-06-22 Marek Polacek - - PR c++/65707 - PR c++/89480 - PR c++/58836 - * g++.dg/cpp0x/nondeduced5.C: New test. - * g++.dg/cpp0x/nondeduced6.C: New test. - * g++.dg/cpp0x/nondeduced7.C: New test. - - PR c++/66256 - * g++.dg/cpp0x/noexcept54.C: New test. - -2019-06-22 Jan Hubicka - - * gcc.dg/tree-ssa/alias-access-path-6.c: New testcase. - -2019-06-22 Marek Polacek - - PR c++/86476 - noexcept-specifier is a complete-class context. - PR c++/52869 - * g++.dg/cpp0x/noexcept45.C: New test. - * g++.dg/cpp0x/noexcept46.C: New test. - * g++.dg/cpp0x/noexcept47.C: New test. - * g++.dg/cpp0x/noexcept48.C: New test. - * g++.dg/cpp0x/noexcept49.C: New test. - * g++.dg/cpp0x/noexcept50.C: New test. - * g++.dg/cpp0x/noexcept51.C: New test. - * g++.dg/cpp0x/noexcept52.C: New test. - * g++.dg/cpp0x/noexcept53.C: New test. - * g++.dg/eh/shadow1.C: Adjust dg-error. - - PR c++/90881 - bogus -Wunused-value in unevaluated context. - * g++.dg/cpp0x/Wunused-value1.C: New test. - -2019-06-22 Paolo Carlini - - * g++.dg/diagnostic/auto-storage-1.C: New. - * g++.dg/diagnostic/no-type-1.C: Likewise. - * g++.dg/diagnostic/no-type-2.C: Likewise. - * g++.dg/diagnostic/top-level-auto-1.C: Likewise. - * g++.dg/cpp0x/auto9.C: Test some locations too. - * g++.dg/cpp1z/register1.C: Likewise. - * g++.dg/cpp1z/register2.C: Likewise. - * g++.dg/cpp1z/register3.C: Likewise. - * g++.dg/other/error34.C: Likewise. - -2019-06-21 Paolo Carlini - - PR c++/90909 - * g++.dg/other/final7.C: New. - -2019-06-21 Jakub Jelinek - - * g++.dg/vect/simd-2.cc: Don't xfail, instead expect vectorization on - x86. - * g++.dg/vect/simd-5.cc: Likewise. - -2019-06-21 Paolo Carlini - - PR c++/90909 - Revert: - 2019-05-21 Paolo Carlini - - PR c++/67184 - PR c++/69445 - * g++.dg/other/final3.C: New. - * g++.dg/other/final4.C: Likewise. - * g++.dg/other/final5.C: Likewise. - - * g++.dg/other/final6.C: New. - -2019-06-21 Marek Polacek - - PR c++/61490 - qualified-id in friend function definition. - * g++.dg/diagnostic/friend2.C: New test. - * g++.dg/diagnostic/friend3.C: New test. - - PR c++/60223 - ICE with T{} in non-deduced context. - * g++.dg/cpp0x/nondeduced1.C: New test. - * g++.dg/cpp0x/nondeduced2.C: New test. - * g++.dg/cpp0x/nondeduced3.C: New test. - * g++.dg/cpp0x/nondeduced4.C: New test. - - PR c++/64235 - missing syntax error with invalid alignas. - * g++.dg/parse/alignas1.C: New test. - -2019-06-21 Steven G. Kargl - - PR fortran/67884 - * gfortran.dg/dummy_procedure_8.f90: Remove a test that is ... - * gfortran.dg/pr67884.f90: ... covered here. New test. - -2019-06-21 Marek Polacek - - PR c++/90490 - fix decltype issues in noexcept-specifier. - * g++.dg/cpp0x/noexcept43.C: New test. - * g++.dg/cpp0x/noexcept44.C: New test. - -2019-06-21 Matthew Beliveau - - PR c++/90875 - added -Wswitch-outside-range option - * c-c++-common/Wswitch-outside-range-1.c: New test. - * c-c++-common/Wswitch-outside-range-2.c: New test. - * c-c++-common/Wswitch-outside-range-3.c: New test. - * c-c++-common/Wswitch-outside-range-4.c: New test. - -2019-06-21 Steven G. Kargl - - PR fortran/51991 - gfortran.dg/pr51991.f90 - -2019-06-21 Jeff Law - - PR tree-optimization/90949 - * gcc.c-torture/execute/pr90949.c: New test. - -2019-06-21 Marek Polacek - - PR c++/90953 - ICE with -Wmissing-format-attribute. - * g++.dg/warn/miss-format-7.C: New test. - -2019-06-21 Richard Biener - - PR debug/90914 - * g++.dg/debug/pr90914.C: New testcase. - -2019-06-21 Richard Biener - - PR tree-optimization/90913 - * gfortran.dg/vect/pr90913.f90: New testcase. - -2019-06-21 Jakub Jelinek - - * gcc.dg/vect/vect-simd-12.c: New test. - * gcc.dg/vect/vect-simd-13.c: New test. - * gcc.dg/vect/vect-simd-14.c: New test. - * gcc.dg/vect/vect-simd-15.c: New test. - * gcc.target/i386/sse2-vect-simd-12.c: New test. - * gcc.target/i386/sse2-vect-simd-13.c: New test. - * gcc.target/i386/sse2-vect-simd-14.c: New test. - * gcc.target/i386/sse2-vect-simd-15.c: New test. - * gcc.target/i386/avx2-vect-simd-12.c: New test. - * gcc.target/i386/avx2-vect-simd-13.c: New test. - * gcc.target/i386/avx2-vect-simd-14.c: New test. - * gcc.target/i386/avx2-vect-simd-15.c: New test. - * gcc.target/i386/avx512f-vect-simd-12.c: New test. - * gcc.target/i386/avx512f-vect-simd-13.c: New test. - * gcc.target/i386/avx512f-vect-simd-14.c: New test. - * gcc.target/i386/avx512bw-vect-simd-15.c: New test. - * g++.dg/vect/simd-6.cc: New test. - * g++.dg/vect/simd-7.cc: New test. - * g++.dg/vect/simd-8.cc: New test. - * g++.dg/vect/simd-9.cc: New test. - * c-c++-common/gomp/scan-2.c: Don't expect any diagnostics. - - PR c++/90950 - * g++.dg/gomp/lastprivate-1.C: New test. - - * gcc.dg/vect/vect-simd-11.c: New test. - * gcc.target/i386/sse2-vect-simd-11.c: New test. - * gcc.target/i386/avx2-vect-simd-11.c: New test. - * gcc.target/i386/avx512bw-vect-simd-11.c: New test. - -2019-06-20 Marek Polacek - - PR c++/79781 - * g++.dg/ext/goto1.C: New test. - -2019-06-20 Steven G. Kargl - - PR fortran/77632 - * gfortran.dg/pr77632_1.f90: New test. - -2019-06-20 Marek Polacek - - PR c++/68265 - * g++.dg/parse/error62.C: New test. - -2019-06-20 Steven G. Kargl - - PR fortran/86587 - * gfortran.dg/pr86587.f90: New test. - -2019-06-20 Iain Sandoe - - * obj-c++.dg/stubify-1.mm: Adjust options and scan-asm checks. - * obj-c++.dg/stubify-2.mm: Likewise. - * objc.dg/stubify-1.m: Likewise. - * objc.dg/stubify-2.m: Likewise. - -2019-06-20 Marek Polacek - - PR c++/87512 - * g++.dg/cpp1z/inline-var7.C: New test. - -2019-06-20 H.J. Lu - - PR target/54855 - * gcc.target/i386/pr54855-1.c: New test. - * gcc.target/i386/pr54855-2.c: Likewise. - * gcc.target/i386/pr54855-3.c: Likewise. - * gcc.target/i386/pr54855-4.c: Likewise. - * gcc.target/i386/pr54855-5.c: Likewise. - * gcc.target/i386/pr54855-6.c: Likewise. - * gcc.target/i386/pr54855-7.c: Likewise. - * gcc.target/i386/pr54855-8.c: Likewise. - * gcc.target/i386/pr54855-9.c: Likewise. - * gcc.target/i386/pr54855-10.c: Likewise. - -2019-06-20 Jan Hubicka - - * gcc.c-torture/execute/alias-access-path-1.c: New testcase. - -2019-06-20 Marek Polacek - - PR c++/89873 - * g++.dg/cpp1y/noexcept1.C: New test. - -2019-06-20 Thomas Koenig - - PR fortran/90937 - * gfortran.dg/external_procedure_4.f90: New test. - -2019-06-20 Tom de Vries - - * gcc.dg/pr90866-2.c: Require global_constructor. - -2019-06-20 Tom de Vries - - * gcc.c-torture/compile/pr89280.c: Require nonlocal_goto. - * gcc.dg/pr88870.c: Same. - * gcc.dg/pr90082.c: Same. - -2019-06-20 Tom de Vries - - * gcc.dg/pr89737.c: Require indirect_jumps. - * gcc.dg/torture/pr87693.c: Same. - * gcc.dg/torture/pr89135.c: Same. - * gcc.dg/torture/pr90071.c: Same. - -2019-06-20 Tom de Vries - - * gcc.c-torture/compile/pr89280.c: Require label_values. - * gcc.dg/pr89737.c: Same. - * gcc.dg/pr90082.c: Same. - * gcc.dg/torture/pr89135.c: Same. - * gcc.dg/torture/pr89247.c: Same. - * gcc.dg/torture/pr90071.c: Same. - -2019-06-20 Tom de Vries - - * gcc.c-torture/compile/pr77754-1.c: Require alloca. - * gcc.c-torture/compile/pr77754-2.c: Same. - * gcc.c-torture/compile/pr77754-3.c: Same. - * gcc.c-torture/compile/pr77754-4.c: Same. - * gcc.c-torture/compile/pr77754-5.c: Same. - * gcc.c-torture/compile/pr77754-6.c: Same. - * gcc.c-torture/compile/pr87110.c: Same. - * gcc.c-torture/execute/pr86528.c: Same. - * gcc.dg/Walloca-larger-than-2.c: Same. - * gcc.dg/Walloca-larger-than.c: Same. - * gcc.dg/Warray-bounds-41.c: Same. - * gcc.dg/Wrestrict-17.c: Same. - * gcc.dg/Wstrict-overflow-27.c: Same. - * gcc.dg/Wstringop-truncation-3.c: Same. - * gcc.dg/pr78902.c: Same. - * gcc.dg/pr87099.c: Same. - * gcc.dg/pr87320.c: Same. - * gcc.dg/pr89045.c: Same. - * gcc.dg/strlenopt-62.c: Same. - * gcc.dg/tree-ssa/alias-37.c: Same. - -2019-06-19 Marek Polacek - - PR c++/60364 - noreturn after first decl not diagnosed. - * g++.dg/warn/noreturn-8.C: New test. - * g++.dg/warn/noreturn-9.C: New test. - * g++.dg/warn/noreturn-10.C: New test. - * g++.dg/warn/noreturn-11.C: New test. - -2019-06-19 Martin Sebor - - PR tree-optimization/90626 - * gcc.dg/strlenopt-65.c: New test. - * gcc.dg/strlenopt-66.c: New test. - * gcc.dg/strlenopt.h (strcmp, strncmp): Declare. - -2019-06-19 Martin Sebor - - PR translation/90156 - * gcc.dg/format/gcc_diag-11.c: Enable. - -2019-06-19 Steven G. Kargl - - PR fortran/69499 - * gfortran.dg/pr69499.f90: New test. - * gfortran.dg/module_error_1.f90: Update dg-error string. - -2019-06-19 Steven G. Kargl - - PR fortran/69398 - * gfortran.dg/pr69398.f90: New test. - -2019-06-19 Steven G. Kargl - - PR fortran/87907 - * gfortran.dg/pr87907.f90: New testcase. - -2019-06-19 Wilco Dijkstra - - PR middle-end/84521 - * gcc.c-torture/execute/pr84521.c: New test. - -2019-06-19 Jakub Jelinek - - * gcc.dg/vect/vect-simd-8.c: If main is defined, don't include - tree-vect.h nor call check_vect. - * gcc.dg/vect/vect-simd-9.c: Likewise. - * gcc.dg/vect/vect-simd-10.c: New test. - * gcc.target/i386/sse2-vect-simd-8.c: New test. - * gcc.target/i386/sse2-vect-simd-9.c: New test. - * gcc.target/i386/sse2-vect-simd-10.c: New test. - * gcc.target/i386/avx2-vect-simd-8.c: New test. - * gcc.target/i386/avx2-vect-simd-9.c: New test. - * gcc.target/i386/avx2-vect-simd-10.c: New test. - * gcc.target/i386/avx512f-vect-simd-8.c: New test. - * gcc.target/i386/avx512f-vect-simd-9.c: New test. - * gcc.target/i386/avx512f-vect-simd-10.c: New test. - - * g++.dg/vect/simd-3.cc: New test. - * g++.dg/vect/simd-4.cc: New test. - * g++.dg/vect/simd-5.cc: New test. - -2019-06-19 Jakub Jelinek - - * g++.dg/ubsan/pr63956.C: Adjust expected diagnostics. - -2019-06-19 Jim MacArthur - Mark Eggleston - - PR fortran/89103 - * gfortran.dg/dec_format_empty_item_1.f: New test. - * gfortran.dg/dec_format_empty_item_2.f: New test. - * gfortran.dg/dec_format_empty_item_3.f: New test. - -2019-06-19 Kugan Vivekanandarajah - - * gcc.target/aarch64/pr88834.c: Move from here... - * gcc.target/aarch64/sve/pr88834.c: ...to here. - -2019-06-18 Cherry Zhang - - * go.dg/concatstring.go: New test. - -2019-06-18 Thomas Schwinge - - PR fortran/90921 - * gfortran.dg/goacc/declare-3.f95: Update. - - PR fortran/85221 - * gfortran.dg/goacc/declare-3.f95: New file. - - PR middle-end/90859 - * c-c++-common/goacc/firstprivate-mappings-1.c: Update. - - * c-c++-common/goacc/firstprivate-mappings-1.c: New file. - * g++.dg/goacc/firstprivate-mappings-1.C: Likewise. - - PR testsuite/90861 - * c-c++-common/goacc/declare-pr90861.c: New file. - - PR testsuite/90868 - * c-c++-common/goacc/declare-1.c: Update. - * c-c++-common/goacc/declare-2.c: Likewise. - - PR middle-end/90862 - * c-c++-common/goacc/declare-1.c: Update. - * c-c++-common/goacc/declare-2.c: Likewise. - -2019-06-18 Marek Polacek - - PR c++/84698 - * g++.dg/cpp0x/noexcept42.C: New test. - - PR c++/71548 - * g++.dg/cpp0x/variadic177.C: New test. - -2019-06-18 Richard Sandiford - - * gcc.target/aarch64/sve/struct_vect_18.c: Allow branches to - contain dots. - * gcc.target/aarch64/sve/struct_vect_19.c: Likewise. - * gcc.target/aarch64/sve/struct_vect_20.c: Likewise. - * gcc.target/aarch64/sve/struct_vect_21.c: Likewise. - * gcc.target/aarch64/sve/struct_vect_22.c: Likewise. - * gcc.target/aarch64/sve/struct_vect_23.c: Likewise. - * gcc.target/aarch64/sve/unroll-1.c: Likewise. - * gcc.target/aarch64/sve/while_1.c: Check for b.any. - -2019-06-18 Uroš Bizjak - - * gcc.target/i386/pr81563.c (dg-final): Check that no - registers are restored from %esp. - -2019-06-18 Richard Biener - - PR debug/90900 - * gcc.dg/gomp/pr90900.c: New testcase. - -2019-06-18 Martin Sebor - - * gcc.dg/pr90866-2.c: Remove a pointless declaration - to avoid compilation errors on arm-none-eabi. - -2019-06-18 Szabolcs Nagy - - * gcc.target/aarch64/pcs_attribute-2.c: Remove ifunc usage. - * gcc.target/aarch64/pcs_attribute-3.c: New test. - -2019-06-18 Alejandro Martinez - * gcc.target/aarch64/sve/fadda_1.c: New test. - -2019-06-17 Jakub Jelinek - - * gcc.dg/vect/vect-simd-8.c: New test. - * gcc.dg/vect/vect-simd-9.c: New test. - * g++.dg/vect/simd-2.cc: New test. - * g++.dg/gomp/scan-1.C: New test. - -2019-06-17 Uroš Bizjak - - PR target/62055 - * gcc.target/i386/fnabs.c: New test. - -2019-06-17 Marek Polacek - - PR c++/83820 - excessive attribute arguments not detected. - * g++.dg/cpp0x/gen-attrs-67.C: New test. - -2019-06-17 Nathan Sidwell - - PR c++/90754 - * g++.dg/lookup/pr90754.C: New. - -2019-06-17 Wilco Dijkstra - - PR middle-end/64242 - * gcc.c-torture/execute/pr64242.c: Improve test. - -2019-06-16 Jozef Lawrynowicz - - * gcc.target/msp430/mspabi_sllll.c: New test. - * gcc.target/msp430/mspabi_srall.c: New test. - * gcc.target/msp430/mspabi_srlll.c: New test. - * gcc.c-torture/execute/shiftdi-2.c: New test. - -2019-06-16 Jozef Lawrynowicz - - * lib/target-supports.exp: Add check_effective_target_longlong64. - -2019-06-16 Jan Hubicka - - * gcc.dg/tree-ssa/alias-access-path-4.c: New testcase. - * gcc.dg/tree-ssa/alias-access-path-5.c: New testcase. - -2019-06-15 Iain Buclaw - - PR d/90650 - * gdc.dg/pr90650a.d: New test. - * gdc.dg/pr90650b.d: New test. - -2019-06-15 Steven G. Kargl - - * gfortran.dg/dummy_derived_typed.f90: New test. - -2019-06-15 Jan Hubicka - - * gcc.dg/tree-ssa/alias-access-path-2.c: New testcase. - -2019-06-15 Steven G. Kargl - - * gfortran.dg/ieee/ieee_4.f90: Un-xfail on i?86-*-freebsd. - -2019-06-15 Iain Sandoe - - PR objc/90709 - * obj-c++.dg/proto-lossage-7.mm: Use proxy headers. - * obj-c++.dg/strings/const-cfstring-2.mm: Likewise. - * obj-c++.dg/strings/const-cfstring-5.mm: Likewise. - * obj-c++.dg/strings/const-str-12.mm: Likewise. - * obj-c++.dg/syntax-error-1.mm: Likewise. - * obj-c++.dg/torture/strings/const-cfstring-1.mm: Likewise. - * obj-c++.dg/torture/strings/const-str-10.mm: Likewise. - * obj-c++.dg/torture/strings/const-str-11.mm: Likewise. - * obj-c++.dg/torture/strings/const-str-9.mm: Likewise. - * obj-c++.dg/cxx-ivars-3.mm: Skip on later Darwin, where the 10.4 API - in no longer supported, also on m64 where there's no meaning to it. - * obj-c++.dg/isa-field-1.mm: Suppress unwanted warning, add comment why. - * obj-c++.dg/objc-gc-3.mm: Skip for Darwin > 16, the API use is an error - there. - * obj-c++.dg/qual-types-1.mm: Prune a spurious l64 warning. - * obj-c++.dg/stubify-1.mm: Tidy up after better compiler warnings. - * obj-c++.dg/stubify-2.mm: Likewise. - * obj-c++.dg/try-catch-1.mm: Likewise. - * obj-c++.dg/try-catch-3.mm: Likewise. - -2019-06-15 Iain Sandoe - - PR objc/90709 - * objc.dg/encode-7-next-64bit.m: Use proxy headers. - * objc.dg/image-info.m: Likewise. - * objc.dg/method-6.m: Likewise. - * objc.dg/no-extra-load.m: Likewise. - * objc.dg/objc-foreach-4.m: Likewise. - * objc.dg/objc-foreach-5.m: Likewise. - * objc.dg/proto-lossage-7.m: Likewise. - * objc.dg/strings/const-cfstring-2.m: Likewise. - * objc.dg/strings/const-cfstring-5.m: Likewise. - * objc.dg/strings/const-str-12b.m: Likewise. - * objc.dg/symtab-1.m: Likewise. - * objc.dg/torture/strings/const-cfstring-1.m: Likewise. - * objc.dg/torture/strings/const-str-10.m: Likewise. - * objc.dg/torture/strings/const-str-11.m: Likewise. - * objc.dg/torture/strings/const-str-9.m: Likewise. - * objc.dg/zero-link-1.m: Likewise. - * objc.dg/zero-link-2.m: Likewise. - * objc.dg/zero-link-3.m: Likewise. - * objc.dg/isa-field-1.m: Suppress unwanted warning, add comment why. - * objc.dg/headers.m: XFAIL for Darwin14-19. - * objc.dg/objc-gc-4.m: Skip for Darwin > 16, the API use is an error - there. - -2019-06-15 Iain Sandoe - - PR objc/90709 - * objc-obj-c++-shared/CF-CFString.h: New. - * objc-obj-c++-shared/F-NSArray.h: New. - * objc-obj-c++-shared/F-NSAutoreleasePool.h: New. - * objc-obj-c++-shared/F-NSObject.h: New. - * objc-obj-c++-shared/F-NSString.h: New. - * objc-obj-c++-shared/F-NSValue.h: New. - * objc-obj-c++-shared/GNUStep/CoreFoundation/CFArray.h: New. - * objc-obj-c++-shared/GNUStep/CoreFoundation/CFAvailability.h: New. - * objc-obj-c++-shared/GNUStep/CoreFoundation/CFBase.h: New. - * objc-obj-c++-shared/GNUStep/CoreFoundation/CFCharacterSet.h: New. - * objc-obj-c++-shared/GNUStep/CoreFoundation/CFData.h: New. - * objc-obj-c++-shared/GNUStep/CoreFoundation/CFDictionary.h: New. - * objc-obj-c++-shared/GNUStep/CoreFoundation/CFLocale.h: New. - * objc-obj-c++-shared/GNUStep/CoreFoundation/CFString.h: New. - * objc-obj-c++-shared/GNUStep/Foundation/NSArray.h: New. - * objc-obj-c++-shared/GNUStep/Foundation/NSAutoreleasePool.h: New. - * objc-obj-c++-shared/GNUStep/Foundation/NSDate.h: New. - * objc-obj-c++-shared/GNUStep/Foundation/NSEnumerator.h: New. - * objc-obj-c++-shared/GNUStep/Foundation/NSGeometry.h: New. - * objc-obj-c++-shared/GNUStep/Foundation/NSObjCRuntime.h: New. - * objc-obj-c++-shared/GNUStep/Foundation/NSObject.h: New. - * objc-obj-c++-shared/GNUStep/Foundation/NSRange.h: New. - * objc-obj-c++-shared/GNUStep/Foundation/NSString.h: New. - * objc-obj-c++-shared/GNUStep/Foundation/NSValue.h: New. - * objc-obj-c++-shared/GNUStep/Foundation/NSZone.h: New. - * objc-obj-c++-shared/GNUStep/GNUstepBase/GNUstep.h: New. - * objc-obj-c++-shared/GNUStep/GNUstepBase/GSBlocks.h: New. - * objc-obj-c++-shared/GNUStep/GNUstepBase/GSConfig.h: New. - * objc-obj-c++-shared/GNUStep/GNUstepBase/GSObjCRuntime.h: New. - * objc-obj-c++-shared/GNUStep/GNUstepBase/GSVersionMacros.h: New. - * objc-obj-c++-shared/GNUStep/GNUstepBase/NSArray+GNUstepBase.h: New. - * objc-obj-c++-shared/GNUStep/GNUstepBase/NSMutableString+GNUstepBase.h: - New. - * objc-obj-c++-shared/GNUStep/GNUstepBase/NSNumber+GNUstepBase.h: New. - * objc-obj-c++-shared/GNUStep/GNUstepBase/NSObject+GNUstepBase.h: New. - * objc-obj-c++-shared/GNUStep/GNUstepBase/NSString+GNUstepBase.h: New. - -2019-06-15 Jakub Jelinek - - PR middle-end/90779 - * c-c++-common/goacc/routine-5.c (func2): Don't expect error for - static block scope variable in #pragma acc routine. - -2019-06-14 Steven G. Kargl - - * gfortran.dg/integer_exponentiation_4.f90: Update test. - * gfortran.dg/integer_exponentiation_5.F90: Ditto. - * gfortran.dg/no_range_check_1.f90: Ditto. - -2019-06-14 Harald Anlauf - - PR fortran/90577 - PR fortran/90578 - * gfortran.dg/lrshift_1.f90: Adjust testcase. - * gfortran.dg/shiftalr_3.f90: New testcase. - -2019-06-14 Steven G. Kargl - - PR fortran/89646 - * gfortran.dg/pr89646.f90: New test. - -2019-06-14 H.J. Lu - - PR rtl-optimization/90765 - * gcc.target/i386/pr90765-1.c: New test. - * gcc.target/i386/pr90765-2.c: Likewise. - -2019-06-14 Marek Polacek - - PR c++/90884 - stray note with -Wctor-dtor-privacy. - * g++.dg/warn/ctor-dtor-privacy-4.C: New. - * g++.dg/warn/ctor-dtor-privacy-4.h: New. - -2019-06-14 Richard Biener - - * gcc.dg/tree-ssa/ldist-26.c: Adjust. - -2019-06-14 Feng Xue - - PR ipa/90401 - * gcc.dg/ipa/ipcp-agg-10.c: New test. - -2019-06-13 Martin Sebor - - PR tree-optimization/90662 - * gcc.dg/pr90866-2.c: New test. - * gcc.dg/pr90866.c: Ditto. - -2019-06-13 Jiufu Guo - Lijia He - - PR tree-optimization/77820 - * gcc.dg/tree-ssa/phi_on_compare-1.c: New testcase. - * gcc.dg/tree-ssa/phi_on_compare-2.c: New testcase. - * gcc.dg/tree-ssa/phi_on_compare-3.c: New testcase. - * gcc.dg/tree-ssa/phi_on_compare-4.c: New testcase. - * gcc.dg/tree-ssa/split-path-6.c: Update testcase. - * gcc.target/sh/pr51244-20.c: Update testcase. - -2019-06-13 Iain Sandoe - - * gcc.dg/darwin-minversion-link.c: New test. - -2019-06-13 Steven G. Kargl - - PR fortran/68544 - * gfortran.dg/pr68544.f90: New test. - * gfortran.dg/pr85687.f90: Modify test for new error message. - -2019-06-13 Iain Sandoe - - * g++.dg/pr71694.C: Use non-PIC codegen for Darwin m32. - -2019-06-13 Steven G. Kargl - - PR fortran/89344 - * gfortran.dg/pr89344.f90: New test. - -2019-06-13 Iain Sandoe - - * gcc.dg/darwin-minversion-1.c: Use compile rather than link/run. - * gcc.dg/darwin-minversion-2.c: Likewise. - -2019-06-13 Paolo Carlini - - PR target/90871 - * g++.dg/ext/altivec-15.C: Add dg-error directive. - -2019-06-13 Iain Sandoe - - * gcc.dg/pr90760.c: Require alias support. - -2019-06-13 Jan Hubicka - - PR tree-optimization/90869 - * g++.dg/tree-ssa/alias-access-path-1.C: New testcase. - -2019-06-13 Richard Biener - - PR tree-optimization/90856 - * gcc.target/i386/pr90856.c: New testcase. - -2019-06-13 Jakub Jelinek - - * g++.dg/tree-ssa/ssa-dse-1.C: Don't match exact number of chars of - = {} store. - * g++.dg/tree-ssa/pr31146.C: Change -fdump-tree-forwprop to - -fdump-tree-forwprop1 in dg-options. Expect in MEM. - -2019-06-13 Richard Biener - - * gcc.dg/vect/vect-version-1.c: New testcase. - * gcc.dg/vect/vect-version-2.c: Likewise. - -2019-06-13 Paolo Carlini - - * g++.dg/diagnostic/variably-modified-type-1.C: New. - * g++.dg/cpp0x/alias-decl-1.C: Test the location too. - * g++.dg/other/pr84792-1.C: Likewise. - * g++.dg/other/pr84792-2.C: Likewise. - * g++.dg/parse/error24.C: Likewise. - * g++.dg/parse/error32.C: Likewise. - * g++.dg/parse/error33.C: Likewise. - * g++.dg/parse/saved1.C: Likewise. - * g++.dg/template/operator6.C: Likewise. - * g++.dg/template/pr61745.C: Likewise. - * g++.dg/template/typedef41.C: Likewise. - * g++.old-deja/g++.jason/crash10.C: Likewise. - -2019-06-13 Paolo Carlini - - * g++.dg/diagnostic/conflicting-specifiers-1.C: New. - * g++.dg/diagnostic/two-or-more-data-types-1.C: Likewise. - * g++.dg/parse/error10.C: Adjust location. - * g++.dg/parse/pragma2.C: Likewise. - -2019-06-13 Feng Xue - - PR tree-optimization/89713 - * g++.dg/tree-ssa/empty-loop.C: New test. - * gcc.dg/tree-ssa/dce-2.c: New test. - * gcc.dg/const-1.c: Add -fno-finite-loops option. - * gcc.dg/graphite/graphite.exp: Likewise. - * gcc.dg/loop-unswitch-1.c: Likewise. - * gcc.dg/predict-9.c: Likewise. - * gcc.dg/pure-2.c: Likewise. - * gcc.dg/tree-ssa/20040211-1.c: Likewise. - * gcc.dg/tree-ssa/loop-10.c: Likewise. - * gcc.dg/tree-ssa/split-path-6.c: Likewise. - * gcc.dg/tree-ssa/ssa-thread-12.c: Likewise. - -2019-06-13 Kugan Vivekanandarajah - - PR target/88838 - * gcc.target/aarch64/pr88838.c: New test. - * gcc.target/aarch64/sve/while_1.c: Adjust. - -2019-06-13 Kugan Vivekanandarajah - - PR target/88834 - * gcc.target/aarch64/pr88834.c: New test. - * gcc.target/aarch64/sve/struct_vect_1.c: Adjust. - * gcc.target/aarch64/sve/struct_vect_14.c: Likewise. - * gcc.target/aarch64/sve/struct_vect_15.c: Likewise. - * gcc.target/aarch64/sve/struct_vect_16.c: Likewise. - * gcc.target/aarch64/sve/struct_vect_17.c: Likewise. - * gcc.target/aarch64/sve/struct_vect_7.c: Likewise. - -2019-06-12 Marek Polacek - - PR c++/87410 - * g++.dg/cpp1y/pr87410.C: New test. - -2019-06-12 Marek Polacek - - PR c++/66999 - 'this' captured by reference. - * g++.dg/cpp0x/lambda/lambda-this21.C: New test. - - PR c++/90825 - endless recursion when evaluating sizeof. - PR c++/90832 - endless recursion when evaluating sizeof. - * g++.dg/cpp0x/constexpr-sizeof2.C: New test. - * g++.dg/cpp0x/constexpr-sizeof3.C: New test. - -2019-06-12 Martin Sebor - - PR middle-end/90676 - * gcc.dg/tree-ssa/pr30375.c: Adjust and simplify expected test - output some more. - * gcc.dg/tree-ssa/slsr-27.c: Ditto. - * gcc.dg/tree-ssa/slsr-28.c: Ditto. - * gcc.dg/tree-ssa/slsr-29.c: Ditto. - * gcc.dg/tree-ssa/ssa-dse-24.c: Ditto. - -2019-06-12 Marek Polacek - - PR c++/90736 - bogus error with alignof. - * g++.dg/cpp0x/alignof5.C: New test. - -2019-06-12 Dimitar Dimitrov - - * gcc.dg/builtin-apply2.c: Skip for PRU. - * gcc.dg/torture/stackalign/builtin-apply-2.c: Ditto. - -2019-06-12 Dimitar Dimitrov - - * g++.old-deja/g++.abi/ptrmem.C: Add PRU to list. - -2019-06-12 Dimitar Dimitrov - - * gcc.dg/tree-ssa/20040204-1.c: XFAIL on pru. - * gcc.dg/tree-ssa/reassoc-33.c: Ditto. - * gcc.dg/tree-ssa/reassoc-34.c: Ditto. - * gcc.dg/tree-ssa/reassoc-35.c: Ditto. - * gcc.dg/tree-ssa/reassoc-36.c: Ditto. - -2019-06-12 Dimitar Dimitrov - - * gcc.dg/stack-usage-1.c: Define PRU stack usage. - -2019-06-12 Dimitar Dimitrov - - * gcc.c-torture/execute/20101011-1.c: Define DO_TEST to 0 for PRU. - * gcc.dg/20020312-2.c: No PIC register for PRU. - -2019-06-12 Dimitar Dimitrov - - * lib/gcc-dg.exp: Filter unsupported features in PRU's TI ABI mode. - * lib/target-utils.exp: Ditto. - * lib/target-supports.exp (check_effective_target_function_pointers, - check_effective_target_large_return_values): New. - -2019-06-12 Dimitar Dimitrov - - * lib/gcc-dg.exp: Bail on region overflow for tiny targets. - * lib/target-utils.exp: Ditto. - * lib/target-supports.exp: Declare PRU target as tiny. - -2019-06-12 Dimitar Dimitrov - - * gcc.target/pru/abi-arg-struct.c: New test. - * gcc.target/pru/ashiftrt.c: New test. - * gcc.target/pru/builtins-1.c: New test. - * gcc.target/pru/builtins-error.c: New test. - * gcc.target/pru/clearbit.c: New test. - * gcc.target/pru/loop-asm.c: New test. - * gcc.target/pru/loop-dowhile.c: New test. - * gcc.target/pru/loop-hi-1.c: New test. - * gcc.target/pru/loop-hi-2.c: New test. - * gcc.target/pru/loop-qi-1.c: New test. - * gcc.target/pru/loop-qi-2.c: New test. - * gcc.target/pru/loop-short-1.c: New test. - * gcc.target/pru/loop-short-2.c: New test. - * gcc.target/pru/loop-si-1.c: New test. - * gcc.target/pru/loop-si-2.c: New test. - * gcc.target/pru/loop-u8_pcrel_overflow.c: New test. - * gcc.target/pru/loop-ubyte-1.c: New test. - * gcc.target/pru/loop-ubyte-2.c: New test. - * gcc.target/pru/lra-framepointer-fragmentation-1.c: New test. - * gcc.target/pru/lra-framepointer-fragmentation-2.c: New test. - * gcc.target/pru/mabi-ti-1.c: New test. - * gcc.target/pru/mabi-ti-2.c: New test. - * gcc.target/pru/mabi-ti-3.c: New test. - * gcc.target/pru/mabi-ti-4.c: New test. - * gcc.target/pru/mabi-ti-5.c: New test. - * gcc.target/pru/mabi-ti-6.c: New test. - * gcc.target/pru/mabi-ti-7.c: New test. - * gcc.target/pru/pr64366.c: New test. - * gcc.target/pru/pragma-ctable_entry.c: New test. - * gcc.target/pru/pru.exp: New file. - * gcc.target/pru/qbbc-1.c: New test. - * gcc.target/pru/qbbc-2.c: New test. - * gcc.target/pru/qbbc-3.c: New test. - * gcc.target/pru/qbbs-1.c: New test. - * gcc.target/pru/qbbs-2.c: New test. - * gcc.target/pru/setbit.c: New test. - * gcc.target/pru/zero_extend-and-hisi.c: New test. - * gcc.target/pru/zero_extend-and-qihi.c: New test. - * gcc.target/pru/zero_extend-and-qisi.c: New test. - * gcc.target/pru/zero_extend-hisi.c: New test. - * gcc.target/pru/zero_extend-qihi.c: New test. - * gcc.target/pru/zero_extend-qisi.c: New test. - * lib/target-supports.exp: Add PRU to feature filters. - -2019-06-12 Steven G. Kargl - - PR fortran/90002 - * gfortran.dg/pr90002.f90: New test. - -2019-06-12 Martin Sebor - - PR middle-end/90676 - * gcc.dg/tree-ssa/dump-6.c: New test. - * g++.dg/tree-ssa/pr19807.C: Adjust expected output. - * g++.dg/tree-ssa/ssa-dse-1.C: Same. - * gcc.dg/store_merging_5.c: Same. - * gcc.dg/tree-prof/stringop-2.c: Same. - * gcc.dg/tree-ssa/pr30375.c: Same. - * gcc.dg/tree-ssa/slsr-27.c: Same. - * gcc.dg/tree-ssa/slsr-28.c: Same. - * gcc.dg/tree-ssa/slsr-29.c: Same. - * gcc.dg/tree-ssa/ssa-dse-24.c: Same. - -2019-06-12 Martin Sebor - - PR tree-optimization/90662 - * gcc.dg/strlenopt-62.c: New test. - * gcc.dg/strlenopt-63.c: New test. - * gcc.dg/strlenopt-64.c: New test. - -2019-06-12 Przemyslaw Wirkus - - * gcc.target/arm/ssadv16qi.c: New test. - * gcc.target/arm/usadv16qi.c: Likewise. - -2019-06-12 Jakub Jelinek - - PR c/90760 - * gcc.dg/pr90760.c: New test. - -2019-06-11 Faraz Shahbazker - - * gcc.target/mips/data-sym-pool.c: Update expected output. - * gcc.target/mips/data-sym-multi-pool.c: New test. - -2019-06-11 Iain Sandoe - - PR testsuite/65364 - * gcc.dg/uninit-19.c (fn1): Adjust target condition for Darwin. - (fn2): Likewise. - -2019-06-11 Michael Meissner - - * gcc.target/powerpc/localentry-1.c: Add -mpcrel option. - * gcc.target/powerpc/localentry-detect-1.c: Explicitly set and - unset -mpcrel in the target pragmas. - * gcc.target/powerpc/notoc-direct-1.c: Add -mpcrel option. - * gcc.target/powerpc/pcrel-sibcall-1.c: Explicitly set and - unset -mpcrel in the target pragmas. - -2019-06-11 Marc Glisse - - * gcc.dg/tree-ssa/cmpexactdiv-5.c: New file. - -2019-06-11 Matthew Beliveau - - PR c++/90449 - add -Winaccessible-base option. - * g++.dg/warn/Winaccessible-base-1.C: New file. - * g++.dg/warn/Winaccessible-base-2.C: New file. - * g++.dg/warn/Winaccessible-virtual-base-1.C: New file. - * g++.dg/warn/Winaccessible-virtual-base-2.C: New file. - -2019-06-11 Jakub Jelinek - - PR c++/90810 - * g++.dg/ext/vector37.C: New test. - -2019-06-10 Matthew Beliveau - - PR c++/87250 - * g++.dg/cpp0x/pr87250.C: New test. - -2019-06-10 Jakub Jelinek - - PR testsuite/90772 - * g++.dg/cpp1y/feat-cxx14.C: Use std::size_t instead of size_t. - * g++.dg/cpp1z/feat-cxx1z.C: Likewise. - * g++.dg/cpp2a/feat-cxx2a.C: Likewise. - * g++.dg/cpp1z/pr85569.C: Include . - * g++.dg/tree-ssa/pr80293.C: Include . - * g++.dg/tree-ssa/pr69336.C: Include . - -2019-06-10 Jonathan Wakely - - PR other/90695 - * g++.dg/cpp0x/noexcept15.C: Remove dependency on library header. - -2019-06-10 Jakub Jelinek - - * c-c++-common/gomp/scan-1.c: New test. - * c-c++-common/gomp/scan-2.c: New test. - * c-c++-common/gomp/scan-3.c: New test. - * c-c++-common/gomp/scan-4.c: New test. - -2019-06-10 Martin Liska - - * gcc.dg/no_profile_instrument_function-attr-1.c: Fix - function name. - -2019-06-10 Claudiu Zissulescu - - * gcc.target/arc/jumptables.c: Update test. - -2019-06-10 Claudiu Zissulescu - - * gcc.target/arc/and-cnst-size.c: New test. - * gcc.target/arc/mov-cnst-size.c: Likewise. - * gcc.target/arc/or-cnst-size.c: Likewise. - * gcc.target/arc/store-merge-1.c: Update test. - * gcc.target/arc/arc700-stld-hazard.c: Likewise. - * gcc.target/arc/cmem-1.c: Likewise. - * gcc.target/arc/cmem-2.c: Likewise. - * gcc.target/arc/cmem-3.c: Likewise. - * gcc.target/arc/cmem-4.c: Likewise. - * gcc.target/arc/cmem-5.c: Likewise. - * gcc.target/arc/cmem-6.c: Likewise. - * gcc.target/arc/loop-4.c: Likewise. - * gcc.target/arc/movh_cl-1.c: Likewise. - * gcc.target/arc/sdata-3.c: Likewise. - -2019-06-10 Martin Liska - - * gcc.dg/ipa/pr68035.c: Update scanned pattern. - -2019-06-10 Iain Sandoe - - * gcc.dg/attr-copy-6.c: Require alias support. - -2019-06-09 Marek Polacek - - PR c++/65175 - * g++.dg/cpp0x/alias-decl-69.C: New test. - - PR c++/60366 - * g++.dg/cpp0x/lambda/lambda-ice32.C: New test. - -019-06-09 Paul Thomas - - PR fortran/89365 - * gfortran.dg/assumed_rank_bounds_3.f90 : New test. - -2019-06-08 Paul Thomas - - PR fortran/90786 - * gfortran.dg/proc_ptr_51.f90 : New test. - -2019-06-08 Marek Polacek - - PR c++/52269 - * g++.dg/cpp0x/constexpr-decltype4.C: New test. - -2019-06-08 Thomas Koenig - Tomáš Trnka - - PR fortran/90744 - * gfortran.dg/deferred_character_33.f90: New test. - * gfortran.dg/deferred_character_33a.f90: New test. - -2019-06-08 Marek Polacek - - PR c++/77548 - * g++.dg/other/pr77548.C: New test. - - PR c++/72845 - * g++.dg/cpp0x/noexcept41.C: New test. - -2019-06-08 Prathamesh Kulkarni - - * gcc.target/aarch64/sve/init_1.c: Remove options - -O2 -fno-schedule-insns and instead pass -O. - Update assembly in comments. - * gcc.target/aarch64/sve/init_2.c: Likewise. - * gcc.target/aarch64/sve/init_3.c: Likewise. - * gcc.target/aarch64/sve/init_4.c: Likewise. - * gcc.target/aarch64/sve/init_5.c: Likewise and additionally - adjust dg-scan. - * gcc.target/aarch64/sve/init_6.c: Likewise. - * gcc.target/aarch64/sve/init_7.c: Likewise. - * gcc.target/aarch64/sve/init_8.c: Likewise. - * gcc.target/aarch64/sve/init_9.c: Likewise. - * gcc.target/aarch64/sve/init_10.c: Likewise. - * gcc.target/aarch64/sve/init_11.c: Likewise. - * gcc.target/aarch64/sve/init_12.c: Likewise. - -2019-06-07 Marek Polacek - - PR c++/77747 - * g++.dg/cpp0x/inh-ctor33.C: New test. - - PR c++/77967 - * g++.dg/cpp0x/alias-decl-68.C: New test. - - PR c++/77771 - * g++.dg/cpp0x/constexpr-77771.C: New test. - -2019-06-07 John David Anglin - - * lib/scanasm.exp (dg-function-on-line): Add pattern for hppa*-*-linux*. - -2019-06-07 Mark Eggleston - - PR fortran/89100 - * gfortran.dg/fmt_f_default_field_width_3.f90: Modify dg-error - to allow use when kind=16 is not supported. - * gfortran.dg/fmt_g_default_field_width_3.f90: Modify dg-error - to allow use when kind=16 is not supported. - -2019-06-07 Richard Biener - - PR debug/90574 - * gcc.misc-tests/gcov-pr90574-1.c: New testcase. - * gcc.misc-tests/gcov-pr90574-2.c: Likewise. - -2019-06-07 Jan Hubicka - - * gcc.dg/lto/alias-access-path-2.0.c: New testcase. - -2019-06-07 Martin Liska - - PR tree-optimization/78902 - * c-c++-common/asan/alloca_loop_unpoisoning.c: Use result - of __builtin_alloca. - * c-c++-common/asan/pr88619.c: Likewise. - * g++.dg/overload/using2.C: Likewise for malloc. - * gcc.dg/attr-alloc_size-5.c: Add new dg-warning. - * gcc.dg/nonnull-3.c: Use result of __builtin_strdup. - * gcc.dg/pr43643.c: Likewise. - * gcc.dg/pr59717.c: Likewise for calloc. - * gcc.dg/torture/pr71816.c: Likewise. - * gcc.dg/tree-ssa/pr78886.c: Likewise. - * gcc.dg/tree-ssa/pr79697.c: Likewise. - * gcc.dg/pr78902.c: New test. - -2019-06-06 Iain Sandoe - - * g++.dg/cpp0x/alignas4.C: Amend test to check for zerofill syntax - on Darwin. - -2019-06-06 Martin Jambor - - * gcc.dg/tree-ssa/alias-access-path-1.c: Remove -fno-tree-sra option. - * gcc.dg/tree-ssa/ssa-dse-26.c: Disable FRE. - * gnat.dg/opt39.adb: Adjust scan dump. - -2019-06-06 Jozef Lawrynowicz - - * gcc.target/msp430/size-optimized-shifts.c: New test. - -2019-06-06 Jozef Lawrynowicz - - * gcc.target/msp430/emulate-slli.c: New test. - * gcc.target/msp430/emulate-srai.c: New test. - * gcc.target/msp430/emulate-srli.c: New test. - -2019-06-06 Martin Liska - - PR tree-optimization/87954 - * gcc.dg/pr87954.c: New test. - -2019-06-06 Richard Biener - - * gcc.dg/tree-ssa/alias-37.c: New testcase. - * gcc.dg/torture/20190604-1.c: Likewise. - * gcc.dg/tree-ssa/pta-callused.c: Adjust. - -2019-06-06 Claudiu Zissulescu - - * gcc.target/arc/tmac-1.c: Reoreder dg-directives. - * gcc.target/arc/tmac-2.c: Likewise. - -2019-06-05 Martin Sebor - - PR c/90737 - * c-c++-common/Wreturn-local-addr.c: New test. - * g++.dg/warn/Wreturn-local-addr-6.C: New test. - -2019-06-05 Hongtao Liu - - * gcc.target/i386/avx512dq-vfpclasspd-1.c: Adjust scan assember - for {x,y,z} suffix. - * gcc.target/i386/avx512dq-vfpclassps-1.c: Ditto. - -2019-06-05 Martin Sebor - - * gcc.dg/format/gcc_diag-11.c: Skip until -Wformat-diag has - been committed. - -2019-06-05 Paolo Carlini - - * g++.dg/diagnostic/return-type-invalid-1.C: New. - * g++.old-deja/g++.brendan/crash16.C: Adjust. - * g++.old-deja/g++.law/ctors5.C: Likewise. - -2019-06-05 Paolo Carlini - - * g++.dg/other/friend4.C: Test locations too. - * g++.dg/other/friend5.C: Likewise. - * g++.dg/other/friend7.C: Likewise. - -2019-06-05 Segher Boessenkool - - * g++.target/powerpc/undef-bool-3.C: Add -maltivec to dg-options. - -2019-06-05 Martin Sebor - - * gcc.dg/weak/weak-19.c: New test. - -2019-06-05 Eric Botcazou - - * gnat.dg/specs/discr6.ads: New test. - -2019-06-05 Sam Tebbs - - * gcc.target/aarch64/return_address_sign_b_1.c: New file. - * gcc.target/aarch64/return_address_sign_b_2.c: New file. - * gcc.target/aarch64/return_address_sign_b_3.c: New file. - * gcc.target/aarch64/return_address_sign_builtin.c: New file. - * g++.target/aarch64/return_address_sign_ab_exception.C: New file. - * g++.target/aarch64/return_address_sign_b_exception.C: New file. - -2019-06-05 Jakub Jelinek - - PR debug/90733 - * gcc.dg/pr90733.c: New test. - -2019-06-05 Richard Biener - - PR middle-end/90726 - * gcc.dg/pr90726.c: Enable IVOPTs. - -2019-06-05 Jakub Jelinek - - * g++.dg/vect/simd-1.cc: New test. - -2019-06-05 Hongtao Liu - - PR target/89803 - * gcc.target/i386/avx-1.c (__builtin_ia32_fpclasssss, - __builtin_ia32_fpclasssd): Removed. - (__builtin_ia32_fpclassss_mask, __builtin_ia32_fpclasssd_mask): Define. - * gcc.target/i386/sse-13.c (__builtin_ia32_fpclasssss, - __builtin_ia32_fpclasssd): Removed. - (__builtin_ia32_fpclassss_mask, __builtin_ia32_fpclasssd_mask): Define. - * gcc.target/i386/sse-23.c (__builtin_ia32_fpclasssss, - __builtin_ia32_fpclasssd): Removed. - (__builtin_ia32_fpclassss_mask, __builtin_ia32_fpclasssd_mask): Define. - * gcc.target/i386/avx512dq-vfpclassss-2.c: New. - * gcc.target/i386/avx512dq-vfpclasssd-2.c: New. - * gcc.target/i386/avx512dq-vfpclassss-1.c (avx512f_test): - Add test for _mm_mask_fpclass_ss_mask. - * gcc.target/i386/avx512dq-vfpclasssd-1.c (avx512f_test): - Add test for _mm_mask_fpclass_sd_mask. - -2019-06-04 Segher Boessenkool - - * gcc.target/powerpc/direct-move-double1.c (VSX_REG_ATTR): Delete. - * gcc.target/powerpc/direct-move-double2.c: Ditto. - * gcc.target/powerpc/direct-move-float1.c: Ditto. - * gcc.target/powerpc/direct-move-float2.c: Ditto. - * gcc.target/powerpc/direct-move-vint1.c: Ditto. - * gcc.target/powerpc/direct-move-vint2.c: Ditto. - -2019-06-04 Segher Boessenkool - - * gcc.target/powerpc/direct-move-float1.c: Use "wa" instead of "ww" - constraint. - -2019-06-04 Paolo Carlini - - * g++.dg/concepts/pr60573.C: Test locations too. - * g++.dg/cpp0x/deleted13.C: Likewise. - * g++.dg/parse/error29.C: Likewise. - * g++.dg/parse/qualified4.C: Likewise. - * g++.dg/template/crash96.C Likewise. - * g++.old-deja/g++.brendan/crash22.C Likewise. - * g++.old-deja/g++.brendan/crash23.C Likewise. - * g++.old-deja/g++.law/visibility10.C Likewise. - * g++.old-deja/g++.other/decl5.C: Likewise. - -2019-06-04 Bill Schmidt - - PR target/78263 - * g++.target/powerpc: New directory. - * g++.target/powerpc/powerpc.exp: New test driver. - * g++.target/powerpc/undef-bool-3.C: New. - -2019-06-04 Jakub Jelinek - - * c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect - a sorry_at on any of the clauses. - -2019-06-04 Richard Biener - - PR middle-end/90726 - * gcc.dg/pr90726.c: New testcase. - -2019-06-04 Richard Biener - - PR tree-optimization/90738 - * gcc.dg/torture/pr90738.c: New testcase. - - Revert - 2019-06-03 Richard Biener - - * gcc.dg/tree-ssa/alias-access-path-1.c: Scan fre1. - -2019-06-04 Martin Liska - - * c-c++-common/goacc/acc-icf.c: Change scanned pattern. - * gfortran.dg/goacc/pr78027.f90: Likewise. - -2019-06-03 Segher Boessenkool - - * gcc.target/powerpc/mmfpgpr.c: Delete. - -2019-06-03 David Edelsohn - - * gcc.dg/debug/enum-1.c: Add -fno-eliminate-unused-debug-symbols - on AIX. - * g++.dg/debug/enum-1.C: Same. - -2019-06-03 Wilco Dijkstra - - PR middle-end/64242 - * gcc.c-torture/execute/pr64242.c: Update test. - -2019-06-03 Szabolcs Nagy - - * gcc.target/aarch64/pcs_attribute-2.c: New test. - * gcc.target/aarch64/torture/simd-abi-4.c: Check .variant_pcs support. - * lib/target-supports.exp (check_effective_target_aarch64_variant_pcs): - New. - -2019-06-03 Kyrylo Tkachov - - * gcc.target/aarch64/ssadv16qi.c: Add +nodotprod to pragma. - * gcc.target/aarch64/usadv16qi.c: Likewise. - * gcc.target/aarch64/ssadv16qi-dotprod.c: New test. - * gcc.target/aarch64/usadv16qi-dotprod.c: Likewise. - -2019-06-03 Prathamesh Kulkarni - - * lib/target-supports.exp (add_options_for_aarch64_sve): New procedure. - (aarch64_sve_hw_bits): Call add_options_for_aarch64_sve. - (check_effective_target_aarch64_sve_hw): Likewise. - -2019-06-03 Richard Biener - - * gcc.dg/tree-ssa/alias-access-path-1.c: Scan fre1. - -2019-06-03 Richard Biener - - PR tree-optimization/90716 - * gcc.dg/guality/pr90716.c: New testcase. - -2019-06-03 Prathamesh Kulkarni - - PR target/88837 - * gcc.target/aarch64/sve/init_1.c: New test. - * gcc.target/aarch64/sve/init_1_run.c: Likewise. - * gcc.target/aarch64/sve/init_2.c: Likewise. - * gcc.target/aarch64/sve/init_2_run.c: Likewise. - * gcc.target/aarch64/sve/init_3.c: Likewise. - * gcc.target/aarch64/sve/init_3_run.c: Likewise. - * gcc.target/aarch64/sve/init_4.c: Likewise. - * gcc.target/aarch64/sve/init_4_run.c: Likewise. - * gcc.target/aarch64/sve/init_5.c: Likewise. - * gcc.target/aarch64/sve/init_5_run.c: Likewise. - * gcc.target/aarch64/sve/init_6.c: Likewise. - * gcc.target/aarch64/sve/init_6_run.c: Likewise. - * gcc.target/aarch64/sve/init_7.c: Likewise. - * gcc.target/aarch64/sve/init_7_run.c: Likewise. - * gcc.target/aarch64/sve/init_8.c: Likewise. - * gcc.target/aarch64/sve/init_8_run.c: Likewise. - * gcc.target/aarch64/sve/init_9.c: Likewise. - * gcc.target/aarch64/sve/init_9_run.c: Likewise. - * gcc.target/aarch64/sve/init_10.c: Likewise. - * gcc.target/aarch64/sve/init_10_run.c: Likewise. - * gcc.target/aarch64/sve/init_11.c: Likewise. - * gcc.target/aarch64/sve/init_11_run.c: Likewise. - * gcc.target/aarch64/sve/init_12.c: Likewise. - * gcc.target/aarch64/sve/init_12_run.c: Likewise. - -2019-06-03 Alejandro Martinez - - PR tree-optimization/90681 - * gfortran.dg/vect/pr90681.f: New test. - -2019-06-03 Richard Biener - - PR testsuite/90713 - * gcc.dg/gimplefe-40.c: Add -maltivec for powerpc. - -2019-06-02 Thomas Koenig - - PR fortran/90539 - * gfortran.dg/internal_pack_24.f90: New test. - -2019-06-01 Iain Sandoe - - PR target/90698 - * gcc.target/i386/pr49866.c: XFAIL for Darwin. - * gcc.target/i386/pr63538.c: Likewise. - * gcc.target/i386/pr61599-1.c: Skip for Darwin. - -2019-06-01 Martin Sebor - - PR middle-end/90694 - * gcc.dg/tree-ssa/dump-5.c: New test. - -2019-05-31 Jan Hubicka - - * g++.dg/lto/alias-1_0.C: New testcase. - * g++.dg/lto/alias-1_1.C: New testcase. - -2019-05-31 H.J. Lu - - PR target/89355 - * gcc.target/i386/cet-label-3.c: New test. - * gcc.target/i386/cet-label-4.c: Likewise. - * gcc.target/i386/cet-label-5.c: Likewise. - -2019-05-31 Dragan Mladjenovic - - * gcc.target/mips/msa-fmadd.c: New. - -2019-05-31 Jakub Jelinek - - * c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect - a sorry on lastprivate conditional on simd construct. - * gcc.dg/vect/vect-simd-6.c: New test. - * gcc.dg/vect/vect-simd-7.c: New test. - - * gcc.dg/vect/vect-simd-5.c: New test. - -2019-05-31 Xiong Hu Luo - - PR c/43673 - * gcc.dg/format-dfp-printf-1.c: New test. - * gcc.dg/format-dfp-scanf-1.c: Likewise. - -2019-05-31 Marc Glisse - - * g++.dg/tree-ssa/cprop-vcond.C: New file. - -2019-05-31 Marc Glisse - - * gcc.dg/tree-ssa/cmpexactdiv-3.c: New file. - * gcc.dg/tree-ssa/cmpexactdiv-4.c: New file. - * gcc.dg/Walloca-13.c: Xfail. - -2019-05-31 Bill Schmidt - Michael Meissner - - * gcc.target/powerpc/cpu-future.c: Require powerpc_future_ok. - * gcc.target/powerpc/localentry-1.c: Likewise. - * gcc.target/powerpc/localentry-direct-1.c: Likewise. - * gcc.target/powerpc/notoc-direct-1.c: Likewise. - * gcc.target/powerpc/pcrel-sibcall-1.c: Likewise. - * lib/target-supports.exp (check_powerpc_future_hw_available): New. - (check_effective_target_powerpc_future_ok): New. - -2019-05-31 Thomas De Schampheleire - - PR debug/86964 - * g++.dg/debug/dwarf2/fesd-any.C: Use - -fno-eliminate-unused-debug-symbols. - * g++.dg/debug/dwarf2/fesd-baseonly.C: Likewise. - * g++.dg/debug/dwarf2/fesd-none.C: Likewise. - * g++.dg/debug/dwarf2/fesd-reduced.C: Likewise. - * g++.dg/debug/dwarf2/fesd-sys.C: Likewise. - * g++.dg/debug/dwarf2/inline-var-1.C: Likewise. - * g++.dg/debug/enum-2.C: Likewise. - * gcc.dg/debug/dwarf2/fesd-any.c: Likewise. - * gcc.dg/debug/dwarf2/fesd-baseonly.c: Likewise. - * gcc.dg/debug/dwarf2/fesd-none.c: Likewise. - * gcc.dg/debug/dwarf2/fesd-reduced.c: Likewise. - * gcc.dg/debug/dwarf2/fesd-sys.c: Likewise. - -2019-05-31 Jakub Jelinek - - PR tree-optimization/90671 - * gcc.dg/torture/pr90671.c: New test. - -2019-05-31 Iain Sandoe - - * g++.dg/cpp0x/pr84497.C: Require alias support. - -2019-05-31 Iain Sandoe - - * gcc.target/i386/falign-functions-3.c: Adjust align syntax - and label for Darwin. - * gcc.target/i386/attr-aligned-2.c: Adjust align syntax for - Darwin. - -2019-05-30 Sylvia Taylor - - * gcc.target/aarch64/sve/fabd_1.c: New. - -2019-05-30 Iain Sandoe - - * gcc.target/i386/pr86257.c: Require native TLS support. - * gcc.target/i386/stack-prot-sym.c: Likewise. - -2019-05-30 Paolo Carlini - - * g++.dg/cpp0x/alias-decl-18.C: Test location too. - * g++.dg/cpp0x/udlit-nofunc-neg.C: Likewise. - * g++.dg/parse/crash59.C: Likewise. - * g++.dg/parse/error38.C: Likewise. - * g++.dg/parse/error39.C: Likewise. - * g++.dg/template/crash31.C: Likewise. - * g++.dg/template/operator8.C: Likewise. - * g++.dg/template/operator9.C: Likewise. - -2019-05-29 Bill Schmidt - - * gcc.target/powerpc/notoc-direct-1.c: New. - * gcc.target/powerpc/pcrel-sibcall-1.c: New. - -2019-05-29 Jakub Jelinek - - PR c++/90598 - * g++.dg/cpp0x/pr90598.C: New test. - -2019-05-29 Thomas Koenig - - PR fortran/90539 - * gfortran.dg/internal_pack_21.f90: Adjust scan patterns. - * gfortran.dg/internal_pack_22.f90: New test. - * gfortran.dg/internal_pack_23.f90: New test. - -2019-05-29 Jan Hubicka - - * tree-ssa/alias-access-spath-1.c: new testcase. - -2019-05-29 Paolo Carlini - - PR c++/89875 - * g++.dg/cpp0x/decltype-pr66548.C: Remove xfail. - * g++.dg/template/sizeof-template-argument.C: Adjust expected error. - -2019-05-29 Alejandro Martinez - - * gcc.target/aarch64/sve2/aarch64-sve2.exp: New file, regression - driver for AArch64 SVE2. - * gcc.target/aarch64/sve2/average_1.c: New test. - * lib/target-supports.exp (check_effective_target_aarch64_sve2): New - helper. - (check_effective_target_aarch64_sve1_only): Likewise. - (check_effective_target_aarch64_sve2_hw): Likewise. - (check_effective_target_vect_avg_qi): Check for SVE1 only. - -2019-05-29 Sam Tebbs - - * gcc.target/aarch64/return_address_sign_b_1.c: New file. - * gcc.target/aarch64/return_address_sign_b_2.c: New file. - * gcc.target/aarch64/return_address_sign_b_3.c: New file. - * gcc.target/aarch64/return_address_sign_b_exception.c: New file. - * gcc.target/aarch64/return_address_sign_ab_exception.c: New file. - * gcc.target/aarch64/return_address_sign_builtin.c: New file - -2019-05-29 Jakub Jelinek - - * c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect - sorry on lastprivate conditional on parallel for. - * c-c++-common/gomp/lastprivate-conditional-3.c (foo): Add tests for - lastprivate conditional warnings on parallel for constructs. - * c-c++-common/gomp/lastprivate-conditional-4.c: New test. - - PR c/90628 - * c-c++-common/builtin-arith-overflow-3.c: New test. - - P1091R3 - Extending structured bindings to be more like var decls - P1381R1 - Reference capture of structured bindings - * g++.dg/cpp1z/decomp3.C (test): For static, expect only warning - instead of error and only for c++17_down. Add a thread_local test. - (z2): Add a __thread test. - * g++.dg/cpp2a/decomp1.C: New test. - * g++.dg/cpp2a/decomp1-aux.cc: New file. - * g++.dg/cpp2a/decomp2.C: New test. - * g++.dg/cpp2a/decomp3.C: New test. - -2019-05-29 Martin Liska - - PR testsuite/90657 - * gcc.dg/ipa/pr90555.c: Remove duplicite dg-compile. - -2019-05-28 Bill Schmidt - - * gcc.target/powerpc/localentry-detect-1.c: New file. - -2019-05-28 Marek Polacek - - PR c++/90548 - ICE with generic lambda and empty pack. - * g++.dg/cpp1y/lambda-generic-90548.C: New test. - -2019-05-28 Alejandro Martinez - - * gcc.target/aarch64/sve/mask_load_slp_1.c: New test for SLP - vectorized masked loads. - -2019-05-28 Jeff Law - - * gcc.target/sh/pr50749-qihisi-predec-3.c: Disable - loop distribution. - -2019-05-28 Segher Boessenkool - - * gcc.target/powerpc/p9-dimode1.c: Don't restrict to -m64. Check for - all mtvsr*, not just mtvsrd. Use "wa" instead of "wi" constraints. - * gcc.target/powerpc/p9-dimode2.c: Ditto. - -2019-05-28 Martin Liska - - PR ipa/90555 - * gcc.dg/ipa/pr90555.c: New test. - -2019-05-28 Eric Botcazou - - * gnat.dg/machine_attr1.ad[sb]: New test. - -2019-05-28 Eric Botcazou - - * gnat.dg/opt79.ad[sb]: New test. - -2019-05-28 Eric Botcazou - - * gnat.dg/specs/discr5.ads: New test. - -2019-05-28 Eric Botcazou - - * gnat.dg/prefetch1.ad[sb]: New test. - -2019-05-27 Iain Sandoe - - * gcc.target/i386/pr22076.c: Adjust options to - match codegen expected by the scan-asms. - -2019-05-27 Eric Botcazou - - * gnat.dg/specs/array4.ads: New test. - -2019-05-27 Christophe Lyon - - PR tree-optimization/88440 - * gcc.target/aarch64/sve/index_offset_1.c: Add - -fno-tree-loop-distribute-patterns. - * gcc.target/aarch64/sve/single_1.c: Likewise. - * gcc.target/aarch64/sve/single_2.c: Likewise. - * gcc.target/aarch64/sve/single_3.c: Likewise. - * gcc.target/aarch64/sve/single_4.c: Likewise. - * gcc.target/aarch64/sve/vec_init_1.c: Likewise. - * gcc.target/aarch64/vect-fmovd-zero.c: Likewise. - * gcc.target/aarch64/vect-fmovf-zero.c: Likewise. - * gcc.target/arm/ivopts.c: Likewise. - -2019-05-27 Richard Biener - - PR tree-optimization/90637 - * gcc.dg/gomp/pr90637.c: New testcase. - -2019-05-27 Eric Botcazou - - * gnat.dg/expect2.adb: New test. - * gnat.dg/expect2_pkg.ads: New helper. - -2019-05-27 Eric Botcazou - - * gnat.dg/aliased2.adb: New test. - -2019-05-27 Eric Botcazou - - * gnat.dg/limited_with7.ad[sb]: New test. - * gnat.dg/limited_with7_pkg.ads: New helper. - -2019-05-27 Eric Botcazou - - * gnat.dg/unchecked_convert13.adb: New test. - -2019-05-27 Richard Biener - - PR testsuite/90615 - * gcc.dg/vect/costmodel/ppc/costmodel-vect-31b.c: Add - -fno-tree-loop-distribute-patterns. - * gcc.dg/vect/costmodel/ppc/costmodel-vect-33.c: Likewise. - * gcc.dg/vect/costmodel/ppc/costmodel-vect-76a.c: Likewise. - * gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c: Likewise. - * gcc.dg/vect/costmodel/ppc/costmodel-vect-76c.c: Likewise. - * gcc.target/powerpc/vsx-vectorize-1.c: Likewise. - -2019-05-26 Iain Sandoe - - * gcc.target/i386/pr39013-1.c: Adjust scan-asms for PIE to - account for PIC code on Darwin. - * gcc.target/i386/pr39013-2.c: Likewise. - * gcc.target/i386/pr64317.c: Likewise. - -2019-05-25 Iain Sandoe - - * gcc.target/i386/pr59874-3.c: Use the spelling of popcnt - expected for Darwin. - -2019-05-25 Iain Sandoe - - * gcc.target/i386/pr89261.c: Test that the alignment required - by the test correctly produces the expected error on Darwin. - -2019-05-25 Iain Sandoe - - * gcc.target/i386/pr82659-3.c: Require alias support. - -2019-05-25 Marek Polacek - - PR c++/90572 - wrong disambiguation in friend declaration. - * g++.dg/cpp2a/typename16.C: New test. - * g++.dg/parse/friend13.C: New test. - -2019-05-24 Jakub Jelinek - - * c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect - sorry for omp for. - * c-c++-common/gomp/lastprivate-conditional-3.c: New test. - -2019-05-24 Richard Biener - - PR testsuite/90607 - * gcc.dg/pr53265.c: Amend for new expected diagnostic. - -2019-05-24 Jakub Jelinek - - PR tree-optimization/90106 - PR testsuite/90517 - * gcc.dg/cdce1.c: Don't scan-assembler, instead -fdump-tree-optimized - and scan-tree-dump for tail call. - * gcc.dg/cdce2.c: Likewise. - -2019-05-24 Iain Sandoe - - * gcc.target/i386/pconfig-1.c: Scan for the string in the generated - code, not in comments or miscellaneous directives. - * gcc.target/i386/pr18041-1.c: Likewise. - * gcc.target/i386/pr18041-2.c: Likewise. - * gcc.target/i386/wbinvd-1.c: Likewise. - * gcc.target/i386/wbnoinvd-1.c: Likewise. - * gcc.target/i386/pr66819-3.c: Specifically, check that there is no - call to "bar". - * gcc.target/i386/pr66819-4.c: Likewise. - * gcc.target/i386/pr82662.c - * gcc.target/i386/ptwrite2.c: Make the checks look for the specific - destination register, don't try the m32 test on m64 targets. - -2019-05-24 Iain Sandoe - - * gcc.target/i386/pr67985-2.c: Adjust label checks for - Darwin. - * gcc.target/i386/pr77881.c: Likewise. - -2019-05-24 Iain Sandoe - - * gcc.target/i386/falign-functions-2.c: Skip for Darwin. - * gcc.target/i386/pr70738-7.c: Likewise. - * gcc.target/i386/pr24414.c: Likewise. - -2019-05-23 Iain Sandoe - - * lib/target-supports.exp (check_effective_target_mfentry): New. - * gcc.target/i386/fentry-override.c: Require effective target mfentry. - * gcc.target/i386/fentry.c: Likewise. - * gcc.target/i386/fentryname1.c: Likewise. - * gcc.target/i386/fentryname2.c: Likewise. - * gcc.target/i386/fentryname3.c: Likewise. - * gcc.target/i386/nop-mcount.c: Likewise. - * gcc.target/i386/pr82699-2.c: Likewise. - * gcc.target/i386/pr82699-4.c: Likewise. - * gcc.target/i386/pr82699-5.c: Likewise. - * gcc.target/i386/pr82699-6.c: Likewise. - * gcc.target/i386/returninst1.c: Likewise. - * gcc.target/i386/returninst2.c: Likewise. - * gcc.target/i386/returninst3.c : Likewise. - -2019-05-23 Bill Schmidt - - * gcc.target/powerpc/localentry-1.c: New file. - -2019-05-23 Uroš Bizjak - - PR target/90552 - * gcc.target/i386/pr90552.c: New test. - -2019-05-23 Mark Eggleston - - * gfortran.dg/fmt_f_default_field_width_1.f90: Hide REAL(16) behind - __GFC_REAL_16__. Add -cpp to dg-options. - * gfortran.dg/fmt_f_default_field_width_2.f90: Ditto. - * gfortran.dg/fmt_f_default_field_width_3.f90: Ditto. - * gfortran.dg/fmt_g_default_field_width_1.f90: Ditto. - * gfortran.dg/fmt_g_default_field_width_2.f90: Ditto. - * gfortran.dg/fmt_g_default_field_width_3.f90: Ditto. - -2019-05-23 Bill Schmidt - - * gcc.target/powerpc/cpu-future.c: New test. - -2019-05-23 Richard Biener - - PR tree-optimization/88440 - * gcc.dg/tree-ssa/ldist-37.c: New testcase. - * gcc.dg/tree-ssa/ldist-38.c: Likewise. - * gcc.dg/vect/vect.exp: Add -fno-tree-loop-distribute-patterns. - * gcc.dg/tree-ssa/ldist-37.c: Adjust. - * gcc.dg/tree-ssa/ldist-38.c: Likewise. - * g++.dg/tree-ssa/pr78847.C: Likewise. - * gcc.dg/autopar/pr39500-1.c: Likewise. - * gcc.dg/autopar/reduc-1char.c: Likewise. - * gcc.dg/autopar/reduc-7.c: Likewise. - * gcc.dg/tree-ssa/ivopts-lt-2.c: Likewise. - * gcc.dg/tree-ssa/ivopts-lt.c: Likewise. - * gcc.dg/tree-ssa/predcom-dse-1.c: Likewise. - * gcc.dg/tree-ssa/predcom-dse-2.c: Likewise. - * gcc.dg/tree-ssa/predcom-dse-3.c: Likewise. - * gcc.dg/tree-ssa/predcom-dse-4.c: Likewise. - * gcc.dg/tree-ssa/prefetch-7.c: Likewise. - * gcc.dg/tree-ssa/prefetch-8.c: Likewise. - * gcc.dg/tree-ssa/prefetch-9.c: Likewise. - * gcc.dg/tree-ssa/scev-11.c: Likewise. - * gcc.dg/vect/costmodel/i386/costmodel-vect-31.c: Likewise. - * gcc.dg/vect/costmodel/i386/costmodel-vect-33.c: Likewise. - * gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c: Likewise. - * gcc.dg/vect/costmodel/x86_64/costmodel-vect-33.c: Likewise. - * gcc.target/i386/pr30970.c: Likewise. - * gcc.target/i386/vect-double-1.c: Likewise. - * gcc.target/i386/vect-double-2.c: Likewise. - * gcc.dg/tree-ssa/gen-vect-2.c: Likewise. - * gcc.dg/tree-ssa/gen-vect-26.c: Likewise. - * gcc.dg/tree-ssa/gen-vect-28.c: Likewise. - * gcc.dg/tree-ssa/gen-vect-32.c: Likewise. - * gfortran.dg/vect/vect-5.f90: Likewise. - * gfortran.dg/vect/vect-8.f90: Likewise. - -2019-05-23 Martin Liska - - PR sanitizer/90570 - * g++.dg/asan/pr90570.C: New test. - -2019-05-23 Eric Botcazou - - * gnat.dg/opt78.ad[sb]: New test. - -2019-05-23 Iain Sandoe - - PR rtl-optimisation/64895 - * gcc.target/i386/fuse-caller-save-rec.c: Remove XFAILs. - * gcc.target/i386/fuse-caller-save.c: Likewise. - * gcc.target/i386/fuse-caller-save-xmm.c: Adjust tests for - PIC cases, remove XFAILs. - -2019-05-23 Thomas Schwinge - - PR middle-end/90510 - * brig.dg/test/gimple/packed.hsail: Adjust. - -2019-05-23 Jakub Jelinek - - * g++.dg/cpp2a/is-constant-evaluated8.C: New test. - -2019-05-23 Hans-Peter Nilsson - - * gfortran.dg/dec_io_1.f90, gfortran.dg/dtio_1.f90, - gfortran.dg/dtio_12.f90, gfortran.dg/fmt_en.f90, - gfortran.dg/namelist_89.f90: Gate test on effective_target - fd_truncate. - -2019-05-22 David Malcolm - - PR c++/90462 - * g++.dg/pr90462.C: New test. - -2019-05-22 Marek Polacek - - * g++.dg/cpp1y/udlit-char-template-neg.C: Expect the error on a - different line. Check the column number too. - -2019-05-22 Uroš Bizjak - - * gcc.target/i386/vect-signbitf.c (dg-final): Improve - scan-assembler-not string to avoid false matching on 32bit targets. - -2019-05-22 H.J. Lu - - PR target/88483 - * gcc.target/i386/stackalign/pr88483-1.c: New test. - * gcc.target/i386/stackalign/pr88483-2.c: Likewise. - -2019-05-22 Andrew Stubbs - - * gfortran.dg/coarray_lock_7.f90: Fix output patterns. - -2019-05-22 Mark Eggleston - - PR fortran/89100 - * gfortran.dg/fmt_f_default_field_width_1.f90: New test. - * gfortran.dg/fmt_f_default_field_width_2.f90: New test. - * gfortran.dg/fmt_f_default_field_width_3.f90: New test. - * gfortran.dg/fmt_g_default_field_width_1.f90: New test. - * gfortran.dg/fmt_g_default_field_width_2.f90: New test. - * gfortran.dg/fmt_g_default_field_width_3.f90: New test. - * gfortran.dg/fmt_i_default_field_width_1.f90: New test. - * gfortran.dg/fmt_i_default_field_width_2.f90: New test. - * gfortran.dg/fmt_i_default_field_width_3.f90: New test. - -2019-05-22 Martin Liska - - PR testsuite/90564 - * gcc.target/powerpc/pr80315-1.c: Remove usage of quotes. - * gcc.target/powerpc/pr80315-2.c: Likewise. - * gcc.target/powerpc/pr80315-3.c: Likewise. - * gcc.target/powerpc/pr80315-4.c: Likewise. - -2019-05-22 Martin Liska - - PR testsuite/90564 - * gcc.target/powerpc/pr80315-1.c: Add one extra \ to escape brackets. - * gcc.target/powerpc/pr80315-2.c: Likewise. - * gcc.target/powerpc/pr80315-3.c: Likewise. - * gcc.target/powerpc/pr80315-4.c: Likewise. - -2019-05-22 Iain Sandoe - - PR testsuite/27221 - * g++.dg/ext/alignof2.C: XFAIL for 32bit Darwin. - -2019-05-22 Martin Liska - - PR lto/90500 - * gcc.target/i386/pr90500-1.c: Make the test-case valid now. - -2019-05-22 Richard Biener - - * gcc.dg/tree-ssa/ssa-lim-13.c: New testcase. - -2019-05-22 Alan Modra - - * gcc.target/powerpc/ppc32-abi-dfp-1.c: Don't use - power mnemonics. - * gcc.dg/vect/O3-pr70130.c: Disable default options - added by check_vect_support_and_set_flags. - * gcc.dg/vect/pr48765.c: Likewise. - * gfortran.dg/vect/pr45714-b.f: Likewise. - -2019-05-22 Hans-Peter Nilsson - - PR middle-end/90553 - * gcc.dg/torture/pr90553.c: New test. - -2019-05-21 Paolo Carlini - - * g++.dg/cpp0x/udlit-tmpl-arg-neg2.C: Check locations too. - * g++.dg/cpp0x/udlit-tmpl-parms-neg.C: Likewise. - -2019-05-21 Paolo Carlini - - PR c++/67184 - PR c++/69445 - * g++.dg/other/final3.C: New. - * g++.dg/other/final4.C: Likewise. - * g++.dg/other/final5.C: Likewise. - -2019-05-21 Marek Polacek - - DR 1940 - static_assert in anonymous unions. - * g++.dg/DRs/dr1940.C: New test. - -2019-05-21 Uroš Bizjak - - PR target/90547 - * gcc.target/i386/pr90547.c: New test. - -2019-05-21 Rainer Orth - - * gcc.dg/Wattribute-alias.c: Pass emtpy arg to dg-require-ifunc. - - * gcc.c-torture/execute/20030125-1.c: Pass emtpy arg to dg-require-weak. - - * gcc.dg/torture/ftrapv-2.c: Pass empty arg to dg-require-fork. - - * gcc.target/i386/pr84723-1.c: Remove dg-require-ifunc. - * gcc.target/i386/pr84723-2.c: Likewise. - * gcc.target/i386/pr84723-3.c: Likewise. - * gcc.target/i386/pr84723-4.c: Likewise. - * gcc.target/i386/pr84723-5.c: Likewise. - -2019-05-21 Iain Sandoe - - PR testsuite/67958 - * gcc.target/i386/pr32219-1.c: Adjust scan-asms for Darwin, comment - the differences. - * gcc.target/i386/pr32219-2.c: Likewise. - * gcc.target/i386/pr32219-3.c: Likewise. - * gcc.target/i386/pr32219-4.c: Likewise. - * gcc.target/i386/pr32219-5.c: Likewise. - * gcc.target/i386/pr32219-6.c: Likewise. - * gcc.target/i386/pr32219-7.c: Likewise. - * gcc.target/i386/pr32219-8.c: Likewise. - -2019-05-21 Iain Sandoe - - PR target/63891 - * gcc.dg/darwin-weakimport-3.c: Adjust options and explain - the reasons. - -2019-05-21 Uroš Bizjak - - * gcc.target/i386/vect-signbitf.c: New test. - -2019-05-21 Nathan Sidwell - - * g++.dg/lookup/using53.C: Adjust diagnostic. - -2019-05-21 Alan Modra - - PR target/90545 - * gcc.target/powerpc/fold-vec-splats-floatdouble.c: Correct comments - and rename functions to suit parameters. - -2019-05-21 Richard Biener - - PR middle-end/90510 - * gcc.target/i386/pr90510.c: New testcase. - -2019-05-21 Martin Liska - - * gcc.target/i386/pr90500-1.c: Add missing '""'. - * gcc.target/i386/pr90500-2.c: Likewise. - -2019-05-21 Vladislav Ivanishin - - * gcc.dg/uninit-28-gimple.c: New test. - * gcc.dg/uninit-29-gimple.c: New test. - * gcc.dg/uninit-30-gimple.c: New test. - * gcc.dg/uninit-31-gimple.c: New test. - -2019-05-21 Martin Liska - - * gcc.dg/pr90263.c: Add -O2. - -2019-05-21 Martin Liska - - * gcc.target/powerpc/ppc64-abi-warn-1.c: Wrap a type. - * gcc.target/powerpc/pr80315-1.c: Use new interval format. - * gcc.target/powerpc/pr80315-2.c: Likewise. - * gcc.target/powerpc/pr80315-3.c: Likewise. - * gcc.target/powerpc/pr80315-4.c: Likewise. - * gcc.target/powerpc/warn-lvsl-lvsr.c: Wrap builtin names. - -2019-05-21 Martin Liska - - PR testsuite/90551 - * pr90263.c: Move from gcc.c-torture/compile - into gcc.dg. - -2019-05-20 Uroš Bizjak - - PR testsuite/90503 - * gcc.target/i386/pr22076.c (dg-options): Add -mno-sse2. - Remove -flax-vector-conversions. - (dg-additional-options): Remove. - (test): Change to void. Declare m0 and m1 as __m64 and - cast initializer in a proper way. Do not return result. - (dg-final): Scan for 2 instances of movq. - -2019-05-20 Marek Polacek - - CWG 2094 - volatile scalars are trivially copyable. - PR c++/85679 - * g++.dg/ext/is_trivially_constructible1.C: Change the expected result - for volatile int. - * g++.dg/ext/is_trivially_copyable.C: New test. - -2019-05-20 Marek Polacek - - * g++.dg/ext/utf8-2.C: Accept both "char" and "char8_t" in aka. - - * g++.dg/cpp2a/nontype-class17.C: New test. - - * g++.dg/lookup/strong-using2.C: New test. - -2019-05-20 Jeff Law - - * gcc.dg/Wtype-limits-Wextra.c: Adjust expected output after - recent diagnostic cleanups. - -2019-05-20 Christophe Lyon - - PR tree-optimization/90106 - * gcc.dg/cdce3.c: Add hard_float effective target. - -2019-05-20 Marc Glisse - - * gcc.dg/torture/pta-ptrarith-3.c: Relax the matched pattern. - -2019-05-20 Iain Sandoe - - PR testsuite/58321 - * gcc.target/i386/memcpy-strategy-3.c: Adjust count for Darwin and - add a comment as to the reason for the difference. - * gcc.target/i386/memset-strategy-1.c: Likewise. - -2019-05-20 Jonathan Wakely - - PR c++/90532 Ensure __is_constructible(T[]) is false - * g++.dg/ext/90532.C: New test. - -2019-05-20 Jakub Jelinek - - * gcc.target/i386/avx512f-simd-1.c: New test. - -2019-05-20 Christophe Lyon - - * gcc.target/aarch64/target_attr_10.c: Add quotes to expected - error message. - * gcc.target/arm/attr-neon-builtin-fail.c: Likewise. - -2019-05-20 Martin Liska - - PR middle-end/90263 - * gcc.c-torture/compile/pr90263.c: New test. - * lib/target-supports.exp: Add check_effective_target_glibc. - -2019-05-20 Richard Biener - - PR testsuite/90518 - * gcc.dg/gimplefe-40.c: Restrict to targets with appropriate - vector support. - * gcc.dg/gimplefe-41.c: Likewise. - -2019-05-19 Andrew Pinski - - PR pch/81721 - * g++.dg/pch/operator-1.C: New testcase. - * g++.dg/pch/operator-1.Hs: New file. - -2019-05-19 Paul Thomas - - PR fortran/90498 - * gfortran.dg/associate_48.f90 : New test. - -2019-05-19 Thomas Koenig - - PR fortran/78290 - * gfortran.dg/pr78290.f90: New test. - -2019-05-19 Thomas Koenig - - PR fortran/88821 - * gfortran.dg/alloc_comp_auto_array_3.f90: Add -O0 to dg-options - to make sure the test for internal_pack is retained. - * gfortran.dg/assumed_type_2.f90: Split compile and run time - tests into this and - * gfortran.dg/assumed_type_2a.f90: New file. - * gfortran.dg/c_loc_test_22.f90: Likewise. - * gfortran.dg/contiguous_3.f90: Likewise. - * gfortran.dg/internal_pack_11.f90: Likewise. - * gfortran.dg/internal_pack_12.f90: Likewise. - * gfortran.dg/internal_pack_16.f90: Likewise. - * gfortran.dg/internal_pack_17.f90: Likewise. - * gfortran.dg/internal_pack_18.f90: Likewise. - * gfortran.dg/internal_pack_4.f90: Likewise. - * gfortran.dg/internal_pack_5.f90: Add -O0 to dg-options - to make sure the test for internal_pack is retained. - * gfortran.dg/internal_pack_6.f90: Split compile and run time - tests into this and - * gfortran.dg/internal_pack_6a.f90: New file. - * gfortran.dg/internal_pack_8.f90: Likewise. - * gfortran.dg/missing_optional_dummy_6: Split compile and run time - tests into this and - * gfortran.dg/missing_optional_dummy_6a.f90: New file. - * gfortran.dg/no_arg_check_2.f90: Split compile and run time tests - into this and - * gfortran.dg/no_arg_check_2a.f90: New file. - * gfortran.dg/typebound_assignment_5.f90: Split compile and run time - tests into this and - * gfortran.dg/typebound_assignment_5a.f90: New file. - * gfortran.dg/typebound_assignment_6.f90: Split compile and run time - tests into this and - * gfortran.dg/typebound_assignment_6a.f90: New file. - * gfortran.dg/internal_pack_19.f90: New file. - * gfortran.dg/internal_pack_20.f90: New file. - * gfortran.dg/internal_pack_21.f90: New file. - -2019-05-18 Iain Sandoe - - * objc.dg/instancetype-0.m: New. - -2019-05-17 Martin Sebor - - * gcc.dg/gcc_diag-11.c: Remove accidentally committed test. - - * g++.dg/overload/conv-op1.C: Adjust text of expected messages. - * g++.dg/ubsan/pr63956.C: Same. - * g++.old-deja/g++.pt/assign1.C: Same. - -2019-05-17 Thomas Schwinge - - PR testsuite/89433 - * c-c++-common/goacc/routine-5.c: Update. - * c-c++-common/goacc/routine-level-of-parallelism-1.c: Likewise. - * c-c++-common/goacc/routine-level-of-parallelism-2.c: New file. - - PR testsuite/89433 - * c-c++-common/goacc/routine-2.c: Update, and move some test - into... - * c-c++-common/goacc/routine-level-of-parallelism-1.c: ... this - new file. - - PR testsuite/89433 - * c-c++-common/goacc/classify-routine.c: Update. - * gfortran.dg/goacc/classify-routine.f95: Likewise. - -2019-05-16 Martin Sebor - - * c-c++-common/Wbool-operation-1.c: Adjust text of expected diagnostics. - * c-c++-common/Wvarargs-2.c: Same. - * c-c++-common/Wvarargs.c: Same. - * c-c++-common/pr51768.c: Same. - * c-c++-common/tm/inline-asm.c: Same. - * c-c++-common/tm/safe-1.c: Same. - * g++.dg/asm-qual-1.C: Same. - * g++.dg/asm-qual-3.C: Same. - * g++.dg/conversion/dynamic1.C: Same. - * g++.dg/cpp0x/constexpr-89599.C: Same. - * g++.dg/cpp0x/constexpr-cast.C: Same. - * g++.dg/cpp0x/constexpr-shift1.C: Same. - * g++.dg/cpp0x/lambda/lambda-conv11.C: Same. - * g++.dg/cpp0x/nullptr04.C: Same. - * g++.dg/cpp0x/static_assert12.C: Same. - * g++.dg/cpp0x/static_assert8.C: Same. - * g++.dg/cpp1y/lambda-conv1.C: Same. - * g++.dg/cpp1y/pr79393-3.C: Same. - * g++.dg/cpp1y/static_assert1.C: Same. - * g++.dg/cpp1z/constexpr-if4.C: Same. - * g++.dg/cpp1z/constexpr-if5.C: Same. - * g++.dg/cpp1z/constexpr-if9.C: Same. - * g++.dg/eh/goto2.C: Same. - * g++.dg/eh/goto3.C: Same. - * g++.dg/expr/static_cast8.C: Same. - * g++.dg/ext/flexary5.C: Same. - * g++.dg/ext/utf-array-short-wchar.C: Same. - * g++.dg/ext/utf-array.C: Same. - * g++.dg/ext/utf8-2.C: Same. - * g++.dg/gomp/loop-4.C: Same. - * g++.dg/gomp/macro-4.C: Same. - * g++.dg/gomp/udr-1.C: Same. - * g++.dg/init/initializer-string-too-long.C: Same. - * g++.dg/other/offsetof9.C: Same. - * g++.dg/ubsan/pr63956.C: Same. - * g++.dg/warn/Wbool-operation-1.C: Same. - * g++.dg/warn/Wtype-limits-Wextra.C: Same. - * g++.dg/warn/Wtype-limits.C: Same. - * g++.dg/wrappers/pr88680.C: Same. - * g++.old-deja/g++.mike/eh55.C: Same. - * gcc.dg/Wsign-compare-1.c: Same. - * gcc.dg/Wtype-limits-Wextra.c: Same. - * gcc.dg/Wtype-limits.c: Same. - * gcc.dg/Wunknownprag.c: Same. - * gcc.dg/Wunsuffixed-float-constants-1.c: Same. - * gcc.dg/asm-6.c: Same. - * gcc.dg/asm-qual-1.c: Same. - * gcc.dg/cast-1.c: Same. - * gcc.dg/cast-2.c: Same. - * gcc.dg/cast-3.c: Same. - * gcc.dg/cpp/source_date_epoch-2.c: Same. - * gcc.dg/debug/pr85252.c: Same. - * gcc.dg/dfp/cast-bad.c: Same. - * gcc.dg/format/gcc_diag-1.c: Same. - * gcc.dg/format/gcc_diag-11.c: Same. - * gcc.dg/gcc_diag-11.c: Same. - * gcc.dg/gnu-cond-expr-2.c: Same. - * gcc.dg/gnu-cond-expr-3.c: Same. - * gcc.dg/gomp/macro-4.c: Same. - * gcc.dg/init-bad-1.c: Same. - * gcc.dg/init-bad-2.c: Same. - * gcc.dg/init-bad-3.c: Same. - * gcc.dg/pr27528.c: Same. - * gcc.dg/pr48552-1.c: Same. - * gcc.dg/pr48552-2.c: Same. - * gcc.dg/pr59846.c: Same. - * gcc.dg/pr61096-1.c: Same. - * gcc.dg/pr8788-1.c: Same. - * gcc.dg/pr90082.c: Same. - * gcc.dg/simd-2.c: Same. - * gcc.dg/spellcheck-params-2.c: Same. - * gcc.dg/spellcheck-params.c: Same. - * gcc.dg/strlenopt-49.c: Same. - * gcc.dg/tm/pr52141.c: Same. - * gcc.dg/torture/pr51106-1.c: Same. - * gcc.dg/torture/pr51106-2.c: Same. - * gcc.dg/utf-array-short-wchar.c: Same. - * gcc.dg/utf-array.c: Same. - * gcc.dg/utf8-2.c: Same. - * gcc.dg/warn-sprintf-no-nul.c: Same. - * gcc.target/i386/asm-flag-0.c: Same. - * gcc.target/i386/inline_error.c: Same. - * gcc.target/i386/pr30848.c: Same. - * gcc.target/i386/pr39082-1.c: Same. - * gcc.target/i386/pr39678.c: Same. - * gcc.target/i386/pr57756.c: Same. - * gcc.target/i386/pr68843-1.c: Same. - * gcc.target/i386/pr79804.c: Same. - * gcc.target/i386/pr82673.c: Same. - * obj-c++.dg/class-protocol-1.mm: Same. - * obj-c++.dg/exceptions-3.mm: Same. - * obj-c++.dg/exceptions-4.mm: Same. - * obj-c++.dg/exceptions-5.mm: Same. - * obj-c++.dg/exceptions-6.mm: Same. - * obj-c++.dg/method-12.mm: Same. - * obj-c++.dg/method-13.mm: Same. - * obj-c++.dg/method-6.mm: Same. - * obj-c++.dg/method-7.mm: Same. - * obj-c++.dg/method-9.mm: Same. - * obj-c++.dg/method-lookup-1.mm: Same. - * obj-c++.dg/proto-lossage-4.mm: Same. - * obj-c++.dg/protocol-qualifier-2.mm: Same. - * objc.dg/call-super-2.m: Same. - * objc.dg/class-protocol-1.m: Same. - * objc.dg/desig-init-1.m: Same. - * objc.dg/exceptions-3.m: Same. - * objc.dg/exceptions-4.m: Same. - * objc.dg/exceptions-5.m: Same. - * objc.dg/exceptions-6.m: Same. - * objc.dg/method-19.m: Same. - * objc.dg/method-2.m: Same. - * objc.dg/method-5.m: Same. - * objc.dg/method-6.m: Same. - * objc.dg/method-7.m: Same. - * objc.dg/method-lookup-1.m: Same. - * objc.dg/proto-hier-1.m: Same. - * objc.dg/proto-lossage-4.m: Same. - -2019-05-17 Dragan Mladjenovic - - * g++.dg/eh/o32-fp.C: New. - * gcc.target/mips/dwarfregtable-1.c: New. - * gcc.target/mips/dwarfregtable-2.c: New. - * gcc.target/mips/dwarfregtable-3.c: New. - * gcc.target/mips/dwarfregtable-4.c: New. - * gcc.target/mips/dwarfregtable.h: New. - -2019-05-17 H.J. Lu - - * gcc.target/x86_64/abi/test_varargs-m128.c: New file. - * gcc.target/x86_64/abi/avx/test_varargs-m256.c: Likewise. - * gcc.target/x86_64/abi/avx512f/test_varargs-m512.c: Likewise. - -2019-05-17 H.J. Lu - - PR target/90497 - * gcc.target/i386/pr90497-1.c: New test. - * gcc.target/i386/pr90497-2.c: Likewise. - -2019-05-17 Robin Dapp - - * gcc.target/s390/global-array-element-pic.c: Add -march=z900. - * gcc.target/s390/global-array-element-pic2.c: New test for z10+. - -2019-05-17 Richard Biener - - * gcc.dg/gimplefe-41.c: New testcase. - -2019-05-17 Jun Ma - - PR tree-optimization/90106 - * gcc.dg/cdce3.c: New test. - -2019-05-17 Andreas Krebbel - - * gcc.target/s390/zvector/vec-sldw.c: New test. - -2019-05-17 Martin Liska - - PR middle-end/90478 - * gcc.dg/tree-ssa/pr90478-2.c: Remove. - -2019-05-16 Jakub Jelinek - - * gcc.dg/vect/vect-simd-1.c: New test. - * gcc.dg/vect/vect-simd-2.c: New test. - * gcc.dg/vect/vect-simd-3.c: New test. - * gcc.dg/vect/vect-simd-4.c: New test. - -2019-05-16 Martin Liska - - PR lto/90500 - * gcc.target/i386/pr90500-1.c: New test. - * gcc.target/i386/pr90500-2.c: New test. - -2019-05-16 Vladislav Ivanishin - - PR tree-optimization/90394 - * gcc.dg/uninit-pr90394-1-gimple.c: New test. - * gcc.dg/uninit-pr90394.c: New test. - -2019-05-16 Richard Biener - - PR testsuite/90502 - * gcc.dg/tree-ssa/vector-6.c: Adjust for half of the - transforms happening earlier now. - -2019-05-16 Iain Sandoe - - * lib/target-supports.exp (check_effective_target_cet): Add the - -fcf-protection flag to the build conditions. - -2019-05-16 Jun Ma - - PR tree-optimization/90106 - * gcc.dg/cdce1.c: Check tailcall code generation after cdce pass. - * gcc.dg/cdce2.c: Likewise. - -2019-05-16 Richard Biener - - PR tree-optimization/90424 - * g++.target/i386/pr90424-1.C: New testcase. - * g++.target/i386/pr90424-2.C: Likewise. - -2019-05-16 Richard Biener - - * gcc.dg/gimplefe-40.c: Amend again. - -2019-05-15 Cherry Zhang - - * go.test/test/nilptr2.go: Change use function to actually do - something. - -2019-05-16 Jakub Jelinek - - PR middle-end/90478 - * gcc.dg/tree-ssa/pr90478.c: Add empty dg-options. Use long long type - instead of long. - - * c-c++-common/gomp/simd8.c: New test. - -2019-05-15 Marek Polacek - - CWG 2096 - constraints on literal unions. - * g++.dg/cpp0x/literal-type1.C: New test. - -2019-05-15 Janne Blomqvist - - PR fortran/90461 - * gfortran.dg/open_errors_2.f90: Add -std=f2008, adjust line number. - * gfortran.dg/open_errors_3.f90: New test. - -2019-05-15 H.J. Lu - - PR target/89021 - * gcc.target/i386/mmx-vals.h: New file. - * gcc.target/i386/sse2-mmx-2.c: Likewise. - * gcc.target/i386/sse2-mmx-3.c: Likewise. - * gcc.target/i386/sse2-mmx-4.c: Likewise. - * gcc.target/i386/sse2-mmx-5.c: Likewise. - * gcc.target/i386/sse2-mmx-6.c: Likewise. - * gcc.target/i386/sse2-mmx-7.c: Likewise. - * gcc.target/i386/sse2-mmx-8.c: Likewise. - * gcc.target/i386/sse2-mmx-9.c: Likewise. - * gcc.target/i386/sse2-mmx-10.c: Likewise. - * gcc.target/i386/sse2-mmx-11.c: Likewise. - * gcc.target/i386/sse2-mmx-12.c: Likewise. - * gcc.target/i386/sse2-mmx-13.c: Likewise. - * gcc.target/i386/sse2-mmx-14.c: Likewise. - * gcc.target/i386/sse2-mmx-15.c: Likewise. - * gcc.target/i386/sse2-mmx-16.c: Likewise. - * gcc.target/i386/sse2-mmx-17.c: Likewise. - * gcc.target/i386/sse2-mmx-18a.c: Likewise. - * gcc.target/i386/sse2-mmx-18b.c: Likewise. - * gcc.target/i386/sse2-mmx-18c.c: Likewise. - * gcc.target/i386/sse2-mmx-19a.c: Likewise. - * gcc.target/i386/sse2-mmx-18b.c: Likewise. - * gcc.target/i386/sse2-mmx-19c.c: Likewise. - * gcc.target/i386/sse2-mmx-19d.c: Likewise. - * gcc.target/i386/sse2-mmx-19e.c: Likewise. - * gcc.target/i386/sse2-mmx-20.c: Likewise. - * gcc.target/i386/sse2-mmx-21.c: Likewise. - * gcc.target/i386/sse2-mmx-22.c: Likewise. - * gcc.target/i386/sse2-mmx-cvtpi2ps.c: Likewise. - * gcc.target/i386/sse2-mmx-cvtps2pi.c: Likewise. - * gcc.target/i386/sse2-mmx-cvttps2pi.c: Likewise. - * gcc.target/i386/sse2-mmx-maskmovq.c: Likewise. - * gcc.target/i386/sse2-mmx-packssdw.c: Likewise. - * gcc.target/i386/sse2-mmx-packsswb.c: Likewise. - * gcc.target/i386/sse2-mmx-packuswb.c: Likewise. - * gcc.target/i386/sse2-mmx-paddb.c: Likewise. - * gcc.target/i386/sse2-mmx-paddd.c: Likewise. - * gcc.target/i386/sse2-mmx-paddq.c: Likewise. - * gcc.target/i386/sse2-mmx-paddsb.c: Likewise. - * gcc.target/i386/sse2-mmx-paddsw.c: Likewise. - * gcc.target/i386/sse2-mmx-paddusb.c: Likewise. - * gcc.target/i386/sse2-mmx-paddusw.c: Likewise. - * gcc.target/i386/sse2-mmx-paddw.c: Likewise. - * gcc.target/i386/sse2-mmx-pand.c: Likewise. - * gcc.target/i386/sse2-mmx-pandn.c: Likewise. - * gcc.target/i386/sse2-mmx-pavgb.c: Likewise. - * gcc.target/i386/sse2-mmx-pavgw.c: Likewise. - * gcc.target/i386/sse2-mmx-pcmpeqb.c: Likewise. - * gcc.target/i386/sse2-mmx-pcmpeqd.c: Likewise. - * gcc.target/i386/sse2-mmx-pcmpeqw.c: Likewise. - * gcc.target/i386/sse2-mmx-pcmpgtb.c: Likewise. - * gcc.target/i386/sse2-mmx-pcmpgtd.c: Likewise. - * gcc.target/i386/sse2-mmx-pcmpgtw.c: Likewise. - * gcc.target/i386/sse2-mmx-pextrw.c: Likewise. - * gcc.target/i386/sse2-mmx-pinsrw.c: Likewise. - * gcc.target/i386/sse2-mmx-pmaddwd.c: Likewise. - * gcc.target/i386/sse2-mmx-pmaxsw.c: Likewise. - * gcc.target/i386/sse2-mmx-pmaxub.c: Likewise. - * gcc.target/i386/sse2-mmx-pminsw.c: Likewise. - * gcc.target/i386/sse2-mmx-pminub.c: Likewise. - * gcc.target/i386/sse2-mmx-pmovmskb.c: Likewise. - * gcc.target/i386/sse2-mmx-pmulhuw.c: Likewise. - * gcc.target/i386/sse2-mmx-pmulhw.c: Likewise. - * gcc.target/i386/sse2-mmx-pmullw.c: Likewise. - * gcc.target/i386/sse2-mmx-pmuludq.c: Likewise. - * gcc.target/i386/sse2-mmx-por.c: Likewise. - * gcc.target/i386/sse2-mmx-psadbw.c: Likewise. - * gcc.target/i386/sse2-mmx-pshufw.c: Likewise. - * gcc.target/i386/sse2-mmx-pslld.c: Likewise. - * gcc.target/i386/sse2-mmx-pslldi.c: Likewise. - * gcc.target/i386/sse2-mmx-psllq.c: Likewise. - * gcc.target/i386/sse2-mmx-psllqi.c: Likewise. - * gcc.target/i386/sse2-mmx-psllw.c: Likewise. - * gcc.target/i386/sse2-mmx-psllwi.c: Likewise. - * gcc.target/i386/sse2-mmx-psrad.c: Likewise. - * gcc.target/i386/sse2-mmx-psradi.c: Likewise. - * gcc.target/i386/sse2-mmx-psraw.c: Likewise. - * gcc.target/i386/sse2-mmx-psrawi.c: Likewise. - * gcc.target/i386/sse2-mmx-psrld.c: Likewise. - * gcc.target/i386/sse2-mmx-psrldi.c: Likewise. - * gcc.target/i386/sse2-mmx-psrlq.c: Likewise. - * gcc.target/i386/sse2-mmx-psrlqi.c: Likewise. - * gcc.target/i386/sse2-mmx-psrlw.c: Likewise. - * gcc.target/i386/sse2-mmx-psrlwi.c: Likewise. - * gcc.target/i386/sse2-mmx-psubb.c: Likewise. - * gcc.target/i386/sse2-mmx-psubd.c: Likewise. - * gcc.target/i386/sse2-mmx-psubq.c: Likewise. - * gcc.target/i386/sse2-mmx-psubusb.c: Likewise. - * gcc.target/i386/sse2-mmx-psubusw.c: Likewise. - * gcc.target/i386/sse2-mmx-psubw.c: Likewise. - * gcc.target/i386/sse2-mmx-punpckhbw.c: Likewise. - * gcc.target/i386/sse2-mmx-punpckhdq.c: Likewise. - * gcc.target/i386/sse2-mmx-punpckhwd.c: Likewise. - * gcc.target/i386/sse2-mmx-punpcklbw.c: Likewise. - * gcc.target/i386/sse2-mmx-punpckldq.c: Likewise. - * gcc.target/i386/sse2-mmx-punpcklwd.c: Likewise. - * gcc.target/i386/sse2-mmx-pxor.c: Likewise. - -2019-05-15 H.J. Lu - - PR target/89021 - * config/i386/i386-builtins.c (bdesc_tm): Enable MMX intrinsics - with SSE2. - -2019-05-15 H.J. Lu - - PR target/89021 - * gcc.target/i386/pr82483-1.c: Error only on ia32. - * gcc.target/i386/pr82483-2.c: Likewise. - -2019-05-15 Martin Liska - - PR middle-end/90478 - * gcc.dg/tree-ssa/pr90478-2.c: New test. - * gcc.dg/tree-ssa/pr90478.c: New test. - -2019-05-15 Richard Biener - - * gcc.dg/gimplefe-40.c: Amend. - -2019-05-15 Iain Sandoe - - * lib/target-supports.exp - (check_effective_target_powerpc_p8vector_ok): No support for Darwin. - (check_effective_target_powerpc_p9vector_ok): Likewise. - (check_effective_target_powerpc_float128_sw_ok): Likewise. - (check_effective_target_powerpc_float128_hw_ok): Likewise. - (check_effective_target_powerpc_vsx_ok): Likewise. - * gcc.target/powerpc/bfp/bfp.exp: Don't try to run this for Darwin. - * gcc.target/powerpc/dfp/dfp.exp: Likewise. - -2019-05-15 Iain Sandoe - - * gcc.dg/pr87600.h: Add __POWERPC__ as an alternate test - for PowerPC platforms. - -2019-05-15 Iain Sandoe - - PR target/82920 - * g++.dg/cet-notrack-1.C: Adjust scan assembler for Darwin. - * gcc.target/i386/cet-notrack-5a.c: Likewise. - * gcc.target/i386/cet-notrack-5b.c: Likewise. - * gcc.target/i386/cet-notrack-6b.c: Likewise. - * gcc.target/i386/cet-notrack-icf-1.c: Likewise. - * gcc.target/i386/cet-notrack-icf-2.c: Likewise. - * gcc.target/i386/cet-notrack-icf-3.c: Likewise. - * gcc.target/i386/cet-notrack-icf-4.c: Likewise. - * gcc.target/i386/cet-sjlj-3.c: Likewise. - * gcc.target/i386/cet-sjlj-5.c: Likewise. - -2019-05-14 Marek Polacek - - PR c++/68918 - * g++.dg/cpp0x/decltype71.C: New test. - - PR c++/70156 - * g++.dg/init/static5.C: New test. - -2019-05-14 Iain Sandoe - - PR target/82920 - * gcc.target/i386/cet-sjlj-6b.c: Require effective target x32. - * gcc.target/i386/pr52146.c: Likewise. - * gcc.target/i386/pr52698.c: Likewise. - * gcc.target/i386/pr52857-1.c: Likewise. - * gcc.target/i386/pr52857-2.c: Likewise. - * gcc.target/i386/pr52876.c: Likewise. - * gcc.target/i386/pr53698.c: Likewise. - * gcc.target/i386/pr54157.c: Likewise. - * gcc.target/i386/pr55049-1.c: Likewise. - * gcc.target/i386/pr55093.c: Likewise. - * gcc.target/i386/pr55116-1.c: Likewise. - * gcc.target/i386/pr55116-2.c: Likewise. - * gcc.target/i386/pr55597.c: Likewise. - * gcc.target/i386/pr59929.c: Likewise. - * gcc.target/i386/pr66470.c: Likewise. - -2019-05-14 Rainer Orth - - * gcc.dg/atomic/c11-atomic-exec-4.c: Simplify triplet to - *-*-solaris2*. - * gcc.dg/atomic/c11-atomic-exec-5.c: Likewise. - * gcc.dg/c99-math-double-1.c: Likewise. - * gcc.dg/c99-math-float-1.c: Likewise. - * gcc.dg/c99-math-long-double-1.c: Likewise. - * gcc.misc-tests/linkage.exp: Simplify triplet to - x86_64-*-solaris2*. - - * gcc.target/i386/mcount_pic.c: Remove *-*-solaris2.10* && !gld - xfail. - * gcc.target/i386/pr63620.c: Likewise. - - * lib/target-supports.exp (check_sse_os_support_available): Remove - Solaris 9/x86 workaround. - -2019-05-14 Richard Biener - - * gcc.dg/gimplefe-40.c: New testcase. - -2019-05-14 Paolo Carlini - - PR preprocessor/90382 - * g++.dg/diagnostic/trailing1.C: New test. - -2019-05-14 marxin - - PR middle-end/90340 - * gcc.dg/tree-ssa/pr90340-2.c: Add case-values-threshold - param. - -2019-05-14 Richard Biener - H.J. Lu - - PR tree-optimization/88828 - * gcc.target/i386/pr88828-1.c: New test. - * gcc.target/i386/pr88828-1a.c: Likewise. - * gcc.target/i386/pr88828-1b.c: Likewise. - * gcc.target/i386/pr88828-1c.c: Likewise. - * gcc.target/i386/pr88828-4a.c: Likewise. - * gcc.target/i386/pr88828-4b.c: Likewise. - * gcc.target/i386/pr88828-5a.c: Likewise. - * gcc.target/i386/pr88828-5b.c: Likewise. - * gcc.target/i386/pr88828-7.c: Likewise. - * gcc.target/i386/pr88828-7a.c: Likewise. - * gcc.target/i386/pr88828-7b.c: Likewise. - * gcc.target/i386/pr88828-8.c: Likewise. - * gcc.target/i386/pr88828-8a.c: Likewise. - * gcc.target/i386/pr88828-8b.c: Likewise. - * gcc.target/i386/pr88828-9.c: Likewise. - * gcc.target/i386/pr88828-9a.c: Likewise. - * gcc.target/i386/pr88828-9b.c: Likewise. - -2019-05-14 Przemyslaw Wirkus - - * gcc.target/aarch64/signbitv4sf.c: New test. - * gcc.target/aarch64/signbitv2sf.c: New test. - -2019-05-13 Jonathan Wakely - - * g++.dg/cpp0x/Wattributes1.C: Adjust dg-error line number to fix - regression, by matching a note on any line. - * g++.dg/cpp0x/Wattributes2.C: Add another copy that checks the - correct line number is matched without depending on a library header. - -2019-05-13 Richard Biener - - PR tree-optimization/90402 - * gcc.dg/torture/pr90402-1.c: New testcase. - -2019-05-12 Iain Sandoe - Dominique d'Humieres - - PR target/82920 - * gcc.target/i386/indirect-thunk-1.c: Adjust scan-asms for Darwin, - do not use -fno-pic on Darwin. - * gcc.target/i386/indirect-thunk-2.c: Likewise. - * gcc.target/i386/indirect-thunk-3.c: Likewise. - * gcc.target/i386/indirect-thunk-4.c: Likewise. - * gcc.target/i386/indirect-thunk-7.c: Likewise. - * gcc.target/i386/indirect-thunk-attr-1.c: Likewise. - * gcc.target/i386/indirect-thunk-attr-2.c: Likewise. - * gcc.target/i386/indirect-thunk-attr-3.c: Likewise. - * gcc.target/i386/indirect-thunk-attr-4.c: Likewise. - * gcc.target/i386/indirect-thunk-attr-5.c: Likewise. - * gcc.target/i386/indirect-thunk-attr-6.c: Likewise. - * gcc.target/i386/indirect-thunk-attr-7.c: Likewise. - * gcc.target/i386/indirect-thunk-attr-8.c: Likewise. - * gcc.target/i386/indirect-thunk-extern-1.c: Likewise. - * gcc.target/i386/indirect-thunk-extern-2.c: Likewise. - * gcc.target/i386/indirect-thunk-extern-3.c: Likewise. - * gcc.target/i386/indirect-thunk-extern-4.c: Likewise. - * gcc.target/i386/indirect-thunk-extern-7.c: Likewise. - * gcc.target/i386/indirect-thunk-inline-1.c: Likewise. - * gcc.target/i386/indirect-thunk-inline-2.c: Likewise. - * gcc.target/i386/indirect-thunk-inline-3.c: Likewise. - * gcc.target/i386/indirect-thunk-inline-4.c: Likewise. - * gcc.target/i386/indirect-thunk-inline-7.c: Likewise. - * gcc.target/i386/indirect-thunk-register-1.c: Likewise. - * gcc.target/i386/indirect-thunk-register-2.c: Likewise. - * gcc.target/i386/indirect-thunk-register-3.c: Likewise. - * gcc.target/i386/indirect-thunk-register-4.c: Likewise. - * gcc.target/i386/ret-thunk-1.c: Likewise. - * gcc.target/i386/ret-thunk-10.c: Likewise. - * gcc.target/i386/ret-thunk-11.c: Likewise. - * gcc.target/i386/ret-thunk-12.c: Likewise. - * gcc.target/i386/ret-thunk-13.c: Likewise. - * gcc.target/i386/ret-thunk-14.c: Likewise. - * gcc.target/i386/ret-thunk-15.c: Likewise. - * gcc.target/i386/ret-thunk-16.c: Likewise. - * gcc.target/i386/ret-thunk-2.c: Likewise. - * gcc.target/i386/ret-thunk-22.c: Likewise. - * gcc.target/i386/ret-thunk-23.c: Likewise. - * gcc.target/i386/ret-thunk-24.c: Likewise. - * gcc.target/i386/ret-thunk-3.c: Likewise. - * gcc.target/i386/ret-thunk-4.c: Likewise. - * gcc.target/i386/ret-thunk-5.c: Likewise. - * gcc.target/i386/ret-thunk-6.c: Likewise. - * gcc.target/i386/ret-thunk-7.c: Likewise. - * gcc.target/i386/ret-thunk-8.c: Likewise. - * gcc.target/i386/ret-thunk-9.c: Likewise. - -2019-05-11 Iain Sandoe - - PR testsuite/81058 - * gcc.target/i386/avx512bw-vpmovswb-1.c: Use regular data section - for variables on Darwin, rather than common. - * gcc.target/i386/avx512bw-vpmovuswb-1.c: Likewise. - * gcc.target/i386/avx512bw-vpmovwb-1.c: Likewise. - -2019-05-11 Paolo Carlini - - * g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C: New. - * g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C: Likewise. - -2019-05-10 Thomas Koenig - - PR fortran/61968 - * gfortran.dg/assumed_type_10.f90: New test case. - * gfortran.dg/assumed_type_11.f90: New test case. - -2019-05-10 Iain Sandoe - - * gcc.target/x86_64/abi/avx512f/abi-avx512f.exp: Darwin is - now tested. - * gcc.target/x86_64/abi/avx512f/asm-support-darwin.s: New. - -2019-05-10 Paolo Carlini - - * g++.dg/diagnostic/main1.C: New. - -2019-05-10 Marek Polacek - - PR c++/78010 - bogus -Wsuggest-override warning on final function. - * g++.dg/warn/Wsuggest-override-2.C: New test. - -2019-05-10 Jakub Jelinek - - PR tree-optimization/90385 - * gfortran.dg/pr90385.f90: New test. - - PR c++/90383 - * g++.dg/cpp1y/constexpr-90383-1.C: New test. - * g++.dg/cpp1y/constexpr-90383-2.C: New test. - -2019-05-10 Paul Thomas - - PR fortran/90093 - * gfortran.dg/ISO_Fortran_binding_12.f90: New test. - * gfortran.dg/ISO_Fortran_binding_12.c: Supplementary code. - - PR fortran/90352 - * gfortran.dg/iso_c_binding_char_1.f90: New test. - - PR fortran/90355 - * gfortran.dg/ISO_Fortran_binding_4.f90: Add 'substr' to test - the direct passing of substrings as descriptors to bind(C). - * gfortran.dg/assign_10.f90: Increase the tree_dump count of - 'atmp' to account for the setting of the 'span' field. - * gfortran.dg/transpose_optimization_2.f90: Ditto. - -2019-05-10 Jakub Jelinek - - PR tree-optimization/88709 - PR tree-optimization/90271 - * gcc.dg/store_merging_29.c: Allow 4 stores to replace 6 stores on - arm*-*-*. - - PR pch/90326 - * g++.dg/pch/pr90326.C: New test. - * g++.dg/pch/pr90326.Hs: New file. - -2019-05-10 Martin Liska - - PR middle-end/90340 - * gcc.dg/tree-ssa/pr90340-2.c: New test. - * gcc.dg/tree-ssa/pr90340.c: New test. - -2019-05-09 Cherry Zhang - - * go.dg/mapstring.go: New test. - -2019-05-09 Richard Earnshaw - - PR target/90405 - * gcc.target/arm/pr90405.c: New test. - -2019-05-09 Martin Liska - - * gcc.dg/gimplefe-39.c: New test. - -2019-05-09 Martin Liska - - * gcc.dg/gimplefe-37.c: New test. - * gcc.dg/gimplefe-33.c: Likewise. - -2019-05-09 Paolo Carlini - - PR c++/90382 - Revert: - 2018-04-26 Paolo Carlini - - * g++.dg/diagnostic/trailing1.C: New. - -2019-05-09 Richard Biener - - PR tree-optimization/90395 - * gcc.dg/torture/pr90395.c: New testcase. - -2019-05-08 Cherry Zhang - - * go.dg/cmpstring.go: New test. - -2019-05-08 Jakub Jelinek - - PR c++/59813 - PR tree-optimization/89060 - * gcc.dg/tree-ssa/pr89060.c: New test. - -2019-05-08 Mihail Ionescu - Richard Earnshaw - - PR target/88167 - * gcc.target/arm/pr88167-1.c: New test. - * gcc.target/arm/pr88167-2.c: New test. - -2018-05-08 Bin Cheng - - PR tree-optimization/90078 - * g++.dg/tree-ssa/pr90078.C: New test. - -2018-05-08 Bin Cheng - - PR tree-optimization/90240 - * gfortran.dg/graphite/pr90240.f: New test. - -2019-05-08 Li Jia He - - PR other/90381 - * gcc.dg/tree-ssa/pr88676-2.c: Add 'target le' option to limit the - test case to run on the little endian machine. - -2019-05-08 Jakub Jelinek - - PR tree-optimization/90356 - * gcc.dg/tree-ssa/pr90356-1.c: New test. - * gcc.dg/tree-ssa/pr90356-2.c: New test. - * gcc.dg/tree-ssa/pr90356-3.c: New test. - * gcc.dg/tree-ssa/pr90356-4.c: New test. - -2019-05-07 Wei Xiao - - * gcc.target/i386/avx512bf16-vcvtne2ps2bf16-1.c: New test. - * gcc.target/i386/avx512bf16-vcvtneps2bf16-1.c: New test. - * gcc.target/i386/avx512bf16-vdpbf16ps-1.c: New test. - * gcc.target/i386/avx512bf16vl-vcvtne2ps2bf16-1.c: New test. - * gcc.target/i386/avx512bf16vl-vcvtneps2bf16-1.c: New test. - * gcc.target/i386/avx512bf16vl-vdpbf16ps-1.c: New test. - * gcc.target/i386/builtin_target.c: Handle avx512bf16. - * gcc.target/i386/sse-12.c: Add -mavx512bf16. - * gcc.target/i386/sse-13.c: Ditto. - * gcc.target/i386/sse-14.c: Ditto. - * gcc.target/i386/sse-22.c: Ditto. - * gcc.target/i386/sse-23.c: Ditto. - * g++.dg/other/i386-2.C: Ditto. - * g++.dg/other/i386-3.C: Ditto. - -2019-05-07 Cherry Zhang - - * go.dg/arrayclear.go: New test. - * go.dg/mapclear.go: New test. - -2019-05-07 Kelvin Nilsen - - PR target/89765 - * gcc.target/powerpc/pr89765-mc.c: New test. - * gcc.target/powerpc/vsx-builtin-10c.c: New test. - * gcc.target/powerpc/vsx-builtin-10d.c: New test. - * gcc.target/powerpc/vsx-builtin-11c.c: New test. - * gcc.target/powerpc/vsx-builtin-11d.c: New test. - * gcc.target/powerpc/vsx-builtin-12c.c: New test. - * gcc.target/powerpc/vsx-builtin-12d.c: New test. - * gcc.target/powerpc/vsx-builtin-13c.c: New test. - * gcc.target/powerpc/vsx-builtin-13d.c: New test. - * gcc.target/powerpc/vsx-builtin-14c.c: New test. - * gcc.target/powerpc/vsx-builtin-14d.c: New test. - * gcc.target/powerpc/vsx-builtin-15c.c: New test. - * gcc.target/powerpc/vsx-builtin-15d.c: New test. - * gcc.target/powerpc/vsx-builtin-16c.c: New test. - * gcc.target/powerpc/vsx-builtin-16d.c: New test. - * gcc.target/powerpc/vsx-builtin-17c.c: New test. - * gcc.target/powerpc/vsx-builtin-17d.c: New test. - * gcc.target/powerpc/vsx-builtin-18c.c: New test. - * gcc.target/powerpc/vsx-builtin-18d.c: New test. - * gcc.target/powerpc/vsx-builtin-19c.c: New test. - * gcc.target/powerpc/vsx-builtin-19d.c: New test. - * gcc.target/powerpc/vsx-builtin-20c.c: New test. - * gcc.target/powerpc/vsx-builtin-20d.c: New test. - * gcc.target/powerpc/vsx-builtin-9c.c: New test. - * gcc.target/powerpc/vsx-builtin-9d.c: New test. - -2019-05-07 Alejandro Martinez - - * gcc.target/aarch64/sve/sad_1.c: New test for sum of absolute - differences. - -2019-05-07 Uroš Bizjak - - * gcc.target/i386/asm-7.c: New test. - * gcc.target/i386/asm-1.c: Update expected error string. - * gcc.target/i386/pr62120.c: Ditto. - -2019-05-07 Li Jia He - - * gcc.dg/tree-ssa/pr37508.c: Add the no-ssa-phiopt option to skip phi - optimization. - * gcc.dg/tree-ssa/pr88676-2.c: New testcase. - -2019-05-06 H.J. Lu - Hongtao Liu - - PR target/89750 - PR target/86444 - * gcc.target/i386/avx512f-vcomisd-2.c: New. - * gcc.target/i386/avx512f-vcomisd-2.c: Likewise. - -2019-05-06 Steven G. Kargl - - PR fortran/90290 - * gfortran.dg/pr90290.f90: New test. - -2019-05-06 Jakub Jelinek - - PR tree-optimization/88709 - PR tree-optimization/90271 - * gcc.dg/store_merging_26.c: New test. - * gcc.dg/store_merging_27.c: New test. - * gcc.dg/store_merging_28.c: New test. - * gcc.dg/store_merging_29.c: New test. - -2019-05-06 Kelvin Nilsen - - PR target/89424 - * gcc.target/powerpc/pr89424-0.c: New test. - * gcc.target/powerpc/vsx-builtin-13a.c: Define macro PR89424 to - enable testing of newly patched capability. - * gcc.target/powerpc/vsx-builtin-13b.c: Likewise. - * gcc.target/powerpc/vsx-builtin-20a.c: Likewise. - * gcc.target/powerpc/vsx-builtin-20b.c: Likewise. - -2019-05-06 Marek Polacek - - PR c++/90265 - ICE with generic lambda. - * g++.dg/cpp1y/lambda-generic-90265.C: New test. - -2019-05-06 Richard Biener - - PR tree-optimization/90358 - * gcc.target/i386/pr90358.c: New testcase. - -2019-05-06 Richard Biener - - PR tree-optimization/88828 - * gcc.target/i386/pr88828-0.c: New testcase. - -2019-05-06 Richard Biener - - PR tree-optimization/90328 - * gcc.dg/torture/pr90328.c: New testcase. - -2019-05-06 Richard Biener - - PR testsuite/90331 - * gcc.dg/pr87314-1.c: Align the substring to open up - string merging for targets aligning strings to 8 bytes. - -2019-05-06 Martin Liska - - PR sanitizer/90312 - * gcc.dg/asan/pr87930.c: Run the test only on *linux or *gnu - systems. - * gcc.dg/tsan/pr88017.c: Likewise. - -2019-05-05 Thomas Koenig - - PR fortran/90344 - * gfortran.dg/pr90344.f90: New test - -2019-05-03 Marc Glisse - - PR tree-optimization/90269 - * g++.dg/tree-ssa/ldist-1.C: New file. - -2019-05-03 Richard Biener - - * gcc.dg/vect/slp-reduc-sad-2.c: New testcase. - -2019-05-03 Richard Biener - - PR middle-end/89518 - * gcc.dg/pr89518.c: New testcase. - -2019-05-03 Richard Biener - - PR middle-end/87314 - * gcc.dg/pr87314-1.c: New testcase. - -2019-05-03 Richard Biener - - PR tree-optimization/88963 - * gcc.dg/tree-ssa/ssa-fre-31.c: Disable forwprop. - * gcc.target/i386/pr88963-1.c: New testcase. - * gcc.target/i386/pr88963-2.c: Likewise. - -2019-05-03 Dominique d'Humieres - - PR target/88809 - * gcc.target/i386/pr88809.c: Adjust for darwin. - * gcc.target/i386/pr88809-2.c: Adjust for i386 and darwin. - -2019-05-03 Jakub Jelinek - - PR tree-optimization/90303 - * g++.target/i386/pr90303.C: New test. - -2019-05-03 Richard Biener - - PR tree-optimization/89698 - * g++.dg/tree-ssa/pr89698.C: New testcase. - -2019-05-02 Iain Sandoe - - * g++.dg/ext/instantiate2.C: Remove special-casing for Darwin. - -2019-05-02 Richard Biener - - PR tree-optimization/89653 - * g++.dg/vect/pr89653.cc: New testcase. - -2019-05-02 Richard Biener - - PR tree-optimization/89509 - * gcc.dg/torture/restrict-8.c: New testcase. - -2019-05-02 Iain Sandoe - - * gcc.dg/tree-prof/section-attr-1.c: Update scan-asm regex - for cold section label. - * gcc.dg/tree-prof/section-attr-2.c: Likewise. - * gcc.dg/tree-prof/section-attr-3.c: Likewise. - -2019-05-02 Rainer Orth - - * gcc.target/i386/spellcheck-options-5.c: Restrict to Linux and - GNU targets. - -2019-05-02 Alejandro Martinez - - * gcc.target/aarch64/sve/dot_1.c: New test for dot product. - -2019-05-02 Martin Liska - - * gcc.target/i386/funcspec-4.c: Update scanned pattern. - * g++.target/i386/pr57362.C: Likewise. - -2019-05-02 Martin Liska - - PR target/88809 - * gcc.target/i386/pr88809.c: New test. - * gcc.target/i386/pr88809-2.c: New test. - -2019-05-01 Dominique d'Humieres - - PR fortran/60144 - * gfortran.dg/block_name_2.f90: Adjust dg-error. - * gfortran.dg/dec_type_print_3.f90.f90: Likewise. - * gfortran.dg/pr60144.f90: New test. - -2019-05-01 Jeff Law - - PR tree-optimization/90037 - * g++.dg/tree-ssa/pr88797.C: New test. - -2019-05-01 Nathan Sidwell - - * g++.dg/cpp0x/decltype9.C: Adjust expected diagnostics. - -2019-04-30 Jakub Jelinek - - PR target/89093 - * gcc.target/aarch64/return_address_sign_3.c: Remove extra space in - target attribute. - -2019-04-30 Giuliano Belinassi - - * gcc.dg/sinhatanh-2.c: Count the number of functions. - * gcc.dg/sinhatanh-3.c: Likewise. - -2019-04-30 Martin Liska - - * gcc.dg/Werror-13.c: Add new tests for it. - * gcc.dg/pragma-diag-6.c: Likewise. - -2019-04-30 Jakub Jelinek - - PR target/89093 - * gcc.target/aarch64/pr89093.c: New test. - * gcc.target/aarch64/pr63304_1.c: Remove space from target string. - - PR tree-optimization/89475 - * gcc.dg/tree-ssa/pr89475.c: New test. - -2019-04-30 Bin Cheng - - PR tree-optimization/90240 - Revert: - 2019-04-23 Bin Cheng - - PR tree-optimization/90078 - * g++.dg/tree-ssa/pr90078.C: New test. - -2019-04-29 Vladislav Ivanishin - - * gcc.dg/uninit-25-gimple.c: New test. - * gcc.dg/uninit-25.c: New test. - * gcc.dg/uninit-26.c: New test. - * gcc.dg/uninit-27-gimple.c: New test. - -2019-04-29 Richard Biener - - PR tree-optimization/90278 - * gcc.dg/torture/pr90278.c: New testcase. - -2019-04-27 Jakub Jelinek - - PR c++/90173 - * g++.dg/cpp1z/class-deduction66.C: Use dg-do compile instead of - dg-do run. - -2019-04-27 Uroš Bizjak - - PR target/89261 - * gcc.target/i386/pr89261.c: New test. - -2019-04-27 Martin Liska - - PR middle-end/90258 - * gcc.dg/completion-5.c: New test. - * gcc.target/i386/spellcheck-options-5.c: New test. - -2019-04-26 Jim Wilson - - * gcc.target/riscv/load-immediate.c: New. - -2019-04-26 Jonathan Wakely - - PR c++/90243 - * g++.dg/diagnostic/pr90243.C: New test. - -2019-04-26 Paolo Carlini - - PR c++/90173 - * g++.dg/cpp1z/class-deduction66.C: New. - -2019-04-26 Paolo Carlini - - * g++.dg/diagnostic/trailing1.C: New. - -2019-04-26 Richard Sandiford - - * gcc.dg/alias-16.c: New test. - -2019-04-25 Martin Liska - H.J. Lu - - PR target/89929 - * g++.target/i386/mv28.C: New test. - * gcc.target/i386/mvc14.c: Likewise. - * g++.target/i386/pr57362.C: Updated. - -2019-04-24 Jeff Law - - PR tree-optimization/90037 - * gcc.dg/tree-ssa/20030710-1.c: Update dump file to scan. - * gcc.dg/isolate-2.c: Likewise. - * gcc.dg/isolate-4.c: Likewise. - * gcc.dg/pr19431.c: Accept either ordering of PHI args. - * gcc.dg/pr90037.c: New test. - -2019-04-25 Jakub Jelinek - - PR c++/44648 - * g++.dg/warn/Wunused-var-35.C: Remove xfail. - -2019-04-25 Richard Biener - - PR middle-end/90194 - * g++.dg/torture/pr90194.C: New testcase. - -2019-04-24 Marek Polacek - - PR c++/90236 - * g++.dg/cpp1z/nontype-auto16.C: New test. - -2019-04-24 Jakub Jelinek - - PR target/90193 - * gcc.target/i386/pr90193.c: New test. - -2019-04-24 Andreas Krebbel - - PR target/89952 - * gcc.target/s390/pr89952.c: New test. - -2019-04-24 Jakub Jelinek - - PR target/90187 - * g++.target/i386/pr90187.C: New test. - -2019-04-24 Iain Buclaw - - * gdc.test/README.gcc: New file. - -2019-04-24 Jakub Jelinek - - PR tree-optimization/90208 - * gcc.dg/tsan/pr90208-1.c: New test. - * gcc.dg/tsan/pr90208-2.c: New test. - - PR tree-optimization/90211 - * gcc.dg/autopar/pr90211.c: New test. - -2019-04-23 Iain Buclaw - Robin Dapp - - * gdc.dg/link.d: Test if target d_runtime. - * gdc.dg/runnable.d: Fix tests to work on BigEndian. - * gdc.dg/simd.d: Likewise. - -2019-04-23 Iain Buclaw - - * gdc.test/fail_compilation/fail2456.d: New test. - * gdc.test/fail_compilation/test18312.d: New test. - * gdc.test/gdc-test.exp (gdc-convert-args): Handle -betterC. - -2018-04-23 Sudakshina Das - - * gcc.target/aarch64/bti-1.c: Add scan directive for gnu note section - for linux targets. - * gcc.target/aarch64/va_arg_1.c: Update scan directive to not clash - with GNU note section. - -2019-04-23 Jeff Law - - * lib/target-supports.exp - (check_effective_target_keeps_null_pointer_checks): Add cr16. - -2019-04-23 Roman Zhuykov - - PR rtl-optimization/87979 - * gcc.dg/pr87979.c: New test. - -2019-04-23 Roman Zhuykov - - PR rtl-optimization/84032 - * gcc.dg/pr84032.c: New test. - -2018-04-23 Bin Cheng - - PR tree-optimization/90078 - * g++.dg/tree-ssa/pr90078.C: New test. - -2018-04-23 Bin Cheng - - PR tree-optimization/90021 - * gfortran.dg/pr90021.f90: New test. - -2019-04-22 Steven G. Kargl - - PR fortran/90166 - * gfortran.dg/submodule_22.f08: Add additional dg-error comments. - -2019-04-22 Paul Thomas - - PR fortran/57284 - * gfortran.dg/class_70.f03 - -2019-04-21 H.J. Lu - - PR target/90178 - * gcc.target/i386/pr90178.c: New test. - -2019-04-20 Sandra Loosemore - - * g++.dg/ipa/pr89009.C: Add dg-require-effective-target fpic. - -2019-04-19 Paolo Carlini - - PR c++/89900 - * g++.dg/cpp0x/pr89900-1.C: New. - * g++.dg/cpp0x/pr89900-2.C: Likewise. - * g++.dg/cpp0x/pr89900-3.C: Likewise. - * g++.dg/cpp0x/pr89900-4.C: Likewise. - -2019-04-19 Jakub Jelinek - - PR middle-end/90139 - * gcc.c-torture/compile/pr90139.c: New test. - - PR c++/90138 - * g++.dg/template/pr90138.C: New test. - - PR c/89888 - * c-c++-common/pr89888.c: New test. - * g++.dg/torture/pr40335.C: Change dg-bogus into dg-warning. - Don't expect -Wswitch-unreachable warning. - - PR c++/90108 - * c-c++-common/pr90108.c: New test. - -2019-04-18 Richard Sandiford - - PR middle-end/85164 - * gcc.dg/pr85164-1.c, gcc.dg/pr85164-2.c: New tests. - -2019-04-18 Richard Biener - - PR debug/90131 - * gcc.dg/guality/pr90131.c: New testcase. - -2019-04-17 Jakub Jelinek - - PR c++/89325 - * g++.dg/ext/attrib58.C: New test. - * g++.dg/ext/attrib59.C: New test. - * g++.dg/ext/attrib60.C: New test. - - PR target/90125 - * gcc.target/i386/avx512f-vfmsubXXXss-2.c (avx512f_test): Adjust - constants to ensure precise result even when not using fma. - * gcc.target/i386/avx512f-vfnmaddXXXss-2.c (avx512f_test): Likewise. - * gcc.target/i386/avx512f-vfmaddXXXsd-3.c: New test. - * gcc.target/i386/avx512f-vfmaddXXXss-3.c: New test. - * gcc.target/i386/avx512f-vfmsubXXXsd-3.c: New test. - * gcc.target/i386/avx512f-vfmsubXXXss-3.c: New test. - * gcc.target/i386/avx512f-vfnmaddXXXsd-3.c: New test. - * gcc.target/i386/avx512f-vfnmaddXXXss-3.c: New test. - * gcc.target/i386/avx512f-vfnmsubXXXsd-3.c: New test. - * gcc.target/i386/avx512f-vfnmsubXXXss-3.c: New test. - -2019-04-17 Marek Polacek - - PR c++/90124 - bogus error with incomplete type in decltype. - * g++.dg/cpp0x/decltype70.C: New test. - -2019-04-17 Jakub Jelinek - - PR middle-end/90095 - * gcc.dg/pr90095-1.c: New test. - * gcc.dg/pr90095-2.c: New test. - -2019-04-17 Thomas Schwinge - - PR fortran/90048 - * gfortran.dg/goacc/private-explicit-kernels-1.f95: New file. - * gfortran.dg/goacc/private-explicit-parallel-1.f95: Likewise. - * gfortran.dg/goacc/private-explicit-routine-1.f95: Likewise. - - PR fortran/90067 - PR fortran/90114 - * gfortran.dg/goacc/private-1.f95: Remove file. - * gfortran.dg/goacc/private-2.f95: Likewise. - * gfortran.dg/goacc/private-predetermined-kernels-1.f95: New file. - * gfortran.dg/goacc/private-predetermined-parallel-1.f95: - Likewise. - * gfortran.dg/goacc/private-predetermined-routine-1.f95: Likewise. - -2019-04-17 Jakub Jelinek - - PR target/89093 - * gcc.target/arm/pr89093-2.c: New test. - -2019-04-16 Jakub Jelinek - - PR c++/86953 - * g++.dg/cpp0x/constexpr-86953.C: New test. - -2019-04-16 Dominique d'Humieres - - * g++.dg/lto/pr89358_0.C: Replace dg-* with dg-lto-*. - -2019-04-16 Alexandre Oliva - - PR debug/89528 - * gcc.dg/guality/pr89528.c: New. - - PR rtl-optimization/86438 - * gcc.dg/torture/pr86438.c: Split up too-wide shift. - -2019-04-16 Jakub Jelinek - - PR target/90096 - * gcc.target/i386/pr90096.c: New test. - * gcc.target/i386/pr69255-1.c: Adjust expected diagnostics. - * gcc.target/i386/pr69255-2.c: Likewise. - * gcc.target/i386/pr69255-3.c: Likewise. - - PR rtl-optimization/90082 - * gcc.dg/pr90082.c: New test. - - PR tree-optimization/90090 - * g++.dg/opt/pr90090.C: New test. - -2019-04-16 Richard Biener - - PR tree-optimization/56049 - * gfortran.dg/pr56049.f90: New testcase. - -2019-04-15 Richard Biener - - PR debug/90074 - * gcc.dg/guality/pr90074.c: New testcase. - -2019-04-15 Richard Biener - - PR tree-optimization/90071 - * gcc.dg/torture/pr90071.c: New testcase. - -2019-04-15 Segher Boessenkool - - PR rtl-optimization/89794 - * gcc.dg/torture/pr89794.c: New testcase. - -2019-04-15 Richard Biener - - PR ipa/88936 - * gcc.dg/torture/pr88936-1.c: New testcase. - * gcc.dg/torture/pr88936-2.c: Likewise. - * gcc.dg/torture/pr88936-3.c: Likewise. - -2019-04-15 Martin Jambor - - PR ipa/pr89693 - * g++.dg/ipa/pr89693.C: New test. - -2019-04-15 Dominique d'Humieres - - PR tree-optimization/90020 - * gcc.dg/torture/pr90020.c: Add linker options for darwin. - -2019-04-14 Jan Hubicka - - PR lto/89358 - * g++.dg/lto/pr89358_0.C: New testcase. - * g++.dg/lto/pr89358_1.C: New testcase. - -2019-04-14 Thomas Koenig - - PR fortran/85448 - * gfortran.dg/bind_c_usage_33.f90: New test and... - * gfortran.dg/bind_c_usage_33_c.c: Additional source. - -2019-04-14 Paul Thomas - - PR fortran/89843 - * gfortran.dg/ISO_Fortran_binding_4.f90: Modify the value of x - in ctg. Test the conversion of the descriptor types in the main - program. - * gfortran.dg/ISO_Fortran_binding_10.f90: New test. - * gfortran.dg/ISO_Fortran_binding_10.c: Called by it. - - PR fortran/89846 - * gfortran.dg/ISO_Fortran_binding_11.f90: New test. - * gfortran.dg/ISO_Fortran_binding_11.c: Called by it. - - PR fortran/90022 - * gfortran.dg/ISO_Fortran_binding_1.c: Correct the indexing for - the computation of 'ans'. Also, change the expected results for - CFI_is_contiguous to comply with standard. - * gfortran.dg/ISO_Fortran_binding_1.f90: Correct the expected - results for CFI_is_contiguous to comply with standard. - * gfortran.dg/ISO_Fortran_binding_9.f90: New test. - * gfortran.dg/ISO_Fortran_binding_9.c: Called by it. - -2019-04-13 Jakub Jelinek - - PR target/89093 - * gcc.target/arm/pr89093.c: New test. - -2019-04-12 Jakub Jelinek - - PR c/89933 - * c-c++-common/pr89933.c: New test. - -2019-04-12 Martin Sebor - - PR c/88383 - PR c/89288 - PR c/89798 - PR c/89797 - * c-c++-common/attributes-1.c: Adjust. - * c-c++-common/builtin-has-attribute-4.c: Adjust expectations. - * c-c++-common/builtin-has-attribute-6.c: New test. - * c-c++-common/builtin-has-attribute-7.c: New test. - * c-c++-common/pr71574.c: Adjust. - * gcc.dg/pr25559.c: Adjust. - * gcc.dg/attr-vector_size.c: New test. - -2019-04-12 Jakub Jelinek - - PR rtl-optimization/89965 - * gcc.target/i386/pr89965.c: New test. - -2019-04-12 Marek Polacek - - PR c++/87603 - constexpr functions are no longer noexcept. - * g++.dg/cpp0x/constexpr-noexcept.C: Adjust the expected result. - * g++.dg/cpp0x/constexpr-noexcept3.C: Likewise. - * g++.dg/cpp0x/constexpr-noexcept4.C: Likewise. - * g++.dg/cpp0x/constexpr-noexcept8.C: New test. - * g++.dg/cpp0x/inh-ctor32.C: Remove dg-message. - * g++.dg/cpp1y/constexpr-noexcept1.C: New test. - -2019-04-12 Marek Polacek - - * g++.dg/cpp0x/noexcept30.C: Tweak dg-error. - * g++.dg/cpp0x/pr86397-1.C: Likewise. - * g++.dg/cpp0x/pr86397-2.C: Likewise. - -2019-04-12 Matthew Malcomson - - * g++.target/arm/arm.exp: Change format of default prune regex. - * gcc.target/arm/arm.exp: Change format of default prune regex. - -2019-04-12 Martin Liska - - PR middle-end/89970 - * gcc.target/i386/mvc15.c: New test. - * gcc.target/i386/mvc3.c: Quote target in error pattern. - * gcc.target/i386/mvc4.c: Remove duplicit 'default'. - -2019-04-12 Kelvin Nilsen - - PR target/87532 - * gcc.target/powerpc/fold-vec-extract-char.p8.c: Adjust expected - instruction counts. - * gcc.target/powerpc/fold-vec-extract-int.p8.c: Likewise. - * gcc.target/powerpc/fold-vec-extract-short.p8.c: Likewise. - -2019-04-12 Jakub Jelinek - - PR c/89946 - * c-c++-common/pr89946.c: New test. - - PR rtl-optimization/90026 - * g++.dg/opt/pr90026.C: New test. - -2018-04-11 Steve Ellcey - - PR rtl-optimization/87763 - * gcc.target/aarch64/combine_bfxil.c: Change some bfxil checks - to bfi. - -2019-04-11 Richard Biener - - PR tree-optimization/90020 - * gcc.dg/torture/pr90020.c: New testcase. - -2019-04-11 Richard Biener - - PR tree-optimization/90018 - * gcc.dg/vect/pr90018.c: New testcase. - -2018-04-10 Steve Ellcey - - PR rtl-optimization/87763 - * gcc.target/aarch64/combine_bfxil.c: Change some bfxil checks - to bfi. - * gcc.target/aarch64/combine_bfi_2.c: New test. - -2019-04-10 Jakub Jelinek - - PR middle-end/90025 - * gcc.c-torture/execute/pr90025.c: New test. - - PR c++/90010 - * gcc.dg/pr90010.c: New test. - -2019-04-09 Uroš Bizjak - - * gcc.target/i386/ifcvt-onecmpl-abs-1.c - (dg-options): Use -O2 -fdump-rtl-ce1. - (dg-final): Scan ce1 RTL dump instead of asm dump. - -2019-04-09 Matthew Malcomson - - PR target/90024 - * gcc.dg/torture/neon-immediate-timode.c: New test. - -2019-04-09 Jakub Jelinek - - PR tree-optimization/89998 - * gcc.c-torture/compile/pr89998-1.c: New test. - * gcc.c-torture/compile/pr89998-2.c: New test. - - PR target/90015 - * gcc.target/riscv/interrupt-conflict-mode.c (foo): Adjust expected - diagnostics. - -2019-04-08 Richard Biener - - PR tree-optimization/90006 - * gcc.dg/vect/bb-slp-pr90006.c: New testcase. - -2019-04-08 Jakub Jelinek - - PR rtl-optimization/89865 - * gcc.target/i386/pr49095.c: Don't expect any RMW sequences. - - PR rtl-optimization/89865 - * gcc.target/i386/pr49095.c: Adjust number of expected RMW spots - on ia32. - -2019-04-01 Bin Cheng - - PR tree-optimization/89725 - * gcc.dg/tree-ssa/pr89725.c: New test. - -2019-04-08 Martin Liska - - * gcc.target/riscv/arch-1.c: Fix expected scanned pattern. - -2019-04-08 Paolo Carlini - - PR c++/89914 - * g++.dg/ext/has_nothrow_constructor-3.C: New. - -2019-04-07 Uroš Bizjak - - PR target/89945 - * gcc.target/i386/pr89945.c: New test. - -2019-04-06 Thomas Koenig - - PR fortran/87352 - * gfortran.dg/finalize_28.f90: Adjust count of __builtin_free. - * gfortran.dg/finalize_33.f90: Likewise. - * gfortran.dg/finalize_34.f90: New test. - -2019-04-06 Thomas Koenig - - PR fortran/89981 - * gfortran.dg/entry_22.f90: New test. - -2019-04-05 Marek Polacek - - PR c++/87145 - bogus error converting class type in template arg list. - * g++.dg/cpp0x/constexpr-conv3.C: New test. - * g++.dg/cpp0x/constexpr-conv4.C: New test. - -2019-04-05 Martin Sebor - - PR bootstrap/89980 - * g++.dg/init/array52.C: New test. - -2019-04-05 David Malcolm - - PR c/89985 - * c-c++-common/pr89985.c: New test. - -2019-04-05 Christophe Lyon - - PR c/71598 - * gcc.dg/torture/pr71598-1.c: dg-prune arm linker messages about - size of enums. - * gcc.dg/torture/pr71598-2.c: Likewise. - -2019-04-05 Marek Polacek - - PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion. - * g++.dg/warn/Waddress-of-packed-member2.C: New test. - -2019-04-05 Richard Biener - - PR debug/89892 - PR debug/89905 - * gcc.dg/guality/pr89892.c: New testcase. - * gcc.dg/guality/pr89905.c: Likewise. - * gcc.dg/guality/loop-1.c: Likewise. - -2019-04-05 Richard Sandiford - - PR tree-optimization/89956 - * gfortran.dg/pr89956.f90: New test. - -2019-04-04 Martin Sebor - - PR c++/89974 - PR c++/89878 - PR c++/89833 - PR c++/47488 - * g++.dg/abi/mangle69.C: New test. - * g++.dg/abi/mangle70.C: New test. - * g++.dg/abi/mangle71.C: New test. - * g++.dg/abi/mangle72.C: New test. - * g++.dg/cpp0x/constexpr-array19.C: New test. - * g++.dg/cpp2a/nontype-class15.C: New test. - * g++.dg/cpp2a/nontype-class16.C: New test. - * g++.dg/init/array51.C: New test. - * g++.dg/template/nontype29.C: New test. - -2019-04-04 Martin Sebor - - PR middle-end/89957 - PR middle-end/89911 - * gcc.dg/Wstringop-overflow-13.c: New test. - -2019-04-04 Martin Sebor - - PR middle-end/89934 - * gcc.dg/Wrestrict-19.c: New test. - * gcc.dg/Wrestrict-5.c: Add comment. Remove unused code. - -2019-04-04 Jeff Law - - PR rtl-optimization/89399 - * gcc.c-torture/compile/pr89399.c: New test. - -2019-04-04 Harald Anlauf - - PR fortran/89904 - * gfortran.dg/pr85797.f90: Adjust testcase. - -2019-04-04 Paolo Carlini - - PR c++/65619 - * g++.dg/template/friend67.C: New. - -2019-04-04 Paolo Carlini - - PR c++/61327 - * g++.dg/cpp0x/friend4.C: New. - * g++.dg/cpp0x/friend5.C: Likewise. - -2019-04-04 Paolo Carlini - - PR c++/56643 - * g++.dg/cpp0x/noexcept40.C: New. - -2019-04-03 Dominique d'Humieres - - PR fortran/68567 - * gfortran.dg/parameter_array_error_1.f90: New test. - -2019-04-03 qing zhao - - PR tree-optimization/89730 - * gcc.dg/live-patching-4.c: New test. - -2019-04-03 Clément Chigot - - * lib/go-torture.exp: Only add lto to TORTURE_OPTIONS if it is - supported. - -2019-04-03 Christophe Lyon - - PR c/71598 - * gcc.dg/torture/pr71598-1.c: Skip if short_enums target. - * gcc.dg/torture/pr71598-2.c: Skip if not short_enums target. - -2019-04-03 Richard Biener - - PR tree-optimization/84101 - * gcc.target/i386/pr84101.c: New testcase. - -2019-04-02 Jeff Law - - * gcc.target/visium/bit_shift.c: xfail. - -2019-04-02 Uroš Bizjak - - PR target/89902 - PR target/89903 - * gcc.target/i386/pr70799-4.c: Remove. - * gcc.target/i386/pr70799-5.c: Remove. - * gcc.target/i386/pr89902.c: New test. - * gcc.target/i386/pr89903.c: Ditto. - -2019-04-02 Andrey Belevantsev - - PR rtl-optimization/84206 - * gcc.dg/pr84206.c: New test. - -2019-04-02 Andrey Belevantsev - - PR rtl-optimization/85876 - * gcc.dg/pr85876.c: New test. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/zvector/vec-double-compile.c: New test. - * gcc.target/s390/zvector/vec-float-compile.c: New test. - * gcc.target/s390/zvector/vec-signed-compile.c: New test. - * gcc.target/s390/zvector/vec-unsigned-compile.c: New test. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/zvector/vec-search-string-cc-1.c: New test. - * gcc.target/s390/zvector/vec-search-string-cc-compile.c: New test. - * gcc.target/s390/zvector/vec-search-string-until-zero-cc-1.c: New test. - * gcc.target/s390/zvector/vec-search-string-until-zero-cc-compile.c: New test. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/zvector/vec-shift-left-double-by-bit-1.c: New test. - * gcc.target/s390/zvector/vec-shift-right-double-by-bit-1.c: New test. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/zvector/replicate-bswap-1.c: New test. - * gcc.target/s390/zvector/replicate-bswap-2.c: New test. - -2019-04-02 Alexander Monakov - - PR testsuite/89916 - * gcc.dg/pr86928.c: Do not attempt to add -m32. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/zvector/bswap-and-replicate-1.c: New test. - * gcc.target/s390/zvector/get-element-bswap-1.c: New test. - * gcc.target/s390/zvector/get-element-bswap-2.c: New test. - * gcc.target/s390/zvector/get-element-bswap-3.c: New test. - * gcc.target/s390/zvector/get-element-bswap-4.c: New test. - * gcc.target/s390/zvector/set-element-bswap-1.c: New test. - * gcc.target/s390/zvector/set-element-bswap-2.c: New test. - * gcc.target/s390/zvector/set-element-bswap-3.c: New test. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/zvector/vec-reve-load-byte-z14.c: New test. - * gcc.target/s390/zvector/vec-reve-load-byte.c: New test. - * gcc.target/s390/zvector/vec-reve-load-halfword-z14.c: New test. - * gcc.target/s390/zvector/vec-reve-load-halfword.c: New test. - * gcc.target/s390/zvector/vec-reve-store-byte-z14.c: New test. - * gcc.target/s390/zvector/vec-reve-store-byte.c: New test. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/zvector/vec-revb-load-double-z14.c: New test. - * gcc.target/s390/zvector/vec-revb-load-double.c: New test. - * gcc.target/s390/zvector/vec-revb-store-double-z14.c: New test. - * gcc.target/s390/zvector/vec-revb-store-double.c: New test. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/arch13/fp-signedint-convert-1.c: New test. - * gcc.target/s390/arch13/fp-unsignedint-convert-1.c: New test. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/arch13/sel-1.c: New test. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/arch13/popcount-1.c: New test. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/arch13/bitops-1.c: New test. - * gcc.target/s390/arch13/bitops-2.c: New test. - * gcc.target/s390/md/andc-splitter-1.c: Add -march=z14 build - option and adjust line numbers. - * gcc.target/s390/md/andc-splitter-2.c: Likewise. - -2019-04-02 Andreas Krebbel - - * gcc.target/s390/s390.exp: Run tests in arch13 subdir. - * lib/target-supports.exp (check_effective_target_s390_vxe2): New - runtime check for the vxe2 hardware feature on IBM Z. - -2019-04-01 H.J. Lu - - PR testsuite/89907 - * lib/target-supports.exp (check_avx2_available): Replace - avx_available with avx2_available. - -2019-04-01 Andrey Belevantsev - - PR rtl-optimization/85412 - * gcc.dg/pr85412.c: New test. - -2019-04-01 Paolo Carlini - - PR c++/62207 - * g++.dg/template/crash130.C: New. - * g++.dg/template/crash131.C: Likewise. - -2019-04-01 Martin Sebor - - PR c/89685 - * gcc.dg/attr-copy-8.c: New test. - * g++.dg/ext/attr-copy-2.C: New test. - -2019-04-01 Andrey Belevantsev - - PR rtl-optimization/86928 - * gcc.dg/pr86928.c: New test. - -2019-04-01 Andrey Belevantsev - - PR rtl-optimization/87273 - * gcc.dg/pr87273.c: New test. - -2019-04-01 Martin Liska - - PR driver/89861 - * gcc.dg/spellcheck-options-18.c: New test. - * gcc.dg/spellcheck-options-19.c: New test. - * gcc.dg/spellcheck-options-20.c: New test. - * gcc.dg/spellcheck-options-13.c: Adjust expected output. - * gcc.dg/completion-2.c: Add one variant with no argument. - -2019-04-01 Richard Biener - - PR c/71598 - * gcc.dg/torture/pr71598-1.c: New testcase. - * gcc.dg/torture/pr71598-2.c: Likewise. - * gcc.dg/torture/pr71598-3.c: Likewise. - -2019-03-31 Marek Polacek - - PR c++/89852 - ICE with C++11 functional cast with { }. - * g++.dg/cpp0x/initlist115.C: New test. - -2019-03-31 Harald Anlauf - - PR fortran/83515 - PR fortran/85797 - * gfortran.dg/pr85797.f90: New test. - -2019-03-31 Rainer Orth - - * gcc.dg/attr-aligned-3.c: Enable on *-*-solaris2.*. - -2019-03-30 Iain Buclaw - - * gdc.test/gdc-test.exp (gdc-copy-extra): Append copied files to - cleanup_extra_files. - (dmd2dg): Copy additional files after test is translated. - (gdc-do-test): Remove all copied files after test. - -2019-03-30 Paul Thomas - - PR fortran/89841 - * gfortran.dg/ISO_Fortran_binding_1.f90: Change the interfaces - for c_deallocate, c_allocate and c_assumed_size so that the - attributes of the array arguments are correct and are typed. - * gfortran.dg/ISO_Fortran_binding_7.f90: New test. - * gfortran.dg/ISO_Fortran_binding_7.c: Additional source. - - PR fortran/89842 - * gfortran.dg/ISO_Fortran_binding_8.f90: New test. - * gfortran.dg/ISO_Fortran_binding_8.c: Additional source. - -2019-03-30 Thomas Koenig - - PR fortran/89866 - * gfortran.dg/pointer_intent_8.f90: New test. - -2019-03-29 Jim Wilson - - * gcc.target/riscv/predef-1.c: New. - * gcc.target/riscv/predef-2.c: New. - * gcc.target/riscv/predef-3.c: New. - * gcc.target/riscv/predef-4.c: New. - * gcc.target/riscv/predef-5.c: New. - * gcc.target/riscv/predef-6.c: New. - * gcc.target/riscv/predef-7.c: New. - * gcc.target/riscv/predef-8.c: New. - -2019-03-29 Jakub Jelinek - - PR rtl-optimization/89865 - * gcc.target/i386/pr49095.c: Include in scan-assembler-times patterns - the first argument register, so that occassional spills/fills are - ignored. - - PR sanitizer/89869 - * g++.dg/ubsan/vptr-14.C: New test. - - PR c/89872 - * gcc.dg/tree-ssa/pr89872.c: New test. - -2019-03-29 Roman Zhuykov - - * gcc.dg/diag-sanity.c: New test. - -2019-03-29 Marek Polacek - - PR c++/89871 - * g++.dg/cpp2a/desig14.C: New test. - - PR c++/89876 - ICE with deprecated conversion. - * g++.dg/warn/conv5.C: New test. - -2019-03-29 Martin Liska - - * gcc.dg/ipa/ipa-icf-39.c: Prine '***dbgcnt' output. - * gcc.dg/pr68766.c: Likewise. - -2019-03-29 Jakub Jelinek - - PR rtl-optimization/87485 - * gcc.dg/pr87485.c: New test. - -2019-03-28 Jakub Jelinek - - PR middle-end/89621 - * gfortran.dg/gomp/pr89621.f90: New test. - -2019-03-28 Martin Sebor - - PR c++/66548 - * g++.dg/cpp0x/decltype-pr66548.C: New test. - - PR c++/81506 - * g++.dg/cpp0x/decltype-pr81506.C: New test. - -2019-03-28 Marek Polacek - - PR c++/89612 - ICE with member friend template with noexcept. - * g++.dg/cpp0x/noexcept38.C: New test. - * g++.dg/cpp0x/noexcept39.C: New test. - * g++.dg/cpp1z/noexcept-type21.C: New test. - -2019-03-28 Uroš Bizjak - - PR target/89848 - * gcc.target/i386/pr89848.c: New test. - -2019-03-28 Marek Polacek - - PR c++/89836 - bool constant expression and explicit conversions. - * g++.dg/cpp2a/explicit15.C: New test. - -2019-03-28 Jakub Jelinek - - PR c/89812 - * gcc.dg/attr-aligned-3.c: Limit the test to known ELF targets - other than AVR. Add dg-options "". - - PR c++/89785 - * g++.dg/cpp1y/constexpr-89785-1.C: New test. - * g++.dg/cpp1y/constexpr-89785-2.C: New test. - -2019-03-27 Janus Weil - - PR fortran/85537 - * gfortran.dg/dummy_procedure_11.f90: Fix test case. - * gfortran.dg/pointer_init_11.f90: New test case. - -2019-03-27 Mateusz B - - PR target/85667 - * gcc.target/i386/pr85667-5.c: New testcase. - * gcc.target/i386/pr85667-6.c: New testcase. - -2019-03-27 Bill Schmidt - - PR testsuite/89834 - * gcc.dg/vect/pr81740-2.c: Require vect_hw_misalign. - -2019-03-27 Peter Bergner - - PR rtl-optimization/89313 - * gcc.dg/pr89313.c: New test. - -2019-03-26 Jeff Law - - PR rtl-optimization/87761 - PR rtl-optimization/89826 - * gcc.c-torture/execute/pr89826.c: New test. - -2019-03-27 Richard Biener - - * gcc.dg/torture/20190327-1.c: New testcase. - -2019-03-27 Paul Thomas - - PR fortran/88247 - * gfortran.dg/associate_47.f90: New test. - -2019-03-27 Richard Biener - - PR tree-optimization/89463 - * gcc.dg/guality/pr89463.c: New testcase. - -2019-03-26 Uroš Bizjak - - PR target/89827 - * gcc.target/i386/pr89827.c: New test. - -2019-03-26 Rainer Orth - - * g++.dg/abi/lambda-static-1.C: Handle Solaris as comdat group - syntax. - -2019-03-26 Bin Cheng - - PR tree-optimization/81740 - * gcc.dg/vect/pr81740-1.c: New testcase. - * gcc.dg/vect/pr81740-2.c: Likewise. - -2019-03-26 Iain Buclaw - - * gdc.test/gdc-test.exp (gdc-do-test): Sort and remove duplicate - options in permute args tests. - -2019-03-26 Paolo Carlini - - PR c++/84598 - * g++.dg/ext/pr84598.C: New. - -2019-03-26 Jakub Jelinek - - PR c++/89796 - * g++.dg/gomp/pr89796.C: New test. - * gcc.dg/gomp/pr89796.c: New test. - -2019-03-25 David Malcolm - - PR rtl-optimization/88347 - PR rtl-optimization/88423 - * gcc.c-torture/compile/pr88347.c: New test. - * gcc.c-torture/compile/pr88423.c: New test. - -2019-03-25 Martin Sebor - - PR c/89812 - * gcc.dg/attr-aligned-3.c: New test. - -2019-03-25 Johan Karlsson - - PR debug/86964 - * gcc.dg/debug/dwarf2/pr86964.c: New testcase. - -2019-03-25 Paolo Carlini - - PR c++/84661 - PR c++/85013 - * g++.dg/concepts/pr84661.C: New. - * g++.dg/torture/pr85013.C: Likewise. - -2019-03-25 Marek Polacek - - PR c++/89214 - ICE when initializing aggregates with bases. - * g++.dg/cpp1z/aggr-base8.C: New test. - * g++.dg/cpp1z/aggr-base9.C: New test. - - PR c++/89705 - ICE with reference binding with conversion function. - * g++.dg/cpp0x/rv-conv2.C: New test. - -2019-03-25 Richard Biener - - PR tree-optimization/89789 - * gcc.dg/torture/pr89789.c: New testcase. - -2019-03-25 Nathan Sidwell - - * g++.dg/abi/lambda-static-1.C: New. - -2019-03-25 Richard Biener - - PR tree-optimization/89802 - * g++.dg/tree-ssa/pr89802.C: New testcase. - -2019-03-25 Jakub Jelinek - - PR c++/60702 - * g++.dg/tls/thread_local11.C: Remove scan-tree-dump-times directives - for _ZTH* calls. - * g++.dg/tls/thread_local11a.C: New test. - -2019-03-25 Richard Biener - - PR middle-end/89790 - * g++.dg/pr89790.C: New testcase. - -2019-03-24 Uroš Bizjak - - * gcc.target/i386/pr82281.c: Compile only for ia32 effective target. - (dg-options): Remove -m32. Add -msse2 -mtune=znver1. - * gcc.target/i386/pr89676.c: Compile only for ia32 effective target. - (dg-options): Remove -m32 and -march=i686. Add -mno-stv. - -2019-03-24 Thomas Koenig - - PR fortran/78865 - * gfortran.dg/altreturn_10.f90: New test. - * gfortran.dg/whole_file_3.f90: Change dg-warning to dg-error. - -2019-03-22 Vladimir Makarov - - PR rtl-optimization/89676 - * gcc.target/i386/pr89676.c: New. - -2019-03-22 Jakub Jelinek - - PR c++/60702 - * g++.dg/tls/thread_local11.C: New test. - * g++.dg/tls/thread_local11.h: New test. - * g++.dg/tls/thread_local12a.C: New test. - * g++.dg/tls/thread_local12b.C: New test. - * g++.dg/tls/thread_local12c.C: New test. - * g++.dg/tls/thread_local12d.C: New test. - * g++.dg/tls/thread_local12e.C: New test. - * g++.dg/tls/thread_local12f.C: New test. - * g++.dg/tls/thread_local12g.C: New test. - * g++.dg/tls/thread_local12h.C: New test. - * g++.dg/tls/thread_local12i.C: New test. - * g++.dg/tls/thread_local12j.C: New test. - * g++.dg/tls/thread_local12k.C: New test. - * g++.dg/tls/thread_local12l.C: New test. - - PR c++/87481 - * g++.dg/cpp1y/constexpr-87481.C: New test. - -2019-03-22 Simon Wright - - PR ada/89583 - * gnat.dg/socket2.adb: New. - -2019-03-22 Bill Schmidt - - * gcc.target/powerpc/mmx-psubd-2.c: Test _m_psubd. - -2019-03-22 Hongtao Liu - - PR target/89784 - * gcc.target/i386/avx512f-vfmaddXXXsd-1.c (avx512f_test): Add tests - for _mm_mask{,3,z}_*. - * gcc.target/i386/avx512f-vfmaddXXXss-1.c (avx512f_test): Likewise. - * gcc.target/i386/avx512f-vfmsubXXXsd-1.c (avx512f_test): Likewise. - * gcc.target/i386/avx512f-vfmsubXXXss-1.c (avx512f_test): Likewise. - * gcc.target/i386/avx512f-vfnmaddXXXsd-1.c (avx512f_test): Likewise. - * gcc.target/i386/avx512f-vfnmaddXXXss-1.c (avx512f_test): Likewise. - * gcc.target/i386/avx512f-vfnmsubXXXsd-1.c (avx512f_test): Likewise. - * gcc.target/i386/avx512f-vfnmsubXXXss-1.c (avx512f_test): Likewise. - * gcc.target/i386/avx512f-vfmaddXXXsd-2.c: New test. - * gcc.target/i386/avx512f-vfmaddXXXss-2.c: New test. - * gcc.target/i386/avx512f-vfmsubXXXsd-2.c: New test. - * gcc.target/i386/avx512f-vfmsubXXXss-2.c: New test. - * gcc.target/i386/avx512f-vfnmaddXXXsd-2.c: New test. - * gcc.target/i386/avx512f-vfnmaddXXXss-2.c: New test. - * gcc.target/i386/avx512f-vfnmsubXXXsd-2.c: New test. - * gcc.target/i386/avx512f-vfnmsubXXXss-2.c: New test. - -2019-03-22 Jakub Jelinek - - PR target/89784 - * gcc.target/i386/sse-13.c (__builtin_ia32_vfmaddsd3_mask, - __builtin_ia32_vfmaddsd3_mask3, __builtin_ia32_vfmaddsd3_maskz, - __builtin_ia32_vfmsubsd3_mask3, __builtin_ia32_vfmaddss3_mask, - __builtin_ia32_vfmaddss3_mask3, __builtin_ia32_vfmaddss3_maskz, - __builtin_ia32_vfmsubss3_mask3): Define. - * gcc.target/i386/sse-23.c (__builtin_ia32_vfmaddsd3_mask, - __builtin_ia32_vfmaddsd3_mask3, __builtin_ia32_vfmaddsd3_maskz, - __builtin_ia32_vfmsubsd3_mask3, __builtin_ia32_vfmaddss3_mask, - __builtin_ia32_vfmaddss3_mask3, __builtin_ia32_vfmaddss3_maskz, - __builtin_ia32_vfmsubss3_mask3): Define. - * gcc.target/i386/avx-1.c (__builtin_ia32_vfmaddsd3_mask, - __builtin_ia32_vfmaddsd3_mask3, __builtin_ia32_vfmaddsd3_maskz, - __builtin_ia32_vfmsubsd3_mask3, __builtin_ia32_vfmaddss3_mask, - __builtin_ia32_vfmaddss3_mask3, __builtin_ia32_vfmaddss3_maskz, - __builtin_ia32_vfmsubss3_mask3): Define. - * gcc.target/i386/sse-14.c: Add tests for - _mm_mask{,3,z}_f{,n}m{add,sub}_round_s{s,d} builtins. - * gcc.target/i386/sse-22.c: Likewise. - -2019-03-21 Martin Sebor - - PR tree-optimization/89350 - * gcc.dg/Warray-bounds-40.c: Remove an xfail. - * gcc.dg/Wstringop-overflow.c: Xfail overly ambitious tests. - * gcc.dg/Wstringop-overflow-11.c: New test. - * gcc.dg/Wstringop-overflow-12.c: New test. - * gcc.dg/pr89350.c: New test. - * gcc.dg/pr40340-1.c: Adjust expected warning. - * gcc.dg/pr40340-2.c: Same. - * gcc.dg/pr40340-4.c: Same. - * gcc.dg/pr40340-5.c: Same. - -2019-03-21 Jakub Jelinek - - PR lto/89692 - * g++.dg/other/pr89692.C: New test. - - PR c++/89767 - * g++.dg/cpp1y/lambda-init18.C: New test. - * g++.dg/cpp1y/lambda-init19.C: New test. - * g++.dg/cpp1y/pr89767.C: New test. - -2019-03-21 Thomas Schwinge - Cesar Philippidis - - PR fortran/72741 - * gfortran.dg/goacc/routine-external-level-of-parallelism-1.f: New - file. - * gfortran.dg/goacc/routine-external-level-of-parallelism-2.f: - Likewise. - -2019-03-21 Thomas Schwinge - - PR fortran/72741 - * c-c++-common/goacc/routine-3-extern.c: New file. - * c-c++-common/goacc/routine-3.c: Adjust. - * c-c++-common/goacc/routine-4-extern.c: New file. - * c-c++-common/goacc/routine-4.c: Adjust. - * gfortran.dg/goacc/routine-module-3.f90: New file. - - PR fortran/89773 - * gfortran.dg/goacc/pr89773.f90: New file. - * gfortran.dg/goacc/pr77765.f90: Adjust. - * gfortran.dg/goacc/routine-6.f90: Adjust, and extend. - - PR fortran/72741 - * gfortran.dg/goacc/routine-module-mod-1.f90: Update. - - PR fortran/72741 - * gfortran.dg/goacc/routine-module-1.f90: New file. - * gfortran.dg/goacc/routine-module-2.f90: Likewise. - * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise. - - * gfortran.dg/goacc/goacc.exp (dg-compile-aux-modules): New proc. - - PR fortran/56408 - * gcc.target/powerpc/ppc-fortran/ppc-fortran.exp - (dg-compile-aux-modules): Fix diagnostic. - * gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Likewise. - * gfortran.dg/dg.exp (dg-compile-aux-modules): Likewise. - - PR fortran/56408 - * gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Workaround - missing nexted dg-test call support in dejaGNU 1.4.4. - - PR fortran/29383 - * gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in - other '*.exp' files. - -2019-03-21 Richard Biener - - PR tree-optimization/89779 - * gcc.dg/torture/pr89779.c: New testcase. - -2019-03-21 Paolo Carlini - - PR c++/78645 - * g++.dg/cpp0x/constexpr-ice20.C: New. - -2019-03-21 Paolo Carlini - - PR c++/89571 - * g++.dg/cpp0x/noexcept37.C: New. - -2019-03-21 Iain Buclaw - - PR d/89017 - * gdc.dg/pr89017.d: New test. - -2019-03-20 Janus Weil - - PR fortran/71861 - * gfortran.dg/interface_abstract_5.f90: New test case. - -2019-03-20 Jakub Jelinek - - PR target/89775 - * gcc.target/s390/pr89775-1.c: New test. - * gcc.target/s390/pr89775-2.c: New test. - -2019-03-20 Jakub Jelinek - - PR target/89752 - * g++.target/aarch64/aarch64.exp: New file. - * g++.target/aarch64/pr89752.C: New test. - -2019-03-19 Martin Sebor - - PR tree-optimization/89688 - * gcc.dg/strlenopt-61.c: New test. - * g++.dg/warn/Wstringop-overflow-2.C: New test. - -2019-03-19 Jim Wilson - - PR target/89411 - * gcc.target/riscv/losum-overflow.c: New test. - -2019-03-19 Martin Sebor - - PR tree-optimization/89644 - * gcc.dg/Wstringop-truncation-8.c: New test. - -2019-03-19 Martin Liska - - PR middle-end/89737 - * gcc.dg/pr89737.c: New test. - -2019-03-19 Jan Hubicka - - PR lto/87809 - PR lto/89335 - * g++.dg/lto/pr87089_0.C: New testcase. - * g++.dg/lto/pr87089_1.C: New testcase. - * g++.dg/lto/pr89335_0.C: New testcase. - -2019-03-19 Kelvin Nilsen - - PR target/89736 - * gcc.target/powerpc/pr87532-mc.c: Modify dejagnu directives to - restrict this test to vsx targets. - -2019-03-19 Jakub Jelinek - - PR target/89752 - * g++.dg/ext/asm15.C: Check for particular diagnostic wording. - * g++.dg/ext/asm16.C: Likewise. - * g++.dg/ext/asm17.C: New test. - -2019-03-19 Eric Botcazou - - * c-c++-common/unroll-7.c: New test. - -2019-03-19 Jakub Jelinek - - PR target/89726 - * gcc.target/i386/fpprec-1.c (x): Add 6 new constants. - (expect_round, expect_rint, expect_floor, expect_ceil, expect_trunc): - Add expected results for them. - - PR c/89734 - * gcc.dg/pr89734.c: New test. - -2019-03-18 Martin Sebor - - PR tree-optimization/89720 - * gcc.dg/Warray-bounds-42.c: New test. - -2019-03-19 H.J. Lu - - PR c++/89630 - * g++.target/i386/pr89630.C: New test. - -2019-03-18 Kito Cheng - - * gcc.target/riscv/arch-1.c: Add quotes around march in dg-error. - -2019-03-18 Segher Boessenkool - - * gcc.target/powerpc/bswap16.c: Use a pointer instead of a global for - the "store" test as well. - * gcc.target/powerpc/bswap32.c: Ditto. - -2019-03-18 Segher Boessenkool - - * gcc.target/powerpc/bswap16.c: Use a pointer instead of a global for - the "store" test as well. - * gcc.target/powerpc/bswap32.c: Ditto. - -2019-03-18 Segher Boessenkool - - * gcc.target/powerpc/pr18096-1.c: Allow an error message that says - "exceeds" instead of just one that talks about "too large". - -2019-03-18 Richard Sandiford - - * gcc.target/aarch64/sve/cost_model_1.c: New test. - -2019-03-18 Martin Jambor - - PR tree-optimization/89546 - * gcc.dg/tree-ssa/pr89546.c: New test. - -2019-03-18 Andrew Burgess - - PR target/89627 - * g++.target/riscv/call-with-empty-struct-float.C: New file. - * g++.target/riscv/call-with-empty-struct-int.C: New file. - * g++.target/riscv/call-with-empty-struct.H: New file. - * g++.target/riscv/riscv.exp: New file. - -2019-03-18 Paolo Carlini - - PR c++/85014 - * g++.dg/cpp0x/pr85014.C: New. - -2019-03-18 Jakub Jelinek - - PR middle-end/86979 - * gcc.dg/pr86979.c: New test. - -2019-03-17 Thomas Koenig - - PR fortran/88008 - * gfortran.dg/typebound_call_31.f90: New test. - -2019-03-03-17 John David Anglin - - * gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on - hppa*-*-hpux*. - * gcc.dg/compat/pr83487-1_y.c: Likewise. - - * gfortran.dg/pointer_init_10.f90: Require visibility support. - * gfortran.dg/temporary_3.f90: Likewise. - - * gcc.dg/pr88074.c: Require c99_runtime. - * gcc.dg/warn-abs-1.c: Likewise. - * gfortran.dg/ISO_Fortran_binding_1.f90: Likewise. - - PR testsuite/89666 - * c-c++-common/builtin-has-attribute-3.c: Define SKIP_ALIAS on - hppa*-*-hpux*. - * gcc.dg/attr-copy.c: Require alias support. - * gcc.dg/ipa/ipa-icf-39.c: Likewise. - -2019-03-16 Jakub Jelinek - - PR fortran/89724 - * gfortran.dg/continuation_15.f90: New test. - * gfortran.dg/continuation_16.f90: New test. - -2019-03-16 John David Anglin - - * g++.dg/cpp0x/pr84497.C: Restore dg-require-weak. - - PR testsuite/89393 - * g++.dg/abi/ref-temp1.C: Skip on 32-bit hppa*-*-hpux*. - * g++.dg/cpp0x/pr84497.C: Likewise. - - * c-c++-common/builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*. - * gcc.dg/attr-copy-6.c: Likewise. - * gcc.dg/pr87793.c: Likewise. - - PR testsuite/89471 - * gcc.dg/pr84941.c: Skip on hppa*-*-*. - - * gcc.dg/Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*. - * gcc.dg/gimplefe-34.c: Likewise. - * gcc.dg/compat/pr83487-2_x.c: Use -fno-common option on hppa*-*-hpux*. - * gcc.dg/compat/pr83487-2_y.c: Likewise. - - PR testsuite/84174 - * gcc.dg/Wattributes-6.c: Skip warning check at line 404 on - hppa*64*-*-*. - - PR testsuite/83453 - * c-c++-common/Wattributes.c: Skip a warning check on hppa*64*-*-*. - - * lib/target-supports.exp (check_ascii_locale_available): Remove - hppa*-*-hpux*. - -2019-03-16 Thomas Koenig - - PR fortran/84394 - * gfortran.dg/blockdata_11.f90: New test. - -2019-03-15 Harald Anlauf - - PR fortran/60091 - * gfortran.dg/pointer_remapping_3.f08: Adjust error messages. - * gfortran.dg/pointer_remapping_7.f90: Adjust error message. - -2019-03-15 Kelvin Nilsen - - PR target/87532 - * gcc.target/powerpc/fold-vec-extract-char.p8.c: Modify expected - instruction selection. - * gcc.target/powerpc/fold-vec-extract-int.p8.c: Likewise. - * gcc.target/powerpc/fold-vec-extract-short.p8.c: Likewise. - * gcc.target/powerpc/pr87532-mc.c: New test. - * gcc.target/powerpc/pr87532.c: New test. - * gcc.target/powerpc/vec-extract-v16qiu-v2.h: New test. - * gcc.target/powerpc/vec-extract-v16qiu-v2a.c: New test. - * gcc.target/powerpc/vec-extract-v16qiu-v2b.c: New test. - * gcc.target/powerpc/vsx-builtin-10a.c: New test. - * gcc.target/powerpc/vsx-builtin-10b.c: New test. - * gcc.target/powerpc/vsx-builtin-11a.c: New test. - * gcc.target/powerpc/vsx-builtin-11b.c: New test. - * gcc.target/powerpc/vsx-builtin-12a.c: New test. - * gcc.target/powerpc/vsx-builtin-12b.c: New test. - * gcc.target/powerpc/vsx-builtin-13a.c: New test. - * gcc.target/powerpc/vsx-builtin-13b.c: New test. - * gcc.target/powerpc/vsx-builtin-14a.c: New test. - * gcc.target/powerpc/vsx-builtin-14b.c: New test. - * gcc.target/powerpc/vsx-builtin-15a.c: New test. - * gcc.target/powerpc/vsx-builtin-15b.c: New test. - * gcc.target/powerpc/vsx-builtin-16a.c: New test. - * gcc.target/powerpc/vsx-builtin-16b.c: New test. - * gcc.target/powerpc/vsx-builtin-17a.c: New test. - * gcc.target/powerpc/vsx-builtin-17b.c: New test. - * gcc.target/powerpc/vsx-builtin-18a.c: New test. - * gcc.target/powerpc/vsx-builtin-18b.c: New test. - * gcc.target/powerpc/vsx-builtin-19a.c: New test. - * gcc.target/powerpc/vsx-builtin-19b.c: New test. - * gcc.target/powerpc/vsx-builtin-20a.c: New test. - * gcc.target/powerpc/vsx-builtin-20b.c: New test. - * gcc.target/powerpc/vsx-builtin-9a.c: New test. - * gcc.target/powerpc/vsx-builtin-9b.c: New test. - -2019-03-15 Alexandre Oliva - - PR c++/88534 - PR c++/88537 - * g++.dg/cpp2a/pr88534.C: New. - * g++.dg/cpp2a/pr88537.C: New. - -2019-03-15 Robin Dapp - - * gcc.target/s390/target-attribute/tattr-1.c (htm0): -mhtm -> '-mhtm'. - * gcc.target/s390/target-attribute/tattr-2.c: Likewise. - * gcc.target/s390/target-attribute/tattr-3.c (vx0): -mvx -> '-mvx'. - * gcc.target/s390/target-attribute/tattr-4.c: Likewise. - -2019-03-15 Kyrylo Tkachov - - PR target/89719 - * gcc.target/aarch64/spellcheck_4.c: Adjust dg-error string. - * gcc.target/aarch64/spellcheck_5.c: Likewise. - * gcc.target/aarch64/spellcheck_6.c: Likewise. - -2019-03-15 Jakub Jelinek - - PR c++/89709 - * g++.dg/cpp0x/constexpr-89709.C: New test. - - PR debug/89704 - * gcc.dg/debug/pr89704.c: New test. - -2019-03-15 H.J. Lu - - PR target/89650 - * g++.target/i386/pr89650.C: New test. - -2019-03-14 Richard Biener - - * gcc.dg/gimplefe-13.c: Adjust. - * gcc.dg/gimplefe-14.c: Likewise. - * gcc.dg/gimplefe-17.c: Likewise. - * gcc.dg/gimplefe-18.c: Likewise. - * gcc.dg/gimplefe-7.c: Likewise. - * gcc.dg/torture/pr89595.c: Likewise. - * gcc.dg/tree-ssa/cunroll-13.c: Likewise. - * gcc.dg/tree-ssa/ivopt_mult_1g.c: Likewise. - * gcc.dg/tree-ssa/ivopt_mult_2g.c: Likewise. - * gcc.dg/tree-ssa/scev-3.c: Likewise. - * gcc.dg/tree-ssa/scev-4.c: Likewise. - * gcc.dg/tree-ssa/scev-5.c: Likewise. - * gcc.dg/vect/vect-cond-arith-2.c: Likewise. - * gcc.target/aarch64/sve/loop_add_6.c: Likewise. - -2019-03-14 Jakub Jelinek - - PR ipa/89684 - * gcc.target/i386/pr89684.c: New test. - - PR rtl-optimization/89679 - * gcc.dg/pr89679.c: New test. - -2019-03-14 Richard Biener - - PR tree-optimization/89710 - * gcc.dg/torture/pr89710.c: New testcase. - -2019-03-14 Richard Biener - - PR middle-end/89698 - * g++.dg/torture/pr89698.C: New testcase. - -2019-03-14 Jakub Jelinek - - PR tree-optimization/89703 - * gcc.c-torture/compile/pr89703-1.c: New test. - * gcc.c-torture/compile/pr89703-2.c: New test. - -2019-03-14 H.J. Lu - - PR target/89523 - * gcc.target/i386/pr89523-1a.c: New test. - * gcc.target/i386/pr89523-1b.c: Likewise. - * gcc.target/i386/pr89523-2.c: Likewise. - * gcc.target/i386/pr89523-3.c: Likewise. - * gcc.target/i386/pr89523-4.c: Likewise. - * gcc.target/i386/pr89523-5.c: Likewise. - * gcc.target/i386/pr89523-6.c: Likewise. - * gcc.target/i386/pr89523-7.c: Likewise. - * gcc.target/i386/pr89523-8.c: Likewise. - * gcc.target/i386/pr89523-9.c: Likewise. - -2019-03-14 Jakub Jelinek - - PR c++/89512 - * g++.dg/cpp1y/var-templ61.C: New test. - - PR c++/89652 - * g++.dg/cpp1y/constexpr-89652.C: New test. - -2019-03-13 Harald Anlauf - - PR fortran/87045 - * gfortran.dg/pr87045.f90: New test. - -2019-03-13 Vladimir Makarov - - PR target/85860 - * gcc.target/i386/pr85860.c: New. - -2019-03-13 Marek Polacek - - PR c++/89686 - mixing init-capture and simple-capture in lambda. - * g++.dg/cpp2a/lambda-pack-init2.C: New test. - - PR c++/89660 - bogus error with -Wredundant-move. - * g++.dg/cpp0x/Wredundant-move8.C: New test. - * g++.dg/cpp0x/Wredundant-move9.C: New test. - -2019-03-13 Janus Weil - - PR fortran/89601 - * gfortran.dg/pdt_16.f03: Modified to avoid follow-up errors. - * gfortran.dg/pdt_30.f90: New test case. - -2019-03-13 Marek Polacek - - PR c++/88979 - further P0634 fix for constructors. - * g++.dg/cpp2a/typename15.C: New test. - -2019-03-13 Martin Sebor - - PR tree-optimization/89662 - * gcc.dg/Warray-bounds-41.c: New test. - -2019-03-13 Paolo Carlini - - PR c++/63508 - * g++.dg/cpp0x/auto53.C: New. - -2019-03-13 Richard Biener - - PR middle-end/89677 - * gcc.dg/torture/pr89677.c: New testcase. - -2019-03-13 Paolo Carlini - - PR c++/85558 - * g++.dg/other/friend16.C: New. - * g++.dg/other/friend17.C: Likewise. - -2019-03-13 Jakub Jelinek - - PR middle-end/88588 - * c-c++-common/gomp/pr88588.c: New test. - -2019-03-13 Thomas Koenig - - PR fortran/66695 - PR fortran/77746 - PR fortran/79485 - * gfortran.dg/binding_label_tests_30.f90: New test. - * gfortran.dg/binding_label_tests_31.f90: New test. - * gfortran.dg/binding_label_tests_32.f90: New test. - * gfortran.dg/binding_label_tests_33.f90: New test. - -2019-03-13 Iain Buclaw - - * gdc.dg/pr88957.d: Move to gdc.dg/ubsan. - * gdc.dg/ubsan/ubsan.exp: New file. - * lib/gdc.exp (gdc_include_flags): Remove unused target variable. - Explicitly return flags from procedure. - -2019-03-13 Iain Buclaw - - PR d/88957 - * gdc.dg/pr88957.d: New test. - * gdc.dg/simd.d: Add new vector tests. - -2019-03-12 Uroš Bizjak - - PR d/87824 - * lib/gdc.exp (gdc_include_flags): Find C++ headers by calling - libstdc++v3/scripts/testsuite_flags. Filter out unsupported - -nostdinc++ flag. - -2019-03-12 Thomas Koenig - - PR fortran/87673 - * gfortran.dg/charlen_17.f90: New test. - -2019-03-12 Robin Dapp - - * gcc.target/s390/memset-1.c: Adapt test case for new scheduling. - -2019-03-12 Martin Liska - - * gfortran.dg/abstract_type_3.f03: Amend test-case scan patterns. - * gfortran.dg/binding_label_tests_4.f03: Likewise. - * gfortran.dg/c_f_pointer_tests_6.f90: Likewise. - * gfortran.dg/c_funloc_tests_6.f90: Likewise. - * gfortran.dg/c_loc_tests_17.f90: Likewise. - * gfortran.dg/constructor_9.f90: Likewise. - * gfortran.dg/dec_structure_8.f90: Likewise. - * gfortran.dg/entry_4.f90: Likewise. - * gfortran.dg/init_char_with_nonchar_ctr.f90: Likewise. - * gfortran.dg/initialization_23.f90: Likewise. - * gfortran.dg/logical_assignment_1.f90: Likewise. - * gfortran.dg/pr80752.f90: Likewise. - * gfortran.dg/pr88116_1.f90: Likewise. - * gfortran.dg/pr88467.f90: Likewise. - * gfortran.dg/typebound_call_7.f03: Likewise. - * gfortran.dg/typebound_generic_1.f03: Likewise. - * gfortran.dg/typebound_operator_2.f03: Likewise. - * gfortran.dg/typebound_operator_4.f03: Likewise. - * gfortran.dg/typebound_proc_9.f03: Likewise. - * gfortran.dg/unlimited_polymorphic_2.f03: Likewise. - -2019-03-12 Paul Thomas - - PR fortran/89363 - * gfortran.dg/assumed_rank_16.f90: New test. - - PR fortran/89364 - * gfortran.dg/assumed_rank_17.f90: New test. - -2019-03-12 Jakub Jelinek - - PR middle-end/89663 - * gcc.c-torture/compile/pr89663-1.c: New test. - * gcc.c-torture/compile/pr89663-2.c: New test. - -2019-03-12 Richard Biener - - PR tree-optimization/89664 - * gfortran.dg/pr89664.f90: New testcase. - -2019-03-11 Jakub Jelinek - - PR fortran/89651 - * gfortran.dg/gomp/pr89651.f90: New test. - - PR middle-end/89655 - PR bootstrap/89656 - * gcc.c-torture/compile/pr89655.c: New test. - -2019-03-11 Christophe Lyon - - * gcc.target/arm/f16_f64_conv_no_dp.c: Add arm_fp16_ok effective - target. - -2019-03-11 Martin Liska - - * g++.dg/conversion/simd3.C (foo): Wrap option names - with apostrophe character. - * g++.dg/cpp1z/decomp3.C (test): Likewise. - (test3): Likewise. - * g++.dg/cpp1z/decomp4.C (test): Likewise. - * g++.dg/cpp1z/decomp44.C (foo): Likewise. - * g++.dg/cpp1z/decomp45.C (f): Likewise. - * g++.dg/opt/pr34036.C: Likewise. - * g++.dg/spellcheck-c++-11-keyword.C: Likewise. - * gcc.dg/c90-fordecl-1.c (foo): Likewise. - * gcc.dg/cpp/dir-only-4.c: Likewise. - * gcc.dg/cpp/dir-only-5.c: Likewise. - * gcc.dg/cpp/pr71591.c: Likewise. - * gcc.dg/format/opt-1.c: Likewise. - * gcc.dg/format/opt-2.c: Likewise. - * gcc.dg/format/opt-3.c: Likewise. - * gcc.dg/format/opt-4.c: Likewise. - * gcc.dg/format/opt-5.c: Likewise. - * gcc.dg/format/opt-6.c: Likewise. - * gcc.dg/pr22231.c: Likewise. - * gcc.dg/pr33007.c: Likewise. - * gcc.dg/simd-1.c (hanneke): Likewise. - * gcc.dg/simd-5.c: Likewise. - * gcc.dg/simd-6.c: Likewise. - * gcc.dg/spellcheck-options-14.c: Likewise. - * gcc.dg/spellcheck-options-15.c: Likewise. - * gcc.dg/spellcheck-options-16.c: Likewise. - * gcc.dg/spellcheck-options-17.c: Likewise. - * gcc.dg/tree-ssa/pr23109.c: Likewise. - * gcc.dg/tree-ssa/recip-5.c: Likewise. - * gcc.target/i386/cet-notrack-1a.c (func): Likewise. - (__attribute__): Likewise. - * gcc.target/i386/cet-notrack-icf-1.c (fn3): Likewise. - * gcc.target/i386/cet-notrack-icf-3.c (__attribute__): Likewise. - * gcc.target/powerpc/warn-1.c: Likewise. - * gcc.target/powerpc/warn-2.c: Likewise. - -2019-03-11 Andreas Krebbel - - * gcc.target/s390/zvector/vec-addc-u128.c: New test. - -2019-03-11 Eric Botcazou - - * c-c++-common/unroll-6.c: New test. - -2019-03-11 Paolo Carlini - - PR c++/87571 - * g++.dg/template/memfriend18.C: New. - -2019-03-10 Rainer Orth - - * gdc.dg/pr89041.d: Mark as compile test. - -2019-03-10 Rainer Orth - - * gcc.target/i386/indirect-thunk-extern-7.c: Add -fjump-tables to - dg-options. - -2019-03-10 Martin Jambor - - PR tree-optimization/85762 - PR tree-optimization/87008 - PR tree-optimization/85459 - * g++.dg/tree-ssa/pr87008.C: New test. - * gcc.dg/guality/pr54970.c: Xfail tests querying a[0] everywhere. - -2019-03-10 Thomas Koenig - - PR fortran/66089 - * gfortran.dg/assumed_type_2.f90: Adapted tree dumps. - * gfortran.dg/no_arg_check_2.f90: Likewise. - -2019-03-10 Jakub Jelinek - - PR c++/89648 - * g++.dg/cpp0x/lambda/lambda-89648.C: New test. - -2019-03-10 Thomas Koenig - - PR fortran/66089 - * gfortran.dg/dependency_53.f90: New test. - -2019-03-10 Thomas Koenig - - PR fortran/87734 - * gfortran.dg/public_private_module_10.f90: New test. - -2019-03-09 John David Anglin - - PR c++/70349 - * g++.dg/abi/abi-tag18a.C: Skip on 32-bit hppa*-*-hpux*. - - PR middle-end/68733 - * c-c++-common/gomp/clauses-2.c: Skip on 32-bit hppa*-*-hpux*. - - PR testsuite/89472 - * gcc.dg/debug/dwarf2/inline5.c: XFAIL one scan-assembler-times check. - -2019-03-09 Paolo Carlini - - PR c++/87750 - * g++.dg/cpp0x/pr87750.C: New. - -2019-03-09 John David Anglin - - * c-c++-common/ident-0b.c: Also skip on 32-bit hppa*-*-hpux*. - * c-c++-common/ident-1a.c: Likewise. - * c-c++-common/ident-1b.c: Likewise. - * c-c++-common/ident-2b.c: Likewise. - - * g++.dg/tls/pr77285-2.C: Require tls_native support. - - * g++.dg/ext/visibility/lambda1.C: Require visibility. - - PR inline-asm/87010 - * gcc.dg/torture/20180712-1.c: Skip on hppa*-*-*. - - * gfortran.dg/coarray_data_1.f90: Link against libatomic if target - libatomic_available. - -2019-03-09 Iain Buclaw - - PR d/89041 - * gdc.dg/pr89041.d: New test. - -2019-03-09 Thomas Koenig - - PR fortran/71544 - * gfortran.dg/c_ptr_tests_19.f90: New test. - -2019-03-09 John David Anglin - - * gnat.dg/debug11.adb: Skip on 32-bit hppa*-*-hpux*. - * gnat.dg/debug12.adb: Likewise. - - * lib/target-supports.exp (check_effective_target_weak_undefined): - Return 0 on hppa*-*-hpux*. - (check_ascii_locale_available): Likewise. - -2019-03-09 Janus Weil - - PR fortran/84504 - * gfortran.dg/pointer_init_10.f90: New test case. - -2019-03-09 John David Anglin - - * gfortran.dg/ieee/ieee_9.f90: Fix typo. - -2019-03-09 John David Anglin - - PR fortran/89639 - * gfortran.dg/ieee/ieee_9.f90: Skip on hppa*-*-linux*. - -2019-03-09 Thomas König - - PR fortran/71203 - * gfortran.dg/array_simplify_3.f90: New test case. - -2019-03-09 Jakub Jelinek - - PR c/88568 - * g++.dg/other/pr88568.C: New test. - - PR rtl-optimization/89634 - * gcc.c-torture/execute/pr89634.c: New test. - -2019-03-08 Jakub Jelinek - - PR c/85870 - * gcc.dg/lto/pr85870_0.c: Add dg-extra-ld-options with - -r -nostdlib -flinker-output=nolto-rel. - -2019-03-08 David Malcolm - - PR target/79926 - * gcc.target/i386/interrupt-387-err-1.c: Update expected message. - * gcc.target/i386/interrupt-387-err-2.c: Likewise. - * gcc.target/i386/interrupt-mmx-err-1.c: Likewise. - * gcc.target/i386/interrupt-mmx-err-2.c: Likewise. - -2019-03-08 Paolo Carlini - - PR c++/63540 - * g++.dg/cpp0x/implicit17.C: New. - -2019-03-08 Paolo Carlini - - PR c++/22149 - * g++.dg/template/access29.C: New. - -2019-03-08 Jakub Jelinek - - PR c++/82075 - * g++.dg/cpp1z/decomp49.C: New test. - -2019-03-08 Andre Vieira - - * gcc.target/arm/f16_f64_conv_no_dp.c: New test. - -2019-03-08 Uroš Bizjak - - PR target/68924 - PR target/78782 - PR target/87558 - * gcc.target/i386/pr78782.c: New test. - * gcc.target/i386/pr87558.c: Ditto. - -2019-03-08 Jakub Jelinek - - PR c/85870 - * gcc.dg/lto/pr85870_0.c: New test. - * gcc.dg/lto/pr85870_1.c: New test. - -2019-03-08 Martin Liska - - PR target/86952 - * gcc.target/i386/pr86952.c: New test. - * gcc.target/i386/indirect-thunk-7.c: Use jump tables to match - scanned pattern. - * gcc.target/i386/indirect-thunk-inline-7.c: Likewise. - -2019-03-08 Jakub Jelinek - - PR c++/89585 - * g++.dg/asm-qual-3.C: Adjust expected diagnostics for toplevel - asm volatile. - - PR c++/89599 - * g++.dg/ubsan/vptr-4.C: Adjust expected diagnostics. - * g++.dg/parse/array-size2.C: Likewise. - * g++.dg/cpp0x/constexpr-89599.C: New test. - - PR c++/89622 - * g++.dg/warn/pr89622.C: New test. - -2019-03-07 Jakub Jelinek - - PR target/80003 - * gcc.target/i386/pr68657.c: Adjust expected diagnostics wording. - * gcc.target/i386/interrupt-6.c: Likewise. - * g++.target/i386/pr57362.C: Adjust capitalization in dg-prune-output. - -2019-03-07 Paolo Carlini - - PR c++/84518 - * g++.dg/cpp0x/lambda/lambda-ice30.C: New. - * g++.dg/cpp0x/lambda/lambda-ice31.C: Likewise. - -2019-03-07 Jakub Jelinek - - PR translation/79999 - * c-c++-common/gomp/doacross-1.c: Adjust expected diagnostics. - * c-c++-common/gomp/doacross-3.c: New test. - - PR target/89602 - * gcc.target/i386/avx512f-vmovss-1.c: New test. - * gcc.target/i386/avx512f-vmovss-2.c: New test. - * gcc.target/i386/avx512f-vmovss-3.c: New test. - * gcc.target/i386/avx512f-vmovsd-1.c: New test. - * gcc.target/i386/avx512f-vmovsd-2.c: New test. - * gcc.target/i386/avx512f-vmovsd-3.c: New test. - -2019-03-07 Martin Jambor - - PR lto/87525 - * gcc.dg/ipa/ipcp-5.c: New test. - -2019-03-07 Martin Jambor - - PR ipa/88235 - * g++.dg/ipa/pr88235.C: New test. - -2019-04-07 Richard Biener - - PR middle-end/89618 - * gcc.target/i386/pr89618.c: New testcase. - -2019-03-07 Richard Biener - - PR tree-optimization/89595 - * gcc.dg/torture/pr89595.c: New testcase. - -2019-03-07 Jakub Jelinek - - PR c++/89585 - * g++.dg/asm-qual-3.C: Adjust expected diagnostics. - -2019-03-06 Harald Anlauf - - PR fortran/71203 - * gfortran.dg/substr_8.f90: New test. - -2019-03-06 Jakub Jelinek - - PR c++/87148 - * g++.dg/ext/flexary34.C: New test. - -2019-03-06 Peter Bergner - - PR rtl-optimization/88845 - * gcc.target/powerpc/pr88845.c: New test. - -2019-03-06 Marek Polacek - - PR c++/87378 - bogus -Wredundant-move warning. - * g++.dg/cpp0x/Wredundant-move1.C (fn4): Drop dg-warning. - * g++.dg/cpp0x/Wredundant-move7.C: New test. - -2019-03-06 Richard Biener - - PR testsuite/89551 - * gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit - the way that makes the testcase PASS. - -2019-03-05 Jakub Jelinek - - PR middle-end/89590 - * gcc.dg/pr89590.c: New test. - -2019-03-05 Wilco Dijkstra - - PR target/89222 - * gcc.target/arm/pr89222.c: Add new test. - -2019-03-05 Richard Biener - - PR tree-optimization/89594 - * gcc.dg/pr89594.c: New testcase. - -2019-03-05 Jakub Jelinek - - PR tree-optimization/89487 - * gcc.dg/tree-ssa/pr89487.c: Include ../pr87600.h. - (caml_interprete): Ifdef the whole body out if REG1 or REG2 macros - aren't defined. Use REG1 instead of "%r15" and REG2 instead of - "%r14". - - PR bootstrap/89560 - * g++.dg/other/pr89560.C: New test. - - PR tree-optimization/89570 - * gcc.dg/pr89570.c: New test. - - PR tree-optimization/89566 - * c-c++-common/pr89566.c: New test. - -2019-03-04 Paolo Carlini - - PR c++/84605 - * g++.dg/parse/crash69.C: New. - -2019-03-04 Jakub Jelinek - - PR c++/71446 - * g++.dg/cpp2a/desig12.C: New test. - * g++.dg/cpp2a/desig13.C: New test. - -2019-03-04 Tamar Christina - - PR target/88530 - * gcc.target/aarch64/options_set_10.c: Add native. - -2019-03-04 Wilco Dijkstra - - PR tree-optimization/89437 - * gcc.dg/sinatan-1.c: Fix testcase. - -2019-03-04 Richard Biener - - PR middle-end/89572 - * gcc.dg/torture/pr89572.c: New testcase. - -2018-03-04 Bin Cheng - - PR tree-optimization/89487 - * gcc.dg/tree-ssa/pr89487.c: New test. - -2019-03-03 Harald Anlauf - - PR fortran/77583 - * gfortran.dg/pr77583.f90: New test. - -2019-03-03 Thomas Koenig - - PR fortran/72714 - * gfortran.dg/coarray_allocate_11.f90: New test. - -2019-03-02 Harald Anlauf - - PR fortran/89516 - * gfortran.dg/pr89492.f90: Adjust testcase. - * gfortran.dg/transfer_check_5.f90: New test. - -2019-03-02 Jakub Jelinek - - PR c++/71446 - * g++.dg/cpp2a/desig10.C: New test. - * g++.dg/cpp2a/desig11.C: New test. - * g++.dg/ext/desig4.C: Expect 4 new errors. - - PR target/89506 - * gcc.dg/pr89506.c: New test. - -2019-03-01 Kito Cheng - Monk Chiang - - * gcc.target/riscv/attribute-1.c: New. - * gcc.target/riscv/attribute-2.c: Likewise. - * gcc.target/riscv/attribute-3.c: Likewise. - * gcc.target/riscv/attribute-4.c: Likewise. - * gcc.target/riscv/attribute-5.c: Likewise. - * gcc.target/riscv/attribute-6.c: Likewise. - * gcc.target/riscv/attribute-7.c: Likewise. - * gcc.target/riscv/attribute-8.c: Likewise. - * gcc.target/riscv/attribute-9.c: Likewise. - - * gcc.target/riscv/arch-1.c: New. - * gcc.target/riscv/arch-2.c: Likewise. - * gcc.target/riscv/arch-3.c: Likewise. - * gcc.target/riscv/arch-4.c: Likewise. - -2019-03-01 Jakub Jelinek - - PR middle-end/89497 - * g++.dg/tree-prof/devirt.C: Adjust also the ilp32 - scan-tree-dump-times from dom3 to tracer pass. - -2019-03-01 Segher Boessenkool - - * gcc.target/powerpc/ throughout: Delete dg-skip-if "do not override - -mcpu". Use -mdejagnu-cpu= in dg-options instead of -mcpu=. - -2019-03-01 Alexander Monakov - - PR rtl-optimization/85899 - * gcc.dg/pr85899.c: New test. - -2019-03-01 Marek Polacek - - PR c++/89537 - missing location for error with non-static member fn. - * g++.dg/diagnostic/member-fn-1.C: New test. - - PR c++/89532 - ICE with incomplete type in decltype. - * g++.dg/cpp2a/nontype-class14.C: New test. - -2019-03-01 Jakub Jelinek - - Implement P1002R1, Try-catch blocks in constexpr functions - PR c++/89513 - * g++.dg/cpp2a/constexpr-try1.C: New test. - * g++.dg/cpp2a/constexpr-try2.C: New test. - * g++.dg/cpp2a/constexpr-try3.C: New test. - * g++.dg/cpp2a/constexpr-try4.C: New test. - * g++.dg/cpp2a/constexpr-try5.C: New test. - * g++.dg/cpp0x/constexpr-ctor10.C: Don't expect error for C++2a. - -2019-03-01 Richard Sandiford - - PR tree-optimization/89535 - * gfortran.dg/vect/pr89535.f90: New test. - -2019-03-01 Richard Biener - - PR middle-end/89541 - * gfortran.dg/pr89451.f90: New testcase. - -2019-03-01 Richard Biener - - PR middle-end/89497 - * gcc.dg/tree-ssa/reassoc-43.c: Avoid false match in regex. - * g++.dg/tree-prof/devirt.C: Scan tracer dump for foldings - that happen now earlier. - -2019-02-28 Eric Botcazou - - * gcc.c-torture/execute/20190228-1.c: New test. - -2019-02-28 Marek Polacek - - PR c++/87068 - missing diagnostic with fallthrough statement. - * c-c++-common/Wimplicit-fallthrough-37.c: New test. - -2019-02-28 Thomas Schwinge - Cesar Philippidis - - PR fortran/72741 - PR fortran/89433 - * gfortran.dg/goacc/routine-multiple-directives-1.f90: New file. - * gfortran.dg/goacc/routine-multiple-directives-2.f90: Likewise. - - PR fortran/72741 - * gfortran.dg/goacc/routine-multiple-lop-clauses-1.f90: New file. - - PR fortran/72741 - PR fortran/89433 - * gfortran.dg/goacc/routine-6.f90: Update - * gfortran.dg/goacc/routine-intrinsic-1.f: New file. - * gfortran.dg/goacc/routine-intrinsic-2.f: Likewise. - -2019-02-28 Jakub Jelinek - - PR c/89521 - * gcc.dg/pr89521-1.c: New test. - * gcc.dg/pr89521-2.c: New test. - -2019-02-28 John David Anglin - - PR testsuite/89441 - * g++.dg/ipa/pr89009.C: Update symbol visibility. - -2019-02-28 Tamar Christina - - PR target/88530 - * gcc.target/aarch64/options_set_10.c: New test. - -2019-02-28 Paolo Carlini - - PR c++/89522 - * g++.dg/cpp1y/lambda-generic-ice10.C: New. - -2019-02-28 Jakub Jelinek - - PR c/89525 - * gcc.dg/pr89525.c: New test. - - PR c/89520 - * gcc.dg/pr89520-1.c: New test. - * gcc.dg/pr89520-2.c: New test. - -2019-02-27 Marek Polacek - - PR c++/88857 - ICE with value-initialization of argument in template. - * g++.dg/cpp0x/initlist-value4.C: New test. - -2019-02-27 Marek Polacek - - PR c++/89511 - ICE with using-declaration and unscoped enumerator. - * g++.dg/cpp0x/using-enum-3.C: New test. - -2019-02-27 Jakub Jelinek - - PR tree-optimization/89280 - * gcc.dg/torture/pr57147-2.c (SetNaClSwitchExpectations): Add static - keyword. - -2019-02-27 Richard Biener - - * gcc.dg/gimplefe-36.c: New testcase. - -2019-02-27 Paolo Carlini - - PR c++/89488 - * g++.dg/cpp0x/nsdmi15.C: New. - -2019-02-27 Paolo Carlini - - PR c++/88987 - * g++.dg/cpp0x/pr88987.C: New. - -2019-02-27 Jakub Jelinek - - PR tree-optimization/89280 - * gcc.c-torture/compile/pr89280.c: New test. - * gcc.dg/torture/pr57147-2.c: Don't expect a setjmp after noreturn - function. Skip the test for -O0. - -2018-02-26 Steve Ellcey - - * gfortran.dg/simd-builtins-1.f90: Update for aarch64*-*-*. - * gfortran.dg/simd-builtins-2.f90: Ditto. - * gfortran.dg/simd-builtins-6.f90: Ditto. - * gfortran.dg/simd-builtins-8.f90: New test. - * gfortran.dg/simd-builtins-8.h: New header file. - -2019-02-26 Jakub Jelinek - - PR c++/89507 - * g++.dg/other/new2.C: New test. - - PR tree-optimization/89500 - * gcc.dg/pr89500.c: New test. - * gcc.dg/Wstringop-overflow-10.c: New test. - * gcc.dg/strlenopt-60.c: New test. - -2019-02-26 Harald Anlauf - - PR fortran/89492 - * gfortran.dg/pr89492.f90: New test. - -2019-02-26 Thomas Koenig - - PR fortran/89496 - * gfortran.dg/altreturn_9_0.f90: New file. - * gfortran.dg/altreturn_9_1.f90: New file. - -2019-02-26 Jakub Jelinek - - PR c++/89481 - * g++.dg/cpp1y/constexpr-89481.C: New test. - -2019-02-26 Richard Biener - - PR tree-optimization/89505 - * gcc.dg/torture/pr89505.c: New testcase. - -2019-02-26 Eric Botcazou - - * gnat.dg/opt77.adb: New test. - * gnat.dg/opt77_pkg.ad[sb]: New helper. - -2019-02-26 Jakub Jelinek - - PR target/89474 - * gcc.target/i386/pr89474.c: New test. - -2019-02-25 Jakub Jelinek - - PR c/77754 - * gcc.c-torture/compile/pr77754-1.c: New test. - * gcc.c-torture/compile/pr77754-2.c: New test. - * gcc.c-torture/compile/pr77754-3.c: New test. - * gcc.c-torture/compile/pr77754-4.c: New test. - * gcc.c-torture/compile/pr77754-5.c: New test. - * gcc.c-torture/compile/pr77754-6.c: New test. - -2019-02-25 Tamar Christina - - PR target/88530 - * gcc.target/aarch64/options_set_1.c: New test. - * gcc.target/aarch64/options_set_2.c: New test. - * gcc.target/aarch64/options_set_3.c: New test. - * gcc.target/aarch64/options_set_4.c: New test. - * gcc.target/aarch64/options_set_5.c: New test. - * gcc.target/aarch64/options_set_6.c: New test. - * gcc.target/aarch64/options_set_7.c: New test. - * gcc.target/aarch64/options_set_8.c: New test. - * gcc.target/aarch64/options_set_9.c: New test. - -2019-02-25 Tamar Christina - - * gcc.target/arm/simd/fp16fml_high.c (test_vfmlal_high_u32, - test_vfmlalq_high_u32, test_vfmlsl_high_u32, test_vfmlslq_high_u32): - Rename .... - (test_vfmlal_high_f16, test_vfmlalq_high_f16, test_vfmlsl_high_f16, - test_vfmlslq_high_f16): ... To this. - * gcc.target/arm/simd/fp16fml_lane_high.c (test_vfmlal_lane_high_u32, - tets_vfmlsl_lane_high_u32, test_vfmlal_laneq_high_u32, - test_vfmlsl_laneq_high_u32, test_vfmlalq_lane_high_u32, - test_vfmlslq_lane_high_u32, test_vfmlalq_laneq_high_u32, - test_vfmlslq_laneq_high_u32): Rename ... - (test_vfmlal_lane_high_f16, tets_vfmlsl_lane_high_f16, - test_vfmlal_laneq_high_f16, test_vfmlsl_laneq_high_f16, - test_vfmlalq_lane_high_f16, test_vfmlslq_lane_high_f16, - test_vfmlalq_laneq_high_f16, test_vfmlslq_laneq_high_f16): ... To this. - * gcc.target/arm/simd/fp16fml_lane_low.c (test_vfmlal_lane_low_u32, - test_vfmlsl_lane_low_u32, test_vfmlal_laneq_low_u32, - test_vfmlsl_laneq_low_u32, test_vfmlalq_lane_low_u32, - test_vfmlslq_lane_low_u32, test_vfmlalq_laneq_low_u32, - test_vfmlslq_laneq_low_u32): Rename ... - (test_vfmlal_lane_low_f16, test_vfmlsl_lane_low_f16, - test_vfmlal_laneq_low_f16, test_vfmlsl_laneq_low_f16, - test_vfmlalq_lane_low_f16, test_vfmlslq_lane_low_f16, - test_vfmlalq_laneq_low_f16, test_vfmlslq_laneq_low_f16): ... To this. - * gcc.target/arm/simd/fp16fml_low.c (test_vfmlal_low_u32, - test_vfmlalq_low_u32, test_vfmlsl_low_u32, test_vfmlslq_low_u32): - Rename ... - (test_vfmlal_low_f16, test_vfmlalq_low_f16, test_vfmlsl_low_f16, - test_vfmlslq_low_f16): ... To this. - -2019-02-25 Tamar Christina - - * gcc.target/aarch64/fp16_fmul_high.h (test_vfmlal_high_u32, - test_vfmlalq_high_u32, test_vfmlsl_high_u32, test_vfmlslq_high_u32): - Rename ... - (test_vfmlal_high_f16, test_vfmlalq_high_f16, test_vfmlsl_high_f16, - test_vfmlslq_high_f16): ... To this. - * gcc.target/aarch64/fp16_fmul_lane_high.h (test_vfmlal_lane_high_u32, - tets_vfmlsl_lane_high_u32, test_vfmlal_laneq_high_u32, - test_vfmlsl_laneq_high_u32, test_vfmlalq_lane_high_u32, - test_vfmlslq_lane_high_u32, test_vfmlalq_laneq_high_u32, - test_vfmlslq_laneq_high_u32): Rename ... - (test_vfmlal_lane_high_f16, tets_vfmlsl_lane_high_f16, - test_vfmlal_laneq_high_f16, test_vfmlsl_laneq_high_f16, - test_vfmlalq_lane_high_f16, test_vfmlslq_lane_high_f16, - test_vfmlalq_laneq_high_f16, test_vfmlslq_laneq_high_f16): ... To this. - * gcc.target/aarch64/fp16_fmul_lane_low.h (test_vfmlal_lane_low_u32, - test_vfmlsl_lane_low_u32, test_vfmlal_laneq_low_u32, - test_vfmlsl_laneq_low_u32, test_vfmlalq_lane_low_u32, - test_vfmlslq_lane_low_u32, test_vfmlalq_laneq_low_u32, - test_vfmlslq_laneq_low_u32): Rename ... - (test_vfmlal_lane_low_f16, test_vfmlsl_lane_low_f16, - test_vfmlal_laneq_low_f16, test_vfmlsl_laneq_low_f16, - test_vfmlalq_lane_low_f16, test_vfmlslq_lane_low_f16, - test_vfmlalq_laneq_low_f16, test_vfmlslq_laneq_low_f16): ... To this. - * gcc.target/aarch64/fp16_fmul_low.h (test_vfmlal_low_u32, - test_vfmlalq_low_u32, test_vfmlsl_low_u32, test_vfmlslq_low_u32): - Rename ... - (test_vfmlal_low_f16, test_vfmlalq_low_f16, test_vfmlsl_low_f16, - test_vfmlslq_low_f16): ... To This. - * lib/target-supports.exp - (check_effective_target_arm_fp16fml_neon_ok_nocache): Update test. - -2019-02-25 Dominique d'Humieres - - PR fortran/89282 - * gfortran.dg/overload_3.f90: New test. - -2019-02-25 Jakub Jelinek - - PR c++/89285 - * g++.dg/cpp1y/constexpr-89285-2.C: New test. - -2019-02-25 Dominique d'Humieres - - PR libfortran/89274 - * gfortran.dg/list_directed_large.f90: New test. - -2019-02-25 Jakub Jelinek - - PR target/89434 - * gcc.c-torture/execute/pr89434.c: New test. - - PR target/89438 - * gcc.dg/pr89438.c: New test. - -2019-02-24 Paolo Carlini - - PR c++/84585 - * g++.dg/cpp0x/pr84585.C: New. - -2019-02-24 Thomas Koenig - - PR fortran/89174 - * gfortran.dg/allocate_with_mold_3.f90: New test. - -2019-02-24 H.J. Lu - - PR target/87007 - * gcc.target/i386/pr87007-1.c: Compile with -mfpmath=sse. - * gcc.target/i386/pr87007-2.c: Likewise. - -2019-02-24 Harald Anlauf - - PR fortran/89266 - PR fortran/88326 - * gfortran.dg/pr89266.f90: New test. - * gfortran.dg/pr88326.f90: New test. - -2019-02-24 Jakub Jelinek - - PR rtl-optimization/89445 - * gcc.target/i386/avx512f-pr89445.c: New test. - -2019-02-23 Martin Sebor - - * gcc.dg/tree-ssa/builtin-sprintf-10.c: Cast remaining - wchar_t to wint_t to avoid a bogus -Wformat warning in - ILP32 (bug 77970). - -2019-02-23 H.J. Lu - - PR testsuite/89476 - * gfortran.dg/ISO_Fortran_binding_5.c: Include - "../../../libgfortran/ISO_Fortran_binding.h". - * gfortran.dg/ISO_Fortran_binding_6.c: Likewise. - -2019-02-23 H.J. Lu - - PR driver/69471 - * gcc.dg/pr69471-1.c: New test. - * gcc.dg/pr69471-2.c: Likewise. - * gcc.target/i386/pr69471-3.c: Likewise. - -2019-02-23 Jerry DeLisle - - PR fortran/84387 - * gfortran.dg/dtio_34.f90: New test. - -2019-02-23 Marek Polacek - - PR c++/88294 - ICE with non-constant noexcept-specifier. - * g++.dg/cpp0x/noexcept34.C: New test. - * g++.dg/cpp0x/noexcept35.C: New test. - - PR c++/89419 - * g++.dg/cpp1y/lambda-generic-89419.C: New test. - -2019-02-23 Paul Thomas - - PR fortran/88117 - * gfortran.dg/deferred_character_32.f90 : New test - -2019-02-23 Paul Thomas - - PR fortran/89385 - * gfortran.dg/ISO_Fortran_binding_1.f90 : Correct test for - previously incorrect lbound for allocatable expressions. Also - correct stop values to avoid repetition. - * gfortran.dg/ISO_Fortran_binding_5.f90 : New test - * gfortran.dg/ISO_Fortran_binding_5.c : Support previous test. - - PR fortran/89366 - * gfortran.dg/ISO_Fortran_binding_6.f90 : New test - * gfortran.dg/ISO_Fortran_binding_6.c : Support previous test. - * gfortran.dg/pr32599.f03 : Set standard to F2008. - -2019-02-22 David Malcolm - - PR c++/89390 - * g++.dg/diagnostic/pr89390.C: Update expected location of error, - renaming to a multicharacter name, so that start != finish. Add - tests for dtor locations. - -2019-02-22 Paolo Carlini - - PR c++/84676 - * g++.dg/cpp0x/pr84676.C: New. - -2019-02-22 Martin Sebor - - * gcc.dg/tree-ssa/builtin-sprintf-10.c: Cast wchar_t to wint_t - to avoid a bogus -Wformat warning in ILP32 (bug 77970). - -2019-02-22 Harald Anlauf - - PR fortran/83057 - * gfortran.dg/newunit_6.f90: New test. - -2019-02-22 Marek Polacek - - PR c++/89420 - ICE with CAST_EXPR in explicit-specifier. - * g++.dg/cpp2a/explicit14.C: New test. - -2019-02-22 Matthew Malcomson - - PR target/89324 - * gcc.dg/rtl/aarch64/subs_adds_sp.c: New test. - * gfortran.fortran-torture/compile/pr89324.f90: New test. - -2019-02-22 Martin Sebor - - PR c/89425 - * gcc.dg/Wabsolute-value.c: New test. - - * gcc.dg/Wbuiltin-declaration-mismatch-12.c: New test. - -2019-02-22 H.J. Lu - Hongtao Liu - Sunil K Pandey - - PR target/87007 - * gcc.target/i386/pr87007-1.c: New test. - * gcc.target/i386/pr87007-2.c: Likewise. - -2019-02-22 Richard Biener - - PR tree-optimization/89440 - * gcc.dg/vect/pr89440.c: New testcase. - -2019-02-22 Thomas Schwinge - - * lib/target-supports.exp (check_effective_target_offload_nvptx): - Remove. - - PR fortran/72741 - * gfortran.dg/goacc/classify-routine.f95: Adjust. - - * c-c++-common/goacc/routine-5.c: Revert earlier changes. - * g++.dg/goacc/template.C: Likewise. - - PR fortran/78027 - * gfortran.dg/goacc/pr78027.f90: Add 'dg-additional-options "-Wno-hsa"'. - -2019-02-22 Richard Biener - - PR middle-end/87609 - * gcc.dg/torture/restrict-7.c: New testcase. - -2019-02-21 Jakub Jelinek - - PR c++/89285 - * g++.dg/ubsan/vptr-4.C: Expect reinterpret_cast errors. - * g++.dg/cpp1y/constexpr-84192.C (f2): Adjust expected diagnostics. - * g++.dg/cpp1y/constexpr-70265-2.C (foo): Adjust expected line of - diagnostics. - * g++.dg/cpp1y/constexpr-89285.C: New test. - * g++.dg/cpp0x/constexpr-arith-overflow.C (add, sub, mul): Ifdef out - for C++11. - (TEST_ADD, TEST_SUB, TEST_MUL): Define to Assert (true) for C++11. - * g++.dg/cpp0x/constexpr-arith-overflow2.C: New test. - -2019-02-21 H.J. Lu - - PR target/87412 - * gcc.target/i386/indirect-thunk-attr-14.c: Replace - -fcf-protection with -fcf-protection=branch. - * gcc.target/i386/indirect-thunk-attr-15.c: Likewise. - * gcc.target/i386/indirect-thunk-attr-16.c: Likewise. - * gcc.target/i386/indirect-thunk-extern-8.c: Likewise. - * gcc.target/i386/indirect-thunk-extern-9.c: Likewise. - * gcc.target/i386/indirect-thunk-extern-10.c: Likewise. - -2019-02-21 Wilco Dijkstra - - * gcc.target/arm/pr88850-2.c: Block -mfloat-abi override. - * gcc.target/arm/pr88850.c: Use -mfloat-abi=softfp. - -2019-02-21 Thomas Koenig - - PR fortran/86119 - * gfortran.dg/warn_conversion_11.f90: New test. - -2019-02-21 H.J. Lu - - PR target/87412 - * gcc.target/i386/pr87412-1.c: New file. - * gcc.target/i386/pr87412-2.c: Likewise. - * gcc.target/i386/pr87412-3.c: Likewise. - * gcc.target/i386/pr87412-4.c: Likewise. - -2019-02-20 Jakub Jelinek - - PR c++/89403 - * g++.dg/cpp0x/pr89403.C: New test. - - PR c++/89405 - * g++.dg/cpp1z/inline-var5.C: New test. - - PR middle-end/89412 - * gcc.c-torture/compile/pr89412.c: New test. - -2019-02-20 Jakub Jelinek - David Malcolm - - PR middle-end/89091 - * gcc.dg/torture/pr89091.c: New test. - -2019-02-20 Jakub Jelinek - - PR middle-end/88074 - PR middle-end/89415 - * gcc.dg/pr88074-2.c: New test. - - PR c++/89336 - * g++.dg/cpp1y/constexpr-89336-3.C: New test. - -2019-02-20 David Malcolm - - PR c/89410 - * gcc.dg/pr89410-1.c: New test. - * gcc.dg/pr89410-2.c: New test. - -2019-02-20 Pat Haugen - - * lib/target-supports.exp (check_effective_target_vect_usad_char): - Add PowerPC support. - * gcc.dg/vect/slp-reduc-sad.c: Update scan string. - * gcc.dg/vect/vect-reduc-sad.c: Likewise. - -2019-02-20 Andre Vieira - - PR target/86487 - * gcc.target/arm/pr86487.c: New. - -2019-02-20 Paolo Carlini - - PR c++/84536 - * g++.dg/cpp1y/var-templ60.C: New. - -2019-02-20 Li Jia He - - PR target/88100 - * gcc.target/powerpc/pr88100.c: New testcase. - -2019-02-19 Wilco Dijkstra - - * gcc.target/arm/pr88850.c: Block -mfloat-abi override. - -2019-02-19 Thomas Koenig - - PR fortran/89384 - * gfortran.dg/ISO_Fortran_binding_4.f90 - -2019-02-19 Thomas Schwinge - - PR c/87924 - * c-c++-common/goacc/asyncwait-5.c: Remove XFAILs. - * gfortran.dg/goacc/asyncwait-5.f: Likewise. - -2019-02-19 Richard Biener - - PR middle-end/88074 - * gcc.dg/pr88074.c: New testcase. - -2019-02-19 Jakub Jelinek - - PR middle-end/89303 - * g++.dg/torture/pr89303.C: Move everything from std namespace to my - namespace. - - PR c++/89387 - * g++.dg/cpp0x/lambda/lambda-89387.C: New test. - - PR c++/89391 - * g++.dg/cpp0x/reinterpret_cast2.C: New test. - - PR c++/89390 - * g++.dg/diagnostic/pr89390.C: New test. - -2019-02-18 Sharon Dvir - - * README: Fix typos. - -2019-02-18 Rainer Orth - - * g++.dg/torture/pr89303.C (bad_weak_ptr): Rename to - bad_weak_ptr_. - -2019-02-18 Thomas Koenig - - PR fortran/87689 - * gfortran.dg/lto/20091028-1_0.f90: Add -Wno-lto-type-mismatch to - options. - * gfortran.dg/lto/20091028-2_0.f90: Likewise. - * gfortran.dg/lto/pr87689_0.f: New file. - * gfortran.dg/lto/pr87689_1.f: New file. - -2019-02-18 Wilco Dijkstra - - * g++.dg/wrappers/pr88680.C: Add -fno-short-enums. - -2019-02-18 Rainer Orth - - * gdc.dg/dg.exp: Tabify. - * gdc.dg/lto/lto.exp: Likewise. - * gdc.test/gdc-test.exp: Likewise. - * lib/gdc-dg.exp: Likewise. - * lib/gdc.exp: Likewise. - -2019-02-18 Richard Biener - - PR tree-optimization/89296 - * gcc.dg/uninit-pr89296.c: New testcase. - -2019-02-18 Jakub Jelinek - - PR target/89369 - * gcc.c-torture/execute/pr89369.c: New test. - * gcc.target/s390/md/rXsbg_mode_sXl.c (rosbg_si_srl, - rxsbg_si_srl): Expect last 3 operands 32,63,62 rather than - 34,63,62. - -2019-02-18 Martin Jambor - - PR tree-optimization/89209 - * gcc.dg/tree-ssa/pr89209.c: New test. - -2019-02-18 Martin Liska - - * gfortran.dg/simd-builtins-7.f90: New test. - * gfortran.dg/simd-builtins-7.h: New test. - -2019-02-17 Harald Anlauf - - PR fortran/88299 - * gfortran.dg/pr88299.f90: New test. - -2019-02-17 Harald Anlauf - - PR fortran/89077 - * gfortran.dg/transfer_simplify_12.f90: New test. - -2019-02-17 Marek Polacek - - PR c++/89217 - ICE with list-initialization in range-based for loop. - * g++.dg/cpp0x/range-for37.C: New test. - - * g++.old-deja/g++.robertl/eb82.C: Tweak dg-error. - - PR c++/89315 - * g++.dg/cpp0x/initlist114.C: New test. - - PR c++/89356 - * g++.dg/abi/mangle68.C: New test. - * g++.dg/cpp0x/decltype69.C: New test. - -2019-02-16 David Malcolm - - PR c++/88680 - * g++.dg/wrappers/pr88680.C: New test. - -2019-02-17 Thomas Koenig - - PR fortran/71066 - * gfortran.dg/coarray_data_1.f90: New test. - -2019-02-16 Eric Botcazou - - * c-c++-common/patchable_function_entry-decl.c: Add -fno-pie on SPARC. - * c-c++-common/patchable_function_entry-default.c: Likewise. - * c-c++-common/patchable_function_entry-definition.c: Likewise. - -2019-02-16 Jakub Jelinek - - PR rtl-optimization/66152 - * gcc.target/i386/pr66152.c: New test. - -2019-02-15 Eric Botcazou - - * g++.dg/asan/asan_oob_test.cc: Skip OOB_int on SPARC. - * g++.dg/asan/function-argument-3.C: Tweak for 32-bit SPARC. - -2019-02-15 Tamar Christina - - * lib/target-supports.exp - (check_effective_target_arm_neon_softfp_fp16_ok_nocache): Drop non-fpu - checking alternative. - -2019-02-15 Eric Botcazou - - * gcc.target/sparc/struct-ret-check-1.c: Add -fno-pie option. - -2019-02-15 Eric Botcazou - - * c-c++-common/patchable_function_entry-decl.c: Do not run on Visium. - * c-c++-common/patchable_function_entry-default.c: Likewise. - * c-c++-common/patchable_function_entry-definition.c: Likewise. - * gcc.dg/tree-ssa/pr84859.c: Add -ftree-cselim switch. - -2019-02-15 Jakub Jelinek - - PR other/69006 - PR testsuite/88920 - * lib/gcc-dg.exp: If llvm_binutils effective target, set - allow_blank_lines to 2 during initialization. - (dg-allow-blank-lines-in-output): Set allow_blank_lines to 1 only if - it was previously zero. - (gcc-dg-prune): Don't check for llvm_binutils effective target here. - Clear allow_blank_lines afterwards whenever it was 1. - * gdc.test/gdc-test.exp (dmd2dg): Don't call - dg-allow-blank-lines-in-output here. - (gdc-do-test): Set allow_blank_lines to 3 if it is 0 before running - the tests and restore it back at the end. - - * c-c++-common/ubsan/opts-1.c: New test. - * c-c++-common/ubsan/opts-2.c: New test. - * c-c++-common/ubsan/opts-3.c: New test. - * c-c++-common/ubsan/opts-4.c: New test. - -2019-02-15 Richard Biener - Jakub Jelinek - - PR tree-optimization/89278 - * gcc.dg/pr89278.c: New test. - -2019-02-15 Jakub Jelinek - - PR c/89340 - * gcc.dg/pr89340.c: New test. - * gcc.dg/torture/pr57036-2.c (jpgDecode_convert): Expect a warning - that leaf attribute on nested function is useless. - - PR other/89342 - * gcc.dg/pr89342.c: New test. - -2019-02-14 Jakub Jelinek - - PR rtl-optimization/89354 - * gcc.dg/pr89354.c: New test. - -2019-02-14 Uroš Bizjak - - * gcc.target/i386/ssse3-pabsb.c: Re-enable 64-bit form on AVX targets. - * gcc.target/i386/ssse3-pabsd.c: Ditto. - * gcc.target/i386/ssse3-pabsw.c: Ditto. - * gcc.target/i386/ssse3-palignr.c: Ditto. - * gcc.target/i386/ssse3-phaddd.c: Ditto. - * gcc.target/i386/ssse3-phaddsw.c: Ditto. - * gcc.target/i386/ssse3-phaddw.c: Ditto. - * gcc.target/i386/ssse3-phsubd.c: Ditto. - * gcc.target/i386/ssse3-phsubsw.c: Ditto. - * gcc.target/i386/ssse3-phsubw.c: Ditto. - * gcc.target/i386/ssse3-pmaddubsw.c: Ditto. - * gcc.target/i386/ssse3-pmulhrsw.c: Ditto. - * gcc.target/i386/ssse3-pshufb.c: Ditto. - * gcc.target/i386/ssse3-psignb.c: Ditto. - * gcc.target/i386/ssse3-psignd.c: Ditto. - * gcc.target/i386/ssse3-psignw.c: Ditto. - -2018-02-14 Steve Ellcey - - * gcc.target/aarch64/pcs_attribute.c: New test. - -2019-02-14 Harald Anlauf - - PR fortran/88248 - * gfortran.dg/pr88248.f90: New test. - * gfortran.dg/f2018_obs.f90: Updated test. - -2019-02-14 Tamar Christina - - * gcc.target/arm/pr88850.c: change options to additional option. - -2019-02-14 Rainer Orth - - PR d/87864 - * lib/gdc.exp (gdc_link_flags): Add path to drtbegin.o/drtend.o if - present. - -2019-02-14 Tamar Christina - - PR target/88850 - * gcc.target/arm/pr88850-2.c: New test. - * lib/target-supports.exp - (check_effective_target_arm_neon_softfp_fp16_ok_nocache, - check_effective_target_arm_neon_softfp_fp16_ok, - add_options_for_arm_neon_softfp_fp16): New. - -2019-02-14 Matthew Malcomson - - * gcc.dg/rtl/arm/ldrd-peepholes.c: Restrict testcase. - * lib/target-supports.exp: Add procedure to check for ldrd. - -2019-02-14 Cesar Philippidis - - PR fortran/72715 - * gfortran.dg/goacc/loop-3-2.f95: Error on do concurrent loops. - * gfortran.dg/goacc/loop-3.f95: Likewise. - * gfortran.dg/goacc/pr72715.f90: New test. - -2019-02-14 Martin Liska - - PR rtl-optimization/89242 - * g++.dg/pr89242.C: New test. - -2019-02-14 Jakub Jelinek - - PR tree-optimization/89314 - * gcc.dg/pr89314.c: New test. - - PR middle-end/89284 - * gcc.dg/ubsan/pr89284.c: New test. - -2019-02-13 Ian Lance Taylor - - * gcc.dg/func-attr-1.c: New test. - -2019-02-13 Uroš Bizjak - - * gcc.target/i386/sse2-init-v2di-2.c (dg-final): Update scan string. - -2019-02-13 Marek Polacek - - PR c++/89297 - ICE with OVERLOAD in template. - * g++.dg/cpp0x/initlist113.C: New test. - -2019-02-13 Alexandre Oliva - - PR c++/86379 - * g++.dg/cpp0x/pr86379.C: New. - - PR c++/87322 - * g++.dg/cpp1y/pr87322.C: New. - * g++.dg/cpp0x/lambda/lambda-variadic5.C: Test that we - instantiate the expected number of lambda functions. - -2019-02-13 Marek Polacek - - PR c++/77304 - * g++.dg/cpp2a/nontype-class13.C: New test. - -2019-02-13 Wilco Dijkstra - - PR target/89190 - * gcc.target/arm/pr89190.c: New test. - -2019-02-13 David Malcolm - - PR c++/89036 - * g++.dg/concepts/pr89036.C: New test. - -2019-02-13 Tamar Christina - - PR target/88847 - * gcc.target/aarch64/sve/pr88847.c: New test. - -2019-02-13 Jonathan Wakely - Jakub Jelinek - - PR middle-end/89303 - * g++.dg/torture/pr89303.C: New test. - -2019-02-13 Paolo Carlini - - PR c++/88986 - * g++.dg/cpp1z/using4.C: New. - * g++.dg/cpp1z/using5.C: Likewise. - * g++.dg/cpp1z/using6.C: Likewise. - -2019-02-13 Jakub Jelinek - - PR target/89290 - * gcc.target/i386/pr89290.c: New test. - -2019-01-23 Xuepeng Guo - - * gcc.target/i386/enqcmd.c: New test. - * gcc.target/i386/enqcmds.c: Likewise. - * g++.dg/other/i386-2.C: Add -menqcmd. - * g++.dg/other/i386-3.C: Likewise. - * gcc.target/i386/sse-12.c: Likewise. - * gcc.target/i386/sse-13.c: Likewise. - * gcc.target/i386/sse-14.c: Likewise. - * gcc.target/i386/sse-23.c: Likewise. - -2019-01-23 Xiong Hu Luo - - * gcc.target/powerpc/crypto-builtin-1.c - (crypto1_be, crypto2_be, crypto3_be, crypto4_be, crypto5_be): - New testcases. - -2019-02-12 H.J. Lu - - PR target/89229 - * gcc.target/i386/pr89229-1.c: New test. - -2019-02-12 Ilya Leoshkevich - - PR target/89233 - * gcc.target/s390/pr89233.c: New test. - -2018-01-12 Bill Schmidt - - * gcc.target/powerpc/vec-sld-modulo.c: Require p8vector_hw. - * gcc.target/powerpc/vec-srad-modulo.c: Likewise. - * gcc.target/powerpc/vec-srd-modulo.c: Likewise. - -2019-02-12 Richard Biener - - PR tree-optimization/89253 - * gfortran.dg/pr89253.f: New testcase. - -2019-02-11 Marek Polacek - - PR c++/89212 - ICE converting nullptr to pointer-to-member-function. - * g++.dg/cpp0x/nullptr40.C: New test. - * g++.dg/cpp0x/nullptr41.C: New test. - -2019-02-11 Jakub Jelinek - - PR c++/88977 - * g++.dg/cpp2a/is-constant-evaluated7.C: New test. - -2019-02-12 Wilco Dijkstra - - PR tree-optimization/86637 - * gcc.c-torture/compile/pr86637-2.c: Test pthread and graphite target. - -2019-02-11 Martin Sebor - - PR tree-optimization/88771 - * gcc.dg/Wstringop-overflow-8.c: New test. - * gcc.dg/Wstringop-overflow-9.c: New test. - * gcc.dg/Warray-bounds-40.c: New test. - * gcc.dg/builtin-stpncpy.c: Adjust. - * gcc.dg/builtin-stringop-chk-4.c: Adjust. - * g++.dg/opt/memcpy1.C: Adjust. - -2019-02-11 Martin Sebor - - PR c++/87996 - * c-c++-common/array-5.c: New test. - * c-c++-common/pr68107.c: Adjust text of diagnostics. - * g++.dg/init/new38.C: Same. - * g++.dg/init/new43.C: Same. - * g++.dg/init/new44.C: Same. - * g++.dg/init/new46.C: Same. - * g++.dg/other/large-size-array.C: Same. - * g++.dg/other/new-size-type.C: Same. - * g++.dg/template/array30.C: Same. - * g++.dg/template/array32.C: New test. - * g++.dg/template/dependent-name3.C: Adjust. - * gcc.dg/large-size-array-3.c: Same. - * gcc.dg/large-size-array-5.c: Same. - * gcc.dg/large-size-array.c: Same. - * g++.old-deja/g++.brendan/array1.C: Same. - * g++.old-deja/g++.mike/p6149.C: Same. - -2019-02-11 Martin Sebor - - * gcc.dg/tree-prof/inliner-1.c: Correct comments. - -2019-02-11 Tamar Christina - - PR middle-end/88560 - * gcc.target/arm/armv8_2-fp16-move-1.c: Update assembler scans. - * gcc.target/arm/fp16-aapcs-3.c: Likewise. - * gcc.target/arm/fp16-aapcs-1.c: Likewise. - -2019-02-11 Bill Schmidt - - * gcc.target/powerpc/vec-sld-modulo.c: New. - * gcc.target/powerpc/vec-srad-modulo.c: New. - * gcc.target/powerpc/vec-srd-modulo.c: New. - -2019-02-11 Martin Liska - - PR ipa/89009 - * g++.dg/ipa/pr89009.C: New test. - -2019-02-10 Thomas Koenig - - PR fortran/71723 - * gfortran.dg/pointer_init_2.f90: Adjust error messages. - * gfortran.dg/pointer_init_6.f90: Likewise. - * gfortran.dg/pointer_init_9.f90: New test. - -2019-02-10 Thomas Koenig - - PR fortran/67679 - * gfortran.dg/warn_undefined_1.f90: New test.o - -2019-02-10 Jakub Jelinek - - PR tree-optimization/89268 - * gcc.dg/vect/pr89268.c: New test. - -2019-02-10 Rainer Orth - - * gnat.dg/lto19.adb: Remove dg-excess-errors. - -2019-02-09 Harald Anlauf - - PR fortran/89077 - * gfortran.dg/substr_simplify.f90: New test. - -2019-02-09 Jan Hubicka - - PR ipa/88711 - * gfortran.dg/pr79966.f90: Xfail everwyhere. - -2019-02-09 Paul Thomas - - PR fortran/89200 - * gfortran.dg/array_reference_2.f90 : New test. - -2019-02-09 Jakub Jelinek - - PR middle-end/89246 - * gcc.dg/gomp/pr89246-1.c: New test. - * gcc.dg/gomp/pr89246-2.c: New test. - -2019-02-08 Jakub Jelinek - - PR tree-optimization/88739 - * gcc.c-torture/execute/pr88739.c: New test. - -2019-02-08 Jozef Lawrynowicz - - PR testsuite/89258 - * gcc.dg/tree-ssa/pr80887.c: Require int32plus. - -2019-02-08 Robin Dapp - - * gcc.target/s390/vector/vec-copysign-execute.c: New test. - * gcc.target/s390/vector/vec-copysign.c: New test. - -2019-02-08 Richard Biener - - PR tree-optimization/89247 - * gcc.dg/torture/pr89247.c: New testcase. - -2019-02-08 Ilya Leoshkevich - - * gcc.target/s390/jump-label.c: New test. - -2019-02-08 Richard Biener - - PR testsuite/89250 - * gcc.dg/vect/vect-24.c: Remove XFAIL on vect_condition targets. - -2019-02-08 Jakub Jelinek - - PR rtl-optimization/89234 - * g++.dg/ubsan/pr89234.C: New test. - -2019-02-08 Richard Biener - - PR middle-end/89223 - * gcc.dg/torture/pr89223.c: New testcase. - -2019-02-07 David Malcolm - - PR tree-optimization/86637 - PR tree-optimization/89235 - * gcc.c-torture/compile/pr86637-1.c: New test. - * gcc.c-torture/compile/pr86637-2.c: New test. - * gcc.c-torture/compile/pr86637-3.c: New test. - * gcc.c-torture/compile/pr89235.c: New test. - -2019-02-07 Kyrylo Tkachov - - * gcc.target/aarch64/abd_1.c: New test. - * gcc.dg/sabd_1.c: Likewise. - -2019-02-07 Dominique d'Humieres - - PR fortran/52789 - * gfortran.dg/wunused-parameter_2.f90: New test. - -2019-02-07 Matthew Malcomson - - * gcc.dg/rtl/arm/ldrd-peepholes.c: Only run on arm - -2019-02-07 Andreas Krebbel - - * gcc.target/s390/zvector/xl-xst-align-1.c: New test. - * gcc.target/s390/zvector/xl-xst-align-2.c: New test. - -2019-02-07 Matthew Malcomson - Jakub Jelinek - - PR bootstrap/88714 - * gcc.c-torture/execute/pr88714.c: New test. - * gcc.dg/rtl/arm/ldrd-peepholes.c: New test. - -2019-02-07 Tamar Christina - - PR/target 88850 - * gcc.target/arm/pr88850.c: New test. - -2019-02-07 Alexandre Oliva - - PR c++/86218 - * g++.dg/cpp0x/pr86218.C: New. - -2019-02-06 Vladimir Makarov - - PR rtl-optimization/89225 - * gcc.target/powerpc/pr89225.c: New. - -2019-02-06 Eric Botcazou - - * gnat.dg/opt76.adb: New test. - -2019-02-06 Thomas Koenig - - PR fortran/71860 - * gfortran.dg/null_10.f90: New test. - -2019-02-06 David Malcolm - - PR c++/71302 - * g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C: Add expected - column numbers to dg-warning directives where they are correct. - * g++.dg/warn/Wzero-as-null-pointer-constant-5.C: Likewise. - * g++.dg/warn/Wzero-as-null-pointer-constant-7.C: Likewise. - * g++.dg/warn/Wzero-as-null-pointer-constant-8.C: New test. - -2019-02-06 Rainer Orth - - PR debug/87451 - * gcc.dg/debug/dwarf2/inline5.c: Allow for non-comment before - "(DIE (0x[0-9a-f]*) DW_TAG_variable". - xfail scan-assembler-not with Solaris as. - -2019-02-06 Bill Seurer - - * gcc.target/powerpc/vsx-vector-6.p7.c: Update instruction - counts and target. - * gcc.target/powerpc/vsx-vector-6.p8.c: Update instruction - counts and target. - * gcc.target/powerpc/vsx-vector-6.p9.c: Update instruction - counts and target. - -2019-02-06 Richard Biener - - PR tree-optimization/89182 - * gfortran.dg/graphite/pr89182.f90: New testcase. - -2019-02-06 Jakub Jelinek - - PR c/89211 - * gcc.dg/pr89211.c: New test. - - PR middle-end/89210 - * c-c++-common/builtin-convertvector-2.c: New test. - -2019-02-05 Nikhil Benesch - - PR go/89019 - * lib/go-torture.exp: Test compiling with -flto. - -2019-02-06 Joseph Myers - - PR c/88584 - * gcc.dg/redecl-18.c: New test. - -2019-02-05 Jakub Jelinek - - PR c++/89187 - * g++.dg/opt/pr89187.C: New test. - -2019-02-05 Andrea Corallo - - * jit.dg/add-driver-options-testlib.c: Add support file for - test-add-driver-options.c testcase. - * jit.dg/all-non-failing-tests.h: Add note about - test-add-driver-options.c - * jit.dg/jit.exp (jit-dg-test): Update to support - add-driver-options-testlib.c compilation. - * jit.dg/test-add-driver-options.c: New testcase. - -2019-02-05 Jakub Jelinek - - PR rtl-optimization/11304 - * gcc.target/i386/call-1.c (set_eax): Add "eax" clobber. - * gcc.target/i386/call-2.c: New test. - -2019-02-05 Marek Polacek - - PR c++/89158 - by-value capture of constexpr variable broken. - * g++.dg/cpp0x/lambda/lambda-89158.C: New test. - -2019-02-05 Segher Boessenkool - - * gcc.dg/vect/pr84711.c: Use -Wno-psabi. - -2019-02-05 Jakub Jelinek - - * gcc.target/powerpc/vec-extract-sint128-1.c: Require int128 effective - target. - * gcc.target/powerpc/vec-extract-uint128-1.c: Likewise. - - PR target/89188 - * g++.dg/opt/pr89188.C: New test. - - PR rtl-optimization/89195 - * gcc.c-torture/execute/pr89195.c: New test. - -2019-02-05 Kelvin Nilsen - - * gcc.target/powerpc/vec-extract-slong-1.c: Require p8 execution - hardware. - * gcc.target/powerpc/vec-extract-schar-1.c: Likewise. - * gcc.target/powerpc/vec-extract-sint128-1.c: Likewise. - * gcc.target/powerpc/vec-extract-sshort-1.c: Likewise. - * gcc.target/powerpc/vec-extract-ulong-1.c: Likewise. - * gcc.target/powerpc/vec-extract-uchar-1.c: Likewise. - * gcc.target/powerpc/vec-extract-sint-1.c: Likewise. - * gcc.target/powerpc/vec-extract-uint128-1.c: Likewise. - * gcc.target/powerpc/vec-extract-ushort-1.c: Likewise. - * gcc.target/powerpc/vec-extract-uint-1.c: Likewise. - -2019-02-05 Jakub Jelinek - - PR target/89186 - * g++.dg/ext/vector36.C: New test. - -2019-02-05 Alexandre Oliva - - PR c++/87770 - * g++.dg/pr87770.C: New. - -2019-02-04 Harald Anlauf - - PR fortran/89077 - * gfortran.dg/pr89077.f90: New test. - -2019-02-04 Martin Liska - - PR ipa/88985 - * gcc.dg/ipa/pr88985.c: New test. - -2019-02-04 Jakub Jelinek - - * gcc.dg/debug/dwarf2/inline5.c: Handle also @, ; or | comment - characters or extra spaces after the comment character. - -2019-02-04 Jakub Jelinek - - * g++.dg/torture/alias-1.C: New test. - -2019-02-03 Martin Sebor - - PR c/69661 - * c-c++-common/Wsequence-point-2.c: New test. - - PR c++/44648 - * g++.dg/warn/Wunused-var-35.C: New test. - -2019-02-03 Richard Biener - - PR debug/87295 - * g++.dg/debug/dwarf2/pr87295.C: New testcase. - -2019-02-02 Thomas Koenig - - PR fortran/88298 - * gfortran.dg/warn_conversion_10.f90: New test. - -2019-02-02 Paul Thomas - - PR fortran/88393 - * gfortran.dg/alloc_comp_assign_16.f03 : New test. - -2019-02-02 Paul Thomas - - PR fortran/88980 - * gfortran.dg/realloc_on_assign_32.f90 : New test. - -2019-02-02 Paul Thomas - - PR fortran/88685 - * gfortran.dg/pointer_array_component_3.f90 : New test. - -2019-02-02 Jakub Jelinek - - PR middle-end/87887 - * gcc.dg/gomp/pr87887-1.c: New test. - * gcc.dg/gomp/pr87887-2.c: New test. - -2019-02-01 Jakub Jelinek - - PR fortran/83246 - PR fortran/89084 - * gfortran.dg/pr89084.f90: New test. - * gfortran.dg/lto/pr89084_0.f90: New test. - * gfortran.dg/pr83246.f90: New test. - -2019-02-01 Marek Polacek - - PR c++/88325 - ICE with invalid out-of-line template member definition. - * g++.dg/cpp2a/typename14.C: New test. - -2019-02-01 Richard Biener - - PR middle-end/88597 - * gcc.dg/torture/pr88597.c: New testcase. - -2019-02-01 Richard Biener - - PR tree-optimization/85497 - * gcc.dg/graphite/pr85497.c: New testcase. - -2019-02-01 Richard Biener - - PR testsuite/87451 - * gcc.dg/debug/dwarf2/inline5.c: Allow more comment variants. - -2019-02-01 Jakub Jelinek - - PR tree-optimization/89143 - * gcc.dg/tree-ssa/vrp121.c: New test. - - PR tree-optimization/88107 - * gcc.dg/gomp/pr88107.c: New test. - - PR c++/87175 - * g++.dg/ext/attrib57.C: New test. - -2018-02-01 Bin Cheng - - PR tree-optimization/88932 - * gfortran.dg/pr88932.f90: New test. - -2019-01-31 Marek Polacek - - PR c++/88983 - ICE with switch in constexpr function. - * g++.dg/cpp1y/constexpr-88983.C: New test. - -2019-01-31 Thomas Koenig - - PR fortran/88669 - * gfortran.dg/contiguous_9.f90: New test. - -2019-01-31 Marek Polacek - - PR c++/89083, c++/80864 - ICE with list initialization in template. - * g++.dg/cpp0x/initlist107.C: New test. - * g++.dg/cpp0x/initlist108.C: New test. - * g++.dg/cpp0x/initlist109.C: New test. - * g++.dg/cpp0x/initlist110.C: New test. - * g++.dg/cpp0x/initlist111.C: New test. - * g++.dg/cpp0x/initlist112.C: New test. - * g++.dg/init/ptrfn4.C: New test. - -2019-01-31 David Malcolm - - PR c/89122 - * g++.dg/spellcheck-stdlib.C (test_FLT_MAX): New test. - * gcc.dg/spellcheck-stdlib.c (test_FLT_MAX): New test. - -2019-01-31 Richard Biener - - PR tree-optimization/89135 - * gcc.dg/torture/pr89135.c: New testcase. - -2019-01-31 Jakub Jelinek - - PR sanitizer/89124 - * c-c++-common/asan/pr89124.c: New test. - -2019-01-30 Jerry DeLisle - - PR fortran/52564 - * gfortran.dg/print_2.f90: New test. - -2019-01-30 Vladimir Makarov - - PR rtl-optimization/87246 - * gcc.target/i386/pr87246.c: New. - -2019-01-30 Marek Polacek - - PR c++/89119 - ICE with value-initialization in template. - * g++.dg/cpp0x/initlist-value3.C: New test. - -2019-01-30 Kelvin Nilsen - - * gcc.target/powerpc/vec-extract-schar-1.c: New test. - * gcc.target/powerpc/vec-extract-sint-1.c: New test. - * gcc.target/powerpc/vec-extract-sint128-1.c: New test. - * gcc.target/powerpc/vec-extract-slong-1.c: New test. - * gcc.target/powerpc/vec-extract-sshort-1.c: New test. - * gcc.target/powerpc/vec-extract-uchar-1.c: New test. - * gcc.target/powerpc/vec-extract-uint-1.c: New test. - * gcc.target/powerpc/vec-extract-uint128-1.c: New test. - * gcc.target/powerpc/vec-extract-ulong-1.c: New test. - * gcc.target/powerpc/vec-extract-ushort-1.c: New test. - -2019-01-30 Richard Biener - - PR tree-optimization/89111 - * gcc.dg/torture/pr89111.c: New testcase. - -2019-01-30 Andrew Stubbs - - PR testsuite/88920 - * lib/target-supports.exp: Cache result. - -2019-01-30 Jakub Jelinek - - PR c++/89105 - * g++.target/i386/pr89105.C: New test. - - PR c/89061 - * gcc.dg/pr89061.c: New test. - -2019-01-29 Martin Sebor - - PR c/88956 - * gcc.dg/Warray-bounds-39.c: New test. - -2019-01-29 Marek Polacek - - PR testsuite/89110 - * g++.dg/other/nontype-1.C: Expect error in all modes. - * g++.dg/parse/crash13.C: Likewise. - * g++.dg/parse/error36.C: Likewise. - * g++.dg/template/error29.C: Likewise. - -2019-01-29 Thomas Koenig - - PR fortran/57048 - * gfortran.dg/c_funptr_1.f90: New file. - * gfortran.dg/c_funptr_1_mod.f90: New file. - -2019-01-29 Jakub Jelinek - - PR c++/66676 - PR ipa/89104 - * gcc.dg/gomp/pr89104.c: New test. - -2019-01-29 Rainer Orth - - * gdc.dg/pr89042a.d: Mark as compile test. - * gdc.dg/pr89042b.d: Likewise. - -2019-01-29 Richard Biener - - PR debug/87295 - * g++.dg/lto/pr87295_0.C: New testcase. - -2019-01-29 Jakub Jelinek - - PR c/89045 - * gcc.dg/pr89045.c: New test. - - PR c/86125 - * gcc.dg/Wbuiltin-declaration-mismatch-7.c: Guard testcase for - lp64, ilp32 and llp64 only. - (fputs): Use unsigned long long instead of size_t for return type. - (vfprintf, vfscanf): Accept arbitrary target specific type for - va_list. - -2019-01-28 Marek Polacek - - PR c++/88358 - name wrongly treated as type. - * g++.dg/cpp2a/typename1.C: Add dg-error. - * g++.dg/cpp2a/typename13.C: New test. - * g++.dg/cpp2a/typename6.C: Make a function name qualified. - Add typename. - -2019-01-28 Marek Polacek - - * g++.dg/cpp0x/enum37.C: Add dg-error. - -2019-01-28 Bernd Edlinger - - * c-c++-common/Waddress-of-packed-member-1.c: Extended test case. - * c-c++-common/Waddress-of-packed-member-2.c: New test case. - -2019-01-28 Bernd Edlinger - - * gcc.dg/Wattribute-alias.c: Add test for #pragma GCC diagnostic ignored - "-Wattribute-alias". - -2019-01-27 Uroš Bizjak - - PR fortran/70696 - * gfortran.dg/coarray/event_3.f0: Add save attribue to x. - -2019-01-27 Marek Polacek - - PR c++/88815 - narrowing conversion lost in decltype. - PR c++/78244 - narrowing conversion in template not detected. - * g++.dg/cpp0x/Wnarrowing15.C: New test. - * g++.dg/cpp0x/Wnarrowing16.C: New test. - * g++.dg/cpp0x/constexpr-decltype3.C: New test. - * g++.dg/cpp1y/Wnarrowing1.C: New test. - - PR c++/89024 - ICE with incomplete enum type. - * g++.dg/cpp0x/enum37.C: New test. - -2019-01-27 Eric Botcazou - - * gnat.dg/opt75.adb: New test. - * gnat.dg/opt75_pkg.ad[sb]: New helper. - -2019-01-27 Jakub Jelinek - - PR target/87214 - * gcc.target/i386/avx512vl-pr87214-1.c: New test. - * gcc.target/i386/avx512vl-pr87214-2.c: New test. - -2019-01-26 Martin Jambor - - PR ipa/88933 - * gfortran.dg/gomp/pr88933.f90: New test. - -2019-01-26 Iain Buclaw - - PR d/89042 - * gdc.dg/pr89042a.d: New test. - * gdc.dg/pr89042b.d: New test. - -2019-01-26 Harald Anlauf - - PR fortran/57553 - * gfortran.dg/pr57553.f90: New test. - -2019-01-26 Eric Botcazou - - * gnat.dg/array34.adb: New test. - -2019-01-26 Jakub Jelinek - - PR preprocessor/88974 - * c-c++-common/cpp/pr88974.c: New test. - -2019-01-25 Paolo Carlini - - PR c++/88969 - * g++.dg/cpp2a/destroying-delete2.C: New. - * g++.dg/cpp2a/destroying-delete3.C: Likewise. - -2019-01-25 Steven G. Kargl - - PR fortran/85780 - * gfortran.dg/pr85780.f90: Update testcase for error message. - -2019-01-25 Richard Earnshaw - - PR target/88469 - * gcc.target/aarch64/aapcs64/test_align-10.c: New test. - * gcc.target/aarch64/aapcs64/test_align-11.c: New test. - * gcc.target/aarch64/aapcs64/test_align-12.c: New test. - -2019-01-25 Richard Sandiford - - PR middle-end/89037 - * gcc.dg/pr89037.c: New test. - -2019-01-25 Christophe Lyon - - * lib/target-supports.exp (check_effective_target_fenv): New. - * gcc.dg/torture/fp-int-convert-float128-timode-3.c: Add missing - fenv effective target. - * gcc.dg/torture/fp-int-convert-timode-1.c: Likewise. - * gcc.dg/torture/fp-int-convert-timode-2.c: Likewise. - * gcc.dg/torture/fp-int-convert-timode-3.c: Likewise. - * gcc.dg/torture/fp-int-convert-timode-4.c: Likewise. - -2019-01-25 Richard Biener - - PR tree-optimization/86865 - * gcc.dg/graphite/pr86865.c: New testcase. - * gcc.dg/graphite/pr69728.c: XFAIL. - * gcc.dg/graphite/scop-21.c: Likewise. - -2019-01-24 Martin Sebor - - PR c/86125 - PR c/88886 - PR middle-end/86308 - * gcc.dg/Wbuiltin-declaration-mismatch-6.c: New test. - * gcc.dg/Wbuiltin-declaration-mismatch-7.c: New test. - * gcc.dg/Wbuiltin-declaration-mismatch-8.c: New test. - * gcc.dg/Wbuiltin-declaration-mismatch-9.c: New test. - * gcc.dg/Wbuiltin-declaration-mismatch-10.c: New test. - * gcc.dg/builtins-69.c: New test. - * gcc.dg/Wint-conversion-2.c: Add expected warning. - * gcc.c-torture/execute/eeprof-1.c: Adjust function signatures. - -2019-01-24 Uroš Bizjak - - PR rtl-optimization/88948 - * gcc.target/i386/pr88948.c: New test. - -2019-01-24 Jakub Jelinek - - PR debug/89006 - * g++.dg/debug/pr89006.C: New test. - - PR middle-end/89015 - * gcc.dg/gomp/pr89015.c: New test. - - PR c++/88976 - * c-c++-common/gomp/cancel-2.c: New test. - * gcc.dg/gomp/cancel-1.c: New test. - * g++.dg/gomp/cancel-1.C: New test. - * g++.dg/gomp/cancel-2.C: New test. - * g++.dg/gomp/cancel-3.C: New test. - -2019-01-24 Jakub Jelinek - - PR tree-optimization/89027 - * gfortran.dg/gomp/pr89027.f90: New test. - -2019-01-24 Paul Thomas - - PR fortran/88929 - * gfortran.dg/ISO_Fortran_binding_3.f90: New test. - * gfortran.dg/ISO_Fortran_binding_3.c: Subsidiary source. - -2019-01-23 H.J. Lu - - PR libgcc/88931 - * gcc.dg/torture/fp-int-convert-timode-1.c: New test. - * gcc.dg/torture/fp-int-convert-timode-2.c: Likewise. - * gcc.dg/torture/fp-int-convert-timode-3.c: Likewise. - * gcc.dg/torture/fp-int-convert-timode-4.c: Likewise. - -2019-01-23 Uroš Bizjak - - PR target/88998 - * g++.target/i386/pr88998.c: New test. - -2019-01-23 Marek Polacek - - PR c++/88757 - qualified name treated wrongly as type. - * g++.dg/cpp0x/dependent2.C: New test. - * g++.dg/cpp2a/typename10.C: Remove dg-error. - * g++.dg/cpp2a/typename12.C: New test. - * g++.dg/template/static30.C: Remove dg-error. - -2019-01-23 Jakub Jelinek - - PR c/44715 - * c-c++-common/pr44715.c: New test. - - PR c++/88984 - * c-c++-common/pr88984.c: New test. - -2019-01-23 Richard Biener - - PR tree-optimization/89008 - * gcc.dg/torture/pr89008.c: New testcase. - -2019-01-23 Eric Botcazou - - * gnat.dg/specs/opt4.ads: New test. - -2019-01-23 Jakub Jelinek - - PR tree-optimization/88964 - * gfortran.dg/pr88964.f90: New test. - -2019-01-22 Martin Sebor - - * c-c++-common/Warray-bounds-2.c: Include headers only if they exist. - * c-c++-common/Warray-bounds-3.c: Make xfails conditional on target - non_strict_align. - * c-c++-common/Wrestrict-2.c: Include headers only if they exist. - * c-c++-common/Wrestrict.c: Make xfails conditional on target - non_strict_align. - -2018-01-22 Steve Ellcey - - * c-c++-common/gomp/pr60823-1.c: Change aarch64-*-* target - to aarch64*-*-* target. - * c-c++-common/gomp/pr60823-3.c: Ditto. - * g++.dg/gomp/declare-simd-1.C: Ditto. - * g++.dg/gomp/declare-simd-3.C: Ditto. - * g++.dg/gomp/declare-simd-4.C: Ditto. - * g++.dg/gomp/declare-simd-7.C: Ditto. - * g++.dg/gomp/pr88182.C: Ditto. - * gcc.dg/gomp/declare-simd-1.c: Ditto. - * gcc.dg/gomp/declare-simd-3.c: Ditto. - * gcc.dg/gomp/pr59669-2.c: Ditto. - * gcc.dg/gomp/pr87895-1.c: Ditto. - * gcc.dg/gomp/simd-clones-2.c: Ditto. - * gfortran.dg/gomp/declare-simd-2.f90: Ditto. - * gfortran.dg/gomp/pr79154-1.f90: Ditto. - * gfortran.dg/gomp/pr83977.f90: Ditto. - -2019-01-22 Jakub Jelinek - - PR target/88965 - * gcc.target/powerpc/pr88965.c: New test. - - PR middle-end/88968 - * c-c++-common/gomp/atomic-23.c: New test. - -2019-01-22 Harald Anlauf - - PR fortran/88579 - * gfortran.dg/power_8.f90: New test. - -2019-01-22 Sandra Loosemore - - * g++.dg/lto/pr87906_0.C: Add dg-require-effective-target fpic. - * g++.dg/vec-init-1.C: Likewise. - * gcc.dg/pr87793.c: Likewise. - -2019-01-22 Sandra Loosemore - - * g++.dg/cpp0x/pr86397-1.C: Add -fdelete-null-pointer-checks. - * g++.dg/cpp0x/pr86397-2.C: Likewise. - -2019-01-22 Richard Earnshaw - - PR target/88469 - * gcc.target/arm/aapcs/bitfield2.c: New test. - * gcc.target/arm/aapcs/bitfield3.c: New test. - -2019-01-22 Wilco Dijkstra - - PR rtl-optimization/87763 - * gcc.dg/vect/vect-nop-move.c: Fix testcase on AArch64. - -2019-01-22 H.J. Lu - - PR target/88954 - * gcc.target/i386/pr88954-1.c: New test. - * gcc.target/i386/pr88954-2.c: Likewise. - -2019-01-22 Richard Earnshaw - - PR target/88469 - * gcc.target/arm/aapcs/bitfield1.c: New test. - * gcc.target/arm/aapcs/overalign_rec1.c: New test. - * gcc.target/arm/aapcs/overalign_rec2.c: New test. - * gcc.target/arm/aapcs/overalign_rec3.c: New test. - -2019-01-22 Manfred Schwarb - - * gfortran.dg/array_function_5.f90: Fix a dg directive. - * gfortran.dg/block_16.f08: Likewise. - * gfortran.dg/dec_structure_14.f90: Likewise. - * gfortran.dg/namelist_96.f90: Likewise. - * gfortran.dg/newunit_5.f90.f90: Moved to - * gfortran.dg/newunit_5.f90: here. - * gfortran.dg/pdt_28.f03: Likewise. - * gfortran.dg/spread_simplify_1.f90: Likewise. - -2019-01-22 Tamar Christina - - PR/tree-optimization 88903 - * gcc.dg/vect/pr88903-1.c: Add explicit &. - -2019-01-22 Jakub Jelinek - - PR rtl-optimization/88904 - * gcc.c-torture/execute/pr88904.c: New test. - - PR target/88905 - * gcc.dg/pr88905.c: New test. - - PR rtl-optimization/49429 - PR target/49454 - PR rtl-optimization/86334 - PR target/88906 - * gcc.target/i386/pr86334.c: New test. - * gcc.target/i386/pr88906.c: New test. - -2019-01-21 Jakub Jelinek - - PR c++/88949 - * g++.dg/gomp/pr88949.C: New test. - -2019-01-21 Manfred Schwarb - - * class_66.f90: Fix a dg directive. - * debug/pr35154-stabs.f: Likewise. - * dec_d_lines_3.f: Likewise. - * dec_d_lines_3.f: Likewise. - * dec_structure_12.f90: Likewise. - * dec_structure_15.f90: Likewise. - * deferred_character_31.f90: Likewise. - * dtio_31.f03: Likewise. - * dtio_32.f03: Likewise. - * extends_11.f03: Likewise. - * integer_plus.f90: Likewise. - * pdt_25.f03: Likewise. - * pr58968.f: Likewise. - * pr78259.f90: Likewise. - * vect/vect-2.f90: Likewise. - * matmul_const.f90: Likewise. - -2019-01-21 Uroš Bizjak - - PR target/88938 - * gcc.target/i386/pr88938.c: New test. - -2019-01-21 Jakub Jelinek - - PR sanitizer/88901 - * g++.dg/asan/pr88901.C: New test. - -2019-01-21 Tamar Christina - - * g++.dg/vect/simd-clone-7.cc: Fix assembler scan. - -2019-01-21 Bernd Edlinger - - PR c/88928 - * c-c++-common/Waddress-of-packed-member-1.c: New test case. - * gcc.dg/pr88928.c: New test case. - -2019-01-21 Jakub Jelinek - - * gcc.dg/utf-array.c: Allow wchar_t to be printed as - {long ,short ,}{unsigned ,}int. - -2019-01-21 Richard Biener - - PR tree-optimization/88934 - * gfortran.dg/pr88934.f90: New testcase. - -2019-01-20 Ulrich Drepper - - Fix after C++ P0600 implementation. - * g++.dg/init/new39.C: Don't just ignore result of new. - -2019-01-20 Iain Buclaw - - * gdc.dg/runnable.d: Add more tests for comparing complex types. - -2019-01-20 Johannes Pfau - - * gdc.dg/runnable.d: Add tests for comparing complex types. - -2019-01-20 Kewen Lin - - * gcc.target/powerpc/altivec_vld_vst_addr.c: Remove, split into - altivec_vld_vst_addr-1.c and altivec_vld_vst_addr-2.c. - * gcc.target/powerpc/altivec_vld_vst_addr-1.c: New test. - * gcc.target/powerpc/altivec_vld_vst_addr-2.c: Ditto. - -2019-01-18 Dominique d'Humieres - - PR fortran/37835 - * gfortran.dg/no-automatic.f90: New test. - -2019-01-19 Steven G. Kargl - - PR fortran/77960 - * gfortran.dg/pr77960.f90: New test. - -2018-01-19 Thomas Koenig - Paul Thomas - - PR fortran/56789 - * gfortran.dg/contiguous_3.f90: Make code compilant. Remove - scan-tree tests that fail with patch. - * gfortran.dg/contiguous_8.f90: New test. - -2019-01-19 Richard Sandiford - - * gfortran.dg/loop_versioning_1.f90: Bump the number of identified - inner strides. - * gfortran.dg/loop_versioning_9.f90: New test. - * gfortran.dg/loop_versioning_10.f90: Likewise. - -2019-01-19 Jakub Jelinek - - PR fortran/88902 - * gfortran.dg/pr88902.f90: New test. - -2019-01-18 Martin Sebor - - * c-c++-common/attr-nonstring-3.c: Remove an xfail. - -2019-01-18 Ian Lance Taylor - - * go.go-torture/execute/names-1.go: Stop using debug/xcoff, which - is no longer externally visible. - -2019-01-18 Marek Polacek - - PR c++/86926 - * g++.dg/cpp1z/constexpr-lambda23.C: New test. - -2019-01-18 H.J. Lu - - PR middle-end/88587 - * g++.target/i386/pr88587.C (dg-do): Add { target ia32 }. - (dg-options): Replace -m32 with -fno-pic. - * gcc.target/i386/mvc13.c (dg-do): Add { target ia32 }. - (dg-options): Remove -m32. - -2019-01-18 Richard Biener - - PR tree-optimization/88903 - * gcc.dg/vect/pr88903-1.c: New testcase. - * gcc.dg/vect/pr88903-2.c: Likewise. - -2019-01-18 H.J. Lu - - PR c/51628 - PR c/88664 - * c-c++-common/pr51628-33.c: New test. - * c-c++-common/pr51628-35.c: New test. - * c-c++-common/pr88664-1.c: Likewise. - * c-c++-common/pr88664-2.c: Likewise. - * gcc.dg/pr51628-34.c: Likewise. - -2019-01-18 Richard Earnshaw - - PR target/88799 - * gcc.target/arm/multilib.exp (config "aprofile"): Add tests for - mp and sec extensions to armv7-a. - -2019-01-18 Martin Liska - - * gcc.dg/no_profile_instrument_function-attr-1.c: Update - expected function name. - -2019-01-18 Jakub Jelinek - - PR tree-optimization/86214 - * g++.dg/opt/pr86214-1.C: New test. - * g++.dg/opt/pr86214-2.C: New test. - -2019-01-18 Christophe Lyon - - * gcc.target/arm/pr77904.c: Add dg-warning for sp clobber. - -2019-01-18 Jakub Jelinek - - Reapply: - 2018-12-15 Jakub Jelinek - - PR target/88489 - * gcc.target/i386/avx512vl-vfixupimmsd-2.c: New test. - * gcc.target/i386/avx512vl-vfixupimmss-2.c: New test. - -2019-01-18 Martin Liska - - PR middle-end/88587 - * g++.target/i386/pr88587.C: New test. - * gcc.target/i386/mvc13.c: New test. - -2018-01-17 Steve Ellcey - - PR fortran/88898 - * gfortran.dg/gomp/declare-simd-2.f90: Add aarch64 target specifier to - warning checks. - * gfortran.dg/gomp/pr79154-1.f90: Ditto. - * gfortran.dg/gomp/pr83977.f90: Ditto. - -2019-01-17 Martin Sebor - - PR middle-end/88273 - * gcc.dg/Warray-bounds-38.c: New test. - -2018-01-17 Steve Ellcey - - * c-c++-common/gomp/pr60823-1.c: Add aarch64 specific - warning checks and assembler scans. - * c-c++-common/gomp/pr60823-3.c: Ditto. - * c-c++-common/gomp/pr63328.c: Ditto. - * g++.dg/gomp/declare-simd-1.C: Ditto. - * g++.dg/gomp/declare-simd-3.C: Ditto. - * g++.dg/gomp/declare-simd-4.C: Ditto. - * g++.dg/gomp/declare-simd-7.C: Ditto. - * g++.dg/gomp/pr88182.C: Ditto. - * g++.dg/vect/simd-clone-7.cc: Ditto. - * gcc.dg/gomp/declare-simd-1.c: Ditto. - * gcc.dg/gomp/declare-simd-3.c: Ditto. - * gcc.dg/gomp/pr59669-2.c: Ditto. - * gcc.dg/gomp/pr87895-1.c: Ditto. - * gcc.dg/gomp/pr87895-2.c: Ditto. - * gcc.dg/gomp/simd-clones-2.c: Ditto. - * gfortran.dg/gomp/declare-simd-2.f90: Ditto. - * gfortran.dg/gomp/pr79154-1.f90: Ditto. - * gfortran.dg/gomp/pr83977.f90: Ditto. - -2019-01-17 Paolo Carlini - - * g++.dg/cpp0x/auto52.C: Test locations too. - * g++.dg/cpp0x/trailing2.C: Likewise. - * g++.dg/cpp1y/auto-fn18.C: Likewise. - * g++.dg/cpp1y/auto-fn25.C: Likewise. - * g++.dg/cpp1y/auto-fn52.C: Likewise. - * g++.dg/cpp1y/auto-fn53.C: Likewise. - * g++.dg/cpp1y/auto-fn54.C: Likewise. - -2019-01-17 David Malcolm - - PR c++/88699 - * g++.dg/template/pr88699.C: New test. - -2019-01-17 Martin Sebor - - PR tree-optimization/88800 - * c-c++-common/Wrestrict.c: Adjust. - * gcc.dg/Warray-bounds-37.c: New test. - * gcc.dg/builtin-memcpy-2.c: New test. - * gcc.dg/builtin-memcpy.c: New test. - -2019-01-17 Tamar Christina - - PR target/88850 - * gcc.target/arm/pr51968.c: Use neon intrinsics. - -2019-01-17 Andrew Stubbs - Kwok Cheung Yeung - Julian Brown - Tom de Vries - - * gcc.dg/20020312-2.c: Add amdgcn support. - * gcc.dg/Wno-frame-address.c: Disable on amdgcn. - * gcc.dg/builtin-apply2.c: Likewise. - * gcc.dg/torture/stackalign/builtin-apply-2.c: Likewise. - * gcc.dg/gimplefe-28.c: Add dg-add-options for sqrt_insn. - * gcc.dg/intermod-1.c: Add -mlocal-symbol-id on amdgcn. - * gcc.dg/memcmp-1.c: Increase timeout factor. - * gcc.dg/pr59605-2.c: Addd -DMAX_COPY=1025 on amdgcn. - * gcc.dg/sibcall-10.c: xfail on amdgcn. - * gcc.dg/sibcall-9.c: Likewise. - * gcc.dg/tree-ssa/gen-vect-11c.c: Likewise. - * gcc.dg/tree-ssa/pr84512.c: Likewise. - * gcc.dg/tree-ssa/loop-1.c: Adjust expectations for amdgcn. - * gfortran.dg/bind_c_array_params_2.f90: Likewise. - * lib/target-supports.exp (check_effective_target_trampolines): - Configure amdgcn. - (check_profiling_available): Likewise. - (check_effective_target_global_constructor): Likewise. - (check_effective_target_return_address): Likewise. - (check_effective_target_fopenacc): Likewise. - (check_effective_target_fopenmp): Likewise. - (check_effective_target_vect_int): Likewise. - (check_effective_target_vect_intfloat_cvt): Likewise. - (check_effective_target_vect_uintfloat_cvt): Likewise. - (check_effective_target_vect_floatint_cvt): Likewise. - (check_effective_target_vect_floatuint_cvt): Likewise. - (check_effective_target_vect_simd_clones): Likewise. - (check_effective_target_vect_shift): Likewise. - (check_effective_target_whole_vector_shift): Likewise. - (check_effective_target_vect_bswap): Likewise. - (check_effective_target_vect_shift_char): Likewise. - (check_effective_target_vect_long): Likewise. - (check_effective_target_vect_float): Likewise. - (check_effective_target_vect_double): Likewise. - (check_effective_target_vect_perm): Likewise. - (check_effective_target_vect_perm_byte): Likewise. - (check_effective_target_vect_perm_short): Likewise. - (check_effective_target_vect_widen_mult_qi_to_hi): Likewise. - (check_effective_target_vect_widen_mult_hi_to_si): Likewise. - (check_effective_target_vect_widen_mult_qi_to_hi_pattern): Likewise. - (check_effective_target_vect_widen_mult_hi_to_si_pattern): Likewise. - (check_effective_target_vect_natural_alignment): Likewise. - (check_effective_target_vect_fully_masked): Likewise. - (check_effective_target_vect_element_align): Likewise. - (check_effective_target_vect_masked_store): Likewise. - (check_effective_target_vect_scatter_store): Likewise. - (check_effective_target_vect_condition): Likewise. - (check_effective_target_vect_cond_mixed): Likewise. - (check_effective_target_vect_char_mult): Likewise. - (check_effective_target_vect_short_mult): Likewise. - (check_effective_target_vect_int_mult): Likewise. - (check_effective_target_sqrt_insn): Likewise. - (check_effective_target_vect_call_sqrtf): Likewise. - (check_effective_target_vect_call_btrunc): Likewise. - (check_effective_target_vect_call_btruncf): Likewise. - (check_effective_target_vect_call_ceil): Likewise. - (check_effective_target_vect_call_floorf): Likewise. - (check_effective_target_lto): Likewise. - (check_vect_support_and_set_flags): Likewise. - (check_effective_target_vect_stridedN): Enable when fully masked is - available. - (add_options_for_sqrt_insn): New procedure. - -2019-01-17 Andrew Stubbs - - * lib/file-format.exp (gcc_target_object_format): Handle AMD GCN. - * lib/gcc-dg.exp (gcc-dg-prune): Ignore blank lines from the LLVM - linker. - * lib/target-supports.exp (check_effective_target_llvm_binutils): New. - -2019-01-17 Andrew Stubbs - - * gcc.dg/graphite/scop-19.c: Check pie_enabled. - * gcc.dg/pic-1.c: Disable on amdgcn. - * gcc.dg/pic-2.c: Disable on amdgcn. - * gcc.dg/pic-3.c: Disable on amdgcn. - * gcc.dg/pic-4.c: Disable on amdgcn. - * gcc.dg/pie-3.c: Disable on amdgcn. - * gcc.dg/pie-4.c: Disable on amdgcn. - * gcc.dg/uninit-19.c: Check pie_enabled. - * lib/target-supports.exp (check_effective_target_pie): Add amdgcn. - -2019-01-17 Andrew Stubbs - Kwok Cheung Yeung - Julian Brown - Tom de Vries - - * c-c++-common/ubsan/pr71512-1.c: Require exceptions. - * c-c++-common/ubsan/pr71512-2.c: Require exceptions. - * gcc.c-torture/compile/pr34648.c: Require exceptions. - * gcc.c-torture/compile/pr41469.c: Require exceptions. - * gcc.dg/20111216-1.c: Require exceptions. - * gcc.dg/cleanup-10.c: Require exceptions. - * gcc.dg/cleanup-11.c: Require exceptions. - * gcc.dg/cleanup-12.c: Require exceptions. - * gcc.dg/cleanup-13.c: Require exceptions. - * gcc.dg/cleanup-5.c: Require exceptions. - * gcc.dg/cleanup-8.c: Require exceptions. - * gcc.dg/cleanup-9.c: Require exceptions. - * gcc.dg/gomp/pr29955.c: Require exceptions. - * gcc.dg/lto/pr52097_0.c: Require exceptions. - * gcc.dg/nested-func-5.c: Require exceptions. - * gcc.dg/pch/except-1.c: Require exceptions. - * gcc.dg/pch/valid-2.c: Require exceptions. - * gcc.dg/pr41470.c: Require exceptions. - * gcc.dg/pr42427.c: Require exceptions. - * gcc.dg/pr44545.c: Require exceptions. - * gcc.dg/pr47086.c: Require exceptions. - * gcc.dg/pr51481.c: Require exceptions. - * gcc.dg/pr51644.c: Require exceptions. - * gcc.dg/pr52046.c: Require exceptions. - * gcc.dg/pr54669.c: Require exceptions. - * gcc.dg/pr56424.c: Require exceptions. - * gcc.dg/pr64465.c: Require exceptions. - * gcc.dg/pr65802.c: Require exceptions. - * gcc.dg/pr67563.c: Require exceptions. - * gcc.dg/tree-ssa/pr41469-1.c: Require exceptions. - * gcc.dg/tree-ssa/ssa-dse-28.c: Require exceptions. - * gcc.dg/vect/pr46663.c: Require exceptions. - * lib/target-supports.exp (check_effective_target_exceptions): New. - -2019-01-17 Tamar Christina - - PR target/88851 - * gcc.target/aarch64/stack-check-cfa-3.c: Update test. - -2019-01-17 Nathan Sidwell - - PR c++/86610 - * g++.dg/cpp0x/pr86610.C: New. - -2019-01-17 Wei Xiao - - * gcc.target/i386/avx512f-vfixupimmpd-2.c: Fix the test cases for - VFIXUPIMM* intrinsics. - * gcc.target/i386/avx512f-vfixupimmps-2.c: Ditto. - * gcc.target/i386/avx512f-vfixupimmsd-2.c: Ditto. - * gcc.target/i386/avx512f-vfixupimmss-2.c: Ditto. - -2019-01-17 Wei Xiao - - PR target/88794 - Revert: - 2018-11-06 Wei Xiao - - * gcc.target/i386/avx-1.c: Update tests for VFIXUPIMM* intrinsics. - * gcc.target/i386/avx512f-vfixupimmpd-1.c: Ditto. - * gcc.target/i386/avx512f-vfixupimmpd-2.c: Ditto. - * gcc.target/i386/avx512f-vfixupimmps-1.c: Ditto. - * gcc.target/i386/avx512f-vfixupimmsd-1.c: Ditto. - * gcc.target/i386/avx512f-vfixupimmsd-2.c: Ditto. - * gcc.target/i386/avx512f-vfixupimmss-1.c: Ditto. - * gcc.target/i386/avx512f-vfixupimmss-2.c: Ditto. - * gcc.target/i386/avx512vl-vfixupimmpd-1.c: Ditto. - * gcc.target/i386/avx512vl-vfixupimmps-1.c: Ditto. - * gcc.target/i386/sse-13.c: Ditto. - * gcc.target/i386/sse-14.c: Ditto. - * gcc.target/i386/sse-22.c: Ditto. - * gcc.target/i386/sse-23.c: Ditto. - * gcc.target/i386/testimm-10.c: Ditto. - * gcc.target/i386/testround-1.c: Ditto. - -2019-01-17 Wei Xiao - - PR target/88794 - Revert: - 2018-12-15 Jakub Jelinek - - PR target/88489 - * gcc.target/i386/avx512vl-vfixupimmsd-2.c: New test. - * gcc.target/i386/avx512vl-vfixupimmss-2.c: New test. - -2019-01-17 Jakub Jelinek - - PR rtl-optimization/88870 - * gcc.dg/pr88870.c: New test. - -2019-01-17 Kewen Lin - - * gcc.target/powerpc/altivec_vld_vst_addr.c: New test. - -2019-01-17 Alexandre Oliva - - PR c++/87768 - * g++.dg/concepts/pr87768.C: New. - - PR c++/86648 - * gcc.dg/cpp1z/pr86648.C: New. - -2019-01-17 Kewen Lin - - PR target/87306 - * gcc.dg/vect/bb-slp-pow-1.c: Modify to reflect that the loop is not - vectorized on POWER unless hardware misaligned loads are available. - -2019-01-16 David Malcolm - - PR target/88861 - * g++.dg/torture/pr88861.C: New test. - -2019-01-16 Tamar Christina - - PR debug/88046 - * g++.dg/lto/pr88046_0.C: Check for shared and fPIC. - -2019-01-16 Paolo Carlini - - * g++.dg/other/pr33558.C: Test location too. - * g++.dg/other/pr33558-2.C: Likewise. - * g++.dg/parse/crash4.C: Likewise. - * g++.old-deja/g++.brendan/err-msg11.C: Likewise. - * g++.old-deja/g++.mike/p7635.C: Likewise. - * g++.old-deja/g++.other/decl6.C: Likewise. - -2019-01-16 Marek Polacek - - PR c++/78244 - narrowing conversion in template not detected. - * g++.dg/cpp0x/Wnarrowing13.C: New test. - * g++.dg/cpp0x/Wnarrowing14.C: New test. - -2019-01-16 Jakub Jelinek - - PR c/51628 - PR target/88682 - * c-c++-common/pr51628-10.c (unaligned_int128_t): Add - may_alias attribute. - -2019-01-15 Nikhil Benesch - - * gcc.misc-tests/godump-1.c: Add test case for typedef before - struct. - -2019-01-15 David Malcolm - - PR c++/88795 - * g++.dg/template/pr88795.C: New test. - -2019-01-15 Thomas Koenig - - PR fortran/43136 - * gfortran.dg/actual_array_substr_3.f90: New test. - -2019-01-15 Steven G. Kargl - - PR fortran/81849 - * gfortran.dg/pr81849.f90: New test. - -2019-01-15 Paul Thomas - - * gfortran.dg/ISO_Fortran_binding_2.c: Change reference to - ISO_Fortran_binding_2.h. - -2019-01-15 Marek Polacek - - PR c++/88866 - * g++.dg/cpp0x/variadic126.C: Tweak dg-error. - -2019-01-15 Richard Sandiford - - PR inline-asm/52813 - * gcc.target/i386/pr52813.c (test1): Turn the diagnostic into a - -Wdeprecated warning and expect a following note:. - -2019-01-15 Richard Biener - - PR debug/88046 - * g++.dg/lto/pr88046_0.C: New testcase. - -2019-01-15 Richard Biener - - PR tree-optimization/88855 - * gcc.dg/pr88855.c: New testcase. - -2019-01-15 Paolo Carlini - - * g++.dg/diagnostic/typedef-initialized.C: New. - -2019-01-15 Paolo Carlini - - * g++.dg/diagnostic/bitfld3.C: New. - -2019-01-15 Jakub Jelinek - - PR tree-optimization/88775 - * gcc.dg/tree-ssa/pr88775-1.c: New test. - * gcc.dg/tree-ssa/pr88775-2.c: New test. - -2019-01-14 Marek Polacek - - PR c++/88825 - ICE with bogus function return type deduction. - * g++.dg/cpp1y/auto-fn55.C: New test. - -2019-01-14 Jakub Jelinek - - * g++.dg/cpp1z/feat-cxx1z.C: Add tests for - __cpp_guaranteed_copy_elision and __cpp_nontype_template_parameter_auto - feature test macros. - * g++.dg/cpp2a/feat-cxx2a.C: Likewise. - -2019-01-14 Marek Polacek - - PR c++/88830 - ICE with abstract class. - * g++.dg/other/abstract7.C: New test. - -2019-01-14 Martin Sebor - - PR target/88638 - * gcc.dg/format/attr-8.c: New test. - * gcc.dg/darwin-cfstring-format-1.c: Adjust diagnostics. - * gcc.dg/format/attr-3.c: Same. - * obj-c++.dg/fsf-nsstring-format-1.mm: Same. - * objc.dg/fsf-nsstring-format-1.m: Same. - -2019-01-14 Martin Liska - - PR gcov-profile/88263 - * g++.dg/gcov/pr88263-2.C: New test. - -2019-01-14 Jakub Jelinek - - PR rtl-optimization/88796 - * gcc.target/i386/pr88796.c: New test. - -2019-01-14 Iain Buclaw - - * gdc.dg/asm1.d: New test. - * gdc.dg/asm2.d: New test. - * gdc.dg/asm3.d: New test. - * gdc.dg/asm4.d: New test. - * lib/gdc.exp (gdc_init): Set gcc_error_prefix and gcc_warning_prefix. - -2019-01-13 Jerry DeLisle - - PR libfortran/88776 - * gfortran.dg/namelist_96.f90: New test. - -2019-01-13 Thomas Koenig - - PR fortran/59345 - * gfortran.dg/internal_pack_18.f90: New test. - -2019-01-13 H.J. Lu - - * gcc.dg/pr51628-20.c: Updated. - * gcc.dg/pr51628-21.c: Likewise. - * gcc.dg/pr51628-25.c: Likewise. - -2019-01-13 Thomas Koenig - - PR fortran/59345 - * gfortran.dg/internal_pack_17.f90: New test. - * gfortran.dg/alloc_comp_auto_array_3.f90: Adjust number of calls - to builtin_free. - -2019-01-12 Steven G. Kargl - - PR fortran/61765 - * gfortran.dg/pr61765.f90: New test. - -2019-01-12 Paolo Carlini - - * g++.dg/cpp0x/pr62101.C: Test locations too. - * g++.dg/inherit/pure1.C: Likewise. - -2019-01-12 Paul Thomas - - * gfortran.dg/ISO_Fortran_binding_2.f90: Remove because of - reports of ICEs. - * gfortran.dg/ISO_Fortran_binding_2.c: Ditto. - -2019-01-12 Paul Thomas - - * gfortran.dg/ISO_Fortran_binding_1.f90: New test. - * gfortran.dg/ISO_Fortran_binding_1.c: Auxilliary file for test. - * gfortran.dg/ISO_Fortran_binding_2.f90: New test. - * gfortran.dg/ISO_Fortran_binding_2.c: Auxilliary file for test. - * gfortran.dg/bind_c_array_params_2.f90: Change search string - for dump tree scan. - -2019-01-11 Steven G. Kargl - - PR fortran/35031 - * gfortran.dg/pr35031.f90: new test. - -2019-01-11 Marek Polacek - - PR c++/88692, c++/87882 - -Wredundant-move false positive with *this. - * g++.dg/cpp0x/Wredundant-move5.C: New test. - * g++.dg/cpp0x/Wredundant-move6.C: New test. - -2019-01-11 Jakub Jelinek - - PR middle-end/85956 - PR lto/88733 - * c-c++-common/gomp/pr85956.c: New test. - * g++.dg/gomp/pr88733.C: New test. - -2019-01-11 Tobias Burnus - - PR C++/88114 - * g++.dg/cpp0x/defaulted61.C: New - * g++.dg/cpp0x/defaulted62.C: New. - -2019-01-11 Jakub Jelinek - - PR tree-optimization/88693 - * gcc.c-torture/execute/pr88693.c: New test. - -2019-01-11 Tamar Christina - - * gcc.target/aarch64/advsimd-intrinsics/vector-complex_f16.c: Require neon - and add options. - -2019-01-11 Martin Liska - - PR middle-end/88758 - * g++.dg/lto/pr88758_0.C: New test. - * g++.dg/lto/pr88758_1.C: New test. - -2019-01-11 Jan Beulich - - * gcc.target/i386/avx512f-vcvtsd2si-1.c, - gcc.target/i386/avx512f-vcvtss2si-1.c, - gcc.target/i386/avx512f-vcvttsd2si-1.c, - gcc.target/i386/avx512f-vcvttss2si-1.c: Permit l suffix. - * gcc.target/i386/avx512f-vcvtsi2ss-1.c, - gcc.target/i386/avx512f-vcvtusi2sd-1.c, - gcc.target/i386/avx512f-vcvtusi2ss-1.c: Expect l suffix. - * gcc.target/i386/avx512f-vcvtusi2sd-2.c, - gcc.target/i386/avx512f-vcvtusi2sd64-2.c, - gcc.target/i386/avx512f-vcvtusi2ss-2.c, - gcc.target/i386/avx512f-vcvtusi2ss64-2.c: Add asm volatile(). - gcc.target/i386/pr19398.c: Permit l or q suffix. - -2019-01-11 Jakub Jelinek - - PR rtl-optimization/88296 - * gcc.target/i386/pr88296.c: New test. - -2019-01-11 Paolo Carlini - - * g++.dg/diagnostic/extern-initialized.C: New. - * g++.dg/ext/dllimport-initialized.C: Likewise. - -2019-01-11 Thomas Koenig - - PR fortran/59345 - * gfortran.dg/internal_pack_16.f90: New test. - -2019-01-10 Jakub Jelinek - - PR target/88785 - * g++.target/i386/pr88785.C: New test. - -2019-01-10 Vladimir Makarov - - PR rtl-optimization/87305 - * gcc.target/aarch64/pr87305.c: New. - -2019-01-10 Richard Biener - - PR tree-optimization/88792 - * gcc.dg/torture/pr88792.c: New testcase. - -2019-01-10 Steven G. Kargl - - PR fortran/86322 - * gfortran.dg/pr86322_1.f90: New test. - * gfortran.dg/pr86322_2.f90: Ditto. - * gfortran.dg/pr86322_3.f90: Ditto. - -2019-01-10 Sudakshina Das - - * gcc.target/aarch64/bti-1.c: Exempt for ilp32. - * gcc.target/aarch64/bti-2.c: Likewise. - * gcc.target/aarch64/bti-3.c: Likewise. - -2019-01-10 Stefan Agner - - PR target/88648 - * gcc.target/arm/pr88648-asm-syntax-unified.c: Add test to - check if -masm-syntax-unified gets applied properly. - -2019-01-10 Jakub Jelinek - - PR c/88568 - * gcc.dg/pr88568.c: New test. - -2019-01-10 Tamar Christina - - * gcc.target/aarch64/advsimd-intrinsics/vector-complex.c: Add AArch32 regexpr. - * gcc.target/aarch64/advsimd-intrinsics/vector-complex_f16.c: Likewise. - -2019-01-10 Tamar Christina - - * gcc.target/aarch64/advsimd-intrinsics/vector-complex.c: New test. - * gcc.target/aarch64/advsimd-intrinsics/vector-complex_f16.c: New test. - -2019-01-10 Tamar Christina - - * lib/target-supports.exp - (check_effective_target_arm_v8_3a_complex_neon_ok_nocache, - check_effective_target_arm_v8_3a_complex_neon_ok, - add_options_for_arm_v8_3a_complex_neon, - check_effective_target_arm_v8_3a_complex_neon_hw, - check_effective_target_vect_complex_rot_N): New. - -2019-01-09 Steven G. Kargl - - PR fortran/88376 - * gfortran.dg/pr88376.f90: New test. - -2019-01-09 Sandra Loosemore - - PR other/16615 - * g++.dg/lto/odr-1_1.C: Update diagnostic message patterns to replace - "can not" with "cannot". - * gfortran.dg/common_15.f90: Likewise. - * gfortran.dg/derived_result_2.f90: Likewise. - * gfortran.dg/do_check_6.f90: Likewise. - * gfortran.dg/namelist_args.f90: Likewise. - * gfortran.dg/negative_unit_check.f90: Likewise. - * gfortran.dg/pure_formal_3.f90: Likewise. - * obj-c++.dg/attributes/method-attribute-2.mm: Likewise. - * obj-c++.dg/exceptions-3.mm: Likewise. - * obj-c++.dg/exceptions-4.mm: Likewise. - * obj-c++.dg/exceptions-5.mm: Likewise. - * obj-c++.dg/property/at-property-23.mm: Likewise. - * obj-c++.dg/property/dotsyntax-17.mm: Likewise. - * obj-c++.dg/property/property-neg-7.mm: Likewise. - * objc.dg/attributes/method-attribute-2.m: Likewise. - * objc.dg/exceptions-3.m: Likewise. - * objc.dg/exceptions-4.m: Likewise. - * objc.dg/exceptions-5.m: Likewise. - * objc.dg/param-1.m: Likewise. - * objc.dg/property/at-property-23.m: Likewise. - * objc.dg/property/dotsyntax-17.m: Likewise. - * objc.dg/property/property-neg-7.m: Likewise. - -2019-01-09 Thomas Koenig - - PR fortran/68426 - * gfortran.dg/spread_simplify_1.f90: New test. - -2019-01-09 Uroš Bizjak - - * lib/target-supports.exp - (check_effective_target_xorsign): Add i?86-*-* and x86_64-*-* targets. - * gcc.target/i386/xorsign.c: New test. - -2019-01-09 Eric Botcazou - - * gcc.target/sparc/tls-ld-int8.c: New test. - * gcc.target/sparc/tls-ld-int16.c: Likewise. - * gcc.target/sparc/tls-ld-int32.c: Likewise. - * gcc.target/sparc/tls-ld-uint8.c: Likewise. - * gcc.target/sparc/tls-ld-uint16.c: Likewise. - * gcc.target/sparc/tls-ld-uint32.c: Likewise. - -2018-01-09 Sudakshina Das - - * gcc.target/aarch64/bti-1.c: Update test to not add command line - option when configure with bti. - * gcc.target/aarch64/bti-2.c: Likewise. - * lib/target-supports.exp - (check_effective_target_default_branch_protection): - Add configure check for --enable-standard-branch-protection. - -2018-01-09 Sudakshina Das - - * gcc.target/aarch64/bti-1.c: New test. - * gcc.target/aarch64/bti-2.c: New test. - * gcc.target/aarch64/bti-3.c: New test. - * lib/target-supports.exp - (check_effective_target_aarch64_bti_hw): Add new check for BTI hw. - -2018-01-09 Sudakshina Das - - * gcc.target/aarch64/test_frame_17.c: Update to check for EP0_REGNUM - instead of IP0_REGNUM and add test case. - -2019-01-09 Alejandro Martinez - - * gcc.target/aarch64/sve/copysign_1.c: New test for SVE vectorized - copysign. - * gcc.target/aarch64/sve/copysign_1_run.c: Likewise. - * gcc.target/aarch64/sve/xorsign_1.c: New test for SVE vectorized - xorsign. - * gcc.target/aarch64/sve/xorsign_1_run.c: Likewise. - -2019-01-09 Jakub Jelinek - - PR rtl-optimization/88331 - * gcc.target/i386/pr88331.c: New test. - -2019-01-08 Paolo Carlini - - * g++.dg/diagnostic/constexpr2.C: New. - * g++.dg/diagnostic/ref3.C: Likewise. - -2019-01-08 Marek Polacek - - PR c++/88538 - braced-init-list in template-argument-list. - * g++.dg/cpp2a/nontype-class11.C: New test. - - PR c++/88744 - * g++.dg/cpp2a/nontype-class12.C: New test. - -2019-01-08 Jakub Jelinek - - PR target/88457 - * gcc.target/powerpc/pr88457.c: Remove -m32, -c and -mcpu=e300c3 from - dg-options. Require ppc_cpu_supports_hw effective target instead of - powerpc64*-*-*. - -2019-01-08 Janus Weil - - PR fortran/88047 - * gfortran.dg/class_69.f90: New test case. - -2019-01-08 H.J. Lu - - PR target/88717 - * gcc.target/i386/pr88717.c: New test. - -2019-01-08 Marek Polacek - - PR c++/88548 - this accepted in static member functions. - * g++.dg/cpp0x/this1.C: New test. - -2019-01-08 Martin Liska - - PR tree-optimization/88753 - * gcc.dg/tree-ssa/pr88753.c: New test. - -2019-01-08 Richard Biener - - PR tree-optimization/86554 - * gcc.dg/torture/pr86554-1.c: New testcase. - * gcc.dg/torture/pr86554-2.c: Likewise. - -2019-01-08 Paolo Carlini - - * g++.dg/diagnostic/thread1.C: Tweak expected error #line 13 to - cover target variance. - -2019-01-08 Richard Biener - - PR fortran/88611 - * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_* - directly build the expected GENERIC tree. - -2019-01-08 Sam Tebbs - - * gcc.target/aarch64/(return_address_sign_1.c, - return_address_sign_2.c, return_address_sign_3.c (__attribute__)): - Change option to -mbranch-protection. - * gcc.target/aarch64/(branch-protection-option.c, - branch-protection-option-2.c, branch-protection-attr.c, - branch-protection-attr-2.c): New file. - -2019-01-08 Paolo Carlini - - * g++.dg/diagnostic/out-of-class-redeclaration.C: New. - -2019-01-08 Iain Sandoe - - * c-c++-common/builtin-has-attribute-3.c: Skip tests requiring symbol - alias support. - * c-c++-common/builtin-has-attribute-4.c: Likewise. - Append match for warning that ‘protected’ attribute is not supported. - -2019-01-08 Iain Sandoe - - * gcc.dg/Wmissing-attributes.c: Require alias support. - * gcc.dg/attr-copy-2.c: Likewise. - * gcc.dg/attr-copy-5.c: Likewise. - -2019-01-08 Jonathan Wakely - Jakub Jelinek - - PR c++/88554 - * g++.dg/warn/Wreturn-type-11.C: New test. - -2019-01-07 David Malcolm - - PR jit/88747 - * jit.dg/test-sum-of-squares.c (verify_code): Update expected vrp - dump to reflect r266077. - -2019-01-07 Jakub Jelinek - - PR c/88701 - * gcc.dg/pr88701.c: New test. - -2019-01-07 Joseph Myers - - PR c/88720 - PR c/88726 - * gcc.dg/inline-40.c, gcc.dg/inline-41.c: New tests. - -2019-01-07 Paolo Carlini - - * g++.dg/diagnostic/constexpr1.C: New. - * g++.dg/diagnostic/thread1.C: Likewise. - -2019-01-07 Thomas Koenig - Harald Anlauf - Tobias Burnus - - * gfortran.dg/is_contiguous_1.f90: New test. - * gfortran.dg/is_contiguous_2.f90: New test. - * gfortran.dg/is_contiguous_3.f90: New test. - -2019-01-07 Marek Polacek - - PR c++/88741 - wrong error with initializer-string. - * g++.dg/init/array50.C: New test. - -2019-01-07 Bernd Edlinger - - PR c++/88261 - PR c++/69338 - PR c++/69696 - PR c++/69697 - * gcc.dg/array-6.c: Move from here ... - * c-c++-common/array-6.c: ... to here and add some more test coverage. - * g++.dg/pr69338.C: New test. - * g++.dg/pr69697.C: Likewise. - * g++.dg/ext/flexary32.C: Likewise. - * g++.dg/ext/flexary3.C: Adjust test. - * g++.dg/ext/flexary12.C: Likewise. - * g++.dg/ext/flexary13.C: Likewise. - * g++.dg/ext/flexary15.C: Likewise. - * g++.dg/warn/Wplacement-new-size-1.C: Likewise. - * g++.dg/warn/Wplacement-new-size-2.C: Likewise. - * g++.dg/warn/Wplacement-new-size-6.C: Likewise. - -2019-01-07 Richard Earnshaw - - * gcc.target/aarch64/subs_compare_2.c: Make '#' immediate prefix - optional in scan pattern. - -2019-01-07 Richard Sandiford - - PR tree-optimization/88598 - * gcc.dg/vect/pr88598-1.c: New test. - * gcc.dg/vect/pr88598-2.c: Likewise. - * gcc.dg/vect/pr88598-3.c: Likewise. - * gcc.dg/vect/pr88598-4.c: Likewise. - * gcc.dg/vect/pr88598-5.c: Likewise. - * gcc.dg/vect/pr88598-6.c: Likewise. - -2019-01-07 Richard Sandiford - - PR tree-optimization/88598 - * gcc.dg/pr88598-1.c: New test. - * gcc.dg/pr88598-2.c: Likewise. - * gcc.dg/pr88598-3.c: Likewise. - * gcc.dg/pr88598-4.c: Likewise. - * gcc.dg/pr88598-5.c: Likewise. - -2019-01-07 Jakub Jelinek - - PR tree-optimization/88676 - * gcc.dg/tree-ssa/pr88676.c: New test. - * gcc.dg/pr88676.c: New test. - * gcc.dg/tree-ssa/pr15826.c: Just verify there is no goto, - allow &. - - PR sanitizer/88619 - * c-c++-common/asan/pr88619.c: New test. - - PR c++/85052 - * c-c++-common/builtin-convertvector-1.c: New test. - * c-c++-common/torture/builtin-convertvector-1.c: New test. - * g++.dg/ext/builtin-convertvector-1.C: New test. - * g++.dg/cpp0x/constexpr-builtin4.C: New test. - -2018-12-26 Mateusz B - - PR target/88521 - * gcc.target/i386/pr88521.c: New testcase. - -2019-01-06 Thomas Koenig - - PR fortran/88658 - * gfortran.dg/min_max_type_2.f90: New test. - -2019-01-06 Jakub Jelinek - - PR c/88363 - * c-c++-common/attributes-4.c (falloc_align_int128, - falloc_size_int128): Guard with #ifdef __SIZEOF_INT128__. - -2019-01-05 Jan Hubicka - - * gcc.dg/ipa/ipcp-2.c: Update bounds. - -2019-01-05 Dominique d'Humieres - - * gcc.dg/plugin/plugindir1.c: Adjust dg-prune-output for Darwin. - * gcc.dg/plugin/plugindir2.c: Likewise. - * gcc.dg/plugin/plugindir3.c: Likewise. - * gcc.dg/plugin/plugindir4.c: Likewise. - -2019-01-05 Janus Weil - - PR fortran/88009 - * gfortran.dg/blockdata_10.f90: New test case. - -2019-01-05 Jakub Jelinek - - PR middle-end/82564 - PR target/88620 - * gcc.dg/nested-func-12.c: New test. - * gcc.c-torture/compile/pr82564.c: New test. - - PR debug/88635 - * gcc.dg/debug/dwarf2/pr88635.c: New test. - -2019-01-05 Dominique d'Humieres - - PR target/60563 - * g++.dg/ext/sync-4.C: Add dg-xfail-run-if for darwin. - -2019-01-04 Martin Sebor - - PR c/88546 - * g++.dg/ext/attr-copy.C: New test. - * gcc.dg/attr-copy-4.c: Disable macro expansion tracking. - * gcc.dg/attr-copy-6.c: New test. - * gcc.dg/attr-copy-7.c: New test. - -2019-01-04 Martin Sebor - - PR c/88363 - * c-c++-common/attributes-4.c: New test. - -2019-01-04 Sam Tebbs - - PR gcc/87763 - * gcc.target/aarch64/combine_bfxil.c: Change scan-assembler-times bfxil - count to 18. - -2019-01-04 Thomas Koenig - - PR fortran/48543 - * gfortran.dg/const_chararacter_merge.f90: Actually remove. - * gfortran.dg/merge_char_const.f90: Restore. - -2019-01-04 Jakub Jelinek - - PR target/88594 - * gcc.dg/pr88594.c: New test. - -2019-01-04 Jan Beulich - - * gcc.target/i386/avx512bitalg-vpshufbitqmb.c, - gcc.target/i386/avx512bw-vpcmpeqb-1.c, - gcc.target/i386/avx512bw-vpcmpequb-1.c, - gcc.target/i386/avx512bw-vpcmpequw-1.c, - gcc.target/i386/avx512bw-vpcmpeqw-1.c, - gcc.target/i386/avx512bw-vpcmpgeb-1.c, - gcc.target/i386/avx512bw-vpcmpgeub-1.c, - gcc.target/i386/avx512bw-vpcmpgeuw-1.c, - gcc.target/i386/avx512bw-vpcmpgew-1.c, - gcc.target/i386/avx512bw-vpcmpgtb-1.c, - gcc.target/i386/avx512bw-vpcmpgtub-1.c, - gcc.target/i386/avx512bw-vpcmpgtuw-1.c, - gcc.target/i386/avx512bw-vpcmpgtw-1.c, - gcc.target/i386/avx512bw-vpcmpleb-1.c, - gcc.target/i386/avx512bw-vpcmpleub-1.c, - gcc.target/i386/avx512bw-vpcmpleuw-1.c, - gcc.target/i386/avx512bw-vpcmplew-1.c, - gcc.target/i386/avx512bw-vpcmpltb-1.c, - gcc.target/i386/avx512bw-vpcmpltub-1.c, - gcc.target/i386/avx512bw-vpcmpltuw-1.c, - gcc.target/i386/avx512bw-vpcmpltw-1.c, - gcc.target/i386/avx512bw-vpcmpneqb-1.c, - gcc.target/i386/avx512bw-vpcmpnequb-1.c, - gcc.target/i386/avx512bw-vpcmpnequw-1.c, - gcc.target/i386/avx512bw-vpcmpneqw-1.c, - gcc.target/i386/avx512bw-vpmovb2m-1.c, - gcc.target/i386/avx512bw-vpmovm2b-1.c, - gcc.target/i386/avx512bw-vpmovm2w-1.c, - gcc.target/i386/avx512bw-vpmovw2m-1.c, - gcc.target/i386/avx512bw-vptestmb-1.c, - gcc.target/i386/avx512bw-vptestmw-1.c, - gcc.target/i386/avx512bw-vptestnmb-1.c, - gcc.target/i386/avx512bw-vptestnmw-1.c, - gcc.target/i386/avx512cd-vpbroadcastmb2q-1.c, - gcc.target/i386/avx512cd-vpbroadcastmw2d-1.c, - gcc.target/i386/avx512dq-vfpclasssd-1.c, - gcc.target/i386/avx512dq-vfpclassss-1.c, - gcc.target/i386/avx512dq-vpmovd2m-1.c, - gcc.target/i386/avx512dq-vpmovm2d-1.c, - gcc.target/i386/avx512dq-vpmovm2q-1.c, - gcc.target/i386/avx512dq-vpmovq2m-1.c, - gcc.target/i386/avx512vl-vpbroadcastmb2q-1.c, - gcc.target/i386/avx512vl-vpbroadcastmw2d-1.c, - gcc.target/i386/avx512vl-vpcmpeqd-1.c, - gcc.target/i386/avx512vl-vpcmpeqq-1.c, - gcc.target/i386/avx512vl-vpcmpequd-1.c, - gcc.target/i386/avx512vl-vpcmpequq-1.c, - gcc.target/i386/avx512vl-vpcmpged-1.c, - gcc.target/i386/avx512vl-vpcmpgeq-1.c, - gcc.target/i386/avx512vl-vpcmpgeud-1.c, - gcc.target/i386/avx512vl-vpcmpgeuq-1.c, - gcc.target/i386/avx512vl-vpcmpgtd-1.c, - gcc.target/i386/avx512vl-vpcmpgtq-1.c, - gcc.target/i386/avx512vl-vpcmpgtud-1.c, - gcc.target/i386/avx512vl-vpcmpgtuq-1.c, - gcc.target/i386/avx512vl-vpcmpled-1.c, - gcc.target/i386/avx512vl-vpcmpleq-1.c, - gcc.target/i386/avx512vl-vpcmpleud-1.c, - gcc.target/i386/avx512vl-vpcmpleuq-1.c, - gcc.target/i386/avx512vl-vpcmpltd-1.c, - gcc.target/i386/avx512vl-vpcmpltq-1.c, - gcc.target/i386/avx512vl-vpcmpltud-1.c, - gcc.target/i386/avx512vl-vpcmpltuq-1.c, - gcc.target/i386/avx512vl-vpcmpneqd-1.c, - gcc.target/i386/avx512vl-vpcmpneqq-1.c, - gcc.target/i386/avx512vl-vpcmpnequd-1.c, - gcc.target/i386/avx512vl-vpcmpnequq-1.c, - gcc.target/i386/avx512vl-vptestmd-1.c, - gcc.target/i386/avx512vl-vptestmq-1.c, - gcc.target/i386/avx512vl-vptestnmd-1.c, - gcc.target/i386/avx512vl-vptestnmq-1.c: Permit %k0 as ordinary - operand. - * gcc.target/i386/avx512bw-vpcmpb-1.c, - gcc.target/i386/avx512bw-vpcmpub-1.c, - gcc.target/i386/avx512bw-vpcmpuw-1.c, - gcc.target/i386/avx512bw-vpcmpw-1.c, - gcc.target/i386/avx512dq-vfpclasspd-1.c, - gcc.target/i386/avx512dq-vfpclassps-1.c, - gcc.target/i386/avx512f-vcmppd-1.c, - gcc.target/i386/avx512f-vcmpps-1.c, - gcc.target/i386/avx512f-vcmpsd-1.c, - gcc.target/i386/avx512f-vcmpss-1.c, - gcc.target/i386/avx512f-vpcmpd-1.c, - gcc.target/i386/avx512f-vpcmpq-1.c, - gcc.target/i386/avx512f-vpcmpud-1.c, - gcc.target/i386/avx512f-vpcmpuq-1.c, - gcc.target/i386/avx512f-vptestmd-1.c, - gcc.target/i386/avx512f-vptestmq-1.c, - gcc.target/i386/avx512f-vptestnmd-1.c, - gcc.target/i386/avx512f-vptestnmq-1.c, - gcc.target/i386/avx512vl-vcmppd-1.c, - gcc.target/i386/avx512vl-vcmpps-1.c, - gcc.target/i386/avx512vl-vpcmpd-1.c, - gcc.target/i386/avx512vl-vpcmpq-1.c, - gcc.target/i386/avx512vl-vpcmpud-1.c, - gcc.target/i386/avx512vl-vpcmpuq-1.c: Likewise. Don't permit %k0 - as mask operand. - -2019-01-03 Martin Sebor - - PR tree-optimization/88659 - * gcc.dg/Wstringop-truncation-6.c: New test. - -2019-01-02 Thomas Koenig - - PR fortran/48543 - * gfortran.dg/const_chararacter_merge.f90: Remove. - -2019-01-03 Jakub Jelinek - - PR debug/88644 - * gcc.dg/debug/dwarf2/pr88644.c: New test. - * gcc.dg/debug/dwarf2/pr80263.c: Remove darwin hack. - -2019-01-03 Iain Sandoe - - * gcc.dg/pubtypes-2.c: Adjust expected pubtypes length. - * gcc.dg/pubtypes-3.c: Likewise. - * gcc.dg/pubtypes-4.c: Likewise. - -2019-01-03 Jakub Jelinek - - PR c++/88636 - * g++.target/i386/pr88636.C: New test. - -2019-01-03 Paolo Carlini - - * g++.dg/cpp1z/nodiscard3.C: Test locations too. - -2019-01-03 Martin Liska - - PR testsuite/88436 - * gcc.target/powerpc/pr54240.c: Scan phiopt2. - -2019-01-02 Marek Polacek - - PR c++/88612 - ICE with -Waddress-of-packed-member. - * g++.dg/warn/Waddress-of-packed-member1.C: New test. - - PR c++/88631 - CTAD failing for value-initialization. - * g++.dg/cpp1z/class-deduction59.C: New test. - - PR c++/81486 - CTAD failing with (). - * g++.dg/cpp1z/class-deduction60.C: New test. - * g++.dg/cpp1z/class-deduction61.C: New test. - -2019-01-02 Martin Sebor - Jeff Law - - * gcc.dg/strlenopt-36.c: Update. - * gcc.dg/strlenopt-45.c: Update. - * gcc.c-torture/execute/strlen-5.c: New test. - * gcc.c-torture/execute/strlen-6.c: New test. - * gcc.c-torture/execute/strlen-7.c: New test. - -2019-01-02 Jakub Jelinek - - PR testsuite/87304 - * gcc.dg/vect/bb-slp-over-widen-1.c: Expect basic block vectorized - messages only on vect_hw_misalign targets. - -2019-01-02 Steven G. Kargl - - * gfortran.dg/argument_checking_7.f90: Remove run-on error message. - * gfortran.dg/dec_d_lines_3.f: Ditto. - * gfortran.dg/dec_structure_24.f90: Ditto. - * gfortran.dg/dec_structure_26.f90: Ditto. - * gfortran.dg/dec_structure_27.f90: Ditto. - * gfortran.dg/dec_type_print_3.f90: Ditto. - * gfortran.dg/derived_name_1.f90: Ditto. - * gfortran.dg/error_recovery_1.f90: Ditto. - * gfortran.dg/gomp/pr29759.f90: Ditto. - * gfortran.dg/pr36192.f90: Ditto. - * gfortran.dg/pr56007.f90: Ditto. - * gfortran.dg/pr56520.f90: Ditto. - * gfortran.dg/pr78741.f90: Ditto. - * gfortran.dg/print_fmt_2.f90: Ditto. - * gfortran.dg/select_type_20.f90: Ditto. - -2019-01-02 Marek Polacek - - PR c++/86875 - * g++.dg/cpp1y/lambda-generic-86875.C: New test. - -2019-01-02 Thomas Koenig - - PR fortran/48543 - * gfortran.dg/const_chararacter_merge.f90: New test. - -2019-01-02 Jan Hubicka - - PR lto/88130 - * g++.dg/torture/pr88130.C: New testcase. - -2019-01-02 Martin Liska - - PR tree-optimization/88650 - * gfortran.dg/predict-3.f90: New test. - -2019-01-02 Rainer Orth - - * g++.dg/gcov/pr88263.C: Rename namespace log to logging. - -2019-01-02 Richard Biener - - PR tree-optimization/88621 - * gcc.dg/torture/pr88621.c: New testcase. - -2019-01-02 Jakub Jelinek - - PR ipa/88561 - * g++.dg/tree-prof/devirt.C: Expect _ZThn16 only for lp64 and llp64 - targets and expect _ZThn8 for ilp32 targets. - -2019-01-01 Martin Sebor - Jeff Law - - * gcc.dg/strlenopt-40.c: Update. - * gcc.dg/strlenopt-51.c: Likewise. - * gcc.dg/tree-ssa/pr79376.c: Likewise. - - * gcc.dg/strlenopt-40.c: Disable a couple tests. - * gcc.dg/strlenopt-48.c: Twiddle test slightly. - * gcc.dg/strlenopt-59.c: New test. - * gcc.dg/tree-ssa/builtin-snprintf-5.c: New test. - * g++.dg/init/strlen.C: New test. - -2019-01-01 Thomas Koenig - - PR fortran/82743 - * gfortran.dg/structure_constructor_16.f90: New test. - -2019-01-01 Jan Hubicka - - * g++.dg/ipa/devirt-36.C: Add dg-do-compile. - * g++.dg/ipa/devirt-53.C: Fix scan template. - -2019-01-01 Jan Hubicka - - * g++.dg/lto/devirt-13_0.C: Drop broken scan of ssa dump. - * g++.dg/lto/devirt-14_0.C: Drop broken scan of ssa dump. - * g++.dg/lto/devirt-23_0.C: Add -fdump-ipa-cp. - -2019-01-01 Jan Hubicka - - * g++.dg/tree-prof/devirt.C: Update testcase. - -2019-01-01 Jakub Jelinek - - Update copyright years. - -Copyright (C) 2019 Free Software Foundation, Inc. - -Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. -- cgit v1.1 From 224d1b10aeaccbb86b78339f18e83dcd5ad2f956 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 6 Oct 2019 00:16:37 +0000 Subject: Daily bump. From-SVN: r276634 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 4d531d0..3d165d7 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20191005 +20191006 -- cgit v1.1 From b1ca639a8692ac245753b10cb528e0db0f56dd57 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 6 Oct 2019 08:02:03 +0000 Subject: [Darwin] Fix some format-related build warnings. This fixes two error messages to avoid punctuation and contracted negations. gcc/ChangeLog: 2019-10-06 Iain Sandoe * config/darwin.c (darwin_override_options): Adjust objective-c ABI version error messages to avoid punctuation and contracted negations. From-SVN: r276635 --- gcc/ChangeLog | 6 ++++++ gcc/config/darwin.c | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4e180d..a2740d2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-06 Iain Sandoe + + * config/darwin.c (darwin_override_options): Adjust objective-c + ABI version error messages to avoid punctuation and contracted + negations. + 2019-10-05 Jan Hubicka * ipa-inline.c: Fix type; compute size rather than self_size diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 2fb9c56..5673982 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -3152,13 +3152,14 @@ darwin_override_options (void) if (global_options_set.x_flag_objc_abi && flag_next_runtime) { if (TARGET_64BIT && global_options.x_flag_objc_abi < 2) - error_at (UNKNOWN_LOCATION, "%<-fobjc-abi-version%> >= 2 must be" - " used for %<-m64%> targets with" - " %<-fnext-runtime%>"); + error_at (UNKNOWN_LOCATION, "%<-fobjc-abi-version%> must be greater" + " than or equal to 2 for %<-m64%> targets" + " with %<-fnext-runtime%>"); if (!TARGET_64BIT && global_options.x_flag_objc_abi >= 2) - error_at (UNKNOWN_LOCATION, "%<-fobjc-abi-version%> >= 2 is not" + error_at (UNKNOWN_LOCATION, "%<-fobjc-abi-version%> %d is not" " supported on %<-m32%> targets with" - " %<-fnext-runtime%>"); + " %<-fnext-runtime%>", + global_options.x_flag_objc_abi); } /* Don't emit DWARF3/4 unless specifically selected. This is a -- cgit v1.1 From 1c8264003ab1d6932d874bd1a9af4ac498d4b4a4 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sun, 6 Oct 2019 15:39:27 +0000 Subject: Fix EXECUTE_IF_SET_IN_HARD_REG_SET use As Maxim pointed out, r276309 broke -O3 bootstrap for aarch64-linux-gnu. It turns out that EXECUTE_IF_SET_IN_HARD_REG_SET isn't safe to use for temporary objects because their lifetimes don't extend to the end of the loop. This patch therefore uses an explicit temporary instead. Other patches in the series already used this style (but for full_reg_and_partial_clobbers rather than full_reg_clobbers), so AFAICT this is the only place that needs fixing. 2019-10-06 Richard Sandiford gcc/ * var-tracking.c (dataflow_set_clear_at_call): Hoist temporary function result outside of EXECUTE_IF_SET_IN_HARD_REG_SET. From-SVN: r276639 --- gcc/ChangeLog | 5 +++++ gcc/var-tracking.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a2740d2..4b7cb0e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-06 Richard Sandiford + + * var-tracking.c (dataflow_set_clear_at_call): Hoist temporary + function result outside of EXECUTE_IF_SET_IN_HARD_REG_SET. + 2019-10-06 Iain Sandoe * config/darwin.c (darwin_override_options): Adjust objective-c diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 3d069e4..5de36ae 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -4902,9 +4902,10 @@ dataflow_set_clear_at_call (dataflow_set *set, rtx_insn *call_insn) unsigned int r; hard_reg_set_iterator hrsi; - function_abi callee_abi = insn_callee_abi (call_insn); + HARD_REG_SET callee_clobbers + = insn_callee_abi (call_insn).full_reg_clobbers (); - EXECUTE_IF_SET_IN_HARD_REG_SET (callee_abi.full_reg_clobbers (), 0, r, hrsi) + EXECUTE_IF_SET_IN_HARD_REG_SET (callee_clobbers, 0, r, hrsi) var_regno_delete (set, r); if (MAY_HAVE_DEBUG_BIND_INSNS) -- cgit v1.1 From 3e1f7c33aeaf33ca532fbef745bb4ab1e3b0aa3f Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 7 Oct 2019 00:16:24 +0000 Subject: Daily bump. From-SVN: r276644 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 3d165d7..19cc974 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20191006 +20191007 -- cgit v1.1 From 806bdf4e40d31cf55744c876eb9f17654de36b99 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 7 Oct 2019 07:53:45 +0000 Subject: re PR tree-optimization/91975 (worse code for small array copy using pointer arithmetic than array indexing) 2019-10-07 Richard Biener PR tree-optimization/91975 * tree-ssa-loop-ivcanon.c (constant_after_peeling): Consistently handle invariants. * g++.dg/tree-ssa/ivopts-3.C: Adjust. * gcc.dg/vect/vect-profile-1.c: Disable cunrolli. * gcc.dg/vect/vect-double-reduc-6.c: Disable unrolling of the innermost loop. * gcc.dg/vect/vect-93.c: Likewise. * gcc.dg/vect/vect-105.c: Likewise. * gcc.dg/vect/pr79920.c: Likewise. * gcc.dg/vect/no-vfa-vect-102.c: Likewise. * gcc.dg/vect/no-vfa-vect-101.c: Likewise. * gcc.dg/vect/pr83202-1.c: Operate on a larger array. * gfortran.dg/vect/vect-8.f90: Likewise. * gcc.dg/tree-ssa/cunroll-2.c: Scan early unrolling dump instead of late one. From-SVN: r276645 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 17 +++++++++++++++++ gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C | 6 ++++-- gcc/testsuite/gcc.dg/tree-ssa/cunroll-2.c | 4 ++-- gcc/testsuite/gcc.dg/vect/no-vfa-vect-101.c | 1 + gcc/testsuite/gcc.dg/vect/no-vfa-vect-102.c | 1 + gcc/testsuite/gcc.dg/vect/pr79920.c | 1 + gcc/testsuite/gcc.dg/vect/pr83202-1.c | 4 ++-- gcc/testsuite/gcc.dg/vect/vect-105.c | 1 + gcc/testsuite/gcc.dg/vect/vect-93.c | 1 + gcc/testsuite/gcc.dg/vect/vect-double-reduc-6.c | 1 + gcc/testsuite/gcc.dg/vect/vect-profile-1.c | 2 +- gcc/testsuite/gfortran.dg/vect/vect-8.f90 | 2 +- gcc/tree-ssa-loop-ivcanon.c | 5 ++--- 14 files changed, 41 insertions(+), 11 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b7cb0e..ef1eb59 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-07 Richard Biener + + PR tree-optimization/91975 + * tree-ssa-loop-ivcanon.c (constant_after_peeling): Consistently + handle invariants. + 2019-10-06 Richard Sandiford * var-tracking.c (dataflow_set_clear_at_call): Hoist temporary diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2c7d62a..e8e0060 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2019-10-07 Richard Biener + + PR tree-optimization/91975 + * g++.dg/tree-ssa/ivopts-3.C: Adjust. + * gcc.dg/vect/vect-profile-1.c: Disable cunrolli. + * gcc.dg/vect/vect-double-reduc-6.c: Disable unrolling of + the innermost loop. + * gcc.dg/vect/vect-93.c: Likewise. + * gcc.dg/vect/vect-105.c: Likewise. + * gcc.dg/vect/pr79920.c: Likewise. + * gcc.dg/vect/no-vfa-vect-102.c: Likewise. + * gcc.dg/vect/no-vfa-vect-101.c: Likewise. + * gcc.dg/vect/pr83202-1.c: Operate on a larger array. + * gfortran.dg/vect/vect-8.f90: Likewise. + * gcc.dg/tree-ssa/cunroll-2.c: Scan early unrolling dump instead + of late one. + 2019-10-05 Steven G. Kargl PR fortran/47045 diff --git a/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C b/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C index 07ff1b7..6760a5b 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C +++ b/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C @@ -70,6 +70,8 @@ int main ( int , char** ) { return 0; } -// Verify that on x86_64 and i?86 we use a single IV for the innermost loop +// Verify that on x86_64 and i?86 we unroll the innsermost loop and +// use three IVs for the then innermost loop -// { dg-final { scan-tree-dump "Selected IV set for loop \[0-9\]* at \[^ \]*:64, 3 avg niters, 1 IVs" "ivopts" { target x86_64-*-* i?86-*-* } } } +// { dg-final { scan-tree-dump "Selected IV set for loop \[0-9\]* at \[^ \]*:63, 127 avg niters, 3 IVs" "ivopts" { target x86_64-*-* i?86-*-* } } } +// { dg-final { scan-tree-dump-not "Selected IV set for loop \[0-9\]* at \[^ \]*:64" "ivopts" { target x86_64-*-* i?86-*-* } } } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-2.c b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-2.c index b1d1c7d..ae3fec9 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -fdump-tree-cunroll-details" } */ +/* { dg-options "-O3 -fdump-tree-cunrolli-details" } */ int a[2]; int test2 (void); void @@ -14,4 +14,4 @@ test(int c) } } /* We are not able to get rid of the final conditional because the loop has two exits. */ -/* { dg-final { scan-tree-dump "loop with 1 iterations completely unrolled" "cunroll"} } */ +/* { dg-final { scan-tree-dump "loop with 2 iterations completely unrolled" "cunrolli"} } */ diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-101.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-101.c index 91eb282..ce93427 100644 --- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-101.c +++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-101.c @@ -22,6 +22,7 @@ int main1 (int x, int y) { p = (struct extraction *) malloc (sizeof (struct extraction)); /* Not vectorizable: different unknown offset. */ +#pragma GCC unroll 0 for (i = 0; i < N; i++) { *((int *)p + x + i) = a[i]; diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102.c index 51f6278..d9e0529 100644 --- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102.c +++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102.c @@ -28,6 +28,7 @@ int main1 (int x, int y) { } /* Not vectorizable: distance 1. */ +#pragma GCC unroll 0 for (i = 0; i < N - 1; i++) { *((int *)p + x + i + 1) = *((int *)p + x + i); diff --git a/gcc/testsuite/gcc.dg/vect/pr79920.c b/gcc/testsuite/gcc.dg/vect/pr79920.c index 276a280..38e0fef 100644 --- a/gcc/testsuite/gcc.dg/vect/pr79920.c +++ b/gcc/testsuite/gcc.dg/vect/pr79920.c @@ -14,6 +14,7 @@ compute_integral (double w_1[18]) for (int ip_1 = 0; ip_1 < 2; ++ip_1) { +#pragma GCC unroll 0 for (int i_0 = 0; i_0 < 6; ++i_0) t33[ip_1][i_0] = ((w_1[i_0*3] * t32[ip_1][0]) + (w_1[i_0*3+2] * t32[ip_1][2])); diff --git a/gcc/testsuite/gcc.dg/vect/pr83202-1.c b/gcc/testsuite/gcc.dg/vect/pr83202-1.c index 33c83de..ac12f07 100644 --- a/gcc/testsuite/gcc.dg/vect/pr83202-1.c +++ b/gcc/testsuite/gcc.dg/vect/pr83202-1.c @@ -1,9 +1,9 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_double } */ -void test(double data[8][8]) +void test(double data[16][16]) { - for (int i = 0; i < 8; i++) + for (int i = 0; i < 16; i++) { for (int j = 0; j < i; j+=4) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-105.c b/gcc/testsuite/gcc.dg/vect/vect-105.c index 0024457..17b6e89 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-105.c +++ b/gcc/testsuite/gcc.dg/vect/vect-105.c @@ -35,6 +35,7 @@ int main1 (int x) { /* Vectorizable: distance > number of iterations. */ for (i = 1; i < N; i++) { +#pragma GCC unroll 0 for (j = 0; j < N; j++) { *((int *)p + x + i + j) = *((int *)p + x + i + j + 5); diff --git a/gcc/testsuite/gcc.dg/vect/vect-93.c b/gcc/testsuite/gcc.dg/vect/vect-93.c index 397c2ed..c3e1278 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-93.c +++ b/gcc/testsuite/gcc.dg/vect/vect-93.c @@ -29,6 +29,7 @@ main1 (float *pa) abort (); } +#pragma GCC unroll 0 for (i = 1; i <= N2; i++) { pa[i] = 3.0; diff --git a/gcc/testsuite/gcc.dg/vect/vect-double-reduc-6.c b/gcc/testsuite/gcc.dg/vect/vect-double-reduc-6.c index 3a4f087..85aec1b 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-double-reduc-6.c +++ b/gcc/testsuite/gcc.dg/vect/vect-double-reduc-6.c @@ -19,6 +19,7 @@ foo () { sum = 1; for (j = 0; j < K; j++) +#pragma GCC unroll 0 for (i = 0; i < K; i++) sum *= in[i+k][j]; out[k] = sum; diff --git a/gcc/testsuite/gcc.dg/vect/vect-profile-1.c b/gcc/testsuite/gcc.dg/vect/vect-profile-1.c index 93d7ad1..922f965 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-profile-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-profile-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_int } */ -/* { dg-additional-options "-fdump-tree-vect-details-blocks" } */ +/* { dg-additional-options "-fdump-tree-vect-details-blocks -fdisable-tree-cunrolli" } */ /* At least one of these should correspond to a full vector. */ diff --git a/gcc/testsuite/gfortran.dg/vect/vect-8.f90 b/gcc/testsuite/gfortran.dg/vect/vect-8.f90 index e26cdf9..386f7de 100644 --- a/gcc/testsuite/gfortran.dg/vect/vect-8.f90 +++ b/gcc/testsuite/gfortran.dg/vect/vect-8.f90 @@ -247,7 +247,7 @@ nl1= 1 nl2= 2 fw= 2.000D0 DO ky= 2,n -DO kx= 2,3 +DO kx= 2,4 du1ky= u1(kx,ky+1,nl1)-u1(kx,ky-1,nl1) du2ky= u2(kx,ky+1,nl1)-u2(kx,ky-1,nl1) du3ky= u3(kx,ky+1,nl1)-u3(kx,ky-1,nl1) diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index 5952cad..d38959c 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -195,9 +195,8 @@ constant_after_peeling (tree op, gimple *stmt, class loop *loop) /* Induction variables are constants when defined in loop. */ if (loop_containing_stmt (stmt) != loop) return false; - tree ev = analyze_scalar_evolution (loop, op); - if (chrec_contains_undetermined (ev) - || chrec_contains_symbols (ev)) + tree ev = instantiate_parameters (loop, analyze_scalar_evolution (loop, op)); + if (chrec_contains_undetermined (ev)) return false; return true; } -- cgit v1.1 From 698114484e668abf28c70d989bc93fa399dda9ac Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 7 Oct 2019 08:36:06 +0000 Subject: [i386] Make the vzeroupper pattern describe its effects (PR91994) The problem in this PR was that vzeroupper has an effect on register contents, but those effects weren't modelled in the rtl pattern, which was just an unspec_volatile. This patch fixes that by running a subpass after vzeroupper insertion to add SETs and CLOBBERs as appropriate. See the comments in the patch for more details. 2019-10-07 Richard Sandiford gcc/ PR target/91994 * config/i386/sse.md (avx_vzeroupper): Turn into a define_expand and wrap the unspec_volatile in a parallel. (*avx_vzeroupper): New define_insn. Use a match_parallel around the unspec_volatile. * config/i386/predicates.md (vzeroupper_pattern): Expect the unspec_volatile to be wrapped in a parallel. * config/i386/i386-features.c (ix86_add_reg_usage_to_vzeroupper) (ix86_add_reg_usage_to_vzerouppers): New functions. (rest_of_handle_insert_vzeroupper): Use them to add register usage information to the vzeroupper instructions. gcc/testsuite/ PR target/91994 * gcc.target/i386/pr91994.c: New test. From-SVN: r276648 --- gcc/ChangeLog | 14 ++++++++ gcc/config/i386/i386-features.c | 63 +++++++++++++++++++++++++++++++++ gcc/config/i386/predicates.md | 5 +-- gcc/config/i386/sse.md | 13 +++++-- gcc/testsuite/ChangeLog | 5 +++ gcc/testsuite/gcc.target/i386/pr91994.c | 35 ++++++++++++++++++ 6 files changed, 130 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr91994.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ef1eb59..ef8731f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2019-10-07 Richard Sandiford + + PR target/91994 + * config/i386/sse.md (avx_vzeroupper): Turn into a define_expand + and wrap the unspec_volatile in a parallel. + (*avx_vzeroupper): New define_insn. Use a match_parallel around + the unspec_volatile. + * config/i386/predicates.md (vzeroupper_pattern): Expect the + unspec_volatile to be wrapped in a parallel. + * config/i386/i386-features.c (ix86_add_reg_usage_to_vzeroupper) + (ix86_add_reg_usage_to_vzerouppers): New functions. + (rest_of_handle_insert_vzeroupper): Use them to add register + usage information to the vzeroupper instructions. + 2019-10-07 Richard Biener PR tree-optimization/91975 diff --git a/gcc/config/i386/i386-features.c b/gcc/config/i386/i386-features.c index 9b297ba..4781a33 100644 --- a/gcc/config/i386/i386-features.c +++ b/gcc/config/i386/i386-features.c @@ -1757,6 +1757,68 @@ convert_scalars_to_vector (bool timode_p) return 0; } +/* Modify the vzeroupper pattern in INSN so that it describes the effect + that the instruction has on the SSE registers. LIVE_REGS are the set + of registers that are live across the instruction. + + For a live register R we use: + + (set (reg:V2DF R) (reg:V2DF R)) + + which preserves the low 128 bits but clobbers the upper bits. + For a dead register we just use: + + (clobber (reg:V2DF R)) + + which invalidates any previous contents of R and stops R from becoming + live across the vzeroupper in future. */ + +static void +ix86_add_reg_usage_to_vzeroupper (rtx_insn *insn, bitmap live_regs) +{ + rtx pattern = PATTERN (insn); + unsigned int nregs = TARGET_64BIT ? 16 : 8; + rtvec vec = rtvec_alloc (nregs + 1); + RTVEC_ELT (vec, 0) = XVECEXP (pattern, 0, 0); + for (unsigned int i = 0; i < nregs; ++i) + { + unsigned int regno = GET_SSE_REGNO (i); + rtx reg = gen_rtx_REG (V2DImode, regno); + if (bitmap_bit_p (live_regs, regno)) + RTVEC_ELT (vec, i + 1) = gen_rtx_SET (reg, reg); + else + RTVEC_ELT (vec, i + 1) = gen_rtx_CLOBBER (VOIDmode, reg); + } + XVEC (pattern, 0) = vec; + df_insn_rescan (insn); +} + +/* Walk the vzeroupper instructions in the function and annotate them + with the effect that they have on the SSE registers. */ + +static void +ix86_add_reg_usage_to_vzerouppers (void) +{ + basic_block bb; + rtx_insn *insn; + auto_bitmap live_regs; + + df_analyze (); + FOR_EACH_BB_FN (bb, cfun) + { + bitmap_copy (live_regs, df_get_live_out (bb)); + df_simulate_initialize_backwards (bb, live_regs); + FOR_BB_INSNS_REVERSE (bb, insn) + { + if (!NONDEBUG_INSN_P (insn)) + continue; + if (vzeroupper_pattern (PATTERN (insn), VOIDmode)) + ix86_add_reg_usage_to_vzeroupper (insn, live_regs); + df_simulate_one_insn_backwards (bb, insn, live_regs); + } + } +} + static unsigned int rest_of_handle_insert_vzeroupper (void) { @@ -1773,6 +1835,7 @@ rest_of_handle_insert_vzeroupper (void) /* Call optimize_mode_switching. */ g->get_passes ()->execute_pass_mode_switching (); + ix86_add_reg_usage_to_vzerouppers (); return 0; } diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 72f8e7e..31f1cea 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -1441,8 +1441,9 @@ ;; return true if OP is a vzeroupper pattern. (define_predicate "vzeroupper_pattern" - (and (match_code "unspec_volatile") - (match_test "XINT (op, 1) == UNSPECV_VZEROUPPER"))) + (and (match_code "parallel") + (match_code "unspec_volatile" "a") + (match_test "XINT (XVECEXP (op, 0, 0), 1) == UNSPECV_VZEROUPPER"))) ;; Return true if OP is an addsub vec_merge operation (define_predicate "addsub_vm_operator" diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index c7f539f..07922a1 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -19622,9 +19622,16 @@ (set_attr "mode" "OI")]) ;; Clear the upper 128bits of AVX registers, equivalent to a NOP -;; if the upper 128bits are unused. -(define_insn "avx_vzeroupper" - [(unspec_volatile [(const_int 0)] UNSPECV_VZEROUPPER)] +;; if the upper 128bits are unused. Initially we expand the instructions +;; as though they had no effect on the SSE registers, but later add SETs and +;; CLOBBERs to the PARALLEL to model the real effect. +(define_expand "avx_vzeroupper" + [(parallel [(unspec_volatile [(const_int 0)] UNSPECV_VZEROUPPER)])] + "TARGET_AVX") + +(define_insn "*avx_vzeroupper" + [(match_parallel 0 "vzeroupper_pattern" + [(unspec_volatile [(const_int 0)] UNSPECV_VZEROUPPER)])] "TARGET_AVX" "vzeroupper" [(set_attr "type" "sse") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e8e0060..01253be 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-07 Richard Sandiford + + PR target/91994 + * gcc.target/i386/pr91994.c: New test. + 2019-10-07 Richard Biener PR tree-optimization/91975 diff --git a/gcc/testsuite/gcc.target/i386/pr91994.c b/gcc/testsuite/gcc.target/i386/pr91994.c new file mode 100644 index 0000000..033be68 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr91994.c @@ -0,0 +1,35 @@ +/* { dg-do run } */ +/* { dg-require-effective-target avx } */ +/* { dg-options "-O2 -mavx -mvzeroupper" } */ + +#include "avx-check.h" + +#include + +__m256i x1, x2, x3; + +__attribute__ ((noinline)) +static void +foo (void) +{ + x1 = x2; +} + +void +bar (void) +{ + __m256i x = x1; + foo (); + x3 = x; +} + +__attribute__ ((noinline)) +void +avx_test (void) +{ + __m256i x = _mm256_set1_epi8 (3); + x1 = x; + bar (); + if (__builtin_memcmp (&x3, &x, sizeof (x))) + __builtin_abort (); +} -- cgit v1.1 From ad00d6c1746fdcbfd86b2d50f2500d7ccb0d1691 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 7 Oct 2019 08:38:49 +0000 Subject: Use CONSTEXPR in machmode.h This patch adds CONSTEXPR to constructors and operators in machmode.h, excluding the controversial constexpr-resistant "() {}" constructors, which would become "= default" if we required C++11. Some of the other routines could potentially be constexpr too, but that can be done on an as-needed basis. 2019-10-07 Richard Sandiford gcc/ * machmode.h (opt_mode): Mark constructors with CONSTEXPR. (pod_mode): Mark operators likewise. (scalar_int_mode): Mark non-default constructors and operators with CONSTEXPR. (scalar_float_mode, scalar_mode, complex_mode): Likewise. (fixed_size_mode): Likewise. From-SVN: r276649 --- gcc/ChangeLog | 9 ++++++ gcc/machmode.h | 87 +++++++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 71 insertions(+), 25 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ef8731f..ce91585 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2019-10-07 Richard Sandiford + * machmode.h (opt_mode): Mark constructors with CONSTEXPR. + (pod_mode): Mark operators likewise. + (scalar_int_mode): Mark non-default constructors and + operators with CONSTEXPR. + (scalar_float_mode, scalar_mode, complex_mode): Likewise. + (fixed_size_mode): Likewise. + +2019-10-07 Richard Sandiford + PR target/91994 * config/i386/sse.md (avx_vzeroupper): Turn into a define_expand and wrap the unspec_volatile in a parallel. diff --git a/gcc/machmode.h b/gcc/machmode.h index 005ec80..64ac213 100644 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -244,11 +244,11 @@ class opt_mode public: enum from_int { dummy = MAX_MACHINE_MODE }; - ALWAYS_INLINE opt_mode () : m_mode (E_VOIDmode) {} - ALWAYS_INLINE opt_mode (const T &m) : m_mode (m) {} + ALWAYS_INLINE CONSTEXPR opt_mode () : m_mode (E_VOIDmode) {} + ALWAYS_INLINE CONSTEXPR opt_mode (const T &m) : m_mode (m) {} template - ALWAYS_INLINE opt_mode (const U &m) : m_mode (T (m)) {} - ALWAYS_INLINE opt_mode (from_int m) : m_mode (machine_mode (m)) {} + ALWAYS_INLINE CONSTEXPR opt_mode (const U &m) : m_mode (T (m)) {} + ALWAYS_INLINE CONSTEXPR opt_mode (from_int m) : m_mode (machine_mode (m)) {} machine_mode else_void () const; machine_mode else_blk () const { return else_mode (BLKmode); } @@ -324,8 +324,12 @@ struct pod_mode typedef typename T::measurement_type measurement_type; machine_mode m_mode; - ALWAYS_INLINE operator machine_mode () const { return m_mode; } - ALWAYS_INLINE operator T () const { return from_int (m_mode); } + ALWAYS_INLINE CONSTEXPR + operator machine_mode () const { return m_mode; } + + ALWAYS_INLINE CONSTEXPR + operator T () const { return from_int (m_mode); } + ALWAYS_INLINE pod_mode &operator = (const T &m) { m_mode = m; return *this; } }; @@ -403,8 +407,11 @@ public: typedef unsigned short measurement_type; ALWAYS_INLINE scalar_int_mode () {} - ALWAYS_INLINE scalar_int_mode (from_int m) : m_mode (machine_mode (m)) {} - ALWAYS_INLINE operator machine_mode () const { return m_mode; } + + ALWAYS_INLINE CONSTEXPR + scalar_int_mode (from_int m) : m_mode (machine_mode (m)) {} + + ALWAYS_INLINE CONSTEXPR operator machine_mode () const { return m_mode; } static bool includes_p (machine_mode); @@ -428,8 +435,11 @@ public: typedef unsigned short measurement_type; ALWAYS_INLINE scalar_float_mode () {} - ALWAYS_INLINE scalar_float_mode (from_int m) : m_mode (machine_mode (m)) {} - ALWAYS_INLINE operator machine_mode () const { return m_mode; } + + ALWAYS_INLINE CONSTEXPR + scalar_float_mode (from_int m) : m_mode (machine_mode (m)) {} + + ALWAYS_INLINE CONSTEXPR operator machine_mode () const { return m_mode; } static bool includes_p (machine_mode); @@ -453,11 +463,20 @@ public: typedef unsigned short measurement_type; ALWAYS_INLINE scalar_mode () {} - ALWAYS_INLINE scalar_mode (from_int m) : m_mode (machine_mode (m)) {} - ALWAYS_INLINE scalar_mode (const scalar_int_mode &m) : m_mode (m) {} - ALWAYS_INLINE scalar_mode (const scalar_float_mode &m) : m_mode (m) {} - ALWAYS_INLINE scalar_mode (const scalar_int_mode_pod &m) : m_mode (m) {} - ALWAYS_INLINE operator machine_mode () const { return m_mode; } + + ALWAYS_INLINE CONSTEXPR + scalar_mode (from_int m) : m_mode (machine_mode (m)) {} + + ALWAYS_INLINE CONSTEXPR + scalar_mode (const scalar_int_mode &m) : m_mode (m) {} + + ALWAYS_INLINE CONSTEXPR + scalar_mode (const scalar_float_mode &m) : m_mode (m) {} + + ALWAYS_INLINE CONSTEXPR + scalar_mode (const scalar_int_mode_pod &m) : m_mode (m) {} + + ALWAYS_INLINE CONSTEXPR operator machine_mode () const { return m_mode; } static bool includes_p (machine_mode); @@ -494,8 +513,11 @@ public: typedef unsigned short measurement_type; ALWAYS_INLINE complex_mode () {} - ALWAYS_INLINE complex_mode (from_int m) : m_mode (machine_mode (m)) {} - ALWAYS_INLINE operator machine_mode () const { return m_mode; } + + ALWAYS_INLINE CONSTEXPR + complex_mode (from_int m) : m_mode (machine_mode (m)) {} + + ALWAYS_INLINE CONSTEXPR operator machine_mode () const { return m_mode; } static bool includes_p (machine_mode); @@ -764,14 +786,29 @@ public: typedef unsigned short measurement_type; ALWAYS_INLINE fixed_size_mode () {} - ALWAYS_INLINE fixed_size_mode (from_int m) : m_mode (machine_mode (m)) {} - ALWAYS_INLINE fixed_size_mode (const scalar_mode &m) : m_mode (m) {} - ALWAYS_INLINE fixed_size_mode (const scalar_int_mode &m) : m_mode (m) {} - ALWAYS_INLINE fixed_size_mode (const scalar_float_mode &m) : m_mode (m) {} - ALWAYS_INLINE fixed_size_mode (const scalar_mode_pod &m) : m_mode (m) {} - ALWAYS_INLINE fixed_size_mode (const scalar_int_mode_pod &m) : m_mode (m) {} - ALWAYS_INLINE fixed_size_mode (const complex_mode &m) : m_mode (m) {} - ALWAYS_INLINE operator machine_mode () const { return m_mode; } + + ALWAYS_INLINE CONSTEXPR + fixed_size_mode (from_int m) : m_mode (machine_mode (m)) {} + + ALWAYS_INLINE CONSTEXPR + fixed_size_mode (const scalar_mode &m) : m_mode (m) {} + + ALWAYS_INLINE CONSTEXPR + fixed_size_mode (const scalar_int_mode &m) : m_mode (m) {} + + ALWAYS_INLINE CONSTEXPR + fixed_size_mode (const scalar_float_mode &m) : m_mode (m) {} + + ALWAYS_INLINE CONSTEXPR + fixed_size_mode (const scalar_mode_pod &m) : m_mode (m) {} + + ALWAYS_INLINE CONSTEXPR + fixed_size_mode (const scalar_int_mode_pod &m) : m_mode (m) {} + + ALWAYS_INLINE CONSTEXPR + fixed_size_mode (const complex_mode &m) : m_mode (m) {} + + ALWAYS_INLINE CONSTEXPR operator machine_mode () const { return m_mode; } static bool includes_p (machine_mode); -- cgit v1.1 From 9b0365879b3c4917f5a2485a1fca8bb678484bfe Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 7 Oct 2019 08:39:12 +0000 Subject: [IRA] Handle fully-tied destinations in a similar way to earlyclobbers IRA's make_early_clobber_and_input_conflicts checks for cases in which an output operand is likely to be an earlyclobber and an input operand is unlikely to be tieable with it. If so, the allocno for the output conflicts with the allocno for the input. This seems to work well. However, a similar situation arises if an output operand is likely to be tied to one of a set of input operands X and if another input operand has a different value from all of the operands in X. E.g. if we have: 0: "=r, r" 1: "0, r" 2: "r, 0" 3: "r, r" operand 0 will always be tied to operand 1 or operand 2, so if operand 3 is different from them both, operand 0 acts like an earlyclobber as far as operand 3 (only) is concerned. The same is true for operand 2 in: 0: "=r" 1: "0" 2: "r" In the second example, we'd normally have a copy between operand 1 and operand 0 if operand 1 dies in the instruction, and so there's rarely a problem. But if operand 1 doesn't die in the instruction, operand 0 still acts as an earlyclobber for operand 2 (if different from operand 1), since in that case LRA must copy operand 1 to operand 0 before the instruction. As the existing comment says: Avoid introducing unnecessary conflicts by checking classes of the constraints and pseudos because otherwise significant code degradation is possible for some targets. I think that's doubly true here. E.g. it's perfectly reasonable to have constraints like: 0: "=r, r" 1: "0, r" 2: "r, r" on targets like s390 that have shorter instructions for tied operands, but that don't want the size difference to influence RA too much. We shouldn't treat operand 0 as earlyclobber wrt operand 2 in that case. This patch therefore treats a normal tied non-earlyclobber output as being effectively earlyclobber wrt to an input if it is so for *all* preferred alternatives. 2019-10-07 Richard Sandiford gcc/ * ira-lives.c (check_and_make_def_conflict): Handle cases in which DEF is not a true earlyclobber but is tied to a specific input operand, and so is effectively earlyclobber wrt inputs that have different values. (make_early_clobber_and_input_conflicts): Pass this case to the above. From-SVN: r276650 --- gcc/ChangeLog | 8 ++++++ gcc/ira-lives.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 80 insertions(+), 14 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce91585..798d16c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2019-10-07 Richard Sandiford + * ira-lives.c (check_and_make_def_conflict): Handle cases in which + DEF is not a true earlyclobber but is tied to a specific input + operand, and so is effectively earlyclobber wrt inputs that have + different values. + (make_early_clobber_and_input_conflicts): Pass this case to the above. + +2019-10-07 Richard Sandiford + * machmode.h (opt_mode): Mark constructors with CONSTEXPR. (pod_mode): Mark operators likewise. (scalar_int_mode): Mark non-default constructors and diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c index cce73a1..098b0e7 100644 --- a/gcc/ira-lives.c +++ b/gcc/ira-lives.c @@ -633,9 +633,28 @@ check_and_make_def_use_conflict (rtx dreg, rtx orig_dreg, /* Check and make if necessary conflicts for definition DEF of class DEF_CL of the current insn with input operands. Process only - constraints of alternative ALT. */ + constraints of alternative ALT. + + One of three things is true when this function is called: + + (1) DEF is an earlyclobber for alternative ALT. Input operands then + conflict with DEF in ALT unless they explicitly match DEF via 0-9 + constraints. + + (2) DEF matches (via 0-9 constraints) an operand that is an + earlyclobber for alternative ALT. Other input operands then + conflict with DEF in ALT. + + (3) [FOR_TIE_P] Some input operand X matches DEF for alternative ALT. + Input operands with a different value from X then conflict with + DEF in ALT. + + However, there's still a judgement call to make when deciding + whether a conflict in ALT is important enough to be reflected + in the pan-alternative allocno conflict set. */ static void -check_and_make_def_conflict (int alt, int def, enum reg_class def_cl) +check_and_make_def_conflict (int alt, int def, enum reg_class def_cl, + bool for_tie_p) { int use, use_match; ira_allocno_t a; @@ -669,14 +688,40 @@ check_and_make_def_conflict (int alt, int def, enum reg_class def_cl) if (use == def || recog_data.operand_type[use] == OP_OUT) continue; + /* An earlyclobber on DEF doesn't apply to an input operand X if X + explicitly matches DEF, but it applies to other input operands + even if they happen to be the same value as X. + + In contrast, if an input operand X is tied to a non-earlyclobber + DEF, there's no conflict with other input operands that have the + same value as X. */ + if (op_alt[use].matches == def + || (for_tie_p + && rtx_equal_p (recog_data.operand[use], + recog_data.operand[op_alt[def].matched]))) + continue; + if (op_alt[use].anything_ok) use_cl = ALL_REGS; else use_cl = op_alt[use].cl; + if (use_cl == NO_REGS) + continue; + + /* If DEF is simply a tied operand, ignore cases in which this + alternative requires USE to have a likely-spilled class. + Adding a conflict would just constrain USE further if DEF + happens to be allocated first. */ + if (for_tie_p && targetm.class_likely_spilled_p (use_cl)) + continue; /* If there's any alternative that allows USE to match DEF, do not record a conflict. If that causes us to create an invalid - instruction due to the earlyclobber, reload must fix it up. */ + instruction due to the earlyclobber, reload must fix it up. + + Likewise, if we're treating a tied DEF like a partial earlyclobber, + do not record a conflict if there's another alternative in which + DEF is neither tied nor earlyclobber. */ for (alt1 = 0; alt1 < recog_data.n_alternatives; alt1++) { if (!TEST_BIT (preferred_alternatives, alt1)) @@ -691,6 +736,12 @@ check_and_make_def_conflict (int alt, int def, enum reg_class def_cl) && recog_data.constraints[use - 1][0] == '%' && op_alt1[use - 1].matches == def)) break; + if (for_tie_p + && !op_alt1[def].earlyclobber + && op_alt1[def].matched < 0 + && alternative_class (op_alt1, def) != NO_REGS + && alternative_class (op_alt1, use) != NO_REGS) + break; } if (alt1 < recog_data.n_alternatives) @@ -701,8 +752,7 @@ check_and_make_def_conflict (int alt, int def, enum reg_class def_cl) if ((use_match = op_alt[use].matches) >= 0) { - if (use_match == def) - continue; + gcc_checking_assert (use_match != def); if (op_alt[use_match].anything_ok) use_cl = ALL_REGS; @@ -717,7 +767,11 @@ check_and_make_def_conflict (int alt, int def, enum reg_class def_cl) /* Make conflicts of early clobber pseudo registers of the current insn with its inputs. Avoid introducing unnecessary conflicts by checking classes of the constraints and pseudos because otherwise - significant code degradation is possible for some targets. */ + significant code degradation is possible for some targets. + + For these purposes, tying an input to an output makes that output act + like an earlyclobber for inputs with a different value, since the output + register then has a predetermined purpose on input to the instruction. */ static void make_early_clobber_and_input_conflicts (void) { @@ -732,15 +786,19 @@ make_early_clobber_and_input_conflicts (void) if (TEST_BIT (preferred_alternatives, alt)) for (def = 0; def < n_operands; def++) { - def_cl = NO_REGS; - if (op_alt[def].earlyclobber) + if (op_alt[def].anything_ok) + def_cl = ALL_REGS; + else + def_cl = op_alt[def].cl; + if (def_cl != NO_REGS) { - if (op_alt[def].anything_ok) - def_cl = ALL_REGS; - else - def_cl = op_alt[def].cl; - check_and_make_def_conflict (alt, def, def_cl); + if (op_alt[def].earlyclobber) + check_and_make_def_conflict (alt, def, def_cl, false); + else if (op_alt[def].matched >= 0 + && !targetm.class_likely_spilled_p (def_cl)) + check_and_make_def_conflict (alt, def, def_cl, true); } + if ((def_match = op_alt[def].matches) >= 0 && (op_alt[def_match].earlyclobber || op_alt[def].earlyclobber)) @@ -749,7 +807,7 @@ make_early_clobber_and_input_conflicts (void) def_cl = ALL_REGS; else def_cl = op_alt[def_match].cl; - check_and_make_def_conflict (alt, def, def_cl); + check_and_make_def_conflict (alt, def, def_cl, false); } } } -- cgit v1.1 From 7a3248463c2095ba112a31809f2965d04bed03b3 Mon Sep 17 00:00:00 2001 From: Mark Eggleston Date: Mon, 7 Oct 2019 09:13:16 +0000 Subject: Delete auto-in_equiv.f90 forgot to use svn delete the first time. From-SVN: r276651 --- gcc/testsuite/gfortran.dg/auto_in_equiv_3.f90 | 63 --------------------------- 1 file changed, 63 deletions(-) delete mode 100644 gcc/testsuite/gfortran.dg/auto_in_equiv_3.f90 (limited to 'gcc') diff --git a/gcc/testsuite/gfortran.dg/auto_in_equiv_3.f90 b/gcc/testsuite/gfortran.dg/auto_in_equiv_3.f90 deleted file mode 100644 index 57c384d..0000000 --- a/gcc/testsuite/gfortran.dg/auto_in_equiv_3.f90 +++ /dev/null @@ -1,63 +0,0 @@ -! { dg-do run } -! { dg-options "-fdec-static -fno-automatic" } - -! Contributed by Mark Eggleston - -! Storage is NOT on the static unless explicitly specified using the -! DEC extension "automatic". The address of the first local variable -! is used to determine that storage for the automatic local variable -! is different to that of a local variable with no attributes. The -! contents of the local variable in suba should be overwritten by the -! call to subb. -! -program test - integer :: dummy - integer, parameter :: address = kind(loc(dummy)) - integer(address) :: ad1 - integer(address) :: ad2 - integer(address) :: ad3 - logical :: ok - - call suba(0, ad1) - call subb(0, ad2) - call suba(1, ad1) - call subc(0, ad3) - ok = (ad1.eq.ad3).and.(ad1.ne.ad2) - if (.not.ok) stop 4 - -contains - subroutine suba(option, addr) - integer, intent(in) :: option - integer(address), intent(out) :: addr - integer, automatic :: a - integer :: b - equivalence (a, b) - addr = loc(a) - if (option.eq.0) then - ! initialise a and c - a = 9 - if (a.ne.b) stop 1 - if (loc(a).ne.loc(b)) stop 2 - else - ! a should've been overwritten - if (a.eq.9) stop 3 - end if - end subroutine suba - - subroutine subb(dummy, addr) - integer, intent(in) :: dummy - integer(address), intent(out) :: addr - integer :: x - addr = loc(x) - x = 77 - end subroutine subb - - subroutine subc(dummy, addr) - integer, intent(in) :: dummy - integer(address), intent(out) :: addr - integer, automatic :: y - addr = loc(y) - y = 77 - end subroutine subc - -end program test -- cgit v1.1 From 3faf75d458529592007436a0972f44e14ebf46f6 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Mon, 7 Oct 2019 09:39:42 +0000 Subject: Use value_range_base::num_pairs instead of vrp_val_is* to check if a range has one sub-range. From-SVN: r276653 --- gcc/ChangeLog | 8 +++++++- gcc/tree-vrp.c | 5 +---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 798d16c..fbb1634 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-07 Aldy Hernandez + + * tree-vrp.c (value_range_base::singleton_p): Use + value_range_base::num_pairs instead of vrp_val_is* to check + if a range has one sub-range. + 2019-10-07 Richard Sandiford * ira-lives.c (check_and_make_def_conflict): Handle cases in which @@ -179,7 +185,7 @@ 2019-10-04 Aldy Hernandez - (value_range_from_overflowed_bounds): Rename from + * range-op.o (value_range_from_overflowed_bounds): Rename from adjust_overflow_bound. (value_range_with_overflow): Rename from create_range_with_overflow. diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index a2ab4a2..86e4dac 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -379,10 +379,7 @@ value_range_base::singleton_p (tree *result) const } return false; } - - /* An anti-range that includes an extreme, is just a range with - one sub-range. Use the one sub-range. */ - if (vrp_val_is_min (m_min, true) || vrp_val_is_max (m_max, true)) + if (num_pairs () == 1) { value_range_base vr0, vr1; ranges_from_anti_range (this, &vr0, &vr1, true); -- cgit v1.1 From 523fe5b61119c17d9b5adf4a6a4cffa10cfaacf7 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Mon, 7 Oct 2019 11:43:13 +0000 Subject: Disentangle range_fold_*ary_expr() into various independent pieces. From-SVN: r276654 --- gcc/ChangeLog | 20 +++++ gcc/ipa-prop.c | 16 +++- gcc/ipa-prop.h | 1 + gcc/tree-vrp.c | 264 +++++++++++++++++++++++++++++++++------------------------ gcc/tree-vrp.h | 1 + 5 files changed, 187 insertions(+), 115 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fbb1634..83ad001 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,25 @@ 2019-10-07 Aldy Hernandez + * ipa-prop.c (ipa_vr::nonzero_p): New. + (ipcp_update_vr): Use nonzero_p instead of open-coding check for + non-zero range. + * ipa-prop.h (class ipa_vr): Add nonzero_p. + * tree-vrp.c (range_has_numeric_bounds_p): New. + (range_int_cst_p): Use range_has_numeric_bounds_p. + (get_range_op_handler): New. + (supported_types_p): New. + (defined_ranges_p): New. + (drop_undefines_to_varying): New. + (range_fold_binary_symbolics_p): New. + (range_fold_unary_symbolics_p): New. + (range_fold_unary_expr): Extract out into above functions. + (range_fold_binary_expr): Same. + (value_range_base::normalize_addresses): New. + (value_range_base::normalize_symbolics): Normalize addresses. + * tree-vrp.h (class value_range_base): Add normalize_addresses. + +2019-10-07 Aldy Hernandez + * tree-vrp.c (value_range_base::singleton_p): Use value_range_base::num_pairs instead of vrp_val_is* to check if a range has one sub-range. diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index e79add1..20a0bdd 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -5109,6 +5109,18 @@ ipcp_update_bits (struct cgraph_node *node) } } +bool +ipa_vr::nonzero_p (tree expr_type) const +{ + if (type == VR_ANTI_RANGE && wi::eq_p (min, 0) && wi::eq_p (max, 0)) + return true; + + unsigned prec = TYPE_PRECISION (expr_type); + return (type == VR_RANGE + && wi::eq_p (min, wi::one (prec)) + && wi::eq_p (max, wi::max_value (prec, TYPE_SIGN (expr_type)))); +} + /* Update value range of formal parameters as described in ipcp_transformation. */ @@ -5181,9 +5193,7 @@ ipcp_update_vr (struct cgraph_node *node) TYPE_SIGN (type))); } else if (POINTER_TYPE_P (TREE_TYPE (ddef)) - && vr[i].type == VR_ANTI_RANGE - && wi::eq_p (vr[i].min, 0) - && wi::eq_p (vr[i].max, 0)) + && vr[i].nonzero_p (TREE_TYPE (ddef))) { if (dump_file) fprintf (dump_file, "Setting nonnull for %u\n", i); diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h index 0ff8085..eb3397a 100644 --- a/gcc/ipa-prop.h +++ b/gcc/ipa-prop.h @@ -165,6 +165,7 @@ public: enum value_range_kind type; wide_int min; wide_int max; + bool nonzero_p (tree) const; }; /* A jump function for a callsite represents the values passed as actual diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 86e4dac..d69cfb1 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -910,15 +910,21 @@ vrp_bitmap_equal_p (const_bitmap b1, const_bitmap b2) && bitmap_equal_p (b1, b2))); } +static bool +range_has_numeric_bounds_p (const value_range_base *vr) +{ + return (vr->min () + && TREE_CODE (vr->min ()) == INTEGER_CST + && TREE_CODE (vr->max ()) == INTEGER_CST); +} + /* Return true if max and min of VR are INTEGER_CST. It's not necessary a singleton. */ bool range_int_cst_p (const value_range_base *vr) { - return (vr->kind () == VR_RANGE - && TREE_CODE (vr->min ()) == INTEGER_CST - && TREE_CODE (vr->max ()) == INTEGER_CST); + return (vr->kind () == VR_RANGE && range_has_numeric_bounds_p (vr)); } /* Return true if VR is a INTEGER_CST singleton. */ @@ -1760,119 +1766,102 @@ extract_range_from_plus_minus_expr (value_range_base *vr, vr->set (kind, min, max); } -/* Normalize a value_range for use in range_ops and return it. */ +/* Return the range-ops handler for CODE and EXPR_TYPE. If no + suitable operator is found, return NULL and set VR to VARYING. */ -static value_range_base -normalize_for_range_ops (const value_range_base &vr) +static const range_operator * +get_range_op_handler (value_range_base *vr, + enum tree_code code, + tree expr_type) { - tree type = vr.type (); + const range_operator *op = range_op_handler (code, expr_type); + if (!op) + vr->set_varying (expr_type); + return op; +} + +/* If the types passed are supported, return TRUE, otherwise set VR to + VARYING and return FALSE. */ - /* This will return ~[0,0] for [&var, &var]. */ - if (POINTER_TYPE_P (type) && !range_includes_zero_p (&vr)) +static bool +supported_types_p (value_range_base *vr, + tree type0, + tree type1 = NULL) +{ + if (!value_range_base::supports_type_p (type0) + || (type1 && !value_range_base::supports_type_p (type1))) { - value_range_base temp; - temp.set_nonzero (type); - return temp; + vr->set_varying (type0); + return false; } - if (vr.symbolic_p ()) - return normalize_for_range_ops (vr.normalize_symbolics ()); - if (TREE_CODE (vr.min ()) == INTEGER_CST - && TREE_CODE (vr.max ()) == INTEGER_CST) - return vr; - /* Anything not strictly numeric at this point becomes varying. */ - return value_range_base (vr.type ()); + return true; } -/* Fold a binary expression of two value_range's with range-ops. */ +/* If any of the ranges passed are defined, return TRUE, otherwise set + VR to UNDEFINED and return FALSE. */ -void -range_fold_binary_expr (value_range_base *vr, - enum tree_code code, - tree expr_type, - const value_range_base *vr0_, - const value_range_base *vr1_) +static bool +defined_ranges_p (value_range_base *vr, + const value_range_base *vr0, + const value_range_base *vr1 = NULL) { - if (!value_range_base::supports_type_p (expr_type) - || (!vr0_->undefined_p () - && !value_range_base::supports_type_p (vr0_->type ())) - || (!vr1_->undefined_p () - && !value_range_base::supports_type_p (vr1_->type ()))) - { - vr->set_varying (expr_type); - return; - } - if (vr0_->undefined_p () && vr1_->undefined_p ()) + if (vr0->undefined_p () && (!vr1 || vr1->undefined_p ())) { vr->set_undefined (); - return; - } - range_operator *op = range_op_handler (code, expr_type); - if (!op) - { - vr->set_varying (expr_type); - return; + return false; } + return true; +} - /* Mimic any behavior users of extract_range_from_binary_expr may - expect. */ - value_range_base vr0 = *vr0_, vr1 = *vr1_; - if (vr0.undefined_p ()) - vr0.set_varying (expr_type); - else if (vr1.undefined_p ()) - vr1.set_varying (expr_type); +static value_range_base +drop_undefines_to_varying (const value_range_base *vr, tree expr_type) +{ + if (vr->undefined_p ()) + return value_range_base (expr_type); + else + return *vr; +} + +/* If any operand is symbolic, perform a binary operation on them and + return TRUE, otherwise return FALSE. */ - /* Handle symbolics. */ - if (vr0.symbolic_p () || vr1.symbolic_p ()) +static bool +range_fold_binary_symbolics_p (value_range_base *vr, + tree_code code, + tree expr_type, + const value_range_base *vr0, + const value_range_base *vr1) +{ + if (vr0->symbolic_p () || vr1->symbolic_p ()) { if ((code == PLUS_EXPR || code == MINUS_EXPR)) { - extract_range_from_plus_minus_expr (vr, code, expr_type, - &vr0, &vr1); - return; + extract_range_from_plus_minus_expr (vr, code, expr_type, vr0, vr1); + return true; } if (POINTER_TYPE_P (expr_type) && code == POINTER_PLUS_EXPR) { - extract_range_from_pointer_plus_expr (vr, code, expr_type, - &vr0, &vr1); - return; + extract_range_from_pointer_plus_expr (vr, code, expr_type, vr0, vr1); + return true; } + const range_operator *op = get_range_op_handler (vr, code, expr_type); + *vr = op->fold_range (expr_type, + vr0->normalize_symbolics (), + vr1->normalize_symbolics ()); + return true; } - - /* Do the range-ops dance. */ - value_range_base n0 = normalize_for_range_ops (vr0); - value_range_base n1 = normalize_for_range_ops (vr1); - *vr = op->fold_range (expr_type, n0, n1); + return false; } -/* Fold a unary expression of a value_range with range-ops. */ +/* If operand is symbolic, perform a unary operation on it and return + TRUE, otherwise return FALSE. */ -void -range_fold_unary_expr (value_range_base *vr, - enum tree_code code, tree expr_type, - const value_range_base *vr0, - tree vr0_type) +static bool +range_fold_unary_symbolics_p (value_range_base *vr, + tree_code code, + tree expr_type, + const value_range_base *vr0) { - /* Mimic any behavior users of extract_range_from_unary_expr may - expect. */ - if (!value_range_base::supports_type_p (expr_type) - || !value_range_base::supports_type_p (vr0_type)) - { - vr->set_varying (expr_type); - return; - } - if (vr0->undefined_p ()) - { - vr->set_undefined (); - return; - } - range_operator *op = range_op_handler (code, expr_type); - if (!op) - { - vr->set_varying (expr_type); - return; - } - - /* Handle symbolics. */ if (vr0->symbolic_p ()) { if (code == NEGATE_EXPR) @@ -1881,7 +1870,7 @@ range_fold_unary_expr (value_range_base *vr, value_range_base zero; zero.set_zero (vr0->type ()); range_fold_binary_expr (vr, MINUS_EXPR, expr_type, &zero, vr0); - return; + return true; } if (code == BIT_NOT_EXPR) { @@ -1889,30 +1878,64 @@ range_fold_unary_expr (value_range_base *vr, value_range_base minusone; minusone.set (build_int_cst (vr0->type (), -1)); range_fold_binary_expr (vr, MINUS_EXPR, expr_type, &minusone, vr0); - return; + return true; } + const range_operator *op = get_range_op_handler (vr, code, expr_type); *vr = op->fold_range (expr_type, - normalize_for_range_ops (*vr0), + vr0->normalize_symbolics (), value_range_base (expr_type)); - return; - } - if (CONVERT_EXPR_CODE_P (code) && (POINTER_TYPE_P (expr_type) - || POINTER_TYPE_P (vr0->type ()))) - { - /* This handles symbolic conversions such such as [25, x_4]. */ - if (!range_includes_zero_p (vr0)) - vr->set_nonzero (expr_type); - else if (vr0->zero_p ()) - vr->set_zero (expr_type); - else - vr->set_varying (expr_type); - return; + return true; } + return false; +} - /* Do the range-ops dance. */ - value_range_base n0 = normalize_for_range_ops (*vr0); - value_range_base n1 (expr_type); - *vr = op->fold_range (expr_type, n0, n1); +/* Perform a binary operation on a pair of ranges. */ + +void +range_fold_binary_expr (value_range_base *vr, + enum tree_code code, + tree expr_type, + const value_range_base *vr0_, + const value_range_base *vr1_) +{ + if (!supported_types_p (vr, expr_type) + || !defined_ranges_p (vr, vr0_, vr1_)) + return; + const range_operator *op = get_range_op_handler (vr, code, expr_type); + if (!op) + return; + + value_range_base vr0 = drop_undefines_to_varying (vr0_, expr_type); + value_range_base vr1 = drop_undefines_to_varying (vr1_, expr_type); + if (range_fold_binary_symbolics_p (vr, code, expr_type, &vr0, &vr1)) + return; + + *vr = op->fold_range (expr_type, + vr0.normalize_addresses (), + vr1.normalize_addresses ()); +} + +/* Perform a unary operation on a range. */ + +void +range_fold_unary_expr (value_range_base *vr, + enum tree_code code, tree expr_type, + const value_range_base *vr0, + tree vr0_type) +{ + if (!supported_types_p (vr, expr_type, vr0_type) + || !defined_ranges_p (vr, vr0)) + return; + const range_operator *op = get_range_op_handler (vr, code, expr_type); + if (!op) + return; + + if (range_fold_unary_symbolics_p (vr, code, expr_type, vr0)) + return; + + *vr = op->fold_range (expr_type, + vr0->normalize_addresses (), + value_range_base (expr_type)); } /* Given a COND_EXPR COND of the form 'V OP W', and an SSA name V, @@ -5997,7 +6020,24 @@ value_range::union_ (const value_range *other) } } -/* Normalize symbolics into constants. */ +/* Normalize addresses into constants. */ + +value_range_base +value_range_base::normalize_addresses () const +{ + if (!POINTER_TYPE_P (type ()) || range_has_numeric_bounds_p (this)) + return *this; + + if (!range_includes_zero_p (this)) + { + gcc_checking_assert (TREE_CODE (m_min) == ADDR_EXPR + || TREE_CODE (m_max) == ADDR_EXPR); + return range_nonzero (type ()); + } + return value_range_base (type ()); +} + +/* Normalize symbolics and addresses into constants. */ value_range_base value_range_base::normalize_symbolics () const @@ -6008,7 +6048,7 @@ value_range_base::normalize_symbolics () const bool min_symbolic = !is_gimple_min_invariant (min ()); bool max_symbolic = !is_gimple_min_invariant (max ()); if (!min_symbolic && !max_symbolic) - return *this; + return normalize_addresses (); // [SYM, SYM] -> VARYING if (min_symbolic && max_symbolic) diff --git a/gcc/tree-vrp.h b/gcc/tree-vrp.h index d20d004..a3f9e90 100644 --- a/gcc/tree-vrp.h +++ b/gcc/tree-vrp.h @@ -86,6 +86,7 @@ public: static bool supports_type_p (tree); value_range_base normalize_symbolics () const; + value_range_base normalize_addresses () const; static const unsigned int m_max_pairs = 2; bool contains_p (tree) const; -- cgit v1.1 From 19849d1585d6ff2cef5f495a93699703cf18b335 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Mon, 7 Oct 2019 11:53:40 +0000 Subject: * ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check. From-SVN: r276655 --- gcc/ChangeLog | 4 ++++ gcc/ipa-prop.c | 1 + 2 files changed, 5 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83ad001..db122e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2019-10-07 Aldy Hernandez + * ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check. + +2019-10-07 Aldy Hernandez + * ipa-prop.c (ipa_vr::nonzero_p): New. (ipcp_update_vr): Use nonzero_p instead of open-coding check for non-zero range. diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 20a0bdd..5020f4a 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -5117,6 +5117,7 @@ ipa_vr::nonzero_p (tree expr_type) const unsigned prec = TYPE_PRECISION (expr_type); return (type == VR_RANGE + && TYPE_UNSIGNED (expr_type) && wi::eq_p (min, wi::one (prec)) && wi::eq_p (max, wi::max_value (prec, TYPE_SIGN (expr_type)))); } -- cgit v1.1 From ca95ce80e05143e64bca88ce5a6a38ee68894a95 Mon Sep 17 00:00:00 2001 From: Vladislav Ivanishin Date: Mon, 7 Oct 2019 14:19:30 +0000 Subject: [doc] -Wuninitialized doesn't do -Wclobbered's job * gcc/doc/invoke.texi (-Wuninitialized): Don't mention the clobbered by setjmp situation here. Fix a verb's ending: "the exact variables or elements for which there are warnings depends" -> "... depend". From-SVN: r276657 --- gcc/ChangeLog | 6 ++++++ gcc/doc/invoke.texi | 21 ++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db122e2..8ecb2a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-07 Vladislav Ivanishin + + * doc/invoke.texi (-Wuninitialized): Don't mention the clobbered by + setjmp situation here. Fix a verb's ending: "the exact variables or + elements for which there are warnings depends" -> "... depend". + 2019-10-07 Aldy Hernandez * ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 0b56162..1077930 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -5578,21 +5578,20 @@ either specify @option{-Wextra -Wunused} (note that @option{-Wall} implies @item -Wuninitialized @opindex Wuninitialized @opindex Wno-uninitialized -Warn if an automatic variable is used without first being initialized -or if a variable may be clobbered by a @code{setjmp} call. In C++, -warn if a non-static reference or non-static @code{const} member -appears in a class without constructors. +Warn if an automatic variable is used without first being initialized. +In C++, warn if a non-static reference or non-static @code{const} +member appears in a class without constructors. If you want to warn about code that uses the uninitialized value of the variable in its own initializer, use the @option{-Winit-self} option. -These warnings occur for individual uninitialized or clobbered -elements of structure, union or array variables as well as for -variables that are uninitialized or clobbered as a whole. They do -not occur for variables or elements declared @code{volatile}. Because -these warnings depend on optimization, the exact variables or elements -for which there are warnings depends on the precise optimization -options and version of GCC used. +These warnings occur for individual uninitialized elements of +structure, union or array variables as well as for variables that are +uninitialized as a whole. They do not occur for variables or elements +declared @code{volatile}. Because these warnings depend on +optimization, the exact variables or elements for which there are +warnings depend on the precise optimization options and version of GCC +used. Note that there may be no warning about a variable that is used only to compute a value that itself is never used, because such -- cgit v1.1 From 880dcdaedac453d2c64ebcc6f1bb5f81539c863c Mon Sep 17 00:00:00 2001 From: Vladislav Ivanishin Date: Mon, 7 Oct 2019 14:29:07 +0000 Subject: Make gsi_next_nonvirtual_phi do what one expects gcc/ * gimple-iterator.h (gsi_next_nonvirtual_phi): Change the semantics to match that of other gsi_next_* functions. Adjust the comment. (gsi_start_nonvirtual_phis): New function. * ipa-icf.c (sem_function::compare_phi_node): Update uses of gsi_next_nonvirtual_phi accordingly. (No functional change.) From-SVN: r276658 --- gcc/ChangeLog | 8 ++++++++ gcc/gimple-iterator.h | 31 +++++++++++++++++-------------- gcc/ipa-icf.c | 11 ++++------- 3 files changed, 29 insertions(+), 21 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ecb2a1..2702146 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2019-10-07 Vladislav Ivanishin + * gimple-iterator.h (gsi_next_nonvirtual_phi): Change the semantics to + match that of other gsi_next_* functions. Adjust the comment. + (gsi_start_nonvirtual_phis): New function. + * ipa-icf.c (sem_function::compare_phi_node): Update uses of + gsi_next_nonvirtual_phi accordingly. (No functional change.) + +2019-10-07 Vladislav Ivanishin + * doc/invoke.texi (-Wuninitialized): Don't mention the clobbered by setjmp situation here. Fix a verb's ending: "the exact variables or elements for which there are warnings depends" -> "... depend". diff --git a/gcc/gimple-iterator.h b/gcc/gimple-iterator.h index ee6f5b1..ccd93d9 100644 --- a/gcc/gimple-iterator.h +++ b/gcc/gimple-iterator.h @@ -325,28 +325,31 @@ gsi_one_nondebug_before_end_p (gimple_stmt_iterator i) return gsi_end_p (i); } -/* Iterates I statement iterator to the next non-virtual statement. */ +/* Advance I statement iterator to the next non-virtual GIMPLE_PHI + statement. */ static inline void gsi_next_nonvirtual_phi (gphi_iterator *i) { - gphi *phi; - - if (gsi_end_p (*i)) - return; - - phi = i->phi (); - gcc_assert (phi != NULL); - - while (virtual_operand_p (gimple_phi_result (phi))) + do { gsi_next (i); + } + while (!gsi_end_p (*i) && virtual_operand_p (gimple_phi_result (i->phi ()))); +} - if (gsi_end_p (*i)) - return; +/* Return a new iterator pointing to the first non-virtual phi statement in + basic block BB. */ - phi = i->phi (); - } +static inline gphi_iterator +gsi_start_nonvirtual_phis (basic_block bb) +{ + gphi_iterator i = gsi_start_phis (bb); + + if (!gsi_end_p (i) && virtual_operand_p (gimple_phi_result (i.phi ()))) + gsi_next_nonvirtual_phi (&i); + + return i; } /* Return the basic block associated with this iterator. */ diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 009aeb4..8bf0f7c 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -1688,13 +1688,10 @@ sem_function::compare_phi_node (basic_block bb1, basic_block bb2) gcc_assert (bb1 != NULL); gcc_assert (bb2 != NULL); - si2 = gsi_start_phis (bb2); - for (si1 = gsi_start_phis (bb1); !gsi_end_p (si1); - gsi_next (&si1)) + si2 = gsi_start_nonvirtual_phis (bb2); + for (si1 = gsi_start_nonvirtual_phis (bb1); !gsi_end_p (si1); + gsi_next_nonvirtual_phi (&si1)) { - gsi_next_nonvirtual_phi (&si1); - gsi_next_nonvirtual_phi (&si2); - if (gsi_end_p (si1) && gsi_end_p (si2)) break; @@ -1731,7 +1728,7 @@ sem_function::compare_phi_node (basic_block bb1, basic_block bb2) return return_false (); } - gsi_next (&si2); + gsi_next_nonvirtual_phi (&si2); } return true; -- cgit v1.1 From 70e2a30ac8f474feefbcc392cbc59cf91271b92b Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Mon, 7 Oct 2019 14:59:00 +0000 Subject: Allow COND_EXPR and VEC_COND_EXPR condtions to trap Right now gimplifier does not allow VEC_COND_EXPR's condition to trap and introduces a temporary if this could happen, for example, generating _5 = _4 > { 2.0e+0, 2.0e+0, 2.0e+0, 2.0e+0 }; _6 = VEC_COND_EXPR <_5, { -1, -1, -1, -1 }, { 0, 0, 0, 0 }>; from GENERIC VEC_COND_EXPR < (*b > { 2.0e+0, 2.0e+0, 2.0e+0, 2.0e+0 }) , { -1, -1, -1, -1 } , { 0, 0, 0, 0 } > This is not necessary and makes the resulting GIMPLE harder to analyze. Change the gimplifier so as to allow COND_EXPR and VEC_COND_EXPR conditions to trap. This patch takes special care to avoid introducing trapping comparisons in GIMPLE_COND. They are not allowed, because they would require 3 outgoing edges (then, else and EH), which is awkward to say the least. Therefore, computations of such conditions should live in their own basic blocks. gcc/ChangeLog: 2019-10-07 Ilya Leoshkevich PR target/77918 * gimple-expr.c (gimple_cond_get_ops_from_tree): Assert that the caller passes a non-trapping condition. (is_gimple_condexpr): Allow trapping conditions. (is_gimple_condexpr_1): New helper function. (is_gimple_condexpr_for_cond): New function, acts like old is_gimple_condexpr. * gimple-expr.h (is_gimple_condexpr_for_cond): New function. * gimple.c (gimple_could_trap_p_1): Handle COND_EXPR and VEC_COND_EXPR. Fix an issue with statements like i = (fp < 1.). * gimplify.c (gimplify_cond_expr): Use is_gimple_condexpr_for_cond. (gimplify_expr): Allow is_gimple_condexpr_for_cond. * tree-eh.c (operation_could_trap_p): Assert on COND_EXPR and VEC_COND_EXPR. (tree_could_trap_p): Handle COND_EXPR and VEC_COND_EXPR. * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Use is_gimple_condexpr_for_cond, remove pointless tmp check (forward_propagate_into_cond): Remove pointless tmp check. From-SVN: r276659 --- gcc/ChangeLog | 22 ++++++++++++++++++++++ gcc/gimple-expr.c | 25 +++++++++++++++++++++---- gcc/gimple-expr.h | 1 + gcc/gimple.c | 14 +++++++++++++- gcc/gimplify.c | 5 +++-- gcc/tree-eh.c | 8 ++++++++ gcc/tree-ssa-forwprop.c | 7 ++++--- 7 files changed, 72 insertions(+), 10 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2702146..922ca5d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,25 @@ +2019-10-07 Ilya Leoshkevich + + PR target/77918 + * gimple-expr.c (gimple_cond_get_ops_from_tree): Assert that the + caller passes a non-trapping condition. + (is_gimple_condexpr): Allow trapping conditions. + (is_gimple_condexpr_1): New helper function. + (is_gimple_condexpr_for_cond): New function, acts like old + is_gimple_condexpr. + * gimple-expr.h (is_gimple_condexpr_for_cond): New function. + * gimple.c (gimple_could_trap_p_1): Handle COND_EXPR and + VEC_COND_EXPR. Fix an issue with statements like i = (fp < 1.). + * gimplify.c (gimplify_cond_expr): Use + is_gimple_condexpr_for_cond. + (gimplify_expr): Allow is_gimple_condexpr_for_cond. + * tree-eh.c (operation_could_trap_p): Assert on COND_EXPR and + VEC_COND_EXPR. + (tree_could_trap_p): Handle COND_EXPR and VEC_COND_EXPR. + * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Use + is_gimple_condexpr_for_cond, remove pointless tmp check + (forward_propagate_into_cond): Remove pointless tmp check. + 2019-10-07 Vladislav Ivanishin * gimple-iterator.h (gsi_next_nonvirtual_phi): Change the semantics to diff --git a/gcc/gimple-expr.c b/gcc/gimple-expr.c index 4082828..1738af1 100644 --- a/gcc/gimple-expr.c +++ b/gcc/gimple-expr.c @@ -574,6 +574,7 @@ gimple_cond_get_ops_from_tree (tree cond, enum tree_code *code_p, || TREE_CODE (cond) == TRUTH_NOT_EXPR || is_gimple_min_invariant (cond) || SSA_VAR_P (cond)); + gcc_checking_assert (!tree_could_throw_p (cond)); extract_ops_from_tree (cond, code_p, lhs_p, rhs_p); @@ -605,17 +606,33 @@ is_gimple_lvalue (tree t) || TREE_CODE (t) == BIT_FIELD_REF); } -/* Return true if T is a GIMPLE condition. */ +/* Helper for is_gimple_condexpr and is_gimple_condexpr_for_cond. */ -bool -is_gimple_condexpr (tree t) +static bool +is_gimple_condexpr_1 (tree t, bool allow_traps) { return (is_gimple_val (t) || (COMPARISON_CLASS_P (t) - && !tree_could_throw_p (t) + && (allow_traps || !tree_could_throw_p (t)) && is_gimple_val (TREE_OPERAND (t, 0)) && is_gimple_val (TREE_OPERAND (t, 1)))); } +/* Return true if T is a GIMPLE condition. */ + +bool +is_gimple_condexpr (tree t) +{ + return is_gimple_condexpr_1 (t, true); +} + +/* Like is_gimple_condexpr, but does not allow T to trap. */ + +bool +is_gimple_condexpr_for_cond (tree t) +{ + return is_gimple_condexpr_1 (t, false); +} + /* Return true if T is a gimple address. */ bool diff --git a/gcc/gimple-expr.h b/gcc/gimple-expr.h index 1ad1432..0925aeb 100644 --- a/gcc/gimple-expr.h +++ b/gcc/gimple-expr.h @@ -41,6 +41,7 @@ extern void gimple_cond_get_ops_from_tree (tree, enum tree_code *, tree *, tree *); extern bool is_gimple_lvalue (tree); extern bool is_gimple_condexpr (tree); +extern bool is_gimple_condexpr_for_cond (tree); extern bool is_gimple_address (const_tree); extern bool is_gimple_invariant_address (const_tree); extern bool is_gimple_ip_invariant_address (const_tree); diff --git a/gcc/gimple.c b/gcc/gimple.c index 8e828a5..a874c29 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -2149,10 +2149,22 @@ gimple_could_trap_p_1 (gimple *s, bool include_mem, bool include_stores) return false; case GIMPLE_ASSIGN: - t = gimple_expr_type (s); op = gimple_assign_rhs_code (s); + + /* For COND_EXPR and VEC_COND_EXPR only the condition may trap. */ + if (op == COND_EXPR || op == VEC_COND_EXPR) + return tree_could_trap_p (gimple_assign_rhs1 (s)); + + /* For comparisons we need to check rhs operand types instead of rhs type + (which is BOOLEAN_TYPE). */ + if (TREE_CODE_CLASS (op) == tcc_comparison) + t = TREE_TYPE (gimple_assign_rhs1 (s)); + else + t = gimple_expr_type (s); + if (get_gimple_rhs_class (op) == GIMPLE_BINARY_RHS) div = gimple_assign_rhs2 (s); + return (operation_could_trap_p (op, FLOAT_TYPE_P (t), (INTEGRAL_TYPE_P (t) && TYPE_OVERFLOW_TRAPS (t)), diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 88d6571..8367069 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4142,8 +4142,8 @@ gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback) /* Now do the normal gimplification. */ /* Gimplify condition. */ - ret = gimplify_expr (&TREE_OPERAND (expr, 0), pre_p, NULL, is_gimple_condexpr, - fb_rvalue); + ret = gimplify_expr (&TREE_OPERAND (expr, 0), pre_p, NULL, + is_gimple_condexpr_for_cond, fb_rvalue); if (ret == GS_ERROR) return GS_ERROR; gcc_assert (TREE_OPERAND (expr, 0) != NULL_TREE); @@ -12976,6 +12976,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, else if (gimple_test_f == is_gimple_val || gimple_test_f == is_gimple_call_addr || gimple_test_f == is_gimple_condexpr + || gimple_test_f == is_gimple_condexpr_for_cond || gimple_test_f == is_gimple_mem_rhs || gimple_test_f == is_gimple_mem_rhs_or_call || gimple_test_f == is_gimple_reg_rhs diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 1aba733..7a02873 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -2523,6 +2523,10 @@ operation_could_trap_p (enum tree_code op, bool fp_operation, bool honor_trapv, bool honor_snans = fp_operation && flag_signaling_nans != 0; bool handled; + /* This function cannot tell whether or not COND_EXPR and VEC_COND_EXPR could + trap, because that depends on the respective condition op. */ + gcc_assert (op != COND_EXPR && op != VEC_COND_EXPR); + if (TREE_CODE_CLASS (op) != tcc_comparison && TREE_CODE_CLASS (op) != tcc_unary && TREE_CODE_CLASS (op) != tcc_binary) @@ -2610,6 +2614,10 @@ tree_could_trap_p (tree expr) if (!expr) return false; + /* For COND_EXPR and VEC_COND_EXPR only the condition may trap. */ + if (TREE_CODE (expr) == COND_EXPR || TREE_CODE (expr) == VEC_COND_EXPR) + expr = TREE_OPERAND (expr, 0); + code = TREE_CODE (expr); t = TREE_TYPE (expr); diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index a1e22c9..fe55ca9 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -527,9 +527,10 @@ forward_propagate_into_gimple_cond (gcond *stmt) tmp = forward_propagate_into_comparison_1 (stmt, code, boolean_type_node, rhs1, rhs2); - if (tmp) + if (tmp + && is_gimple_condexpr_for_cond (tmp)) { - if (dump_file && tmp) + if (dump_file) { fprintf (dump_file, " Replaced '"); print_gimple_expr (dump_file, stmt, 0); @@ -607,7 +608,7 @@ forward_propagate_into_cond (gimple_stmt_iterator *gsi_p) if (tmp && is_gimple_condexpr (tmp)) { - if (dump_file && tmp) + if (dump_file) { fprintf (dump_file, " Replaced '"); print_generic_expr (dump_file, cond); -- cgit v1.1 From dcd2ca63ec5c467decb70db983fc19a8329f67dc Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Mon, 7 Oct 2019 15:01:15 +0000 Subject: Introduce can_vcond_compare_p function z13 supports only non-signaling vector comparisons. This means we cannot vectorize LT, LE, GT, GE and LTGT when compiling for z13. However, we cannot express this restriction today: the code only checks whether vcond$a$b optab exists, but this does not say anything about the operation. Introduce a function that checks whether back-end supports vector comparisons with individual rtx codes by matching vcond expander's third argument with a fake comparison with the corresponding rtx code. gcc/ChangeLog: 2019-10-07 Ilya Leoshkevich PR target/77918 * optabs-tree.c (vcond_icode_p): New function. (vcond_eq_icode_p): Likewise. (expand_vec_cond_expr_p): Use vcond_icode_p and vcond_eq_icode_p. * optabs.c (can_vcond_compare_p): New function. * optabs.h (can_vcond_compare_p): Likewise. From-SVN: r276660 --- gcc/ChangeLog | 10 ++++++++++ gcc/optabs-tree.c | 39 +++++++++++++++++++++++++++++++++------ gcc/optabs.c | 19 +++++++++++++++++++ gcc/optabs.h | 6 ++++++ 4 files changed, 68 insertions(+), 6 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 922ca5d..c9ca3ba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,16 @@ 2019-10-07 Ilya Leoshkevich PR target/77918 + * optabs-tree.c (vcond_icode_p): New function. + (vcond_eq_icode_p): Likewise. + (expand_vec_cond_expr_p): Use vcond_icode_p and + vcond_eq_icode_p. + * optabs.c (can_vcond_compare_p): New function. + * optabs.h (can_vcond_compare_p): Likewise. + +2019-10-07 Ilya Leoshkevich + + PR target/77918 * gimple-expr.c (gimple_cond_get_ops_from_tree): Assert that the caller passes a non-trapping condition. (is_gimple_condexpr): Allow trapping conditions. diff --git a/gcc/optabs-tree.c b/gcc/optabs-tree.c index 8157798..a5ecbf0 100644 --- a/gcc/optabs-tree.c +++ b/gcc/optabs-tree.c @@ -23,7 +23,10 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "target.h" #include "insn-codes.h" +#include "rtl.h" #include "tree.h" +#include "memmodel.h" +#include "optabs.h" #include "optabs-tree.h" #include "stor-layout.h" @@ -329,6 +332,31 @@ expand_vec_cmp_expr_p (tree value_type, tree mask_type, enum tree_code code) return false; } +/* Return true iff vcond_optab/vcondu_optab can handle a vector + comparison for code CODE, comparing operands of type CMP_OP_TYPE and + producing a result of type VALUE_TYPE. */ + +static bool +vcond_icode_p (tree value_type, tree cmp_op_type, enum tree_code code) +{ + return can_vcond_compare_p (get_rtx_code (code, TYPE_UNSIGNED (cmp_op_type)), + TYPE_MODE (value_type), TYPE_MODE (cmp_op_type)); +} + +/* Return true iff vcondeq_optab can handle a vector comparison for code CODE, + comparing operands of type CMP_OP_TYPE and producing a result of type + VALUE_TYPE. */ + +static bool +vcond_eq_icode_p (tree value_type, tree cmp_op_type, enum tree_code code) +{ + if (code != EQ_EXPR && code != NE_EXPR) + return false; + + return get_vcond_eq_icode (TYPE_MODE (value_type), TYPE_MODE (cmp_op_type)) + != CODE_FOR_nothing; +} + /* Return TRUE iff, appropriate vector insns are available for vector cond expr with vector type VALUE_TYPE and a comparison with operand vector types in CMP_OP_TYPE. */ @@ -347,14 +375,13 @@ expand_vec_cond_expr_p (tree value_type, tree cmp_op_type, enum tree_code code) || maybe_ne (GET_MODE_NUNITS (value_mode), GET_MODE_NUNITS (cmp_op_mode))) return false; - if (get_vcond_icode (TYPE_MODE (value_type), TYPE_MODE (cmp_op_type), - TYPE_UNSIGNED (cmp_op_type)) == CODE_FOR_nothing - && ((code != EQ_EXPR && code != NE_EXPR) - || get_vcond_eq_icode (TYPE_MODE (value_type), - TYPE_MODE (cmp_op_type)) == CODE_FOR_nothing)) + if (TREE_CODE_CLASS (code) != tcc_comparison) + /* This may happen, for example, if code == SSA_NAME, in which case we + cannot be certain whether a vector insn is available. */ return false; - return true; + return vcond_icode_p (value_type, cmp_op_type, code) + || vcond_eq_icode_p (value_type, cmp_op_type, code); } /* Use the current target and options to initialize diff --git a/gcc/optabs.c b/gcc/optabs.c index 35921e6..d6701df 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -3819,6 +3819,25 @@ can_compare_p (enum rtx_code code, machine_mode mode, return 0; } +/* Return whether the backend can emit a vector comparison for code CODE, + comparing operands of mode CMP_OP_MODE and producing a result with + VALUE_MODE. */ + +bool +can_vcond_compare_p (enum rtx_code code, machine_mode value_mode, + machine_mode cmp_op_mode) +{ + enum insn_code icode; + bool unsigned_p = (code == LTU || code == LEU || code == GTU || code == GEU); + rtx reg1 = alloca_raw_REG (cmp_op_mode, LAST_VIRTUAL_REGISTER + 1); + rtx reg2 = alloca_raw_REG (cmp_op_mode, LAST_VIRTUAL_REGISTER + 2); + rtx test = alloca_rtx_fmt_ee (code, value_mode, reg1, reg2); + + return (icode = get_vcond_icode (value_mode, cmp_op_mode, unsigned_p)) + != CODE_FOR_nothing + && insn_operand_matches (icode, 3, test); +} + /* This function is called when we are going to emit a compare instruction that compares the values found in X and Y, using the rtl operator COMPARISON. diff --git a/gcc/optabs.h b/gcc/optabs.h index 897bb5d..b1348ce 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -242,6 +242,12 @@ enum can_compare_purpose (without splitting it into pieces). */ extern int can_compare_p (enum rtx_code, machine_mode, enum can_compare_purpose); + +/* Return whether the backend can emit a vector comparison for code CODE, + comparing operands of mode CMP_OP_MODE and producing a result with + VALUE_MODE. */ +extern bool can_vcond_compare_p (enum rtx_code, machine_mode, machine_mode); + extern rtx prepare_operand (enum insn_code, rtx, int, machine_mode, machine_mode, int); /* Emit a pair of rtl insns to compare two rtx's and to jump -- cgit v1.1 From 132235c30fbb2f660e93d72578e95aeb3c7a932f Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 7 Oct 2019 15:37:52 +0000 Subject: call.c (resolve_args): Use cp_expr_loc_or_input_loc in one place. /cp 2019-10-07 Paolo Carlini * call.c (resolve_args): Use cp_expr_loc_or_input_loc in one place. * decl.c (grokdeclarator): Use id_loc in one place. * decl2.c (build_anon_union_vars): Use DECL_SOURCE_LOCATION. * parser.c (cp_parser_delete_expression): Fix the location of the returned expression. (cp_parser_throw_expression): Likewise. * pt.c (determine_specialization): Use DECL_SOURCE_LOCATION. /testsuite 2019-10-07 Paolo Carlini * g++.dg/diagnostic/not-a-function-template-1.C: New. * g++.dg/template/crash107.C: Adjust expected location. * g++.dg/template/dependent-expr1.C: Check locations. * g++.dg/template/error17.C: Check location. From-SVN: r276661 --- gcc/cp/ChangeLog | 10 ++++++++ gcc/cp/call.c | 3 ++- gcc/cp/decl.c | 4 ++-- gcc/cp/decl2.c | 3 ++- gcc/cp/parser.c | 28 +++++++++++++++++++--- gcc/cp/pt.c | 6 +++-- gcc/testsuite/ChangeLog | 7 ++++++ .../g++.dg/diagnostic/not-a-function-template-1.C | 9 +++++++ gcc/testsuite/g++.dg/template/crash107.C | 4 ++-- gcc/testsuite/g++.dg/template/dependent-expr1.C | 8 +++---- gcc/testsuite/g++.dg/template/error17.C | 2 +- 11 files changed, 68 insertions(+), 16 deletions(-) create mode 100644 gcc/testsuite/g++.dg/diagnostic/not-a-function-template-1.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b40825e..90cab94 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +2019-10-07 Paolo Carlini + + * call.c (resolve_args): Use cp_expr_loc_or_input_loc in one place. + * decl.c (grokdeclarator): Use id_loc in one place. + * decl2.c (build_anon_union_vars): Use DECL_SOURCE_LOCATION. + * parser.c (cp_parser_delete_expression): Fix the location of the + returned expression. + (cp_parser_throw_expression): Likewise. + * pt.c (determine_specialization): Use DECL_SOURCE_LOCATION. + 2019-10-05 Jakub Jelinek PR c++/91369 - Implement P0784R7: constexpr new diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 56dcbd3..6c9acac 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4381,7 +4381,8 @@ resolve_args (vec *args, tsubst_flags_t complain) else if (VOID_TYPE_P (TREE_TYPE (arg))) { if (complain & tf_error) - error ("invalid use of void expression"); + error_at (cp_expr_loc_or_input_loc (arg), + "invalid use of void expression"); return NULL; } else if (invalid_nonstatic_memfn_p (EXPR_LOCATION (arg), arg, complain)) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index ea9a001..e405367 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -12754,8 +12754,8 @@ grokdeclarator (const cp_declarator *declarator, tree tmpl = TREE_OPERAND (unqualified_id, 0); if (variable_template_p (tmpl)) { - error ("specialization of variable template %qD " - "declared as function", tmpl); + error_at (id_loc, "specialization of variable template " + "%qD declared as function", tmpl); inform (DECL_SOURCE_LOCATION (tmpl), "variable template declared here"); return error_mark_node; diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 8f935e8..a28e776 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1608,7 +1608,8 @@ build_anon_union_vars (tree type, tree object) just give an error. */ if (TREE_CODE (type) != UNION_TYPE) { - error ("anonymous struct not inside named type"); + error_at (DECL_SOURCE_LOCATION (TYPE_MAIN_DECL (type)), + "anonymous struct not inside named type"); return error_mark_node; } diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 018a03d..c61e0b2 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -9014,6 +9014,7 @@ cp_parser_delete_expression (cp_parser* parser) bool global_scope_p; bool array_p; tree expression; + location_t start_loc = cp_lexer_peek_token (parser->lexer)->location; /* Look for the optional `::' operator. */ global_scope_p @@ -9043,8 +9044,18 @@ cp_parser_delete_expression (cp_parser* parser) if (cp_parser_non_integral_constant_expression (parser, NIC_DEL)) return error_mark_node; - return delete_sanity (expression, NULL_TREE, array_p, global_scope_p, - tf_warning_or_error); + /* Construct a location e.g.: + delete [ ] ptr + ^~~~~~~~~~~~~~ + with caret == start at the start of the "delete" token, and + the end at the end of the final token we consumed. */ + location_t combined_loc = make_location (start_loc, start_loc, + parser->lexer); + expression = delete_sanity (expression, NULL_TREE, array_p, + global_scope_p, tf_warning_or_error); + protected_set_expr_location (expression, combined_loc); + + return expression; } /* Returns 1 if TOKEN may start a cast-expression and isn't '++', '--', @@ -25827,6 +25838,7 @@ cp_parser_throw_expression (cp_parser* parser) { tree expression; cp_token* token; + location_t start_loc = cp_lexer_peek_token (parser->lexer)->location; cp_parser_require_keyword (parser, RID_THROW, RT_THROW); token = cp_lexer_peek_token (parser->lexer); @@ -25842,7 +25854,17 @@ cp_parser_throw_expression (cp_parser* parser) else expression = cp_parser_assignment_expression (parser); - return build_throw (expression); + /* Construct a location e.g.: + throw x + ^~~~~~~ + with caret == start at the start of the "throw" token, and + the end at the end of the final token we consumed. */ + location_t combined_loc = make_location (start_loc, start_loc, + parser->lexer); + expression = build_throw (expression); + protected_set_expr_location (expression, combined_loc); + + return expression; } /* GNU Extensions */ diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 67b3b63..6310e7b 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -2137,7 +2137,8 @@ determine_specialization (tree template_id, if (TREE_CODE (decl) == FUNCTION_DECL && !is_overloaded_fn (fns)) { - error ("%qD is not a function template", fns); + error_at (DECL_SOURCE_LOCATION (decl), + "%qD is not a function template", fns); return error_mark_node; } else if (VAR_P (decl) && !variable_template_p (fns)) @@ -2416,7 +2417,8 @@ determine_specialization (tree template_id, error ("template-id %qD for %q+D does not match any template " "declaration", template_id, decl); if (header_count && header_count != template_count + 1) - inform (input_location, "saw %d %%>, need %d for " + inform (DECL_SOURCE_LOCATION (decl), + "saw %d %%>, need %d for " "specializing a member function template", header_count, template_count + 1); else diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 01253be..e851acd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-10-07 Paolo Carlini + + * g++.dg/diagnostic/not-a-function-template-1.C: New. + * g++.dg/template/crash107.C: Adjust expected location. + * g++.dg/template/dependent-expr1.C: Check locations. + * g++.dg/template/error17.C: Check location. + 2019-10-07 Richard Sandiford PR target/91994 diff --git a/gcc/testsuite/g++.dg/diagnostic/not-a-function-template-1.C b/gcc/testsuite/g++.dg/diagnostic/not-a-function-template-1.C new file mode 100644 index 0000000..caf8afa --- /dev/null +++ b/gcc/testsuite/g++.dg/diagnostic/not-a-function-template-1.C @@ -0,0 +1,9 @@ +// { dg-do compile { target c++14 } } + +template int A; // { dg-message "24:variable template" } + +template int A<>(); // { dg-error "14:template" } + +struct B { + friend int A<>(); // { dg-error "14:specialization" } +}; diff --git a/gcc/testsuite/g++.dg/template/crash107.C b/gcc/testsuite/g++.dg/template/crash107.C index cecf901..3b0b4e8 100644 --- a/gcc/testsuite/g++.dg/template/crash107.C +++ b/gcc/testsuite/g++.dg/template/crash107.C @@ -6,8 +6,8 @@ template struct Vec { // { dg-message "note" } Vec& operator^=(Vec& rhs) { union { - struct {FP_ x,y,z;}; - }; // { dg-error "anonymous struct" } + struct {FP_ x,y,z;}; // { dg-error "20:anonymous struct" } + }; X = y*rhs.z() - z*rhs.y(); // { dg-error "not declared|no member" } } Vec& operator^(Vec& rhs) { diff --git a/gcc/testsuite/g++.dg/template/dependent-expr1.C b/gcc/testsuite/g++.dg/template/dependent-expr1.C index 7964986..eda7526 100644 --- a/gcc/testsuite/g++.dg/template/dependent-expr1.C +++ b/gcc/testsuite/g++.dg/template/dependent-expr1.C @@ -19,11 +19,11 @@ namespace std Foo (sizeof (x)); Foo (__alignof__ (I)); Foo (__alignof__ (x)); - Foo (x->~I ()); // { dg-error "" } + Foo (x->~I ()); // { dg-error "16:invalid" } // Foo (typeid (I)); - Foo (delete x); // { dg-error "" } - Foo (delete[] x); // { dg-error "" } - Foo (throw x); // { dg-error "" } + Foo (delete x); // { dg-error "10:invalid" } + Foo (delete[] x); // { dg-error "10:invalid" } + Foo (throw x); // { dg-error "10:invalid" } } } diff --git a/gcc/testsuite/g++.dg/template/error17.C b/gcc/testsuite/g++.dg/template/error17.C index 30a693f..5b3281a 100644 --- a/gcc/testsuite/g++.dg/template/error17.C +++ b/gcc/testsuite/g++.dg/template/error17.C @@ -5,5 +5,5 @@ void foo() { union { struct { }; }; // { dg-error "prohibits anonymous struct" "anon" } - // { dg-error "not inside" "not inside" { target *-*-* } .-1 } + // { dg-error "18:anonymous struct not inside" "not inside" { target *-*-* } .-1 } } -- cgit v1.1 From 240334e0847ea4185539e3dfef1ab8709bc04d88 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 7 Oct 2019 17:44:55 +0200 Subject: * gcc.target/i386/pr71801.c (uuidcache_init): Fix up size of d array. From-SVN: r276663 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.target/i386/pr71801.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e851acd..ddf94bc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-10-07 Jakub Jelinek + + * gcc.target/i386/pr71801.c (uuidcache_init): Fix up size of d array. + 2019-10-07 Paolo Carlini * g++.dg/diagnostic/not-a-function-template-1.C: New. diff --git a/gcc/testsuite/gcc.target/i386/pr71801.c b/gcc/testsuite/gcc.target/i386/pr71801.c index 6c87522..8db137e 100644 --- a/gcc/testsuite/gcc.target/i386/pr71801.c +++ b/gcc/testsuite/gcc.target/i386/pr71801.c @@ -16,7 +16,7 @@ static int get_label_uuid(char *p1) { } void uuidcache_addentry(char *p1) { __builtin_memcpy(&c, p1, sizeof(c)); } void uuidcache_init() { - char d[1]; + char d[16]; get_label_uuid(d); uuidcache_addentry(d); } -- cgit v1.1 From 0b06099d407225a28f12ed600ae561aa8317dfc9 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 7 Oct 2019 17:49:52 +0200 Subject: * gcc.target/i386/pr71801.c (uuidcache_init): Fix up size of d array. From-SVN: r276664 --- gcc/testsuite/gcc.target/i386/pr71801.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.target/i386/pr71801.c b/gcc/testsuite/gcc.target/i386/pr71801.c index 8db137e..4f1cb19 100644 --- a/gcc/testsuite/gcc.target/i386/pr71801.c +++ b/gcc/testsuite/gcc.target/i386/pr71801.c @@ -16,7 +16,7 @@ static int get_label_uuid(char *p1) { } void uuidcache_addentry(char *p1) { __builtin_memcpy(&c, p1, sizeof(c)); } void uuidcache_init() { - char d[16]; + char d[sizeof(a) + sizeof(c)]; get_label_uuid(d); uuidcache_addentry(d); } -- cgit v1.1 From 8682b1a508e5ba9bd2e1b2b4d298bf7d07a37f80 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 7 Oct 2019 15:58:19 +0000 Subject: MSP430: Don't generate 430X insns when handling data in the lower memory region gcc/ChangeLog: 2019-10-07 Jozef Lawrynowicz * config.in: Regenerate. * config/msp430/constraints.md: Fix docstring for "Ys" constraint. Add new "Yx" constraint. * config/msp430/driver-msp430.c (msp430_propagate_region_opt): New spec function. * config/msp430/msp430-protos.h (msp430_op_not_in_high_mem): New prototype. * config/msp430/msp430.c (msp430_option_override): Allow the lower code/data region to be selected in the small memory model. (msp430_section_attr): Don't warn if the "section" and "lower" attributes are used together. (msp430_handle_generic_attribute): Likewise. (msp430_var_in_low_mem): New function. (TARGET_ENCODE_SECTION_INFO): Define. (msp430_encode_section_info): New function. (gen_prefix): Return early in the small memory model. Require TARGET_USE_LOWER_REGION_PREFIX to be set before adding the ".lower" prefix if -m{code,data}-region=lower have been passed. (msp430_output_aligned_decl_common): Emit common symbols when -mdata-region=lower is passed unless TARGET_USE_LOWER_REGION_PREFIX is set. (TARGET_ASM_FILE_END): Define. (msp430_file_end): New function. (msp430_do_not_relax_short_jumps): Allow relaxation when function will be in the lower region. (msp430_op_not_in_high_mem): New function. (msp430_print_operand): Check "msp430_op_not_in_high_mem" for the 'X' operand selector. Clarify comment for 'x' operand selector. * config/msp430/msp430.h (LINK_SPEC): Propagate -m{code,data}-region to the linker via spec function msp430_propagate_region_opt. (msp430_propagate_region_opt): New prototype. (EXTRA_SPEC_FUNCTIONS): Add msp430_propagate_region_opt. (SYMBOL_FLAG_LOW_MEM): Define. * config/msp430/msp430.md (addsipsi3): Add missing "%X" operand selector. (zero_extendqihi2): Fix operand number used by "%X" selector. (zero_extendqisi2): Likewise. (zero_extendhisi2): Likewise. (movqi): Use "Yx" constraint in place of "%X" operand selector. (movhi): Likewise. (addqi3): Likewise. (addhi3): Likewise. (addsi3): Likewise. (addhi3_cy): Likewise. (addchi4_cy): Likewise. (subqi3): Likewise. (subhi3): Likewise. (subsi3): Likewise. (bic3): Likewise. (and3): Likewise. (ior3): Likewise. (xor3): Likewise. (slli_1): Add missing "%X" operand selector. (slll_1): Likewise. (slll_2): Likewise. (srai_1): Likewise. (sral_1): Likewise. (sral_2): Likewise. (srli_1): Likewise. (srll_1): Likewise. (cbranchqi4_real): Use "Yx" constraint in place of "%X" operand selector. (cbranchhi4_real): Likewise. (cbranchqi4_reversed): Likewise. (cbranchhi4_reversed): Likewise. (*bitbranch4): Likewise. (*bitbranch4_z): Remove unnecessary "%x" operand selector. * config/msp430/msp430.opt (mcode-region=): Set default to MSP430_REGION_LOWER. Improve docstring. (mdata-region=): Likewise. (muse-lower-region-prefix): New option. * config/msp430/t-msp430 (MULTILIB_OPTIONS): Add mdata-region=none multilib. (MULTILIB_MATCHES): Set mdata-region={upper,either} to match mdata-region=none multilib. MULTILIB_EXCEPTIONS: Remove. MULTILIB_REQUIRED: Define. * configure: Regenerate. * configure.ac: Define HAVE_AS_GNU_ATTRIBUTE and HAVE_AS_MSPABI_ATTRIBUTE if GAS version >= 2.33.50. * doc/extend.texi: Clarify comment for {upper,lower,either} function attributes. Add separate description for "lower" variable attribute. gcc/testsuite/ChangeLog: 2019-10-07 Jozef Lawrynowicz * gcc.target/msp430/430x-insns.c: New test. * gcc.target/msp430/data-attributes-2.c: Remove dg-warning directives for conflicts between the "section" and "lower" attributes. * gcc.target/msp430/msp430.exp (check_effective_target_msp430_region_not_lower): New. (check_effective_target_msp430_region_lower): New. * gcc.target/msp430/object-attributes-430.c: New test. * gcc.target/msp430/object-attributes-default.c: New test. * gcc.target/msp430/object-attributes-mlarge-any-region.c: New test. * gcc.target/msp430/object-attributes-mlarge.c: New test. From-SVN: r276665 --- gcc/ChangeLog | 88 ++ gcc/config.in | 6 + gcc/config/msp430/constraints.md | 10 +- gcc/config/msp430/driver-msp430.c | 13 + gcc/config/msp430/msp430-protos.h | 1 + gcc/config/msp430/msp430.c | 214 ++- gcc/config/msp430/msp430.h | 13 +- gcc/config/msp430/msp430.md | 176 ++- gcc/config/msp430/msp430.opt | 12 +- gcc/config/msp430/t-msp430 | 11 +- gcc/configure | 74 + gcc/configure.ac | 14 + gcc/doc/extend.texi | 25 +- gcc/testsuite/ChangeLog | 13 + gcc/testsuite/gcc.target/msp430/430x-insns.c | 1646 ++++++++++++++++++++ .../gcc.target/msp430/data-attributes-2.c | 4 +- gcc/testsuite/gcc.target/msp430/msp430.exp | 8 + .../gcc.target/msp430/object-attributes-430.c | 14 + .../gcc.target/msp430/object-attributes-default.c | 16 + .../msp430/object-attributes-mlarge-any-region.c | 14 + .../gcc.target/msp430/object-attributes-mlarge.c | 15 + 21 files changed, 2256 insertions(+), 131 deletions(-) create mode 100644 gcc/testsuite/gcc.target/msp430/430x-insns.c create mode 100644 gcc/testsuite/gcc.target/msp430/object-attributes-430.c create mode 100644 gcc/testsuite/gcc.target/msp430/object-attributes-default.c create mode 100644 gcc/testsuite/gcc.target/msp430/object-attributes-mlarge-any-region.c create mode 100644 gcc/testsuite/gcc.target/msp430/object-attributes-mlarge.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9ca3ba..74afcaa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,91 @@ +2019-10-07 Jozef Lawrynowicz + + * config.in: Regenerate. + * config/msp430/constraints.md: Fix docstring for "Ys" constraint. + Add new "Yx" constraint. + * config/msp430/driver-msp430.c (msp430_propagate_region_opt): New spec + function. + * config/msp430/msp430-protos.h (msp430_op_not_in_high_mem): New + prototype. + * config/msp430/msp430.c (msp430_option_override): Allow the lower + code/data region to be selected in the small memory model. + (msp430_section_attr): Don't warn if the "section" and "lower" + attributes are used together. + (msp430_handle_generic_attribute): Likewise. + (msp430_var_in_low_mem): New function. + (TARGET_ENCODE_SECTION_INFO): Define. + (msp430_encode_section_info): New function. + (gen_prefix): Return early in the small memory model. + Require TARGET_USE_LOWER_REGION_PREFIX to be set before adding the + ".lower" prefix if -m{code,data}-region=lower have been passed. + (msp430_output_aligned_decl_common): Emit common symbols when + -mdata-region=lower is passed unless TARGET_USE_LOWER_REGION_PREFIX is + set. + (TARGET_ASM_FILE_END): Define. + (msp430_file_end): New function. + (msp430_do_not_relax_short_jumps): Allow relaxation when + function will be in the lower region. + (msp430_op_not_in_high_mem): New function. + (msp430_print_operand): Check "msp430_op_not_in_high_mem" for + the 'X' operand selector. + Clarify comment for 'x' operand selector. + * config/msp430/msp430.h (LINK_SPEC): Propagate + -m{code,data}-region to the linker via spec function + msp430_propagate_region_opt. + (msp430_propagate_region_opt): New prototype. + (EXTRA_SPEC_FUNCTIONS): Add msp430_propagate_region_opt. + (SYMBOL_FLAG_LOW_MEM): Define. + * config/msp430/msp430.md (addsipsi3): Add missing "%X" operand + selector. + (zero_extendqihi2): Fix operand number used by "%X" selector. + (zero_extendqisi2): Likewise. + (zero_extendhisi2): Likewise. + (movqi): Use "Yx" constraint in place of "%X" operand selector. + (movhi): Likewise. + (addqi3): Likewise. + (addhi3): Likewise. + (addsi3): Likewise. + (addhi3_cy): Likewise. + (addchi4_cy): Likewise. + (subqi3): Likewise. + (subhi3): Likewise. + (subsi3): Likewise. + (bic3): Likewise. + (and3): Likewise. + (ior3): Likewise. + (xor3): Likewise. + (slli_1): Add missing "%X" operand selector. + (slll_1): Likewise. + (slll_2): Likewise. + (srai_1): Likewise. + (sral_1): Likewise. + (sral_2): Likewise. + (srli_1): Likewise. + (srll_1): Likewise. + (cbranchqi4_real): Use "Yx" constraint in place of "%X" operand + selector. + (cbranchhi4_real): Likewise. + (cbranchqi4_reversed): Likewise. + (cbranchhi4_reversed): Likewise. + (*bitbranch4): Likewise. + (*bitbranch4_z): Remove unnecessary "%x" operand selector. + * config/msp430/msp430.opt (mcode-region=): Set default to + MSP430_REGION_LOWER. Improve docstring. + (mdata-region=): Likewise. + (muse-lower-region-prefix): New option. + * config/msp430/t-msp430 (MULTILIB_OPTIONS): Add + mdata-region=none multilib. + (MULTILIB_MATCHES): Set mdata-region={upper,either} to match + mdata-region=none multilib. + MULTILIB_EXCEPTIONS: Remove. + MULTILIB_REQUIRED: Define. + * configure: Regenerate. + * configure.ac: Define HAVE_AS_GNU_ATTRIBUTE and + HAVE_AS_MSPABI_ATTRIBUTE if GAS version >= 2.33.50. + * doc/extend.texi: Clarify comment for {upper,lower,either} + function attributes. + Add separate description for "lower" variable attribute. + 2019-10-07 Ilya Leoshkevich PR target/77918 diff --git a/gcc/config.in b/gcc/config.in index 13fd795..9b54a47 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -553,6 +553,12 @@ #endif +/* Define if your assembler supports .mspabi_attribute. */ +#ifndef USED_FOR_TARGET +#undef HAVE_AS_MSPABI_ATTRIBUTE +#endif + + /* Define if the assembler understands -mnan=. */ #ifndef USED_FOR_TARGET #undef HAVE_AS_NAN diff --git a/gcc/config/msp430/constraints.md b/gcc/config/msp430/constraints.md index 7ef249d..4422b2b 100644 --- a/gcc/config/msp430/constraints.md +++ b/gcc/config/msp430/constraints.md @@ -69,9 +69,11 @@ ;; These are memory references that are safe to use without the X suffix, -;; because we know/assume they need not index across the 64k boundary. +;; because we know/assume they need not index across the 64K boundary. +;; Note that for a PSImode memory operand, we always need to use the X suffix, +;; regardless of what this constraint decides. (define_constraint "Ys" - "Memory reference, stack only." + "Memory reference, indexed or indirect register addressing modes." (and (match_code "mem") (ior (and (match_code "plus" "0") @@ -93,3 +95,7 @@ (match_test ("REGNO (XEXP (XEXP (op, 0), 0)) != SP_REGNO"))) )))) +(define_constraint "Yx" + "Memory reference, in lower memory below address 0x10000." + (and (match_code "mem") + (match_test "msp430_op_not_in_high_mem (op)"))) diff --git a/gcc/config/msp430/driver-msp430.c b/gcc/config/msp430/driver-msp430.c index 0a3d1e1..c37b169 100644 --- a/gcc/config/msp430/driver-msp430.c +++ b/gcc/config/msp430/driver-msp430.c @@ -149,3 +149,16 @@ msp430_select_hwmult_lib (int argc ATTRIBUTE_UNUSED, return "-lmul_none"; } + +/* Spec function. Propagate -m{code,data}-region= to the linker, unless the + lower region has been specified without -muse-lower-region-prefix also being + used. */ +const char * +msp430_propagate_region_opt (int argc, const char **argv) +{ + if (strcmp (argv[0], "lower") != 0) + return argv[0]; + else if ((argc == 2) && (strcmp (argv[1], "-muse-lower-region-prefix") == 0)) + return argv[0]; /* argv[0] == "lower". */ + return "none"; +} diff --git a/gcc/config/msp430/msp430-protos.h b/gcc/config/msp430/msp430-protos.h index 267b6f5..1c1757f 100644 --- a/gcc/config/msp430/msp430-protos.h +++ b/gcc/config/msp430/msp430-protos.h @@ -47,5 +47,6 @@ void msp430_split_movsi (rtx *); void msp430_start_function (FILE *, const char *, tree); rtx msp430_subreg (machine_mode, rtx, machine_mode, int); bool msp430_use_f5_series_hwmult (void); +bool msp430_op_not_in_high_mem (rtx op); #endif /* GCC_MSP430_PROTOS_H */ diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index 6430823..354b4dd 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -35,6 +35,7 @@ #include "tm_p.h" #include "regs.h" #include "emit-rtl.h" +#include "varasm.h" #include "diagnostic-core.h" #include "fold-const.h" #include "stor-layout.h" @@ -263,9 +264,6 @@ msp430_option_override (void) else if (!TARGET_LARGE && msp430_code_region == MSP430_REGION_UPPER) error ("%<-mcode-region=upper%> requires the large memory model " "(%<-mlarge%>)"); - else if (!TARGET_LARGE && msp430_code_region == MSP430_REGION_LOWER) - error ("%<-mcode-region=lower%> requires the large memory model " - "(%<-mlarge%>)"); if (!TARGET_LARGE && msp430_data_region == MSP430_REGION_EITHER) error ("%<-mdata-region=either%> requires the large memory model " @@ -273,10 +271,6 @@ msp430_option_override (void) else if (!TARGET_LARGE && msp430_data_region == MSP430_REGION_UPPER) error ("%<-mdata-region=upper%> requires the large memory model " "(%<-mlarge%>)"); - else if (!TARGET_LARGE && msp430_data_region == MSP430_REGION_LOWER) - error ("%<-mdata-region=lower%> requires the large memory model " - "(%<-mlarge%>)"); - if (flag_exceptions || flag_non_call_exceptions || flag_unwind_tables || flag_asynchronous_unwind_tables) @@ -1386,7 +1380,7 @@ msp430_section_attr (tree * node, if (has_attr (ATTR_NOINIT, *node)) message = G_("ignoring attribute %qE because it conflicts with " "attribute %"); - else if (has_attr ("section", *node)) + else if (has_attr ("section", *node) && !TREE_NAME_EQ (name, "lower")) message = G_("ignoring attribute %qE because it conflicts with " "attribute %"); /* It does not make sense to use upper/lower/either attributes without @@ -1564,12 +1558,14 @@ msp430_handle_generic_attribute (tree *node, { const char *message = NULL; + /* The front end has set up an exclusion between the "noinit" and "section" + attributes. */ if (!(TREE_NAME_EQ (name, ATTR_NOINIT) || TREE_NAME_EQ (name, "section"))) return NULL_TREE; - /* The front end has set up an exclusion between the "noinit" and "section" - attributes. */ - if (has_attr (ATTR_LOWER, *node)) + /* We allow the "lower" attribute to be used on variables with the "section" + attribute. */ + if (has_attr (ATTR_LOWER, *node) && !TREE_NAME_EQ (name, "section")) message = G_("ignoring attribute %qE because it conflicts with " "attribute %"); else if (has_attr (ATTR_UPPER, *node)) @@ -1591,6 +1587,55 @@ msp430_handle_generic_attribute (tree *node, return NULL_TREE; } +/* Given a non-automatic VAR_DECL which can possibly have a section, return + true if the variable will definitely be placed in the lower memory + region (below address 0x10000). */ +static bool +msp430_var_in_low_mem (tree decl) +{ + gcc_assert (VAR_P (decl)); + + /* "noinit" variables are always placed in the lower memory region. */ + if (has_attr (ATTR_UPPER, decl) + || has_attr (ATTR_EITHER, decl) + || has_attr (ATTR_PERSIST, decl) + /* Unless the variable is marked with the lower or noinit attribute, we + cannot assume that it is in the lower region if it is marked with the + section attribute or -mdata-region={upper,either,none} have been + passed. + The noinit and section attributes conflict. */ + || (!has_attr (ATTR_LOWER, decl) && !has_attr (ATTR_NOINIT, decl) + && (has_attr ("section", decl) + || msp430_data_region == MSP430_REGION_UPPER + || msp430_data_region == MSP430_REGION_EITHER + || msp430_data_region == MSP430_REGION_ANY))) + return false; + return true; +} + +#undef TARGET_ENCODE_SECTION_INFO +#define TARGET_ENCODE_SECTION_INFO msp430_encode_section_info + +/* Encode whether a SYMBOL_REF is definitely in the lower memory region. */ +static void +msp430_encode_section_info (tree decl, rtx rtl, int first) +{ + rtx symbol; + default_encode_section_info (decl, rtl, first); + + /* Careful not to prod global register variables. */ + if (!MEM_P (rtl)) + return; + symbol = XEXP (rtl, 0); + if (GET_CODE (symbol) != SYMBOL_REF) + return; + + if (VAR_P (decl) + && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)) + && msp430_var_in_low_mem (decl)) + SYMBOL_REF_FLAGS (symbol) = SYMBOL_FLAG_LOW_MEM; +} + #undef TARGET_ASM_FUNCTION_PROLOGUE #define TARGET_ASM_FUNCTION_PROLOGUE msp430_start_function @@ -1744,15 +1789,17 @@ gen_prefix (tree decl) if (has_section_name (".lowtext", decl)) return NULL; - /* If the object has __attribute__((lower)) then use the ".lower." prefix. */ + /* Memory regions require the large memory model. */ + if (!TARGET_LARGE) + return NULL; + + /* Note that we always apply the lower prefix when the attribute has been + used. But we only apply the lower prefix when the lower region has been + specified by a command line option if -muse-lower-region-prefix has also + been passed. */ if (has_attr (ATTR_LOWER, decl)) return lower_prefix; - /* If we are compiling for the MSP430 then we do not support the upper - region. */ - if (! msp430x) - return NULL; - if (has_attr (ATTR_UPPER, decl)) return upper_prefix; @@ -1761,7 +1808,8 @@ gen_prefix (tree decl) if (TREE_CODE (decl) == FUNCTION_DECL) { - if (msp430_code_region == MSP430_REGION_LOWER) + if ((msp430_code_region == MSP430_REGION_LOWER) + && TARGET_USE_LOWER_REGION_PREFIX) return lower_prefix; if (msp430_code_region == MSP430_REGION_UPPER) @@ -1772,7 +1820,8 @@ gen_prefix (tree decl) } else { - if (msp430_data_region == MSP430_REGION_LOWER) + if ((msp430_data_region == MSP430_REGION_LOWER) + && TARGET_USE_LOWER_REGION_PREFIX) return lower_prefix; if (msp430_data_region == MSP430_REGION_UPPER) @@ -1966,7 +2015,6 @@ msp430_unique_section (tree decl, int reloc) /* Emit a declaration of a common symbol. If a data region is in use then put the symbol into the equivalent .bss section instead. */ - void msp430_output_aligned_decl_common (FILE * stream, const tree decl, @@ -1976,7 +2024,9 @@ msp430_output_aligned_decl_common (FILE * stream, { /* Only emit a common symbol if the variable does not have a specific section assigned. */ - if (msp430_data_region == MSP430_REGION_ANY + if ((msp430_data_region == MSP430_REGION_ANY + || ((msp430_data_region == MSP430_REGION_LOWER) + && !TARGET_USE_LOWER_REGION_PREFIX)) && !(decl != NULL_TREE && DECL_SECTION_NAME (decl)) && !has_attr (ATTR_EITHER, decl) && !has_attr (ATTR_LOWER, decl) @@ -2021,6 +2071,78 @@ msp430_output_aligned_decl_common (FILE * stream, } } +#undef TARGET_ASM_FILE_END +#define TARGET_ASM_FILE_END msp430_file_end + +/* Emit MSPABI and GNU object attributes. + Tags and values for MSPABI attributes are: + OFBA_MSPABI_Tag_ISA 4 + MSP430 1 + MSP430X 2 + OFBA_MSPABI_Tag_Code_Model 6 + Small 1 + Large 2 + OFBA_MSPABI_Tag_Data_Model 8 + Small 1 + Large 2 + Restricted 3 (Unused by GNU) + OFBA_MSPABI_Tag_enum_size 10 (Unused by GNU) + Note that Code_Model and Data_Model are always equal for GNU. + We define a new .gnu_attribute to keep track of the data region used. + Tag_GNU_MSP430_Data_Region 4 + LOWER 1 + ANY 2 + See binutils-gdb/include/elf/msp430.h for the full details. */ +static void +msp430_file_end (void) +{ +#ifdef HAVE_AS_GNU_ATTRIBUTE + /* Enum for tag names. */ + enum + { + OFBA_MSPABI_Tag_ISA = 4, + OFBA_MSPABI_Tag_Code_Model = 6, + OFBA_MSPABI_Tag_Data_Model = 8, + Tag_GNU_MSP430_Data_Region = 4 + }; + /* Enum for tag values. */ + enum + { + OFBA_MSPABI_Val_ISA_MSP430 = 1, + OFBA_MSPABI_Val_ISA_MSP430X = 2, + OFBA_MSPABI_Val_Model_Small = 1, + OFBA_MSPABI_Val_Model_Large = 2, + Tag_GNU_MSP430_Data_Region_Lower = 1, + Tag_GNU_MSP430_Data_Region_Any = 2 + }; + /* .mspabi_attribute is a GNU assembler directive only. The assembler will + construct a .MSP430.attributes section based on the options it is invoked + with. The values it reads from these directives are used for validating + those options. */ + const char *msp_attr = ".mspabi_attribute"; + const char *gnu_attr = ".gnu_attribute"; + + /* Emit .mspabi_attribute directive for OFBA_MSPABI_Tag_ISA. */ + fprintf (asm_out_file, "\t%s %d, %d\n", msp_attr, OFBA_MSPABI_Tag_ISA, + msp430x ? OFBA_MSPABI_Val_ISA_MSP430X : OFBA_MSPABI_Val_ISA_MSP430); + /* Emit .mspabi_attribute directive for OFBA_MSPABI_Tag_Code_Model. */ + fprintf (asm_out_file, "\t%s %d, %d\n", msp_attr, OFBA_MSPABI_Tag_Code_Model, + TARGET_LARGE ? OFBA_MSPABI_Val_Model_Large + : OFBA_MSPABI_Val_Model_Small); + /* Emit .mspabi_attribute directive for OFBA_MSPABI_Tag_Data_Model. */ + fprintf (asm_out_file, "\t%s %d, %d\n", msp_attr, OFBA_MSPABI_Tag_Data_Model, + TARGET_LARGE ? OFBA_MSPABI_Val_Model_Large + : OFBA_MSPABI_Val_Model_Small); +#ifdef HAVE_AS_MSPABI_ATTRIBUTE + /* Emit .gnu_attribute directive for Tag_GNU_MSP430_Data_Region. */ + fprintf (asm_out_file, "\t%s %d, %d\n", gnu_attr, Tag_GNU_MSP430_Data_Region, + msp430_data_region == MSP430_REGION_LOWER + ? Tag_GNU_MSP430_Data_Region_Lower + : Tag_GNU_MSP430_Data_Region_Any); +#endif +#endif +} + bool msp430_do_not_relax_short_jumps (void) { @@ -2031,9 +2153,7 @@ msp430_do_not_relax_short_jumps (void) end up in a low section. */ return msp430_code_region == MSP430_REGION_EITHER - || msp430_code_region == MSP430_REGION_LOWER - || has_attr (ATTR_EITHER, current_function_decl) - || has_attr (ATTR_LOWER, current_function_decl); + || has_attr (ATTR_EITHER, current_function_decl); } enum msp430_builtin @@ -3074,6 +3194,36 @@ msp430_print_operand_addr (FILE * file, machine_mode /*mode*/, rtx addr) msp430_print_operand_raw (file, addr); } +/* Determine whether an RTX is definitely not a MEM referencing an address in + the upper memory region. Returns true if we've decided the address will be + in the lower memory region, or the RTX is not a MEM. Returns false + otherwise. */ +bool +msp430_op_not_in_high_mem (rtx op) +{ + rtx op0; + + if (!TARGET_LARGE || !MEM_P (op)) + return true; + + op0 = XEXP (op, 0); + + if (SYMBOL_REF_P (op0) && (SYMBOL_REF_FLAGS (op0) & SYMBOL_FLAG_LOW_MEM)) + /* msp430_encode_section_info decided this mem will be in lower + memory. */ + return true; + + /* Catch (mem (const (plus ((symbol_ref) (const_int))))) e.g. &addr+2. */ + if ((GET_CODE (op0) == CONST) + && (GET_CODE (XEXP (op0, 0)) == PLUS) + && (SYMBOL_REF_P (XEXP (XEXP (op0, 0), 0))) + && (SYMBOL_REF_FLAGS (XEXP (XEXP (op0, 0), 0)) & SYMBOL_FLAG_LOW_MEM)) + return true; + + /* Return false when undecided. */ + return false; +} + #undef TARGET_PRINT_OPERAND #define TARGET_PRINT_OPERAND msp430_print_operand @@ -3245,15 +3395,21 @@ msp430_print_operand (FILE * file, rtx op, int letter) case 'X': /* This is used to turn, for example, an ADD opcode into an ADDX - opcode when we're using 20-bit addresses. */ - if (TARGET_LARGE || GET_MODE (op) == PSImode) + opcode when we're using 20-bit addresses. + This can be used for insns which have only one operand which might be + a mem. + If an insn has two different operands which could be memory operands, + then the "Yx" constraint must be used to determine if the X suffix is + required by checking both operands. */ + if (GET_MODE (op) == PSImode + || !msp430_op_not_in_high_mem (op)) fprintf (file, "X"); - /* We don't care which operand we use, but we want 'X' in the MD - file, so we do it this way. */ return; case 'x': - /* Similarly, but only for PSImodes. BIC, for example, needs this. */ + /* Similarly, but only for PSImodes. BIC, and other insn patterns using + the QHI mode iterator (which includes, QI, HI, and PSImode) use + this. */ if (GET_MODE (op) == PSImode) fprintf (file, "X"); return; diff --git a/gcc/config/msp430/msp430.h b/gcc/config/msp430/msp430.h index 3449bd4..f885de2 100644 --- a/gcc/config/msp430/msp430.h +++ b/gcc/config/msp430/msp430.h @@ -71,7 +71,10 @@ extern bool msp430x; is enabled (the GDB testsuite relies upon unused entities not being deleted). */ #define LINK_SPEC "%{mrelax:--relax} %{mlarge:%{!r:%{!g:--gc-sections}}} " \ - "%{mcode-region=*:--code-region=%*} %{mdata-region=*:--data-region=%*}" + "%{mcode-region=*:--code-region=%:" \ + "msp430_propagate_region_opt(%* %{muse-lower-region-prefix})} " \ + "%{mdata-region=*:--data-region=%:" \ + "msp430_propagate_region_opt(%* %{muse-lower-region-prefix})} " \ #define DRIVER_SELF_SPECS \ " %{!mlarge:%{mcode-region=*:%{mdata-region=*:%e-mcode-region and " \ @@ -90,12 +93,16 @@ extern const char * msp430_select_hwmult_lib (int, const char **); extern const char * msp430_select_cpu (int, const char **); extern const char * msp430_set_driver_var (int, const char **); extern const char * msp430_check_path_for_devices (int, const char **); +extern const char *msp430_propagate_region_opt (int, const char **); +/* There must be a trailing comma after the last item, see gcc.c + "static_spec_functions". */ # define EXTRA_SPEC_FUNCTIONS \ { "msp430_hwmult_lib", msp430_select_hwmult_lib }, \ { "msp430_select_cpu", msp430_select_cpu }, \ { "msp430_set_driver_var", msp430_set_driver_var }, \ - { "msp430_check_path_for_devices", msp430_check_path_for_devices }, + { "msp430_check_path_for_devices", msp430_check_path_for_devices }, \ + { "msp430_propagate_region_opt", msp430_propagate_region_opt }, /* Specify the libraries to include on the linker command line. @@ -482,3 +489,5 @@ typedef struct #define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \ msp430_output_aligned_decl_common ((FILE), (DECL), (NAME), (SIZE), (ALIGN)) + +#define SYMBOL_FLAG_LOW_MEM (SYMBOL_FLAG_MACH_DEP << 0) diff --git a/gcc/config/msp430/msp430.md b/gcc/config/msp430/msp430.md index f6d6889..c72f7aa 100644 --- a/gcc/config/msp430/msp430.md +++ b/gcc/config/msp430/msp430.md @@ -190,22 +190,22 @@ ) (define_insn "movqi" - [(set (match_operand:QI 0 "msp_nonimmediate_operand" "=rYs,rm") - (match_operand:QI 1 "msp_general_operand" "riYs,rmi"))] + [(set (match_operand:QI 0 "msp_nonimmediate_operand" "=rYsYx,rm") + (match_operand:QI 1 "msp_general_operand" "riYsYx,rmi"))] "" "@ MOV.B\t%1, %0 - MOV%X0.B\t%1, %0" + MOVX.B\t%1, %0" ) (define_insn "movhi" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=r,rYs,rm") - (match_operand:HI 1 "msp_general_operand" "N,riYs,rmi"))] + [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=r,rYsYx,rm") + (match_operand:HI 1 "msp_general_operand" "N,riYsYx,rmi"))] "" "@ MOV.B\t%1, %0 MOV.W\t%1, %0 - MOV%X0.W\t%1, %0" + MOVX.W\t%1, %0" ) (define_expand "movsi" @@ -241,7 +241,7 @@ "msp430_split_movsi (operands);" ) -;; Some MOVX.A cases can be done with MOVA, this is only a few of them. +;; FIXME: Some MOVX.A cases can be done with MOVA, this is only a few of them. (define_insn "movpsi" [(set (match_operand:PSI 0 "msp_nonimmediate_operand" "=r,r,r,Ya,rm") (match_operand:PSI 1 "msp_general_operand" "N,O,riYa,r,rmi"))] @@ -289,23 +289,23 @@ ) (define_insn "addqi3" - [(set (match_operand:QI 0 "msp_nonimmediate_operand" "=rYs,rm") + [(set (match_operand:QI 0 "msp_nonimmediate_operand" "=rYsYx,rm") (plus:QI (match_operand:QI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:QI 2 "msp_general_operand" "riYs,rmi")))] + (match_operand:QI 2 "msp_general_operand" "riYsYx,rmi")))] "" "@ ADD.B\t%2, %0 - ADD%X0.B\t%2, %0" + ADDX.B\t%2, %0" ) (define_insn "addhi3" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=rYs,rm") + [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=rYsYx,rm") (plus:HI (match_operand:HI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:HI 2 "msp_general_operand" "riYs,rmi")))] + (match_operand:HI 2 "msp_general_operand" "riYsYx,rmi")))] "" "@ ADD.W\t%2, %0 - ADD%X0.W\t%2, %0" + ADDX.W\t%2, %0" ) ; This pattern is needed in order to avoid reload problems. @@ -317,17 +317,17 @@ (plus:SI (match_operand:SI 1 "register_operand" "0") (match_operand 2 "general_operand" "rmi")))] "" - "ADD.W\t%L2, %L0 { ADDC.W\t%H2, %H0 { PUSH.W\t%H0 { PUSH.W\t%L0 { POPM.A\t#1, %0" + "ADD%X2.W\t%L2, %L0 { ADDC%X2.W\t%H2, %H0 { PUSH.W\t%H0 { PUSH.W\t%L0 { POPM.A\t#1, %0" ) (define_insn "addsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=&r,rm") + [(set (match_operand:SI 0 "nonimmediate_operand" "=&rYsYx,rm") (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") - (match_operand:SI 2 "general_operand" "r,mi")))] + (match_operand:SI 2 "general_operand" "rYsYxi,mi")))] "" "@ ADD\t%L2, %L0 { ADDC\t%H2, %H0 - ADD%X0\t%L2, %L0 { ADDC%X0\t%H2, %H0" + ADDX\t%L2, %L0 { ADDCX\t%H2, %H0" ) ; Version of addhi that exposes the carry operations, for SImode adds. @@ -358,9 +358,9 @@ ; that are not single_set() very well. (define_insn "addhi3_cy" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=r,rm") + [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=rYsYx,rm") (plus:HI (match_operand:HI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:HI 2 "msp_nonimmediate_operand" "r,rm"))) + (match_operand:HI 2 "msp_nonimmediate_operand" "rYsYxi,rm"))) (set (reg:BI CARRY) (truncate:BI (lshiftrt:SI (plus:SI (zero_extend:SI (match_dup 1)) (zero_extend:SI (match_dup 2))) @@ -369,7 +369,7 @@ "" "@ ADD\t%2, %1 ; cy - ADD%X0\t%2, %1 ; cy" + ADDX\t%2, %1 ; cy" ) (define_insn "addhi3_cy_i" @@ -389,15 +389,15 @@ ; Version of addhi that adds the carry, for SImode adds. (define_insn "addchi4_cy" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=r,rm") + [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=rYsYx,rm") (plus:HI (plus:HI (match_operand:HI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:HI 2 "msp_general_operand" "ri,rmi")) + (match_operand:HI 2 "msp_general_operand" "riYsYx,rmi")) (zero_extend:HI (reg:BI CARRY)))) ] "" "@ ADDC\t%2, %1 - ADDC%X0\t%2, %1" + ADDCX\t%2, %1" ) ; Split an SImode add into two HImode adds, keeping track of the carry @@ -458,36 +458,38 @@ ;; Alternatives 2 and 3 are to handle cases generated by reload. (define_insn "subqi3" - [(set (match_operand:QI 0 "nonimmediate_operand" "=rYs, rm, &?r, ?&r") + [(set (match_operand:QI 0 "nonimmediate_operand" "=rYsYx, rm, &?r, ?&r") (minus:QI (match_operand:QI 1 "general_operand" "0, 0, !r, !i") - (match_operand:QI 2 "general_operand" " riYs, rmi, rmi, r")))] + (match_operand:QI 2 "general_operand" " riYsYx, rmi, rmi, r")))] "" "@ SUB.B\t%2, %0 - SUB%X0.B\t%2, %0 - MOV%X0.B\t%1, %0 { SUB%X0.B\t%2, %0 + SUBX.B\t%2, %0 + MOV%X2.B\t%1, %0 { SUB%X2.B\t%2, %0 MOV%X0.B\t%1, %0 { SUB%X0.B\t%2, %0" ) ;; Alternatives 2 and 3 are to handle cases generated by reload. (define_insn "subhi3" - [(set (match_operand:HI 0 "nonimmediate_operand" "=rYs, rm, &?r, ?&r") + [(set (match_operand:HI 0 "nonimmediate_operand" "=rYsYx, rm, &?r, ?&r") (minus:HI (match_operand:HI 1 "general_operand" "0, 0, !r, !i") - (match_operand:HI 2 "general_operand" " riYs, rmi, rmi, r")))] + (match_operand:HI 2 "general_operand" " riYsYx, rmi, rmi, r")))] "" "@ SUB.W\t%2, %0 - SUB%X0.W\t%2, %0 - MOV%X0.W\t%1, %0 { SUB%X0.W\t%2, %0 + SUBX.W\t%2, %0 + MOV%X2.W\t%1, %0 { SUB%X2.W\t%2, %0 MOV%X0.W\t%1, %0 { SUB%X0.W\t%2, %0" ) (define_insn "subsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=&rm") - (minus:SI (match_operand:SI 1 "nonimmediate_operand" "0") - (match_operand:SI 2 "general_operand" "rmi")))] + [(set (match_operand:SI 0 "nonimmediate_operand" "=&rYsYx,m") + (minus:SI (match_operand:SI 1 "nonimmediate_operand" "0,0") + (match_operand:SI 2 "general_operand" "riYsYx,mi")))] "" - "SUB%X0\t%L2, %L0 { SUBC%X0\t%H2, %H0" + "@ + SUB\t%L2, %L0 { SUBC\t%H2, %H0 + SUBX\t%L2, %L0 { SUBCX\t%H2, %H0" ) (define_insn "*bic_cg" @@ -501,44 +503,44 @@ ) (define_insn "bic3" - [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=rYs,rm") - (and:QHI (not:QHI (match_operand:QHI 1 "msp_general_operand" "rYs,rmn")) + [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=rYsYx,rm") + (and:QHI (not:QHI (match_operand:QHI 1 "msp_general_operand" "rYsYx,rmn")) (match_operand:QHI 2 "msp_nonimmediate_operand" "0,0")))] "" "@ BIC%x0%b0\t%1, %0 - BIC%X0%b0\t%1, %0" + BICX%b0\t%1, %0" ) (define_insn "and3" - [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=r,rYs,rm") + [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=r,rYsYx,rm") (and:QHI (match_operand:QHI 1 "msp_nonimmediate_operand" "%0,0,0") - (match_operand:QHI 2 "msp_general_operand" "N,riYs,rmi")))] + (match_operand:QHI 2 "msp_general_operand" "N,riYsYx,rmi")))] "" "@ AND%x0.B\t%2, %0 AND%x0%b0\t%2, %0 - AND%X0%b0\t%2, %0" + ANDX%b0\t%2, %0" ) (define_insn "ior3" - [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=rYs,rm") + [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=rYsYx,rm") (ior:QHI (match_operand:QHI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:QHI 2 "msp_general_operand" "riYs,rmi")))] + (match_operand:QHI 2 "msp_general_operand" "riYsYx,rmi")))] "" "@ BIS%x0%b0\t%2, %0 - BIS%X0%b0\t%2, %0" + BISX%b0\t%2, %0" ) (define_insn "xor3" - [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=rYs,rm") + [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=rYsYx,rm") (xor:QHI (match_operand:QHI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:QHI 2 "msp_general_operand" "riYs,rmi")))] + (match_operand:QHI 2 "msp_general_operand" "riYsYx,rmi")))] "" "@ XOR%x0%b0\t%2, %0 - XOR%X0%b0\t%2, %0" + XORX%b0\t%2, %0" ) ;; Macro : XOR #~0, %0 @@ -567,7 +569,7 @@ "@ AND\t#0xff, %0 MOV.B\t%1, %0 - MOV%X0.B\t%1, %0 + MOV%X1.B\t%1, %0 AND%X0\t#0xff, %0" ) @@ -621,7 +623,7 @@ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "rm")))] "" - "MOV.B\t%1,%L0 { CLR\t%H0" + "MOV%X1.B\t%1,%L0 { CLR\t%H0" ) (define_insn "zero_extendhisi2" @@ -629,7 +631,7 @@ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0,r")))] "" "@ - MOV.W\t#0,%H0 + MOV%X0.W\t#0,%H0 MOV.W\t%1,%L0 { MOV.W\t#0,%H0" ) @@ -782,7 +784,7 @@ (ashift:HI (match_operand:HI 1 "general_operand" "0") (const_int 1)))] "" - "RLA.W\t%0" ;; Note - this is a macro for ADD + "RLA%X0.W\t%0" ;; Note - this is a macro for ADD ) (define_insn "430x_shift_left" @@ -802,7 +804,7 @@ (ashift:SI (match_operand:SI 1 "general_operand" "0") (const_int 1)))] "" - "RLA.W\t%L0 { RLC.W\t%H0" + "RLA%X0.W\t%L0 { RLC%X0.W\t%H0" ) (define_insn "slll_2" @@ -810,7 +812,7 @@ (ashift:SI (match_operand:SI 1 "general_operand" "0") (const_int 2)))] "" - "RLA.W\t%L0 { RLC.W\t%H0 { RLA.W\t%L0 { RLC.W\t%H0" + "RLA%X0.W\t%L0 { RLC%X0.W\t%H0 { RLA%X0.W\t%L0 { RLC%X0.W\t%H0" ) (define_expand "ashlsi3" @@ -867,7 +869,7 @@ (ashiftrt:HI (match_operand:HI 1 "msp_general_operand" "0") (const_int 1)))] "" - "RRA.W\t%0" + "RRA%X0.W\t%0" ) (define_insn "430x_arithmetic_shift_right" @@ -903,7 +905,7 @@ (ashiftrt:SI (match_operand:SI 1 "general_operand" "0") (const_int 1)))] "" - "RRA.W\t%H0 { RRC.W\t%L0" + "RRA%X0.W\t%H0 { RRC%X0.W\t%L0" ) (define_insn "sral_2" @@ -911,7 +913,7 @@ (ashiftrt:SI (match_operand:SI 1 "general_operand" "0") (const_int 2)))] "" - "RRA.W\t%H0 { RRC.W\t%L0 { RRA.W\t%H0 { RRC.W\t%L0" + "RRA%X0.W\t%H0 { RRC%X0.W\t%L0 { RRA%X0.W\t%H0 { RRC%X0.W\t%L0" ) (define_expand "ashrsi3" @@ -968,7 +970,7 @@ (lshiftrt:HI (match_operand:HI 1 "general_operand" "0") (const_int 1)))] "" - "CLRC { RRC.W\t%0" + "CLRC { RRC%X0.W\t%0" ) (define_insn "430x_logical_shift_right" @@ -994,7 +996,7 @@ (lshiftrt:SI (match_operand:SI 1 "general_operand" "0") (const_int 1)))] "" - "CLRC { RRC.W\t%H0 { RRC.W\t%L0" + "CLRC { RRC%X0.W\t%H0 { RRC%X0.W\t%L0" ) (define_insn "srll_2x" @@ -1188,8 +1190,8 @@ (define_insn "cbranchqi4_real" [(set (pc) (if_then_else (match_operator 0 "msp430_cmp_operator" - [(match_operand:QI 1 "nonimmediate_operand" "rYs,rm") - (match_operand:QI 2 "general_operand" "rYsi,rmi")]) + [(match_operand:QI 1 "nonimmediate_operand" "rYsYx,rm") + (match_operand:QI 2 "general_operand" "rYsYxi,rmi")]) (label_ref (match_operand 3 "" "")) (pc))) (clobber (reg:BI CARRY)) @@ -1197,14 +1199,14 @@ "" "@ CMP.B\t%2, %1 { J%0\t%l3 - CMP%X0.B\t%2, %1 { J%0\t%l3" + CMPX.B\t%2, %1 { J%0\t%l3" ) (define_insn "cbranchhi4_real" [(set (pc) (if_then_else (match_operator 0 "msp430_cmp_operator" - [(match_operand:HI 1 "nonimmediate_operand" "rYs,rm") - (match_operand:HI 2 "general_operand" "rYsi,rmi")]) + [(match_operand:HI 1 "nonimmediate_operand" "rYsYx,rm") + (match_operand:HI 2 "general_operand" "rYsYxi,rmi")]) (label_ref (match_operand 3 "" "")) (pc))) (clobber (reg:BI CARRY)) @@ -1222,12 +1224,12 @@ { return which_alternative == 0 ? \"CMP.W\t%2, %1 { J%r0 1f { BRA #%l3 { 1:\" : - \"CMP%X0.W\t%2, %1 { J%r0 1f { BRA #%l3 { 1:\"; + \"CMPX.W\t%2, %1 { J%r0 1f { BRA #%l3 { 1:\"; } return which_alternative == 0 ? \"CMP.W\t%2, %1 { J%0\t%l3\" : - \"CMP%X0.W\t%2, %1 { J%0\t%l3\"; + \"CMPX.W\t%2, %1 { J%0\t%l3\"; " [(set (attr "length") (if_then_else @@ -1257,8 +1259,8 @@ (define_insn "cbranchqi4_reversed" [(set (pc) (if_then_else (match_operator 0 "msp430_reversible_cmp_operator" - [(match_operand:QI 1 "general_operand" "rYsi,rmi") - (match_operand:QI 2 "general_operand" "rYs,rm")]) + [(match_operand:QI 1 "general_operand" "rYsYxi,rmi") + (match_operand:QI 2 "general_operand" "rYsYx,rm")]) (label_ref (match_operand 3 "" "")) (pc))) (clobber (reg:BI CARRY)) @@ -1266,14 +1268,14 @@ "" "@ CMP.B\t%1, %2 { J%R0\t%l3 - CMP%X0.B\t%1, %2 { J%R0\t%l3" + CMPX.B\t%1, %2 { J%R0\t%l3" ) (define_insn "cbranchhi4_reversed" [(set (pc) (if_then_else (match_operator 0 "msp430_reversible_cmp_operator" - [(match_operand:HI 1 "general_operand" "rYsi,rmi") - (match_operand:HI 2 "general_operand" "rYs,rm")]) + [(match_operand:HI 1 "general_operand" "rYsYxi,rmi") + (match_operand:HI 2 "general_operand" "rYsYx,rm")]) (label_ref (match_operand 3 "" "")) (pc))) (clobber (reg:BI CARRY)) @@ -1281,13 +1283,13 @@ "" "@ CMP.W\t%1, %2 { J%R0\t%l3 - CMP%X0.W\t%1, %2 { J%R0\t%l3" + CMPX.W\t%1, %2 { J%R0\t%l3" ) (define_insn "*bitbranch4" [(set (pc) (if_then_else - (ne (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rYs,rm") - (match_operand:QHI 1 "msp_general_operand" "rYsi,rmi")) + (ne (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rYsYx,rm") + (match_operand:QHI 1 "msp_general_operand" "rYsYxi,rmi")) (const_int 0)) (label_ref (match_operand 2 "" "")) (pc))) @@ -1296,46 +1298,52 @@ "" "@ BIT%x0%b0\t%1, %0 { JNE\t%l2 - BIT%X0%b0\t%1, %0 { JNE\t%l2" + BITX%b0\t%1, %0 { JNE\t%l2" ) (define_insn "*bitbranch4" [(set (pc) (if_then_else - (eq (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rm") - (match_operand:QHI 1 "msp_general_operand" "rmi")) + (eq (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rYsYx,rm") + (match_operand:QHI 1 "msp_general_operand" "rYsYxi,rmi")) (const_int 0)) (label_ref (match_operand 2 "" "")) (pc))) (clobber (reg:BI CARRY)) ] "" - "BIT%x0%b0\t%1, %0 { JEQ\t%l2" + "@ + BIT%x0%b0\t%1, %0 { JEQ\t%l2 + BITX%b0\t%1, %0 { JEQ\t%l2" ) (define_insn "*bitbranch4" [(set (pc) (if_then_else - (eq (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rm") - (match_operand:QHI 1 "msp_general_operand" "rmi")) + (eq (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rYsYx,rm") + (match_operand:QHI 1 "msp_general_operand" "rYsYxi,rmi")) (const_int 0)) (pc) (label_ref (match_operand 2 "" "")))) (clobber (reg:BI CARRY)) ] "" - "BIT%X0%b0\t%1, %0 { JNE\t%l2" + "@ + BIT%x0%b0\t%1, %0 { JNE\t%l2 + BITX%b0\t%1, %0 { JNE\t%l2" ) (define_insn "*bitbranch4" [(set (pc) (if_then_else - (ne (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rm") - (match_operand:QHI 1 "msp_general_operand" "rmi")) + (ne (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rYsYx,rm") + (match_operand:QHI 1 "msp_general_operand" "rYsYxi,rmi")) (const_int 0)) (pc) (label_ref (match_operand 2 "" "")))) (clobber (reg:BI CARRY)) ] "" - "BIT%X0%b0\t%1, %0 { JEQ\t%l2" + "@ + BIT%x0%b0\t%1, %0 { JEQ\t%l2 + BITX%b0\t%1, %0 { JEQ\t%l2" ) ;;------------------------------------------------------------ @@ -1368,7 +1376,7 @@ (clobber (reg:BI CARRY)) ] "" - "BIT%x0%X0%b0\t%p1, %0 { JEQ\t%l2" + "BIT%X0%b0\t%p1, %0 { JEQ\t%l2" ) (define_insn "*bitbranch4_z" diff --git a/gcc/config/msp430/msp430.opt b/gcc/config/msp430/msp430.opt index cbbe0fa..2db2906 100644 --- a/gcc/config/msp430/msp430.opt +++ b/gcc/config/msp430/msp430.opt @@ -67,12 +67,16 @@ EnumValue Enum(msp430_hwmult_types) String(f5series) Value(MSP430_HWMULT_F5SERIES) mcode-region= -Target Joined RejectNegative Report ToLower Var(msp430_code_region) Enum(msp430_regions) Init(MSP430_REGION_ANY) -Specify whether functions should be placed into low or high memory. +Target Joined RejectNegative Report ToLower Var(msp430_code_region) Enum(msp430_regions) Init(MSP430_REGION_LOWER) +Specify whether functions should be placed into the lower or upper memory regions, or if they should be shuffled between the regions (either) for best fit (default: lower). mdata-region= -Target Joined RejectNegative Report ToLower Var(msp430_data_region) Enum(msp430_regions) Init(MSP430_REGION_ANY) -Specify whether variables should be placed into low or high memory. +Target Joined RejectNegative Report ToLower Var(msp430_data_region) Enum(msp430_regions) Init(MSP430_REGION_LOWER) +Specify whether variables should be placed into the lower or upper memory regions, or if they should be shuffled between the regions (either) for best fit (default: lower). + +muse-lower-region-prefix +Target Mask(USE_LOWER_REGION_PREFIX) Report +Add the .lower prefix to section names when compiling with -m{code,data}-region=lower (disabled by default). Enum Name(msp430_regions) Type(enum msp430_regions) diff --git a/gcc/config/msp430/t-msp430 b/gcc/config/msp430/t-msp430 index b956510..f8ba775 100644 --- a/gcc/config/msp430/t-msp430 +++ b/gcc/config/msp430/t-msp430 @@ -28,17 +28,22 @@ msp430-devices.o: $(srcdir)/config/msp430/msp430-devices.c \ # Enable multilibs: -MULTILIB_OPTIONS = mcpu=msp430 mlarge -MULTILIB_DIRNAMES = 430 large +MULTILIB_OPTIONS = mcpu=msp430 mlarge mdata-region=none +MULTILIB_DIRNAMES = 430 large full-memory-range # Match -mcpu=430 MULTILIB_MATCHES = mcpu?msp430=mcpu?430 +# These options are equivalent in terms of the multilib required for them +MULTILIB_MATCHES += mdata-region?none=mdata-region?upper +MULTILIB_MATCHES += mdata-region?none=mdata-region?either # The correct multilib for a given mmcu is selected without the need for # hard-coded data here, because DRIVER_SELF_SPECS will place the correct # -mcpu option for a given mcu onto the command line. -MULTILIB_EXCEPTIONS = mcpu=msp430/mlarge +MULTILIB_REQUIRED = mcpu=msp430 +MULTILIB_REQUIRED += mlarge +MULTILIB_REQUIRED += mlarge/mdata-region=none MULTILIB_EXTRA_OPTS = diff --git a/gcc/configure b/gcc/configure index 893a9e6..dc9f5fe 100755 --- a/gcc/configure +++ b/gcc/configure @@ -27773,6 +27773,80 @@ fi as_fn_error $? "Requesting --with-nan= requires assembler support for -mnan=" "$LINENO" 5 fi ;; + msp430-*-*) + # Earlier GAS versions generically support .gnu_attribute, but the + # msp430 assembler will not do anything with it. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5 +$as_echo_n "checking assembler for .gnu_attribute support... " >&6; } +if ${gcc_cv_as_msp430_gnu_attribute+:} false; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_as_msp430_gnu_attribute=no + if test $in_tree_gas = yes; then + if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 33 \) \* 1000 + 50` + then gcc_cv_as_msp430_gnu_attribute=yes +fi + elif test x$gcc_cv_as != x; then + $as_echo '.gnu_attribute 4,1' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then + gcc_cv_as_msp430_gnu_attribute=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_msp430_gnu_attribute" >&5 +$as_echo "$gcc_cv_as_msp430_gnu_attribute" >&6; } +if test $gcc_cv_as_msp430_gnu_attribute = yes; then + +$as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .mspabi_attribute support" >&5 +$as_echo_n "checking assembler for .mspabi_attribute support... " >&6; } +if ${gcc_cv_as_msp430_mspabi_attribute+:} false; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_as_msp430_mspabi_attribute=no + if test $in_tree_gas = yes; then + if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 33 \) \* 1000 + 50` + then gcc_cv_as_msp430_mspabi_attribute=yes +fi + elif test x$gcc_cv_as != x; then + $as_echo '.mspabi_attribute 4,1' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then + gcc_cv_as_msp430_mspabi_attribute=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_msp430_mspabi_attribute" >&5 +$as_echo "$gcc_cv_as_msp430_mspabi_attribute" >&6; } +if test $gcc_cv_as_msp430_mspabi_attribute = yes; then + +$as_echo "#define HAVE_AS_MSPABI_ATTRIBUTE 1" >>confdefs.h + +fi + + ;; riscv*-*-*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .attribute support" >&5 $as_echo_n "checking assembler for .attribute support... " >&6; } diff --git a/gcc/configure.ac b/gcc/configure.ac index eff849f..54a6715 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4949,6 +4949,20 @@ pointers into PC-relative form.]) [Requesting --with-nan= requires assembler support for -mnan=]) fi ;; + msp430-*-*) + # Earlier GAS versions generically support .gnu_attribute, but the + # msp430 assembler will not do anything with it. + gcc_GAS_CHECK_FEATURE([.gnu_attribute support], + gcc_cv_as_msp430_gnu_attribute, [2,33,50],, + [.gnu_attribute 4,1],, + [AC_DEFINE(HAVE_AS_GNU_ATTRIBUTE, 1, + [Define if your assembler supports .gnu_attribute.])]) + gcc_GAS_CHECK_FEATURE([.mspabi_attribute support], + gcc_cv_as_msp430_mspabi_attribute, [2,33,50],, + [.mspabi_attribute 4,1],, + [AC_DEFINE(HAVE_AS_MSPABI_ATTRIBUTE, 1, + [Define if your assembler supports .mspabi_attribute.])]) + ;; riscv*-*-*) gcc_GAS_CHECK_FEATURE([.attribute support], gcc_cv_as_riscv_attribute, [2,32,0],, diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 64fccfe..7e37c5c 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -5206,7 +5206,7 @@ On the MSP430 target these attributes can be used to specify whether the function or variable should be placed into low memory, high memory, or the placement should be left to the linker to decide. The attributes are only significant if compiling for the MSP430X -architecture. +architecture in the large memory model. The attributes work in conjunction with a linker script that has been augmented to specify where to place sections with a @code{.lower} and @@ -7537,15 +7537,30 @@ value will be retained across resets. The linker script being used to create the application should ensure that persistent data is correctly placed. -@item lower -@itemx upper +@item upper @itemx either -@cindex @code{lower} variable attribute, MSP430 @cindex @code{upper} variable attribute, MSP430 @cindex @code{either} variable attribute, MSP430 These attributes are the same as the MSP430 function attributes of the same name (@pxref{MSP430 Function Attributes}). -These attributes can be applied to both functions and variables. + +@item lower +@cindex @code{lower} variable attribute, MSP430 +This option behaves mostly the same as the MSP430 function attribute of the +same name (@pxref{MSP430 Function Attributes}), but it has some additional +functionality. + +If @option{-mdata-region=}@{@code{upper,either,none}@} has been passed, or +the @code{section} attribute is applied to a variable, the compiler will +generate 430X instructions to handle it. This is because the compiler has +to assume that the variable could get placed in the upper memory region +(above address 0xFFFF). Marking the variable with the @code{lower} attribute +informs the compiler that the variable will be placed in lower memory so it +is safe to use 430 instructions to handle it. + +In the case of the @code{section} attribute, the section name given +will be used, and the @code{.lower} prefix will not be added. + @end table @node Nvidia PTX Variable Attributes diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ddf94bc..b55e272 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2019-10-07 Jozef Lawrynowicz + + * gcc.target/msp430/430x-insns.c: New test. + * gcc.target/msp430/data-attributes-2.c: Remove dg-warning + directives for conflicts between the "section" and "lower" attributes. + * gcc.target/msp430/msp430.exp + (check_effective_target_msp430_region_not_lower): New. + (check_effective_target_msp430_region_lower): New. + * gcc.target/msp430/object-attributes-430.c: New test. + * gcc.target/msp430/object-attributes-default.c: New test. + * gcc.target/msp430/object-attributes-mlarge-any-region.c: New test. + * gcc.target/msp430/object-attributes-mlarge.c: New test. + 2019-10-07 Jakub Jelinek * gcc.target/i386/pr71801.c (uuidcache_init): Fix up size of d array. diff --git a/gcc/testsuite/gcc.target/msp430/430x-insns.c b/gcc/testsuite/gcc.target/msp430/430x-insns.c new file mode 100644 index 0000000..a67f778 --- /dev/null +++ b/gcc/testsuite/gcc.target/msp430/430x-insns.c @@ -0,0 +1,1646 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { *-*-* } { "-mcpu=msp430" "-mcpu=430" "-msmall" } { "" } } */ +/* { dg-options "-O1 -mlarge" } */ +/* { dg-final { check-function-bodies "**" "" } } */ + +/* The purpose of this test is to check that all insn patters in msp430.md + which use the "Yx" constraint work as expected. + So when both of the operands are in lower memory, a 430 instruction is + generated, and when at least one of the operands might be in upper memory, + a 430X instruction is generated. + We do not need to extensively test the situation where one of the operands + in an insn is not a mem (i.e. it is a register or immediate). A single test + will verify that the constraint correctly assumes that a reg + or immediate does not itself require a 430X instruction. */ + +typedef char qi; +typedef int hi; +/* For insns which use the QHI mode iterator (therefore accepting QI, HI and + PSI modes), we also check the PSImode version. All insns should be 430x + in that case. */ +typedef __int20 psi; +typedef long si; + +#define ATTR_EITHER __attribute__((either)) +#define ATTR_LOWER __attribute__((lower)) + +/* Use these to generate 430X insns. */ +qi ATTR_EITHER eqi1, eqi2, eqi3, eqi4, eqi5, eqi6; +hi ATTR_EITHER ehi1, ehi2, ehi3, ehi4, ehi5, ehi6; +psi ATTR_EITHER epsi1, epsi2, epsi3, epsi4, epsi5, epsi6; +si ATTR_EITHER esi1, esi2, esi3, esi4, esi5, esi6; + +/* Use these to generate 430 insns. */ +qi ATTR_LOWER lqi1, lqi2, lqi3, lqi4, lqi5, lqi6; +hi ATTR_LOWER lhi1, lhi2, lhi3, lhi4, lhi5, lhi6; +psi ATTR_LOWER lpsi1, lpsi2, lpsi3, lpsi4, lpsi5, lpsi6; +si ATTR_LOWER lsi1, lsi2, lsi3, lsi4, lsi5, lsi6; + +/* The default data region is "lower", so these behave the same as the above + "l*" variables unless -mdata-region={upper,either,none} is passed. */ +qi qi1, qi2, qi3, qi4, qi5, qi6; +hi hi1, hi2, hi3, hi4, hi5, hi6; +psi psi1, psi2, psi3, psi4, psi5, psi6; +si si1, si2, si3, si4, si5, si6; + +qi use_qi(qi a); +hi use_hi(hi a); +psi use_psi(psi a); +si use_si(si a); + +#define USE_MODE(MODE) use_ ## MODE +#define USE_MODE_N(MODE,N) use_ ## N ## MODE + +#define E_VAR(MODE,N) e ## MODE ## N +#define L_VAR(MODE,N) l ## MODE ## N +#define VAR(MODE,N) MODE ## N + +#define REG_VAR(MODE,N) MODE ## r ## N + +/* Verify that a register operand does not influence whether a 430X instruction + is used or not. */ +/* +** register_operand: { target msp430_region_lower } +** ... +** MOV.B &lqi1, R12 +** ... +** MOV.B &qi1, R12 +** ... +** MOVX.B &eqi1, R12 +** ... +*/ +/* +** register_operand: { target msp430_region_not_lower } +** ... +** MOV.B &lqi1, R12 +** ... +** MOVX.B &qi1, R12 +** ... +** MOVX.B &eqi1, R12 +** ... +*/ + +void +register_operand (void) +{ + use_qi (lqi1); + use_qi (qi1); + use_qi (eqi1); +} + +/* Verify that an immediate operand does not influence whether a 430X instruction + is used or not. */ +/* +** immediate_operand: { target msp430_region_lower } +** ... +** MOV.B #1, &lqi1 +** MOV.B #2, &qi1 +** MOVX.B #3, &eqi1 +** ... +*/ +/* +** immediate_operand: { target msp430_region_not_lower } +** ... +** MOV.B #1, &lqi1 +** MOVX.B #2, &qi1 +** MOVX.B #3, &eqi1 +** ... +*/ +void +immediate_operand (void) +{ + lqi1 = 1; + qi1 = 2; + eqi1 = 3; +} + +/* Verify that variables marked with the noinit, persistent, section and lower + attributes have the appropriate format instructions generated to handle + them. */ +int __attribute__((persistent)) pp = 10; +int __attribute__((noinit)) nn; +int __attribute__((section(".data.foo"))) s; +int __attribute__((section(".data.foo"),lower)) sl1; +int __attribute__((lower,section(".data.foo"))) sl2; + +/* +** attrs: +** ... +** MOVX.W #1, &pp +** MOV.W #2, &nn +** MOVX.W #3, &s +** MOV.W #4, &sl1 +** MOV.W #5, &sl2 +** ... +*/ +void +attrs (void) +{ + pp = 1; + nn = 2; + s = 3; + sl1 = 4; + sl2 = 5; +} + +#define MOV_INSNS(MODE) \ + E_VAR(MODE, 1) = E_VAR(MODE, 2); \ + E_VAR(MODE, 3) = L_VAR(MODE, 1); \ + E_VAR(MODE, 4) = VAR(MODE, 1); \ + L_VAR(MODE, 4) = E_VAR(MODE, 5); \ + VAR(MODE, 5) = E_VAR(MODE, 6); \ + L_VAR(MODE, 2) = L_VAR(MODE, 3); \ + L_VAR(MODE, 5) = VAR(MODE, 2); \ + VAR(MODE, 3) = VAR(MODE, 4); \ + VAR(MODE, 6) = L_VAR(MODE, 6); + + +/* +** movqi: { target msp430_region_lower } +** ... +** MOVX.B &eqi2, &eqi1 +** MOVX.B &lqi1, &eqi3 +** MOVX.B &qi1, &eqi4 +** MOVX.B &eqi5, &lqi4 +** MOVX.B &eqi6, &qi5 +** MOV.B &lqi3, &lqi2 +** MOV.B &qi2, &lqi5 +** MOV.B &qi4, &qi3 +** MOV.B &lqi6, &qi6 +** ... +*/ +/* +** movqi: { target msp430_region_not_lower } +** ... +** MOVX.B &eqi2, &eqi1 +** MOVX.B &lqi1, &eqi3 +** MOVX.B &qi1, &eqi4 +** MOVX.B &eqi5, &lqi4 +** MOVX.B &eqi6, &qi5 +** MOV.B &lqi3, &lqi2 +** MOVX.B &qi2, &lqi5 +** MOVX.B &qi4, &qi3 +** MOVX.B &lqi6, &qi6 +** ... +*/ +void +movqi (void) +{ + MOV_INSNS (qi) +} + +/* +** movhi: { target msp430_region_lower } +** ... +** MOVX.W &ehi2, &ehi1 +** MOVX.W &lhi1, &ehi3 +** MOVX.W &hi1, &ehi4 +** MOVX.W &ehi5, &lhi4 +** MOVX.W &ehi6, &hi5 +** MOV.W &lhi3, &lhi2 +** MOV.W &hi2, &lhi5 +** MOV.W &hi4, &hi3 +** MOV.W &lhi6, &hi6 +** ... +*/ +/* +** movhi: { target msp430_region_not_lower } +** ... +** MOVX.W &ehi2, &ehi1 +** MOVX.W &lhi1, &ehi3 +** MOVX.W &hi1, &ehi4 +** MOVX.W &ehi5, &lhi4 +** MOVX.W &ehi6, &hi5 +** MOV.W &lhi3, &lhi2 +** MOVX.W &hi2, &lhi5 +** MOVX.W &hi4, &hi3 +** MOVX.W &lhi6, &hi6 +** ... +*/ +void +movhi (void) +{ + MOV_INSNS (hi) +} + +/* There is no specific movsi3 pattern defined for msp430, but we check + this is synthesized correctly anyway. */ +/* +** movsi: { target msp430_region_lower } +** ... +** MOVX.W &esi2, &esi1 +** MOVX.W &esi2\+2, &esi1\+2 +** MOVX.W &lsi1, &esi3 +** MOVX.W &lsi1\+2, &esi3\+2 +** MOVX.W &si1, &esi4 +** MOVX.W &si1\+2, &esi4\+2 +** MOVX.W &esi5, &lsi4 +** MOVX.W &esi5\+2, &lsi4\+2 +** MOVX.W &esi6, &si5 +** MOVX.W &esi6\+2, &si5\+2 +** MOV.W &lsi3, &lsi2 +** MOV.W &lsi3\+2, &lsi2\+2 +** MOV.W &si2, &lsi5 +** MOV.W &si2\+2, &lsi5\+2 +** MOV.W &si4, &si3 +** MOV.W &si4\+2, &si3\+2 +** MOV.W &lsi6, &si6 +** MOV.W &lsi6\+2, &si6\+2 +** ... +*/ +/* +** movsi: { target msp430_region_not_lower } +** ... +** MOVX.W &esi2, &esi1 +** MOVX.W &esi2\+2, &esi1\+2 +** MOVX.W &lsi1, &esi3 +** MOVX.W &lsi1\+2, &esi3\+2 +** MOVX.W &si1, &esi4 +** MOVX.W &si1\+2, &esi4\+2 +** MOVX.W &esi5, &lsi4 +** MOVX.W &esi5\+2, &lsi4\+2 +** MOVX.W &esi6, &si5 +** MOVX.W &esi6\+2, &si5\+2 +** MOV.W &lsi3, &lsi2 +** MOV.W &lsi3\+2, &lsi2\+2 +** MOVX.W &si2, &lsi5 +** MOVX.W &si2\+2, &lsi5\+2 +** MOVX.W &si4, &si3 +** MOVX.W &si4\+2, &si3\+2 +** MOVX.W &lsi6, &si6 +** MOVX.W &lsi6\+2, &si6\+2 +** ... +*/ +void +movsi (void) +{ + MOV_INSNS (si) +} + +#define ADD_INSNS(MODE) \ + E_VAR(MODE,1) += E_VAR(MODE,2); \ + E_VAR(MODE,3) += L_VAR(MODE,1); \ + E_VAR(MODE,4) += VAR(MODE,1); \ + L_VAR(MODE,2) += E_VAR(MODE,5); \ + VAR(MODE,3) += E_VAR(MODE,6); \ + L_VAR(MODE,3) += L_VAR(MODE,4); \ + L_VAR(MODE,5) += VAR(MODE,2); \ + VAR(MODE,4) += L_VAR(MODE,6); \ + VAR(MODE,5) += VAR(MODE,6); + +/* +** addqi3: { target msp430_region_lower } +** ... +** ADDX.B &eqi2, &eqi1 +** ADDX.B &lqi1, &eqi3 +** ADDX.B &qi1, &eqi4 +** ADDX.B &eqi5, &lqi2 +** ADDX.B &eqi6, &qi3 +** ADD.B &lqi4, &lqi3 +** ADD.B &qi2, &lqi5 +** ADD.B &lqi6, &qi4 +** ADD.B &qi6, &qi5 +** ... +*/ +/* +** addqi3: { target msp430_region_not_lower } +** ... +** ADDX.B &eqi2, &eqi1 +** ADDX.B &lqi1, &eqi3 +** ADDX.B &qi1, &eqi4 +** ADDX.B &eqi5, &lqi2 +** ADDX.B &eqi6, &qi3 +** ADD.B &lqi4, &lqi3 +** ADDX.B &qi2, &lqi5 +** ADDX.B &lqi6, &qi4 +** ADDX.B &qi6, &qi5 +** ... +*/ +void +addqi3 (void) +{ + ADD_INSNS(qi) +} + +/* +** addhi3: { target msp430_region_lower } +** ... +** ADDX.W &ehi2, &ehi1 +** ADDX.W &lhi1, &ehi3 +** ADDX.W &hi1, &ehi4 +** ADDX.W &ehi5, &lhi2 +** ADDX.W &ehi6, &hi3 +** ADD.W &lhi4, &lhi3 +** ADD.W &hi2, &lhi5 +** ADD.W &lhi6, &hi4 +** ADD.W &hi6, &hi5 +** ... +*/ +/* +** addhi3: { target msp430_region_not_lower } +** ... +** ADDX.W &ehi2, &ehi1 +** ADDX.W &lhi1, &ehi3 +** ADDX.W &hi1, &ehi4 +** ADDX.W &ehi5, &lhi2 +** ADDX.W &ehi6, &hi3 +** ADD.W &lhi4, &lhi3 +** ADDX.W &hi2, &lhi5 +** ADDX.W &lhi6, &hi4 +** ADDX.W &hi6, &hi5 +** ... +*/ +void +addhi3 (void) +{ + ADD_INSNS(hi) +} + +/* +** addsi3: { target msp430_region_lower } +** ... +** ADDX &esi2, &esi1 { ADDCX &esi2\+2, &esi1\+2 +** ADDX &lsi1, &esi3 { ADDCX &lsi1\+2, &esi3\+2 +** ADDX &si1, &esi4 { ADDCX &si1\+2, &esi4\+2 +** ADDX &esi5, &lsi2 { ADDCX &esi5\+2, &lsi2\+2 +** ADDX &esi6, &si3 { ADDCX &esi6\+2, &si3\+2 +** ADD &lsi4, &lsi3 { ADDC &lsi4\+2, &lsi3\+2 +** ADD &si2, &lsi5 { ADDC &si2\+2, &lsi5\+2 +** ADD &lsi6, &si4 { ADDC &lsi6\+2, &si4\+2 +** ADD &si6, &si5 { ADDC &si6\+2, &si5\+2 +** ... +*/ +/* +** addsi3: { target msp430_region_not_lower } +** ... +** ADDX &esi2, &esi1 { ADDCX &esi2\+2, &esi1\+2 +** ADDX &lsi1, &esi3 { ADDCX &lsi1\+2, &esi3\+2 +** ADDX &si1, &esi4 { ADDCX &si1\+2, &esi4\+2 +** ADDX &esi5, &lsi2 { ADDCX &esi5\+2, &lsi2\+2 +** ADDX &esi6, &si3 { ADDCX &esi6\+2, &si3\+2 +** ADD &lsi4, &lsi3 { ADDC &lsi4\+2, &lsi3\+2 +** ADDX &si2, &lsi5 { ADDCX &si2\+2, &lsi5\+2 +** ADDX &lsi6, &si4 { ADDCX &lsi6\+2, &si4\+2 +** ADDX &si6, &si5 { ADDCX &si6\+2, &si5\+2 +** ... +*/ +void +addsi3 (void) +{ + ADD_INSNS(si) +} + +#define SUB_INSNS(MODE) \ + E_VAR(MODE,1) -= E_VAR(MODE,2); \ + E_VAR(MODE,3) -= L_VAR(MODE,1); \ + E_VAR(MODE,4) -= VAR(MODE,1); \ + L_VAR(MODE,2) -= E_VAR(MODE,5); \ + VAR(MODE,3) -= E_VAR(MODE,6); \ + L_VAR(MODE,3) -= L_VAR(MODE,4); \ + L_VAR(MODE,5) -= VAR(MODE,2); \ + VAR(MODE,4) -= L_VAR(MODE,6); \ + VAR(MODE,5) -= VAR(MODE,6); + +/* +** subqi3: { target msp430_region_lower } +** ... +** SUBX.B &eqi2, &eqi1 +** SUBX.B &lqi1, &eqi3 +** SUBX.B &qi1, &eqi4 +** SUBX.B &eqi5, &lqi2 +** SUBX.B &eqi6, &qi3 +** SUB.B &lqi4, &lqi3 +** SUB.B &qi2, &lqi5 +** SUB.B &lqi6, &qi4 +** SUB.B &qi6, &qi5 +** ... +*/ +/* +** subqi3: { target msp430_region_not_lower } +** ... +** SUBX.B &eqi2, &eqi1 +** SUBX.B &lqi1, &eqi3 +** SUBX.B &qi1, &eqi4 +** SUBX.B &eqi5, &lqi2 +** SUBX.B &eqi6, &qi3 +** SUB.B &lqi4, &lqi3 +** SUBX.B &qi2, &lqi5 +** SUBX.B &lqi6, &qi4 +** SUBX.B &qi6, &qi5 +** ... +*/ +void +subqi3 (void) +{ + SUB_INSNS(qi) +} + +/* +** subhi3: { target msp430_region_lower } +** ... +** SUBX.W &ehi2, &ehi1 +** SUBX.W &lhi1, &ehi3 +** SUBX.W &hi1, &ehi4 +** SUBX.W &ehi5, &lhi2 +** SUBX.W &ehi6, &hi3 +** SUB.W &lhi4, &lhi3 +** SUB.W &hi2, &lhi5 +** SUB.W &lhi6, &hi4 +** SUB.W &hi6, &hi5 +** ... +*/ +/* +** subhi3: { target msp430_region_not_lower } +** ... +** SUBX.W &ehi2, &ehi1 +** SUBX.W &lhi1, &ehi3 +** SUBX.W &hi1, &ehi4 +** SUBX.W &ehi5, &lhi2 +** SUBX.W &ehi6, &hi3 +** SUB.W &lhi4, &lhi3 +** SUBX.W &hi2, &lhi5 +** SUBX.W &lhi6, &hi4 +** SUBX.W &hi6, &hi5 +** ... +*/ +void +subhi3 (void) +{ + SUB_INSNS(hi) +} + +/* +** subsi3: { target msp430_region_lower } +** ... +** SUBX &esi2, &esi1 { SUBCX &esi2\+2, &esi1\+2 +** SUBX &lsi1, &esi3 { SUBCX &lsi1\+2, &esi3\+2 +** SUBX &si1, &esi4 { SUBCX &si1\+2, &esi4\+2 +** SUBX &esi5, &lsi2 { SUBCX &esi5\+2, &lsi2\+2 +** SUBX &esi6, &si3 { SUBCX &esi6\+2, &si3\+2 +** SUB &lsi4, &lsi3 { SUBC &lsi4\+2, &lsi3\+2 +** SUB &si2, &lsi5 { SUBC &si2\+2, &lsi5\+2 +** SUB &lsi6, &si4 { SUBC &lsi6\+2, &si4\+2 +** SUB &si6, &si5 { SUBC &si6\+2, &si5\+2 +** ... +*/ +/* +** subsi3: { target msp430_region_not_lower } +** ... +** SUBX &esi2, &esi1 { SUBCX &esi2\+2, &esi1\+2 +** SUBX &lsi1, &esi3 { SUBCX &lsi1\+2, &esi3\+2 +** SUBX &si1, &esi4 { SUBCX &si1\+2, &esi4\+2 +** SUBX &esi5, &lsi2 { SUBCX &esi5\+2, &lsi2\+2 +** SUBX &esi6, &si3 { SUBCX &esi6\+2, &si3\+2 +** SUB &lsi4, &lsi3 { SUBC &lsi4\+2, &lsi3\+2 +** SUBX &si2, &lsi5 { SUBCX &si2\+2, &lsi5\+2 +** SUBX &lsi6, &si4 { SUBCX &lsi6\+2, &si4\+2 +** SUBX &si6, &si5 { SUBCX &si6\+2, &si5\+2 +** ... +*/ +void +subsi3 (void) +{ + SUB_INSNS(si) +} + +#define BIC_INSN(MODE) \ + E_VAR(MODE,1) &= (E_VAR(MODE,2) ^ E_VAR(MODE,1)); \ + E_VAR(MODE,3) &= (L_VAR(MODE,1) ^ E_VAR(MODE,3)); \ + E_VAR(MODE,4) &= (VAR(MODE,1) ^ E_VAR(MODE,4)); \ + L_VAR(MODE,2) &= (E_VAR(MODE,5) ^ L_VAR(MODE,2)); \ + VAR(MODE,2) &= (E_VAR(MODE,6) ^ VAR(MODE,2)); \ + L_VAR(MODE,3) &= (L_VAR(MODE,4) ^ L_VAR(MODE,3)); \ + L_VAR(MODE,5) &= (VAR(MODE,3) ^ L_VAR(MODE,5)); \ + VAR(MODE,4) &= (L_VAR(MODE,6) ^ VAR(MODE,4)); \ + VAR(MODE,5) &= (VAR(MODE,6) ^ VAR(MODE,5)); \ + +/* +** bicqi3: { target msp430_region_lower } +** ... +** BICX.B &eqi2, &eqi1 +** BICX.B &lqi1, &eqi3 +** BICX.B &qi1, &eqi4 +** BICX.B &eqi5, &lqi2 +** BICX.B &eqi6, &qi2 +** BIC.B &lqi4, &lqi3 +** BIC.B &qi3, &lqi5 +** BIC.B &lqi6, &qi4 +** BIC.B &qi6, &qi5 +** ... +*/ +/* +** bicqi3: { target msp430_region_not_lower } +** ... +** BICX.B &eqi2, &eqi1 +** BICX.B &lqi1, &eqi3 +** BICX.B &qi1, &eqi4 +** BICX.B &eqi5, &lqi2 +** BICX.B &eqi6, &qi2 +** BIC.B &lqi4, &lqi3 +** BICX.B &qi3, &lqi5 +** BICX.B &lqi6, &qi4 +** BICX.B &qi6, &qi5 +** ... +*/ +void +bicqi3 (void) +{ + BIC_INSN(qi) +} + +/* +** bichi3: { target msp430_region_lower } +** ... +** BICX.W &ehi2, &ehi1 +** BICX.W &lhi1, &ehi3 +** BICX.W &hi1, &ehi4 +** BICX.W &ehi5, &lhi2 +** BICX.W &ehi6, &hi2 +** BIC.W &lhi4, &lhi3 +** BIC.W &hi3, &lhi5 +** BIC.W &lhi6, &hi4 +** BIC.W &hi6, &hi5 +** ... +*/ +/* +** bichi3: { target msp430_region_not_lower } +** ... +** BICX.W &ehi2, &ehi1 +** BICX.W &lhi1, &ehi3 +** BICX.W &hi1, &ehi4 +** BICX.W &ehi5, &lhi2 +** BICX.W &ehi6, &hi2 +** BIC.W &lhi4, &lhi3 +** BICX.W &hi3, &lhi5 +** BICX.W &lhi6, &hi4 +** BICX.W &hi6, &hi5 +** ... +*/ +void +bichi3 (void) +{ + BIC_INSN(hi) +} + +/* +** bicpsi3: +** ... +** BICX.A &epsi2, &epsi1 +** BICX.A &lpsi1, &epsi3 +** BICX.A &psi1, &epsi4 +** BICX.A &epsi5, &lpsi2 +** BICX.A &epsi6, &psi2 +** BICX.A &lpsi4, &lpsi3 +** BICX.A &psi3, &lpsi5 +** BICX.A &lpsi6, &psi4 +** BICX.A &psi6, &psi5 +** ... +*/ +void +bicpsi3 (void) +{ + BIC_INSN(psi) +} + +/* There is no specific bicsi3 pattern defined for msp430, but we check + this is synthesized correctly anyway. */ +/* +** bicsi3: { target msp430_region_lower } +** ... +** BICX.W &esi2, &esi1 +** BICX.W &esi2\+2, &esi1\+2 +** BICX.W &lsi1, &esi3 +** BICX.W &lsi1\+2, &esi3\+2 +** BICX.W &si1, &esi4 +** BICX.W &si1\+2, &esi4\+2 +** BICX.W &esi5, &lsi2 +** BICX.W &esi5\+2, &lsi2\+2 +** BICX.W &esi6, &si2 +** BICX.W &esi6\+2, &si2\+2 +** BIC.W &lsi4, &lsi3 +** BIC.W &lsi4\+2, &lsi3\+2 +** BIC.W &si3, &lsi5 +** BIC.W &si3\+2, &lsi5\+2 +** BIC.W &lsi6, &si4 +** BIC.W &lsi6\+2, &si4\+2 +** BIC.W &si6, &si5 +** BIC.W &si6\+2, &si5\+2 +** ... +*/ +/* +** bicsi3: { target msp430_region_not_lower } +** ... +** BICX.W &esi2, &esi1 +** BICX.W &esi2\+2, &esi1\+2 +** BICX.W &lsi1, &esi3 +** BICX.W &lsi1\+2, &esi3\+2 +** BICX.W &si1, &esi4 +** BICX.W &si1\+2, &esi4\+2 +** BICX.W &esi5, &lsi2 +** BICX.W &esi5\+2, &lsi2\+2 +** BICX.W &esi6, &si2 +** BICX.W &esi6\+2, &si2\+2 +** BIC.W &lsi4, &lsi3 +** BIC.W &lsi4\+2, &lsi3\+2 +** BICX.W &si3, &lsi5 +** BICX.W &si3\+2, &lsi5\+2 +** BICX.W &lsi6, &si4 +** BICX.W &lsi6\+2, &si4\+2 +** BICX.W &si6, &si5 +** BICX.W &si6\+2, &si5\+2 +** ... +*/ +void +bicsi3 (void) +{ + BIC_INSN(si) +} + +#define BIC_CG_INSN(MODE) \ + E_VAR(MODE,1) &= (1 ^ E_VAR(MODE,1)); \ + E_VAR(MODE,2) &= (2 ^ E_VAR(MODE,2)); \ + L_VAR(MODE,1) &= (4 ^ L_VAR(MODE,1)); \ + VAR(MODE,1) &= (8 ^ VAR(MODE,1)); \ + +/* +** bic_cg_qi3: { target msp430_region_lower } +** ... +** BICX.B #1, &eqi1 +** BICX.B #2, &eqi2 +** BIC.B #4, &lqi1 +** BIC.B #8, &qi1 +** ... +*/ +/* +** bic_cg_qi3: { target msp430_region_not_lower } +** ... +** BICX.B #1, &eqi1 +** BICX.B #2, &eqi2 +** BIC.B #4, &lqi1 +** BICX.B #8, &qi1 +** ... +*/ +void +bic_cg_qi3 (void) +{ + BIC_CG_INSN(qi) +} + +/* +** bic_cg_hi3: { target msp430_region_lower } +** ... +** BICX.W #1, &ehi1 +** BICX.W #2, &ehi2 +** BIC.W #4, &lhi1 +** BIC.W #8, &hi1 +** ... +*/ +/* +** bic_cg_hi3: { target msp430_region_not_lower } +** ... +** BICX.W #1, &ehi1 +** BICX.W #2, &ehi2 +** BIC.W #4, &lhi1 +** BICX.W #8, &hi1 +** ... +*/ +void +bic_cg_hi3 (void) +{ + BIC_CG_INSN(hi) +} + +/* +** bic_cg_psi3: +** ... +** BICX.A #1, &epsi1 +** BICX.A #2, &epsi2 +** BICX.A #4, &lpsi1 +** BICX.A #8, &psi1 +** ... +*/ +void +bic_cg_psi3 (void) +{ + BIC_CG_INSN(psi) +} + +/* There is no specific bic_cg_si3 pattern defined for msp430, but we check + this is synthesized correctly anyway. */ +/* +** bic_cg_si3: { target msp430_region_lower } +** ... +** BICX.W #1, &esi1 +** BICX.W #2, &esi2 +** BIC.W #4, &lsi1 +** BIC.W #8, &si1 +** ... +*/ +/* +** bic_cg_si3: { target msp430_region_not_lower } +** ... +** BICX.W #1, &esi1 +** BICX.W #2, &esi2 +** BIC.W #4, &lsi1 +** BICX.W #8, &si1 +** ... +*/ +void +bic_cg_si3 (void) +{ + BIC_CG_INSN(si) +} + +#define AND_INSN(MODE) \ + E_VAR(MODE,1) &= E_VAR(MODE,2); \ + E_VAR(MODE,3) &= L_VAR(MODE,1); \ + E_VAR(MODE,4) &= VAR(MODE,1); \ + L_VAR(MODE,2) &= E_VAR(MODE,5); \ + VAR(MODE,2) &= E_VAR(MODE,6); \ + L_VAR(MODE,3) &= L_VAR(MODE,4); \ + L_VAR(MODE,5) &= VAR(MODE,3); \ + VAR(MODE,4) &= VAR(MODE,5); \ + VAR(MODE,6) &= L_VAR(MODE,6); + +/* +** andqi3: { target msp430_region_lower } +** ... +** ANDX.B &eqi2, &eqi1 +** ANDX.B &lqi1, &eqi3 +** ANDX.B &qi1, &eqi4 +** ANDX.B &eqi5, &lqi2 +** ANDX.B &eqi6, &qi2 +** AND.B &lqi4, &lqi3 +** AND.B &qi3, &lqi5 +** AND.B &qi5, &qi4 +** AND.B &lqi6, &qi6 +** ... +*/ +/* +** andqi3: { target msp430_region_not_lower } +** ... +** ANDX.B &eqi2, &eqi1 +** ANDX.B &lqi1, &eqi3 +** ANDX.B &qi1, &eqi4 +** ANDX.B &eqi5, &lqi2 +** ANDX.B &eqi6, &qi2 +** AND.B &lqi4, &lqi3 +** ANDX.B &qi3, &lqi5 +** ANDX.B &qi5, &qi4 +** ANDX.B &lqi6, &qi6 +** ... +*/ +void +andqi3 (void) +{ + AND_INSN(qi) +} + +/* +** andhi3: { target msp430_region_lower } +** ... +** ANDX.W &ehi2, &ehi1 +** ANDX.W &lhi1, &ehi3 +** ANDX.W &hi1, &ehi4 +** ANDX.W &ehi5, &lhi2 +** ANDX.W &ehi6, &hi2 +** AND.W &lhi4, &lhi3 +** AND.W &hi3, &lhi5 +** AND.W &hi5, &hi4 +** AND.W &lhi6, &hi6 +** ... +*/ +/* +** andhi3: { target msp430_region_not_lower } +** ... +** ANDX.W &ehi2, &ehi1 +** ANDX.W &lhi1, &ehi3 +** ANDX.W &hi1, &ehi4 +** ANDX.W &ehi5, &lhi2 +** ANDX.W &ehi6, &hi2 +** AND.W &lhi4, &lhi3 +** ANDX.W &hi3, &lhi5 +** ANDX.W &hi5, &hi4 +** ANDX.W &lhi6, &hi6 +** ... +*/ +void +andhi3 (void) +{ + AND_INSN(hi) +} + +/* +** andpsi3: +** ... +** ANDX.A &epsi2, &epsi1 +** ANDX.A &lpsi1, &epsi3 +** ANDX.A &psi1, &epsi4 +** ANDX.A &epsi5, &lpsi2 +** ANDX.A &epsi6, &psi2 +** ANDX.A &lpsi4, &lpsi3 +** ANDX.A &psi3, &lpsi5 +** ANDX.A &psi5, &psi4 +** ANDX.A &lpsi6, &psi6 +** ... +*/ +void +andpsi3 (void) +{ + AND_INSN(psi) +} + +/* There is no specific andsi3 pattern defined for msp430, but we check + this is synthesized correctly anyway. */ +/* +** andsi3: { target msp430_region_lower } +** ... +** ANDX.W &esi2, &esi1 +** ANDX.W &esi2\+2, &esi1\+2 +** ANDX.W &lsi1, &esi3 +** ANDX.W &lsi1\+2, &esi3\+2 +** ANDX.W &si1, &esi4 +** ANDX.W &si1\+2, &esi4\+2 +** ANDX.W &esi5, &lsi2 +** ANDX.W &esi5\+2, &lsi2\+2 +** ANDX.W &esi6, &si2 +** ANDX.W &esi6\+2, &si2\+2 +** AND.W &lsi4, &lsi3 +** AND.W &lsi4\+2, &lsi3\+2 +** AND.W &si3, &lsi5 +** AND.W &si3\+2, &lsi5\+2 +** AND.W &si5, &si4 +** AND.W &si5\+2, &si4\+2 +** AND.W &lsi6, &si6 +** AND.W &lsi6\+2, &si6\+2 +** ... +*/ +/* +** andsi3: { target msp430_region_not_lower } +** ... +** ANDX.W &esi2, &esi1 +** ANDX.W &esi2\+2, &esi1\+2 +** ANDX.W &lsi1, &esi3 +** ANDX.W &lsi1\+2, &esi3\+2 +** ANDX.W &si1, &esi4 +** ANDX.W &si1\+2, &esi4\+2 +** ANDX.W &esi5, &lsi2 +** ANDX.W &esi5\+2, &lsi2\+2 +** ANDX.W &esi6, &si2 +** ANDX.W &esi6\+2, &si2\+2 +** AND.W &lsi4, &lsi3 +** AND.W &lsi4\+2, &lsi3\+2 +** ANDX.W &si3, &lsi5 +** ANDX.W &si3\+2, &lsi5\+2 +** ANDX.W &si5, &si4 +** ANDX.W &si5\+2, &si4\+2 +** ANDX.W &lsi6, &si6 +** ANDX.W &lsi6\+2, &si6\+2 +** ... +*/ +void +andsi3 (void) +{ + AND_INSN(si) +} + +#define IOR_INSN(MODE) \ + E_VAR(MODE,1) |= E_VAR(MODE,2); \ + E_VAR(MODE,3) |= L_VAR(MODE,1); \ + E_VAR(MODE,4) |= VAR(MODE,1); \ + L_VAR(MODE,2) |= E_VAR(MODE,5); \ + VAR(MODE,2) |= E_VAR(MODE,6); \ + L_VAR(MODE,3) |= L_VAR(MODE,4); \ + L_VAR(MODE,5) |= VAR(MODE,3); \ + VAR(MODE,4) |= VAR(MODE,5); \ + VAR(MODE,6) |= L_VAR(MODE,6); + +/* +** iorqi3: { target msp430_region_lower } +** ... +** BISX.B &eqi2, &eqi1 +** BISX.B &lqi1, &eqi3 +** BISX.B &qi1, &eqi4 +** BISX.B &eqi5, &lqi2 +** BISX.B &eqi6, &qi2 +** BIS.B &lqi4, &lqi3 +** BIS.B &qi3, &lqi5 +** BIS.B &qi5, &qi4 +** BIS.B &lqi6, &qi6 +** ... +*/ +/* +** iorqi3: { target msp430_region_not_lower } +** ... +** BISX.B &eqi2, &eqi1 +** BISX.B &lqi1, &eqi3 +** BISX.B &qi1, &eqi4 +** BISX.B &eqi5, &lqi2 +** BISX.B &eqi6, &qi2 +** BIS.B &lqi4, &lqi3 +** BISX.B &qi3, &lqi5 +** BISX.B &qi5, &qi4 +** BISX.B &lqi6, &qi6 +** ... +*/ +void +iorqi3 (void) +{ + IOR_INSN(qi) +} + +/* +** iorhi3: { target msp430_region_lower } +** ... +** BISX.W &ehi2, &ehi1 +** BISX.W &lhi1, &ehi3 +** BISX.W &hi1, &ehi4 +** BISX.W &ehi5, &lhi2 +** BISX.W &ehi6, &hi2 +** BIS.W &lhi4, &lhi3 +** BIS.W &hi3, &lhi5 +** BIS.W &hi5, &hi4 +** BIS.W &lhi6, &hi6 +** ... +*/ +/* +** iorhi3: { target msp430_region_not_lower } +** ... +** BISX.W &ehi2, &ehi1 +** BISX.W &lhi1, &ehi3 +** BISX.W &hi1, &ehi4 +** BISX.W &ehi5, &lhi2 +** BISX.W &ehi6, &hi2 +** BIS.W &lhi4, &lhi3 +** BISX.W &hi3, &lhi5 +** BISX.W &hi5, &hi4 +** BISX.W &lhi6, &hi6 +** ... +*/ +void +iorhi3 (void) +{ + IOR_INSN(hi) +} + +/* +** iorpsi3: +** ... +** BISX.A &epsi2, &epsi1 +** BISX.A &lpsi1, &epsi3 +** BISX.A &psi1, &epsi4 +** BISX.A &epsi5, &lpsi2 +** BISX.A &epsi6, &psi2 +** BISX.A &lpsi4, &lpsi3 +** BISX.A &psi3, &lpsi5 +** BISX.A &psi5, &psi4 +** BISX.A &lpsi6, &psi6 +** ... +*/ +void +iorpsi3 (void) +{ + IOR_INSN(psi) +} + +/* There is no specific iorsi3 pattern defined for msp430, but we check + this is synthesized correctly anyway. */ +/* +** iorsi3: { target msp430_region_lower } +** ... +** BISX.W &esi2, &esi1 +** BISX.W &esi2\+2, &esi1\+2 +** BISX.W &lsi1, &esi3 +** BISX.W &lsi1\+2, &esi3\+2 +** BISX.W &si1, &esi4 +** BISX.W &si1\+2, &esi4\+2 +** BISX.W &esi5, &lsi2 +** BISX.W &esi5\+2, &lsi2\+2 +** BISX.W &esi6, &si2 +** BISX.W &esi6\+2, &si2\+2 +** BIS.W &lsi4, &lsi3 +** BIS.W &lsi4\+2, &lsi3\+2 +** BIS.W &si3, &lsi5 +** BIS.W &si3\+2, &lsi5\+2 +** BIS.W &si5, &si4 +** BIS.W &si5\+2, &si4\+2 +** BIS.W &lsi6, &si6 +** BIS.W &lsi6\+2, &si6\+2 +** ... +*/ +/* +** iorsi3: { target msp430_region_not_lower } +** ... +** BISX.W &esi2, &esi1 +** BISX.W &esi2\+2, &esi1\+2 +** BISX.W &lsi1, &esi3 +** BISX.W &lsi1\+2, &esi3\+2 +** BISX.W &si1, &esi4 +** BISX.W &si1\+2, &esi4\+2 +** BISX.W &esi5, &lsi2 +** BISX.W &esi5\+2, &lsi2\+2 +** BISX.W &esi6, &si2 +** BISX.W &esi6\+2, &si2\+2 +** BIS.W &lsi4, &lsi3 +** BIS.W &lsi4\+2, &lsi3\+2 +** BISX.W &si3, &lsi5 +** BISX.W &si3\+2, &lsi5\+2 +** BISX.W &si5, &si4 +** BISX.W &si5\+2, &si4\+2 +** BISX.W &lsi6, &si6 +** BISX.W &lsi6\+2, &si6\+2 +** ... +*/ +void +iorsi3 (void) +{ + IOR_INSN(si) +} + +#define XOR_INSN(MODE) \ + E_VAR(MODE,1) ^= E_VAR(MODE,2); \ + E_VAR(MODE,3) ^= L_VAR(MODE,1); \ + E_VAR(MODE,4) ^= VAR(MODE,1); \ + L_VAR(MODE,2) ^= E_VAR(MODE,5); \ + VAR(MODE,2) ^= E_VAR(MODE,6); \ + L_VAR(MODE,3) ^= L_VAR(MODE,4); \ + L_VAR(MODE,5) ^= VAR(MODE,3); \ + VAR(MODE,4) ^= VAR(MODE,5); \ + VAR(MODE,6) ^= L_VAR(MODE,6); + +/* +** xorqi3: { target msp430_region_lower } +** ... +** XORX.B &eqi2, &eqi1 +** XORX.B &lqi1, &eqi3 +** XORX.B &qi1, &eqi4 +** XORX.B &eqi5, &lqi2 +** XORX.B &eqi6, &qi2 +** XOR.B &lqi4, &lqi3 +** XOR.B &qi3, &lqi5 +** XOR.B &qi5, &qi4 +** XOR.B &lqi6, &qi6 +** ... +*/ +/* +** xorqi3: { target msp430_region_not_lower } +** ... +** XORX.B &eqi2, &eqi1 +** XORX.B &lqi1, &eqi3 +** XORX.B &qi1, &eqi4 +** XORX.B &eqi5, &lqi2 +** XORX.B &eqi6, &qi2 +** XOR.B &lqi4, &lqi3 +** XORX.B &qi3, &lqi5 +** XORX.B &qi5, &qi4 +** XORX.B &lqi6, &qi6 +** ... +*/ +void +xorqi3 (void) +{ + XOR_INSN(qi) +} + +/* +** xorhi3: { target msp430_region_lower } +** ... +** XORX.W &ehi2, &ehi1 +** XORX.W &lhi1, &ehi3 +** XORX.W &hi1, &ehi4 +** XORX.W &ehi5, &lhi2 +** XORX.W &ehi6, &hi2 +** XOR.W &lhi4, &lhi3 +** XOR.W &hi3, &lhi5 +** XOR.W &hi5, &hi4 +** XOR.W &lhi6, &hi6 +** ... +*/ +/* +** xorhi3: { target msp430_region_not_lower } +** ... +** XORX.W &ehi2, &ehi1 +** XORX.W &lhi1, &ehi3 +** XORX.W &hi1, &ehi4 +** XORX.W &ehi5, &lhi2 +** XORX.W &ehi6, &hi2 +** XOR.W &lhi4, &lhi3 +** XORX.W &hi3, &lhi5 +** XORX.W &hi5, &hi4 +** XORX.W &lhi6, &hi6 +** ... +*/ +void +xorhi3 (void) +{ + XOR_INSN(hi) +} + +/* +** xorpsi3: +** ... +** XORX.A &epsi2, &epsi1 +** XORX.A &lpsi1, &epsi3 +** XORX.A &psi1, &epsi4 +** XORX.A &epsi5, &lpsi2 +** XORX.A &epsi6, &psi2 +** XORX.A &lpsi4, &lpsi3 +** XORX.A &psi3, &lpsi5 +** XORX.A &psi5, &psi4 +** XORX.A &lpsi6, &psi6 +** ... +*/ +void +xorpsi3 (void) +{ + XOR_INSN(psi) +} + +/* There is no specific xorsi3 pattern defined for msp430, but we check + this is synthesized correctly anyway. */ +/* +** xorsi3: { target msp430_region_lower } +** ... +** XORX.W &esi2, &esi1 +** XORX.W &esi2\+2, &esi1\+2 +** XORX.W &lsi1, &esi3 +** XORX.W &lsi1\+2, &esi3\+2 +** XORX.W &si1, &esi4 +** XORX.W &si1\+2, &esi4\+2 +** XORX.W &esi5, &lsi2 +** XORX.W &esi5\+2, &lsi2\+2 +** XORX.W &esi6, &si2 +** XORX.W &esi6\+2, &si2\+2 +** XOR.W &lsi4, &lsi3 +** XOR.W &lsi4\+2, &lsi3\+2 +** XOR.W &si3, &lsi5 +** XOR.W &si3\+2, &lsi5\+2 +** XOR.W &si5, &si4 +** XOR.W &si5\+2, &si4\+2 +** XOR.W &lsi6, &si6 +** XOR.W &lsi6\+2, &si6\+2 +** ... +*/ +/* +** xorsi3: { target msp430_region_not_lower } +** ... +** XORX.W &esi2, &esi1 +** XORX.W &esi2\+2, &esi1\+2 +** XORX.W &lsi1, &esi3 +** XORX.W &lsi1\+2, &esi3\+2 +** XORX.W &si1, &esi4 +** XORX.W &si1\+2, &esi4\+2 +** XORX.W &esi5, &lsi2 +** XORX.W &esi5\+2, &lsi2\+2 +** XORX.W &esi6, &si2 +** XORX.W &esi6\+2, &si2\+2 +** XOR.W &lsi4, &lsi3 +** XOR.W &lsi4\+2, &lsi3\+2 +** XORX.W &si3, &lsi5 +** XORX.W &si3\+2, &lsi5\+2 +** XORX.W &si5, &si4 +** XORX.W &si5\+2, &si4\+2 +** XORX.W &lsi6, &si6 +** XORX.W &lsi6\+2, &si6\+2 +** ... +*/ +void +xorsi3 (void) +{ + XOR_INSN(si) +} + +#define DO1 \ +{ \ + qi z; \ + z += use_qi(z); \ + use_qi(z); \ +} + +#define DO2 \ +{ \ + hi z; \ + z += use_hi(z); \ + use_hi(z); \ +} + +#define DO3 \ +{ \ + si z; \ + z += use_si(z); \ + use_si(z); \ +} + +#define CBRANCH_INSN(MODE) \ + if (E_VAR(MODE,1) == E_VAR(MODE,2)) \ + DO1 \ + else if (E_VAR(MODE,3) == L_VAR(MODE,1)) \ + DO2 \ + else if (E_VAR(MODE,4) == VAR(MODE,1)) \ + DO1 \ + else if (L_VAR(MODE,2) == E_VAR(MODE,5)) \ + DO2 \ + else if (VAR(MODE,2) == E_VAR(MODE,6)) \ + DO1 \ + else if (L_VAR(MODE,3) == L_VAR(MODE,4)) \ + DO2 \ + else if (L_VAR(MODE,5) == VAR(MODE,3)) \ + DO2 \ + else if (VAR(MODE,4) == VAR(MODE,5)) \ + DO1 \ + else if (VAR(MODE,6) == L_VAR(MODE,6)) \ + DO2 + +/* +** cbranchqi4_real: { target msp430_region_lower } +** ... +** CMPX.B &eqi2, &eqi1 { JEQ .L[0-9]+ +** CMPX.B &lqi1, &eqi3 { JEQ .L[0-9]+ +** CMPX.B &qi1, &eqi4 { JEQ .L[0-9]+ +** CMPX.B &eqi5, &lqi2 { JEQ .L[0-9]+ +** CMPX.B &eqi6, &qi2 { JEQ .L[0-9]+ +** CMP.B &lqi4, &lqi3 { JEQ .L[0-9]+ +** CMP.B &qi3, &lqi5 { JEQ .L[0-9]+ +** CMP.B &qi5, &qi4 { JEQ .L[0-9]+ +** CMP.B &lqi6, &qi6 { JNE .L[0-9]+ +** ... +*/ +/* +** cbranchqi4_real: { target msp430_region_not_lower } +** ... +** CMPX.B &eqi2, &eqi1 { JEQ .L[0-9]+ +** CMPX.B &lqi1, &eqi3 { JEQ .L[0-9]+ +** CMPX.B &qi1, &eqi4 { JEQ .L[0-9]+ +** CMPX.B &eqi5, &lqi2 { JEQ .L[0-9]+ +** CMPX.B &eqi6, &qi2 { JEQ .L[0-9]+ +** CMP.B &lqi4, &lqi3 { JEQ .L[0-9]+ +** CMPX.B &qi3, &lqi5 { JEQ .L[0-9]+ +** CMPX.B &qi5, &qi4 { JEQ .L[0-9]+ +** CMPX.B &lqi6, &qi6 { JNE .L[0-9]+ +** ... +*/ +void +cbranchqi4_real (void) +{ + CBRANCH_INSN(qi) +} + +/* +** cbranchhi4_real: { target msp430_region_lower } +** ... +** CMPX.W &ehi2, &ehi1 { JEQ .L[0-9]+ +** CMPX.W &lhi1, &ehi3 { JEQ .L[0-9]+ +** CMPX.W &hi1, &ehi4 { JEQ .L[0-9]+ +** CMPX.W &ehi5, &lhi2 { JEQ .L[0-9]+ +** CMPX.W &ehi6, &hi2 { JEQ .L[0-9]+ +** CMP.W &lhi4, &lhi3 { JEQ .L[0-9]+ +** CMP.W &hi3, &lhi5 { JEQ .L[0-9]+ +** CMP.W &hi5, &hi4 { JEQ .L[0-9]+ +** CMP.W &lhi6, &hi6 { JNE .L[0-9]+ +** ... +*/ +/* +** cbranchhi4_real: { target msp430_region_not_lower } +** ... +** CMPX.W &ehi2, &ehi1 { JEQ .L[0-9]+ +** CMPX.W &lhi1, &ehi3 { JEQ .L[0-9]+ +** CMPX.W &hi1, &ehi4 { JEQ .L[0-9]+ +** CMPX.W &ehi5, &lhi2 { JEQ .L[0-9]+ +** CMPX.W &ehi6, &hi2 { JEQ .L[0-9]+ +** CMP.W &lhi4, &lhi3 { JEQ .L[0-9]+ +** CMPX.W &hi3, &lhi5 { JEQ .L[0-9]+ +** CMPX.W &hi5, &hi4 { JEQ .L[0-9]+ +** CMPX.W &lhi6, &hi6 { JNE .L[0-9]+ +** ... +*/ +void +cbranchhi4_real (void) +{ + CBRANCH_INSN(hi) +} + +/* There is no specific cbranchsi4_real pattern defined for msp430, but we + check this is synthesized correctly anyway. */ +/* +** cbranchsi4_real: { target msp430_region_lower } +** ... +** CMPX.W &esi2, &esi1 { JEQ .L[0-9]+ +** CMPX.W &lsi1, &esi3 { JEQ .L[0-9]+ +** CMPX.W &si1, &esi4 { JEQ .L[0-9]+ +** CMPX.W &esi5, &lsi2 { JEQ .L[0-9]+ +** CMPX.W &esi6, &si2 { JEQ .L[0-9]+ +** CMP.W &lsi4, &lsi3 { JEQ .L[0-9]+ +** CMP.W &si3, &lsi5 { JEQ .L[0-9]+ +** CMP.W &si5, &si4 { JEQ .L[0-9]+ +** CMP.W &lsi6, &si6 { JNE .L[0-9]+ +** CMP.W &lsi6\+2, &si6\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &esi2\+2, &esi1\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &lsi1\+2, &esi3\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &si1\+2, &esi4\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &esi5\+2, &lsi2\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &esi6\+2, &si2\+2 { JNE .L[0-9]+ +** ... +** CMP.W &lsi4\+2, &lsi3\+2 { JNE .L[0-9]+ +** ... +** CMP.W &si3\+2, &lsi5\+2 { JNE .L[0-9]+ +** ... +** CMP.W &si5\+2, &si4\+2 { JNE .L[0-9]+ +** ... +*/ +/* +** cbranchsi4_real: { target msp430_region_not_lower } +** ... +** CMPX.W &esi2, &esi1 { JEQ .L[0-9]+ +** CMPX.W &lsi1, &esi3 { JEQ .L[0-9]+ +** CMPX.W &si1, &esi4 { JEQ .L[0-9]+ +** CMPX.W &esi5, &lsi2 { JEQ .L[0-9]+ +** CMPX.W &esi6, &si2 { JEQ .L[0-9]+ +** CMP.W &lsi4, &lsi3 { JEQ .L[0-9]+ +** CMPX.W &si3, &lsi5 { JEQ .L[0-9]+ +** CMPX.W &si5, &si4 { JEQ .L[0-9]+ +** CMPX.W &lsi6, &si6 { JNE .L[0-9]+ +** CMPX.W &lsi6\+2, &si6\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &esi2\+2, &esi1\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &lsi1\+2, &esi3\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &si1\+2, &esi4\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &esi5\+2, &lsi2\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &esi6\+2, &si2\+2 { JNE .L[0-9]+ +** ... +** CMP.W &lsi4\+2, &lsi3\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &si3\+2, &lsi5\+2 { JNE .L[0-9]+ +** ... +** CMPX.W &si5\+2, &si4\+2 { JNE .L[0-9]+ +** ... +*/ +void +cbranchsi4_real (void) +{ + CBRANCH_INSN(si) +} + +#define CBRANCH_REVERSE_INSN(MODE) \ + if (E_VAR(MODE,1) > E_VAR(MODE,2)) \ + DO1 \ + else if (E_VAR(MODE,3) > L_VAR(MODE,1)) \ + DO2 \ + else if (E_VAR(MODE,4) > VAR(MODE,1)) \ + DO1 \ + else if (L_VAR(MODE,2) > E_VAR(MODE,5)) \ + DO2 \ + else if (VAR(MODE,2) > E_VAR(MODE,6)) \ + DO1 \ + else if (L_VAR(MODE,3) > L_VAR(MODE,4)) \ + DO2 \ + else if (L_VAR(MODE,5) > VAR(MODE,3)) \ + DO2 \ + else if (VAR(MODE,4) > VAR(MODE,5)) \ + DO1 \ + else if (VAR(MODE,6) > L_VAR(MODE,6)) \ + DO2 + +/* +** cbranchqi4_reversed: { target msp430_region_lower } +** ... +** CMPX.B &eqi1, &eqi2 { JLO .L[0-9]+ +** CMPX.B &eqi3, &lqi1 { JLO .L[0-9]+ +** CMPX.B &eqi4, &qi1 { JLO .L[0-9]+ +** CMPX.B &lqi2, &eqi5 { JLO .L[0-9]+ +** CMPX.B &qi2, &eqi6 { JLO .L[0-9]+ +** CMP.B &lqi3, &lqi4 { JLO .L[0-9]+ +** CMP.B &lqi5, &qi3 { JLO .L[0-9]+ +** CMP.B &qi4, &qi5 { JLO .L[0-9]+ +** CMP.B &qi6, &lqi6 { JHS .L[0-9]+ +** ... +*/ +/* +** cbranchqi4_reversed: { target msp430_region_not_lower } +** ... +** CMPX.B &eqi1, &eqi2 { JLO .L[0-9]+ +** CMPX.B &eqi3, &lqi1 { JLO .L[0-9]+ +** CMPX.B &eqi4, &qi1 { JLO .L[0-9]+ +** CMPX.B &lqi2, &eqi5 { JLO .L[0-9]+ +** CMPX.B &qi2, &eqi6 { JLO .L[0-9]+ +** CMP.B &lqi3, &lqi4 { JLO .L[0-9]+ +** CMPX.B &lqi5, &qi3 { JLO .L[0-9]+ +** CMPX.B &qi4, &qi5 { JLO .L[0-9]+ +** CMPX.B &qi6, &lqi6 { JHS .L[0-9]+ +** ... +*/ +void +cbranchqi4_reversed (void) +{ + CBRANCH_REVERSE_INSN(qi) +} + +/* +** cbranchhi4_reversed: { target msp430_region_lower } +** ... +** CMPX.W &ehi1, &ehi2 { JL .L[0-9]+ +** CMPX.W &ehi3, &lhi1 { JL .L[0-9]+ +** CMPX.W &ehi4, &hi1 { JL .L[0-9]+ +** CMPX.W &lhi2, &ehi5 { JL .L[0-9]+ +** CMPX.W &hi2, &ehi6 { JL .L[0-9]+ +** CMP.W &lhi3, &lhi4 { JL .L[0-9]+ +** CMP.W &lhi5, &hi3 { JL .L[0-9]+ +** CMP.W &hi4, &hi5 { JL .L[0-9]+ +** CMP.W &hi6, &lhi6 { JGE .L[0-9]+ +** ... +*/ +/* +** cbranchhi4_reversed: { target msp430_region_not_lower } +** ... +** CMPX.W &ehi1, &ehi2 { JL .L[0-9]+ +** CMPX.W &ehi3, &lhi1 { JL .L[0-9]+ +** CMPX.W &ehi4, &hi1 { JL .L[0-9]+ +** CMPX.W &lhi2, &ehi5 { JL .L[0-9]+ +** CMPX.W &hi2, &ehi6 { JL .L[0-9]+ +** CMP.W &lhi3, &lhi4 { JL .L[0-9]+ +** CMPX.W &lhi5, &hi3 { JL .L[0-9]+ +** CMPX.W &hi4, &hi5 { JL .L[0-9]+ +** CMPX.W &hi6, &lhi6 { JGE .L[0-9]+ +** ... +*/ +void +cbranchhi4_reversed (void) +{ + CBRANCH_REVERSE_INSN(hi) +} + +/* There is no specific cbranchsi4_reversed pattern defined for msp430, but + we check this is synthesized correctly anyway. + This output assembly for this one is quite long and convoluted so we only + check part of it. */ +/* +** cbranchsi4_reversed: { target msp430_region_lower } +** ... +** CMPX.W &esi1\+2, &esi2\+2 { JL .L[0-9]+ +** CMPX.W &esi2\+2, &esi1\+2 { JEQ .L[0-9]+ +** CMPX.W &esi3\+2, &lsi1\+2 { JL .L[0-9]+ +** CMPX.W &lsi1\+2, &esi3\+2 { JEQ .L[0-9]+ +** CMPX.W &esi4\+2, &si1\+2 { JL .L[0-9]+ +** CMPX.W &si1\+2, &esi4\+2 { JEQ .L[0-9]+ +** CMPX.W &lsi2\+2, &esi5\+2 { JL .L[0-9]+ +** CMPX.W &esi5\+2, &lsi2\+2 { JEQ .L[0-9]+ +** CMPX.W &si2\+2, &esi6\+2 { JL .L[0-9]+ +** CMPX.W &esi6\+2, &si2\+2 { JEQ .L[0-9]+ +** CMP.W &lsi3\+2, &lsi4\+2 { JL .L[0-9]+ +** CMP.W &lsi4\+2, &lsi3\+2 { JEQ .L[0-9]+ +** CMP.W &lsi5\+2, &si3\+2 { JL .L[0-9]+ +** CMP.W &si3\+2, &lsi5\+2 { JEQ .L[0-9]+ +** CMP.W &si4\+2, &si5\+2 { JL .L[0-9]+ +** CMP.W &si5\+2, &si4\+2 { JEQ .L[0-9]+ +** CMP.W &si6\+2, &lsi6\+2 { JL .L[0-9]+ +** CMP.W &lsi6\+2, &si6\+2 { JNE .L[0-9]+ +** ... +*/ +/* +** cbranchsi4_reversed: { target msp430_region_not_lower } +** ... +** CMPX.W &esi1\+2, &esi2\+2 { JL .L[0-9]+ +** CMPX.W &esi2\+2, &esi1\+2 { JEQ .L[0-9]+ +** CMPX.W &esi3\+2, &lsi1\+2 { JL .L[0-9]+ +** CMPX.W &lsi1\+2, &esi3\+2 { JEQ .L[0-9]+ +** CMPX.W &esi4\+2, &si1\+2 { JL .L[0-9]+ +** CMPX.W &si1\+2, &esi4\+2 { JEQ .L[0-9]+ +** CMPX.W &lsi2\+2, &esi5\+2 { JL .L[0-9]+ +** CMPX.W &esi5\+2, &lsi2\+2 { JEQ .L[0-9]+ +** CMPX.W &si2\+2, &esi6\+2 { JL .L[0-9]+ +** CMPX.W &esi6\+2, &si2\+2 { JEQ .L[0-9]+ +** CMP.W &lsi3\+2, &lsi4\+2 { JL .L[0-9]+ +** CMP.W &lsi4\+2, &lsi3\+2 { JEQ .L[0-9]+ +** CMPX.W &lsi5\+2, &si3\+2 { JL .L[0-9]+ +** CMPX.W &si3\+2, &lsi5\+2 { JEQ .L[0-9]+ +** CMPX.W &si4\+2, &si5\+2 { JL .L[0-9]+ +** CMPX.W &si5\+2, &si4\+2 { JEQ .L[0-9]+ +** CMPX.W &si6\+2, &lsi6\+2 { JL .L[0-9]+ +** CMPX.W &lsi6\+2, &si6\+2 { JNE .L[0-9]+ +** ... +*/ +void +cbranchsi4_reversed (void) +{ + CBRANCH_REVERSE_INSN(si) +} + +#define BITBRANCH_NE_INSN(MODE) \ + if (E_VAR(MODE,1) & E_VAR(MODE,2)) \ + DO1 \ + else if (E_VAR(MODE,3) & L_VAR(MODE,1)) \ + DO2 \ + else if (E_VAR(MODE,4) & VAR(MODE,1)) \ + DO1 \ + else if (L_VAR(MODE,2) & E_VAR(MODE,5)) \ + DO2 \ + else if (VAR(MODE,2) & E_VAR(MODE,6)) \ + DO1 \ + else if (L_VAR(MODE,3) & L_VAR(MODE,4)) \ + DO2 \ + else if (L_VAR(MODE,5) & VAR(MODE,3)) \ + DO2 \ + else if (VAR(MODE,4) & VAR(MODE,5)) \ + DO1 \ + else if (VAR(MODE,6) & L_VAR(MODE,6)) \ + DO2 +/* +** bitbranchqi4: { target msp430_region_lower } +** ... +** BITX.B &eqi2, &eqi1 { JNE .L[0-9]+ +** BITX.B &lqi1, &eqi3 { JNE .L[0-9]+ +** BITX.B &qi1, &eqi4 { JNE .L[0-9]+ +** BITX.B &eqi5, &lqi2 { JNE .L[0-9]+ +** BITX.B &eqi6, &qi2 { JNE .L[0-9]+ +** BIT.B &lqi4, &lqi3 { JNE .L[0-9]+ +** BIT.B &qi3, &lqi5 { JNE .L[0-9]+ +** BIT.B &qi5, &qi4 { JNE .L[0-9]+ +** BIT.B &lqi6, &qi6 { JEQ .L[0-9]+ +** ... +*/ +/* +** bitbranchqi4: { target msp430_region_not_lower } +** ... +** BITX.B &eqi2, &eqi1 { JNE .L[0-9]+ +** BITX.B &lqi1, &eqi3 { JNE .L[0-9]+ +** BITX.B &qi1, &eqi4 { JNE .L[0-9]+ +** BITX.B &eqi5, &lqi2 { JNE .L[0-9]+ +** BITX.B &eqi6, &qi2 { JNE .L[0-9]+ +** BIT.B &lqi4, &lqi3 { JNE .L[0-9]+ +** BITX.B &qi3, &lqi5 { JNE .L[0-9]+ +** BITX.B &qi5, &qi4 { JNE .L[0-9]+ +** BITX.B &lqi6, &qi6 { JEQ .L[0-9]+ +** ... +*/ +void +bitbranchqi4 (void) +{ + BITBRANCH_NE_INSN(qi) +} + +/* +** bitbranchhi4: { target msp430_region_lower } +** ... +** BITX.W &ehi2, &ehi1 { JNE .L[0-9]+ +** BITX.W &lhi1, &ehi3 { JNE .L[0-9]+ +** BITX.W &hi1, &ehi4 { JNE .L[0-9]+ +** BITX.W &ehi5, &lhi2 { JNE .L[0-9]+ +** BITX.W &ehi6, &hi2 { JNE .L[0-9]+ +** BIT.W &lhi4, &lhi3 { JNE .L[0-9]+ +** BIT.W &hi3, &lhi5 { JNE .L[0-9]+ +** BIT.W &hi5, &hi4 { JNE .L[0-9]+ +** BIT.W &lhi6, &hi6 { JEQ .L[0-9]+ +** ... +*/ +/* +** bitbranchhi4: { target msp430_region_not_lower } +** ... +** BITX.W &ehi2, &ehi1 { JNE .L[0-9]+ +** BITX.W &lhi1, &ehi3 { JNE .L[0-9]+ +** BITX.W &hi1, &ehi4 { JNE .L[0-9]+ +** BITX.W &ehi5, &lhi2 { JNE .L[0-9]+ +** BITX.W &ehi6, &hi2 { JNE .L[0-9]+ +** BIT.W &lhi4, &lhi3 { JNE .L[0-9]+ +** BITX.W &hi3, &lhi5 { JNE .L[0-9]+ +** BITX.W &hi5, &hi4 { JNE .L[0-9]+ +** BITX.W &lhi6, &hi6 { JEQ .L[0-9]+ +** ... +*/ +void +bitbranchhi4 (void) +{ + BITBRANCH_NE_INSN(hi) +} + +/* +** bitbranchpsi4: +** ... +** BITX.A &epsi2, &epsi1 { JNE .L[0-9]+ +** BITX.A &lpsi1, &epsi3 { JNE .L[0-9]+ +** BITX.A &psi1, &epsi4 { JNE .L[0-9]+ +** BITX.A &epsi5, &lpsi2 { JNE .L[0-9]+ +** BITX.A &epsi6, &psi2 { JNE .L[0-9]+ +** BITX.A &lpsi4, &lpsi3 { JNE .L[0-9]+ +** BITX.A &psi3, &lpsi5 { JNE .L[0-9]+ +** BITX.A &psi5, &psi4 { JNE .L[0-9]+ +** BITX.A &lpsi6, &psi6 { JEQ .L[0-9]+ +** ... +*/ +void +bitbranchpsi4 (void) +{ + BITBRANCH_NE_INSN(psi) +} + + +/* "bitbranch" using SImode operands is omitted since the resulting assembly + uses many temporary registers to perform the bitwise and comparison + operations. */ diff --git a/gcc/testsuite/gcc.target/msp430/data-attributes-2.c b/gcc/testsuite/gcc.target/msp430/data-attributes-2.c index d049194..6113e99 100644 --- a/gcc/testsuite/gcc.target/msp430/data-attributes-2.c +++ b/gcc/testsuite/gcc.target/msp430/data-attributes-2.c @@ -27,7 +27,7 @@ int __attribute__((lower,upper)) lu = 20; /* { dg-warning "ignoring attribute 'u int __attribute__((lower,either)) le = 20; /* { dg-warning "ignoring attribute 'either' because it conflicts with attribute 'lower'" } */ int __attribute__((lower,persistent)) lp = 20; /* { dg-warning "ignoring attribute 'persistent' because it conflicts with attribute 'lower'" } */ int __attribute__((lower,noinit)) ln; /* { dg-warning "ignoring attribute 'noinit' because it conflicts with attribute 'lower'" } */ -int __attribute__((lower,section(".data.foo"))) ls = 30; /* { dg-warning "ignoring attribute 'section' because it conflicts with attribute 'lower'" } */ +int __attribute__((lower,section(".data.foo"))) ls = 30; int __attribute__((upper)) u = 20; int __attribute__((upper,lower)) ul = 20; /* { dg-warning "ignoring attribute 'lower' because it conflicts with attribute 'upper'" } */ @@ -46,6 +46,6 @@ int __attribute__((either,section(".data.foo"))) es = 30; /* { dg-warning "ignor int __attribute__((section(".data.foo"))) s = 20; int __attribute__((section(".data.foo"),noinit)) sn; /* { dg-warning "ignoring attribute 'noinit' because it conflicts with attribute 'section'" } */ int __attribute__((section(".data.foo"),persistent)) sp = 20; /* { dg-warning "ignoring attribute 'persistent' because it conflicts with attribute 'section'" } */ -int __attribute__((section(".data.foo"),lower)) sl = 2; /* { dg-warning "ignoring attribute 'lower' because it conflicts with attribute 'section'" } */ +int __attribute__((section(".data.foo"),lower)) sl = 2; int __attribute__((section(".data.foo"),upper)) su = 20; /* { dg-warning "ignoring attribute 'upper' because it conflicts with attribute 'section'" } */ int __attribute__((section(".data.foo"),either)) se = 2; /* { dg-warning "ignoring attribute 'either' because it conflicts with attribute 'section'" } */ diff --git a/gcc/testsuite/gcc.target/msp430/msp430.exp b/gcc/testsuite/gcc.target/msp430/msp430.exp index b97f4dc..bcc5686 100644 --- a/gcc/testsuite/gcc.target/msp430/msp430.exp +++ b/gcc/testsuite/gcc.target/msp430/msp430.exp @@ -36,6 +36,14 @@ proc check_effective_target_msp430_mlarge_selected { } { return [check-flags [list "" { *-*-* } { "-mlarge" } { "" } ]] } +proc check_effective_target_msp430_region_not_lower { } { + return [check-flags [list "" { *-*-* } { "-mdata-region=none" "-mdata-region=upper" "-mdata-region=either" } { "" } ]] +} + +proc check_effective_target_msp430_region_lower { } { + return [check-flags [list "" { *-*-* } { "*" } { "-mdata-region=none" "-mdata-region=upper" "-mdata-region=either" } ]] +} + proc check_effective_target_msp430_hwmul_not_none { } { return [check-flags [list "" { *-*-* } \ { "-mhwmult=16bit" "-mhwmult=32bit" "-mhwmult=f5series" } { "" } ]] diff --git a/gcc/testsuite/gcc.target/msp430/object-attributes-430.c b/gcc/testsuite/gcc.target/msp430/object-attributes-430.c new file mode 100644 index 0000000..4296be2 --- /dev/null +++ b/gcc/testsuite/gcc.target/msp430/object-attributes-430.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { *-*-* } { "-mcpu=msp430x" "-mlarge" } { "" } } */ +/* { dg-options "-mcpu=msp430" } */ +/* { dg-final { scan-assembler ".mspabi_attribute 4, 1" } } */ +/* { dg-final { scan-assembler ".mspabi_attribute 6, 1" } } */ +/* { dg-final { scan-assembler ".mspabi_attribute 8, 1" } } */ +/* { dg-final { scan-assembler ".gnu_attribute 4, 1" } } */ + +int +main (void) +{ + while (1); + return 0; +} diff --git a/gcc/testsuite/gcc.target/msp430/object-attributes-default.c b/gcc/testsuite/gcc.target/msp430/object-attributes-default.c new file mode 100644 index 0000000..39c1f3e --- /dev/null +++ b/gcc/testsuite/gcc.target/msp430/object-attributes-default.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-final { scan-assembler ".mspabi_attribute 4, 1" { target msp430_430_selected } } } */ +/* { dg-final { scan-assembler ".mspabi_attribute 4, 2" { target msp430_430x_selected } } } */ +/* { dg-final { scan-assembler ".mspabi_attribute 6, 1" { target { ! msp430_mlarge_selected } } } } */ +/* { dg-final { scan-assembler ".mspabi_attribute 8, 1" { target { ! msp430_mlarge_selected } } } } */ +/* { dg-final { scan-assembler ".mspabi_attribute 6, 2" { target msp430_mlarge_selected } } } */ +/* { dg-final { scan-assembler ".mspabi_attribute 8, 2" { target msp430_mlarge_selected } } } */ +/* { dg-final { scan-assembler ".gnu_attribute 4, 1" { target { ! msp430_region_not_lower } } } } */ +/* { dg-final { scan-assembler ".gnu_attribute 4, 2" { target msp430_region_not_lower } } } */ + +int +main (void) +{ + while (1); + return 0; +} diff --git a/gcc/testsuite/gcc.target/msp430/object-attributes-mlarge-any-region.c b/gcc/testsuite/gcc.target/msp430/object-attributes-mlarge-any-region.c new file mode 100644 index 0000000..2aa8bfb --- /dev/null +++ b/gcc/testsuite/gcc.target/msp430/object-attributes-mlarge-any-region.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { *-*-* } { "-mcpu=msp430" "-mdata-region=lower" } { "" } } */ +/* { dg-options "-mlarge -mdata-region=none" } */ +/* { dg-final { scan-assembler ".mspabi_attribute 4, 2" } } */ +/* { dg-final { scan-assembler ".mspabi_attribute 6, 2" } } */ +/* { dg-final { scan-assembler ".mspabi_attribute 8, 2" } } */ +/* { dg-final { scan-assembler ".gnu_attribute 4, 2" } } */ + +int +main (void) +{ + while (1); + return 0; +} diff --git a/gcc/testsuite/gcc.target/msp430/object-attributes-mlarge.c b/gcc/testsuite/gcc.target/msp430/object-attributes-mlarge.c new file mode 100644 index 0000000..06738ea --- /dev/null +++ b/gcc/testsuite/gcc.target/msp430/object-attributes-mlarge.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { *-*-* } { "-mcpu=msp430" } { "" } } */ +/* { dg-options "-mlarge" } */ +/* { dg-final { scan-assembler ".mspabi_attribute 4, 2" } } */ +/* { dg-final { scan-assembler ".mspabi_attribute 6, 2" } } */ +/* { dg-final { scan-assembler ".mspabi_attribute 8, 2" } } */ +/* { dg-final { scan-assembler ".gnu_attribute 4, 1" { target msp430_region_lower } } } */ +/* { dg-final { scan-assembler ".gnu_attribute 4, 2" { target { ! msp430_region_lower } } } } */ + +int +main (void) +{ + while (1); + return 0; +} -- cgit v1.1 From 36d387f2f098d6d1e1e77d19e38f3b6221ccde2b Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Mon, 7 Oct 2019 20:41:17 +0200 Subject: i386-expand.c (ix86_expand_floorceildf_32, [...]): Reorder functions. * config/i386/i386-expand.c (ix86_expand_floorceildf_32, ix86_expand_rounddf_32): Reorder functions. * config/i386/i386-protos.h: Update.. From-SVN: r276668 --- gcc/ChangeLog | 14 ++- gcc/config/i386/i386-expand.c | 220 +++++++++++++++++++++--------------------- gcc/config/i386/i386-protos.h | 6 +- 3 files changed, 124 insertions(+), 116 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 74afcaa..bbdce86 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-07 Uroš Bizjak + + * config/i386/i386-expand.c (ix86_expand_floorceildf_32, + ix86_expand_rounddf_32): Reorder functions. + * config/i386/i386-protos.h: Update.. + 2019-10-07 Jozef Lawrynowicz * config.in: Regenerate. @@ -20,14 +26,14 @@ ".lower" prefix if -m{code,data}-region=lower have been passed. (msp430_output_aligned_decl_common): Emit common symbols when -mdata-region=lower is passed unless TARGET_USE_LOWER_REGION_PREFIX is - set. + set. (TARGET_ASM_FILE_END): Define. (msp430_file_end): New function. (msp430_do_not_relax_short_jumps): Allow relaxation when function will be in the lower region. (msp430_op_not_in_high_mem): New function. (msp430_print_operand): Check "msp430_op_not_in_high_mem" for - the 'X' operand selector. + the 'X' operand selector. Clarify comment for 'x' operand selector. * config/msp430/msp430.h (LINK_SPEC): Propagate -m{code,data}-region to the linker via spec function @@ -74,9 +80,9 @@ (mdata-region=): Likewise. (muse-lower-region-prefix): New option. * config/msp430/t-msp430 (MULTILIB_OPTIONS): Add - mdata-region=none multilib. + mdata-region=none multilib. (MULTILIB_MATCHES): Set mdata-region={upper,either} to match - mdata-region=none multilib. + mdata-region=none multilib. MULTILIB_EXCEPTIONS: Remove. MULTILIB_REQUIRED: Define. * configure: Regenerate. diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c index 5e377d6..6d3d14c 100644 --- a/gcc/config/i386/i386-expand.c +++ b/gcc/config/i386/i386-expand.c @@ -15903,71 +15903,8 @@ ix86_expand_rint (rtx operand0, rtx operand1) emit_move_insn (operand0, res); } -/* Expand SSE2 sequence for computing floor or ceil from OPERAND1 storing - into OPERAND0. */ -void -ix86_expand_floorceildf_32 (rtx operand0, rtx operand1, bool do_floor) -{ - /* C code for the stuff we expand below. - double xa = fabs (x), x2; - if (!isless (xa, TWO52)) - return x; - xa = xa + TWO52 - TWO52; - x2 = copysign (xa, x); - Compensate. Floor: - if (x2 > x) - x2 -= 1; - Compensate. Ceil: - if (x2 < x) - x2 += 1; - if (HONOR_SIGNED_ZEROS (mode)) - x2 = copysign (x2, x); - return x2; - */ - machine_mode mode = GET_MODE (operand0); - rtx xa, TWO52, tmp, one, res, mask; - rtx_code_label *label; - - TWO52 = ix86_gen_TWO52 (mode); - - /* Temporary for holding the result, initialized to the input - operand to ease control flow. */ - res = gen_reg_rtx (mode); - emit_move_insn (res, operand1); - - /* xa = abs (operand1) */ - xa = ix86_expand_sse_fabs (res, &mask); - - /* if (!isless (xa, TWO52)) goto label; */ - label = ix86_expand_sse_compare_and_jump (UNLE, TWO52, xa, false); - - /* xa = xa + TWO52 - TWO52; */ - xa = expand_simple_binop (mode, PLUS, xa, TWO52, NULL_RTX, 0, OPTAB_DIRECT); - xa = expand_simple_binop (mode, MINUS, xa, TWO52, xa, 0, OPTAB_DIRECT); - - /* xa = copysign (xa, operand1) */ - ix86_sse_copysign_to_positive (xa, xa, res, mask); - - /* generate 1.0 */ - one = force_reg (mode, const_double_from_real_value (dconst1, mode)); - - /* Compensate: xa = xa - (xa > operand1 ? 1 : 0) */ - tmp = ix86_expand_sse_compare_mask (UNGT, xa, res, !do_floor); - emit_insn (gen_rtx_SET (tmp, gen_rtx_AND (mode, one, tmp))); - tmp = expand_simple_binop (mode, do_floor ? MINUS : PLUS, - xa, tmp, NULL_RTX, 0, OPTAB_DIRECT); - if (!do_floor && HONOR_SIGNED_ZEROS (mode)) - ix86_sse_copysign_to_positive (tmp, tmp, res, mask); - emit_move_insn (res, tmp); - - emit_label (label); - LABEL_NUSES (label) = 1; - - emit_move_insn (operand0, res); -} - -/* Expand SSE2 sequence for computing floor or ceil from OPERAND1 storing - into OPERAND0. */ +/* Expand SSE2 sequence for computing floor or ceil + from OPERAND1 storing into OPERAND0. */ void ix86_expand_floorceil (rtx operand0, rtx operand1, bool do_floor) { @@ -16027,30 +15964,30 @@ ix86_expand_floorceil (rtx operand0, rtx operand1, bool do_floor) emit_move_insn (operand0, res); } -/* Expand SSE sequence for computing round from OPERAND1 storing - into OPERAND0. Sequence that works without relying on DImode truncation - via cvttsd2siq that is only available on 64bit targets. */ +/* Expand SSE2 sequence for computing floor or ceil from OPERAND1 storing + into OPERAND0 without relying on DImode truncation via cvttsd2siq + that is only available on 64bit targets. */ void -ix86_expand_rounddf_32 (rtx operand0, rtx operand1) +ix86_expand_floorceildf_32 (rtx operand0, rtx operand1, bool do_floor) { /* C code for the stuff we expand below. - double xa = fabs (x), xa2, x2; + double xa = fabs (x), x2; if (!isless (xa, TWO52)) return x; - Using the absolute value and copying back sign makes - -0.0 -> -0.0 correct. - xa2 = xa + TWO52 - TWO52; - Compensate. - dxa = xa2 - xa; - if (dxa <= -0.5) - xa2 += 1; - else if (dxa > 0.5) - xa2 -= 1; - x2 = copysign (xa2, x); - return x2; + xa = xa + TWO52 - TWO52; + x2 = copysign (xa, x); + Compensate. Floor: + if (x2 > x) + x2 -= 1; + Compensate. Ceil: + if (x2 < x) + x2 += 1; + if (HONOR_SIGNED_ZEROS (mode)) + x2 = copysign (x2, x); + return x2; */ machine_mode mode = GET_MODE (operand0); - rtx xa, xa2, dxa, TWO52, tmp, half, mhalf, one, res, mask; + rtx xa, TWO52, tmp, one, res, mask; rtx_code_label *label; TWO52 = ix86_gen_TWO52 (mode); @@ -16066,31 +16003,24 @@ ix86_expand_rounddf_32 (rtx operand0, rtx operand1) /* if (!isless (xa, TWO52)) goto label; */ label = ix86_expand_sse_compare_and_jump (UNLE, TWO52, xa, false); - /* xa2 = xa + TWO52 - TWO52; */ - xa2 = expand_simple_binop (mode, PLUS, xa, TWO52, NULL_RTX, 0, OPTAB_DIRECT); - xa2 = expand_simple_binop (mode, MINUS, xa2, TWO52, xa2, 0, OPTAB_DIRECT); - - /* dxa = xa2 - xa; */ - dxa = expand_simple_binop (mode, MINUS, xa2, xa, NULL_RTX, 0, OPTAB_DIRECT); + /* xa = xa + TWO52 - TWO52; */ + xa = expand_simple_binop (mode, PLUS, xa, TWO52, NULL_RTX, 0, OPTAB_DIRECT); + xa = expand_simple_binop (mode, MINUS, xa, TWO52, xa, 0, OPTAB_DIRECT); - /* generate 0.5, 1.0 and -0.5 */ - half = force_reg (mode, const_double_from_real_value (dconsthalf, mode)); - one = expand_simple_binop (mode, PLUS, half, half, NULL_RTX, 0, OPTAB_DIRECT); - mhalf = expand_simple_binop (mode, MINUS, half, one, NULL_RTX, - 0, OPTAB_DIRECT); + /* xa = copysign (xa, operand1) */ + ix86_sse_copysign_to_positive (xa, xa, res, mask); - /* Compensate. */ - /* xa2 = xa2 - (dxa > 0.5 ? 1 : 0) */ - tmp = ix86_expand_sse_compare_mask (UNGT, dxa, half, false); - emit_insn (gen_rtx_SET (tmp, gen_rtx_AND (mode, tmp, one))); - xa2 = expand_simple_binop (mode, MINUS, xa2, tmp, NULL_RTX, 0, OPTAB_DIRECT); - /* xa2 = xa2 + (dxa <= -0.5 ? 1 : 0) */ - tmp = ix86_expand_sse_compare_mask (UNGE, mhalf, dxa, false); - emit_insn (gen_rtx_SET (tmp, gen_rtx_AND (mode, tmp, one))); - xa2 = expand_simple_binop (mode, PLUS, xa2, tmp, NULL_RTX, 0, OPTAB_DIRECT); + /* generate 1.0 */ + one = force_reg (mode, const_double_from_real_value (dconst1, mode)); - /* res = copysign (xa2, operand1) */ - ix86_sse_copysign_to_positive (res, xa2, force_reg (mode, operand1), mask); + /* Compensate: xa = xa - (xa > operand1 ? 1 : 0) */ + tmp = ix86_expand_sse_compare_mask (UNGT, xa, res, !do_floor); + emit_insn (gen_rtx_SET (tmp, gen_rtx_AND (mode, one, tmp))); + tmp = expand_simple_binop (mode, do_floor ? MINUS : PLUS, + xa, tmp, NULL_RTX, 0, OPTAB_DIRECT); + if (!do_floor && HONOR_SIGNED_ZEROS (mode)) + ix86_sse_copysign_to_positive (tmp, tmp, res, mask); + emit_move_insn (res, tmp); emit_label (label); LABEL_NUSES (label) = 1; @@ -16098,8 +16028,8 @@ ix86_expand_rounddf_32 (rtx operand0, rtx operand1) emit_move_insn (operand0, res); } -/* Expand SSE sequence for computing trunc from OPERAND1 storing - into OPERAND0. */ +/* Expand SSE sequence for computing trunc + from OPERAND1 storing into OPERAND0. */ void ix86_expand_trunc (rtx operand0, rtx operand1) { @@ -16144,7 +16074,8 @@ ix86_expand_trunc (rtx operand0, rtx operand1) } /* Expand SSE sequence for computing trunc from OPERAND1 storing - into OPERAND0. */ + into OPERAND0 without relying on DImode truncation via cvttsd2siq + that is only available on 64bit targets. */ void ix86_expand_truncdf_32 (rtx operand0, rtx operand1) { @@ -16201,8 +16132,8 @@ ix86_expand_truncdf_32 (rtx operand0, rtx operand1) emit_move_insn (operand0, res); } -/* Expand SSE sequence for computing round from OPERAND1 storing - into OPERAND0. */ +/* Expand SSE sequence for computing round + from OPERAND1 storing into OPERAND0. */ void ix86_expand_round (rtx operand0, rtx operand1) { @@ -16251,6 +16182,77 @@ ix86_expand_round (rtx operand0, rtx operand1) emit_move_insn (operand0, res); } +/* Expand SSE sequence for computing round from OPERAND1 storing + into OPERAND0 without relying on DImode truncation via cvttsd2siq + that is only available on 64bit targets. */ +void +ix86_expand_rounddf_32 (rtx operand0, rtx operand1) +{ + /* C code for the stuff we expand below. + double xa = fabs (x), xa2, x2; + if (!isless (xa, TWO52)) + return x; + Using the absolute value and copying back sign makes + -0.0 -> -0.0 correct. + xa2 = xa + TWO52 - TWO52; + Compensate. + dxa = xa2 - xa; + if (dxa <= -0.5) + xa2 += 1; + else if (dxa > 0.5) + xa2 -= 1; + x2 = copysign (xa2, x); + return x2; + */ + machine_mode mode = GET_MODE (operand0); + rtx xa, xa2, dxa, TWO52, tmp, half, mhalf, one, res, mask; + rtx_code_label *label; + + TWO52 = ix86_gen_TWO52 (mode); + + /* Temporary for holding the result, initialized to the input + operand to ease control flow. */ + res = gen_reg_rtx (mode); + emit_move_insn (res, operand1); + + /* xa = abs (operand1) */ + xa = ix86_expand_sse_fabs (res, &mask); + + /* if (!isless (xa, TWO52)) goto label; */ + label = ix86_expand_sse_compare_and_jump (UNLE, TWO52, xa, false); + + /* xa2 = xa + TWO52 - TWO52; */ + xa2 = expand_simple_binop (mode, PLUS, xa, TWO52, NULL_RTX, 0, OPTAB_DIRECT); + xa2 = expand_simple_binop (mode, MINUS, xa2, TWO52, xa2, 0, OPTAB_DIRECT); + + /* dxa = xa2 - xa; */ + dxa = expand_simple_binop (mode, MINUS, xa2, xa, NULL_RTX, 0, OPTAB_DIRECT); + + /* generate 0.5, 1.0 and -0.5 */ + half = force_reg (mode, const_double_from_real_value (dconsthalf, mode)); + one = expand_simple_binop (mode, PLUS, half, half, NULL_RTX, 0, OPTAB_DIRECT); + mhalf = expand_simple_binop (mode, MINUS, half, one, NULL_RTX, + 0, OPTAB_DIRECT); + + /* Compensate. */ + /* xa2 = xa2 - (dxa > 0.5 ? 1 : 0) */ + tmp = ix86_expand_sse_compare_mask (UNGT, dxa, half, false); + emit_insn (gen_rtx_SET (tmp, gen_rtx_AND (mode, tmp, one))); + xa2 = expand_simple_binop (mode, MINUS, xa2, tmp, NULL_RTX, 0, OPTAB_DIRECT); + /* xa2 = xa2 + (dxa <= -0.5 ? 1 : 0) */ + tmp = ix86_expand_sse_compare_mask (UNGE, mhalf, dxa, false); + emit_insn (gen_rtx_SET (tmp, gen_rtx_AND (mode, tmp, one))); + xa2 = expand_simple_binop (mode, PLUS, xa2, tmp, NULL_RTX, 0, OPTAB_DIRECT); + + /* res = copysign (xa2, operand1) */ + ix86_sse_copysign_to_positive (res, xa2, force_reg (mode, operand1), mask); + + emit_label (label); + LABEL_NUSES (label) = 1; + + emit_move_insn (operand0, res); +} + /* Expand SSE sequence for computing round from OP1 storing into OP0 using sse4 round insn. */ void diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index 4d6e76d..c07dfe5 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -193,11 +193,11 @@ extern void ix86_expand_lfloorceil (rtx, rtx, bool); extern void ix86_expand_rint (rtx, rtx); extern void ix86_expand_floorceil (rtx, rtx, bool); extern void ix86_expand_floorceildf_32 (rtx, rtx, bool); -extern void ix86_expand_round_sse4 (rtx, rtx); -extern void ix86_expand_round (rtx, rtx); -extern void ix86_expand_rounddf_32 (rtx, rtx); extern void ix86_expand_trunc (rtx, rtx); extern void ix86_expand_truncdf_32 (rtx, rtx); +extern void ix86_expand_round (rtx, rtx); +extern void ix86_expand_rounddf_32 (rtx, rtx); +extern void ix86_expand_round_sse4 (rtx, rtx); extern void ix86_expand_vecop_qihi (enum rtx_code, rtx, rtx, rtx); -- cgit v1.1 From 53f450825dd09f95eb7c57677f1803371c57763a Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 7 Oct 2019 20:05:30 +0000 Subject: msp430-protos.h (msp430_split_addsi): New prototype. 2019-10-07 Jozef Lawrynowicz * config/msp430/msp430-protos.h (msp430_split_addsi): New prototype. * config/msp430/msp430.c (msp430_split_addsi): New. * config/msp430/msp430.md: Call msp430_split_addsi () instead of using a block of C code for splitting addsi. From-SVN: r276670 --- gcc/ChangeLog | 7 +++++++ gcc/config/msp430/msp430-protos.h | 1 + gcc/config/msp430/msp430.c | 23 +++++++++++++++++++++++ gcc/config/msp430/msp430.md | 20 +++----------------- 4 files changed, 34 insertions(+), 17 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bbdce86..91ebb5a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-10-07 Jozef Lawrynowicz + + * config/msp430/msp430-protos.h (msp430_split_addsi): New prototype. + * config/msp430/msp430.c (msp430_split_addsi): New. + * config/msp430/msp430.md: Call msp430_split_addsi () instead of using + a block of C code for splitting addsi. + 2019-10-07 Uroš Bizjak * config/i386/i386-expand.c (ix86_expand_floorceildf_32, diff --git a/gcc/config/msp430/msp430-protos.h b/gcc/config/msp430/msp430-protos.h index 1c1757f..37ca482 100644 --- a/gcc/config/msp430/msp430-protos.h +++ b/gcc/config/msp430/msp430-protos.h @@ -44,6 +44,7 @@ void msp430_output_labelref (FILE *, const char *); void msp430_register_pragmas (void); rtx msp430_return_addr_rtx (int); void msp430_split_movsi (rtx *); +int msp430_split_addsi (rtx *); void msp430_start_function (FILE *, const char *, tree); rtx msp430_subreg (machine_mode, rtx, machine_mode, int); bool msp430_use_f5_series_hwmult (void); diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index 354b4dd..add19bd 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -2841,6 +2841,29 @@ msp430_subreg (machine_mode mode, rtx r, machine_mode omode, int byte) return rv; } +int +msp430_split_addsi (rtx *operands) +{ + operands[3] = msp430_subreg (HImode, operands[0], SImode, 0); + operands[4] = msp430_subreg (HImode, operands[1], SImode, 0); + operands[5] = msp430_subreg (HImode, operands[2], SImode, 0); + operands[6] = msp430_subreg (HImode, operands[0], SImode, 2); + operands[7] = msp430_subreg (HImode, operands[1], SImode, 2); + operands[8] = msp430_subreg (HImode, operands[2], SImode, 2); + + /* BZ 64160: Do not use this splitter when the dest partially overlaps the + source. */ + if (reg_overlap_mentioned_p (operands[3], operands[7]) + || reg_overlap_mentioned_p (operands[3], operands[8])) + return 1; + + if (GET_CODE (operands[5]) == CONST_INT) + operands[9] = GEN_INT (INTVAL (operands[5]) & 0xffff); + else + operands[9] = gen_rtx_ZERO_EXTEND (SImode, operands[5]); + return 0; +} + /* Called by movsi_x to generate the HImode operands. */ void msp430_split_movsi (rtx *operands) diff --git a/gcc/config/msp430/msp430.md b/gcc/config/msp430/msp430.md index c72f7aa..e1c61f5 100644 --- a/gcc/config/msp430/msp430.md +++ b/gcc/config/msp430/msp430.md @@ -423,23 +423,9 @@ (zero_extend:HI (reg:BI CARRY)))) ] " - operands[3] = msp430_subreg (HImode, operands[0], SImode, 0); - operands[4] = msp430_subreg (HImode, operands[1], SImode, 0); - operands[5] = msp430_subreg (HImode, operands[2], SImode, 0); - operands[6] = msp430_subreg (HImode, operands[0], SImode, 2); - operands[7] = msp430_subreg (HImode, operands[1], SImode, 2); - operands[8] = msp430_subreg (HImode, operands[2], SImode, 2); - - /* BZ 64160: Do not use this splitter when the dest partially overlaps the source. */ - if (reg_overlap_mentioned_p (operands[3], operands[7]) - || reg_overlap_mentioned_p (operands[3], operands[8])) - FAIL; - - if (GET_CODE (operands[5]) == CONST_INT) - operands[9] = GEN_INT (INTVAL (operands[5]) & 0xffff); - else - operands[9] = gen_rtx_ZERO_EXTEND (SImode, operands[5]); - " + if (msp430_split_addsi (operands)) + FAIL; + " ) -- cgit v1.1 From 8a8969957a86d1832434a07169976c0b1b9e837c Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 7 Oct 2019 20:09:49 +0000 Subject: msp430.c (msp430_file_end): s/msp_/msp430_/ 2019-10-07 Jozef Lawrynowicz * config/msp430/msp430.c (msp430_file_end): s/msp_/msp430_/ (msp430_expand_epilogue): Likewise. * config/msp430/predicates.md: Likewise. * config/msp430/msp430.md: Likewise. Replace blocks of 8 spaces with tabs. From-SVN: r276671 --- gcc/ChangeLog | 8 +++ gcc/config/msp430/msp430.c | 14 +++-- gcc/config/msp430/msp430.md | 122 ++++++++++++++++++++-------------------- gcc/config/msp430/predicates.md | 10 ++-- 4 files changed, 82 insertions(+), 72 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 91ebb5a..7d8aa95 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2019-10-07 Jozef Lawrynowicz + * config/msp430/msp430.c (msp430_file_end): s/msp_/msp430_/ + (msp430_expand_epilogue): Likewise. + * config/msp430/predicates.md: Likewise. + * config/msp430/msp430.md: Likewise. + Replace blocks of 8 spaces with tabs. + +2019-10-07 Jozef Lawrynowicz + * config/msp430/msp430-protos.h (msp430_split_addsi): New prototype. * config/msp430/msp430.c (msp430_split_addsi): New. * config/msp430/msp430.md: Call msp430_split_addsi () instead of using diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index add19bd..ae763fa 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -83,7 +83,7 @@ struct GTY(()) machine_function }; /* This is our init_machine_status, as set in - msp_option_override. */ + msp430_option_override. */ static struct machine_function * msp430_init_machine_status (void) { @@ -2119,18 +2119,20 @@ msp430_file_end (void) construct a .MSP430.attributes section based on the options it is invoked with. The values it reads from these directives are used for validating those options. */ - const char *msp_attr = ".mspabi_attribute"; + const char *msp430_attr = ".mspabi_attribute"; const char *gnu_attr = ".gnu_attribute"; /* Emit .mspabi_attribute directive for OFBA_MSPABI_Tag_ISA. */ - fprintf (asm_out_file, "\t%s %d, %d\n", msp_attr, OFBA_MSPABI_Tag_ISA, + fprintf (asm_out_file, "\t%s %d, %d\n", msp430_attr, OFBA_MSPABI_Tag_ISA, msp430x ? OFBA_MSPABI_Val_ISA_MSP430X : OFBA_MSPABI_Val_ISA_MSP430); /* Emit .mspabi_attribute directive for OFBA_MSPABI_Tag_Code_Model. */ - fprintf (asm_out_file, "\t%s %d, %d\n", msp_attr, OFBA_MSPABI_Tag_Code_Model, + fprintf (asm_out_file, "\t%s %d, %d\n", msp430_attr, + OFBA_MSPABI_Tag_Code_Model, TARGET_LARGE ? OFBA_MSPABI_Val_Model_Large : OFBA_MSPABI_Val_Model_Small); /* Emit .mspabi_attribute directive for OFBA_MSPABI_Tag_Data_Model. */ - fprintf (asm_out_file, "\t%s %d, %d\n", msp_attr, OFBA_MSPABI_Tag_Data_Model, + fprintf (asm_out_file, "\t%s %d, %d\n", msp430_attr, + OFBA_MSPABI_Tag_Data_Model, TARGET_LARGE ? OFBA_MSPABI_Val_Model_Large : OFBA_MSPABI_Val_Model_Small); #ifdef HAVE_AS_MSPABI_ATTRIBUTE @@ -2604,7 +2606,7 @@ msp430_expand_epilogue (int is_eh) else if (is_reentrant_func ()) emit_insn (gen_enable_interrupts ()); - emit_jump_insn (gen_msp_return ()); + emit_jump_insn (gen_msp430_return ()); } /* Implements EH_RETURN_STACKADJ_RTX. Saved and used later in diff --git a/gcc/config/msp430/msp430.md b/gcc/config/msp430/msp430.md index e1c61f5..ebd9c85 100644 --- a/gcc/config/msp430/msp430.md +++ b/gcc/config/msp430/msp430.md @@ -183,15 +183,15 @@ ) (define_insn "movqi_topbyte" - [(set (match_operand:QI 0 "msp_nonimmediate_operand" "=r") - (subreg:QI (match_operand:PSI 1 "msp_general_operand" "r") 2))] + [(set (match_operand:QI 0 "msp430_nonimmediate_operand" "=r") + (subreg:QI (match_operand:PSI 1 "msp430_general_operand" "r") 2))] "msp430x" "PUSHM.A\t#1,%1 { POPM.W\t#1,%0 { POPM.W\t#1,%0" ) (define_insn "movqi" - [(set (match_operand:QI 0 "msp_nonimmediate_operand" "=rYsYx,rm") - (match_operand:QI 1 "msp_general_operand" "riYsYx,rmi"))] + [(set (match_operand:QI 0 "msp430_nonimmediate_operand" "=rYsYx,rm") + (match_operand:QI 1 "msp430_general_operand" "riYsYx,rmi"))] "" "@ MOV.B\t%1, %0 @@ -199,8 +199,8 @@ ) (define_insn "movhi" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=r,rYsYx,rm") - (match_operand:HI 1 "msp_general_operand" "N,riYsYx,rmi"))] + [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=r,rYsYx,rm") + (match_operand:HI 1 "msp430_general_operand" "N,riYsYx,rmi"))] "" "@ MOV.B\t%1, %0 @@ -243,8 +243,8 @@ ;; FIXME: Some MOVX.A cases can be done with MOVA, this is only a few of them. (define_insn "movpsi" - [(set (match_operand:PSI 0 "msp_nonimmediate_operand" "=r,r,r,Ya,rm") - (match_operand:PSI 1 "msp_general_operand" "N,O,riYa,r,rmi"))] + [(set (match_operand:PSI 0 "msp430_nonimmediate_operand" "=r,r,r,Ya,rm") + (match_operand:PSI 1 "msp430_general_operand" "N,O,riYa,r,rmi"))] "" "@ MOV.B\t%1, %0 @@ -279,9 +279,9 @@ ;; Math (define_insn "addpsi3" - [(set (match_operand:PSI 0 "msp_nonimmediate_operand" "=r,rm") - (plus:PSI (match_operand:PSI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:PSI 2 "msp_general_operand" "rLs,rmi")))] + [(set (match_operand:PSI 0 "msp430_nonimmediate_operand" "=r,rm") + (plus:PSI (match_operand:PSI 1 "msp430_nonimmediate_operand" "%0,0") + (match_operand:PSI 2 "msp430_general_operand" "rLs,rmi")))] "" "@ ADDA\t%2, %0 @@ -289,9 +289,9 @@ ) (define_insn "addqi3" - [(set (match_operand:QI 0 "msp_nonimmediate_operand" "=rYsYx,rm") - (plus:QI (match_operand:QI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:QI 2 "msp_general_operand" "riYsYx,rmi")))] + [(set (match_operand:QI 0 "msp430_nonimmediate_operand" "=rYsYx,rm") + (plus:QI (match_operand:QI 1 "msp430_nonimmediate_operand" "%0,0") + (match_operand:QI 2 "msp430_general_operand" "riYsYx,rmi")))] "" "@ ADD.B\t%2, %0 @@ -299,9 +299,9 @@ ) (define_insn "addhi3" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=rYsYx,rm") - (plus:HI (match_operand:HI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:HI 2 "msp_general_operand" "riYsYx,rmi")))] + [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=rYsYx,rm") + (plus:HI (match_operand:HI 1 "msp430_nonimmediate_operand" "%0,0") + (match_operand:HI 2 "msp430_general_operand" "riYsYx,rmi")))] "" "@ ADD.W\t%2, %0 @@ -358,9 +358,9 @@ ; that are not single_set() very well. (define_insn "addhi3_cy" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=rYsYx,rm") - (plus:HI (match_operand:HI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:HI 2 "msp_nonimmediate_operand" "rYsYxi,rm"))) + [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=rYsYx,rm") + (plus:HI (match_operand:HI 1 "msp430_nonimmediate_operand" "%0,0") + (match_operand:HI 2 "msp430_nonimmediate_operand" "rYsYxi,rm"))) (set (reg:BI CARRY) (truncate:BI (lshiftrt:SI (plus:SI (zero_extend:SI (match_dup 1)) (zero_extend:SI (match_dup 2))) @@ -389,9 +389,9 @@ ; Version of addhi that adds the carry, for SImode adds. (define_insn "addchi4_cy" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=rYsYx,rm") - (plus:HI (plus:HI (match_operand:HI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:HI 2 "msp_general_operand" "riYsYx,rmi")) + [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=rYsYx,rm") + (plus:HI (plus:HI (match_operand:HI 1 "msp430_nonimmediate_operand" "%0,0") + (match_operand:HI 2 "msp430_general_operand" "riYsYx,rmi")) (zero_extend:HI (reg:BI CARRY)))) ] "" @@ -479,8 +479,8 @@ ) (define_insn "*bic_cg" - [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=rYs,m") - (and:QHI (match_operand:QHI 1 "msp_general_operand" "0,0") + [(set (match_operand:QHI 0 "msp430_nonimmediate_operand" "=rYs,m") + (and:QHI (match_operand:QHI 1 "msp430_general_operand" "0,0") (match_operand 2 "msp430_inv_constgen_operator" "n,n")))] "" "@ @@ -489,9 +489,9 @@ ) (define_insn "bic3" - [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=rYsYx,rm") - (and:QHI (not:QHI (match_operand:QHI 1 "msp_general_operand" "rYsYx,rmn")) - (match_operand:QHI 2 "msp_nonimmediate_operand" "0,0")))] + [(set (match_operand:QHI 0 "msp430_nonimmediate_operand" "=rYsYx,rm") + (and:QHI (not:QHI (match_operand:QHI 1 "msp430_general_operand" "rYsYx,rmn")) + (match_operand:QHI 2 "msp430_nonimmediate_operand" "0,0")))] "" "@ BIC%x0%b0\t%1, %0 @@ -499,9 +499,9 @@ ) (define_insn "and3" - [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=r,rYsYx,rm") - (and:QHI (match_operand:QHI 1 "msp_nonimmediate_operand" "%0,0,0") - (match_operand:QHI 2 "msp_general_operand" "N,riYsYx,rmi")))] + [(set (match_operand:QHI 0 "msp430_nonimmediate_operand" "=r,rYsYx,rm") + (and:QHI (match_operand:QHI 1 "msp430_nonimmediate_operand" "%0,0,0") + (match_operand:QHI 2 "msp430_general_operand" "N,riYsYx,rmi")))] "" "@ AND%x0.B\t%2, %0 @@ -510,9 +510,9 @@ ) (define_insn "ior3" - [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=rYsYx,rm") - (ior:QHI (match_operand:QHI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:QHI 2 "msp_general_operand" "riYsYx,rmi")))] + [(set (match_operand:QHI 0 "msp430_nonimmediate_operand" "=rYsYx,rm") + (ior:QHI (match_operand:QHI 1 "msp430_nonimmediate_operand" "%0,0") + (match_operand:QHI 2 "msp430_general_operand" "riYsYx,rmi")))] "" "@ BIS%x0%b0\t%2, %0 @@ -520,9 +520,9 @@ ) (define_insn "xor3" - [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=rYsYx,rm") - (xor:QHI (match_operand:QHI 1 "msp_nonimmediate_operand" "%0,0") - (match_operand:QHI 2 "msp_general_operand" "riYsYx,rmi")))] + [(set (match_operand:QHI 0 "msp430_nonimmediate_operand" "=rYsYx,rm") + (xor:QHI (match_operand:QHI 1 "msp430_nonimmediate_operand" "%0,0") + (match_operand:QHI 2 "msp430_general_operand" "riYsYx,rmi")))] "" "@ XOR%x0%b0\t%2, %0 @@ -531,8 +531,8 @@ ;; Macro : XOR #~0, %0 (define_insn "one_cmpl2" - [(set (match_operand:QHI 0 "msp_nonimmediate_operand" "=rYs,m") - (not:QHI (match_operand:QHI 1 "msp_nonimmediate_operand" "0,0")))] + [(set (match_operand:QHI 0 "msp430_nonimmediate_operand" "=rYs,m") + (not:QHI (match_operand:QHI 1 "msp430_nonimmediate_operand" "0,0")))] "" "@ INV%x0%b0\t%0 @@ -540,8 +540,8 @@ ) (define_insn "extendqihi2" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=rYs,m") - (sign_extend:HI (match_operand:QI 1 "msp_nonimmediate_operand" "0,0")))] + [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=rYs,m") + (sign_extend:HI (match_operand:QI 1 "msp430_nonimmediate_operand" "0,0")))] "" "@ SXT%X0\t%0 @@ -549,8 +549,8 @@ ) (define_insn "zero_extendqihi2" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=rYs,r,r,m") - (zero_extend:HI (match_operand:QI 1 "msp_nonimmediate_operand" "0,rYs,m,0")))] + [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=rYs,r,r,m") + (zero_extend:HI (match_operand:QI 1 "msp430_nonimmediate_operand" "0,rYs,m,0")))] "" "@ AND\t#0xff, %0 @@ -571,8 +571,8 @@ ) (define_insn "zero_extendhipsi2" - [(set (match_operand:PSI 0 "msp_nonimmediate_operand" "=r,m") - (zero_extend:PSI (match_operand:HI 1 "msp_nonimmediate_operand" "rm,r")))] + [(set (match_operand:PSI 0 "msp430_nonimmediate_operand" "=r,m") + (zero_extend:PSI (match_operand:HI 1 "msp430_nonimmediate_operand" "rm,r")))] "" "@ MOVX\t%1, %0 @@ -580,7 +580,7 @@ ) (define_insn "truncpsihi2" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=rm") + [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=rm") (truncate:HI (match_operand:PSI 1 "register_operand" "r")))] "" "MOVX\t%1, %0" @@ -851,8 +851,8 @@ ) (define_insn "srai_1" - [(set (match_operand:HI 0 "msp_nonimmediate_operand" "=rm") - (ashiftrt:HI (match_operand:HI 1 "msp_general_operand" "0") + [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=rm") + (ashiftrt:HI (match_operand:HI 1 "msp430_general_operand" "0") (const_int 1)))] "" "RRA%X0.W\t%0" @@ -1094,7 +1094,7 @@ "CALL%Q0\t%1" ) -(define_insn "msp_return" +(define_insn "msp430_return" [(return)] "" { return msp430_is_interrupt_func () ? "RETI" : (TARGET_LARGE ? "RETA" : "RET"); } @@ -1274,8 +1274,8 @@ (define_insn "*bitbranch4" [(set (pc) (if_then_else - (ne (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rYsYx,rm") - (match_operand:QHI 1 "msp_general_operand" "rYsYxi,rmi")) + (ne (and:QHI (match_operand:QHI 0 "msp430_nonimmediate_operand" "rYsYx,rm") + (match_operand:QHI 1 "msp430_general_operand" "rYsYxi,rmi")) (const_int 0)) (label_ref (match_operand 2 "" "")) (pc))) @@ -1289,8 +1289,8 @@ (define_insn "*bitbranch4" [(set (pc) (if_then_else - (eq (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rYsYx,rm") - (match_operand:QHI 1 "msp_general_operand" "rYsYxi,rmi")) + (eq (and:QHI (match_operand:QHI 0 "msp430_nonimmediate_operand" "rYsYx,rm") + (match_operand:QHI 1 "msp430_general_operand" "rYsYxi,rmi")) (const_int 0)) (label_ref (match_operand 2 "" "")) (pc))) @@ -1304,8 +1304,8 @@ (define_insn "*bitbranch4" [(set (pc) (if_then_else - (eq (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rYsYx,rm") - (match_operand:QHI 1 "msp_general_operand" "rYsYxi,rmi")) + (eq (and:QHI (match_operand:QHI 0 "msp430_nonimmediate_operand" "rYsYx,rm") + (match_operand:QHI 1 "msp430_general_operand" "rYsYxi,rmi")) (const_int 0)) (pc) (label_ref (match_operand 2 "" "")))) @@ -1319,8 +1319,8 @@ (define_insn "*bitbranch4" [(set (pc) (if_then_else - (ne (and:QHI (match_operand:QHI 0 "msp_nonimmediate_operand" "rYsYx,rm") - (match_operand:QHI 1 "msp_general_operand" "rYsYxi,rmi")) + (ne (and:QHI (match_operand:QHI 0 "msp430_nonimmediate_operand" "rYsYx,rm") + (match_operand:QHI 1 "msp430_general_operand" "rYsYxi,rmi")) (const_int 0)) (pc) (label_ref (match_operand 2 "" "")))) @@ -1337,7 +1337,7 @@ (define_insn "*bitbranch4_z" [(set (pc) (if_then_else - (ne (zero_extract:HI (match_operand:QHI 0 "msp_nonimmediate_operand" "rYs,rm") + (ne (zero_extract:HI (match_operand:QHI 0 "msp430_nonimmediate_operand" "rYs,rm") (const_int 1) (match_operand 1 "msp430_bitpos" "i,i")) (const_int 0)) @@ -1353,7 +1353,7 @@ (define_insn "*bitbranch4_z" [(set (pc) (if_then_else - (eq (zero_extract:HI (match_operand:QHI 0 "msp_nonimmediate_operand" "rm") + (eq (zero_extract:HI (match_operand:QHI 0 "msp430_nonimmediate_operand" "rm") (const_int 1) (match_operand 1 "msp430_bitpos" "i")) (const_int 0)) @@ -1367,7 +1367,7 @@ (define_insn "*bitbranch4_z" [(set (pc) (if_then_else - (eq (zero_extract:HI (match_operand:QHI 0 "msp_nonimmediate_operand" "rm") + (eq (zero_extract:HI (match_operand:QHI 0 "msp430_nonimmediate_operand" "rm") (const_int 1) (match_operand 1 "msp430_bitpos" "i")) (const_int 0)) @@ -1381,7 +1381,7 @@ (define_insn "*bitbranch4_z" [(set (pc) (if_then_else - (ne (zero_extract:HI (match_operand:QHI 0 "msp_nonimmediate_operand" "rm") + (ne (zero_extract:HI (match_operand:QHI 0 "msp430_nonimmediate_operand" "rm") (const_int 1) (match_operand 1 "msp430_bitpos" "i")) (const_int 0)) diff --git a/gcc/config/msp430/predicates.md b/gcc/config/msp430/predicates.md index 1bfd33d..751548c 100644 --- a/gcc/config/msp430/predicates.md +++ b/gcc/config/msp430/predicates.md @@ -18,7 +18,7 @@ ;; along with GCC; see the file COPYING3. If not see ;; . -(define_predicate "msp_volatile_memory_operand" +(define_predicate "msp430_volatile_memory_operand" (and (match_code "mem") (match_test ("memory_address_addr_space_p (GET_MODE (op), XEXP (op, 0), MEM_ADDR_SPACE (op))"))) ) @@ -26,16 +26,16 @@ ; TRUE for any valid general operand. We do this because ; general_operand refuses to match volatile memory refs. -(define_predicate "msp_general_operand" +(define_predicate "msp430_general_operand" (ior (match_operand 0 "general_operand") - (match_operand 0 "msp_volatile_memory_operand")) + (match_operand 0 "msp430_volatile_memory_operand")) ) ; Likewise for nonimmediate_operand. -(define_predicate "msp_nonimmediate_operand" +(define_predicate "msp430_nonimmediate_operand" (ior (match_operand 0 "nonimmediate_operand") - (match_operand 0 "msp_volatile_memory_operand")) + (match_operand 0 "msp430_volatile_memory_operand")) ) (define_predicate "ubyte_operand" -- cgit v1.1 From 2161a445d1c129bf2faa031bd862fa4fe3a4121b Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Mon, 7 Oct 2019 20:14:26 +0000 Subject: [Darwin, machopic 0/n] Initial tidy of Mach-O symbol handling. We want to improve the detection and caching of symbol-properties so that (a) we can make the compiler's output match the platform norms (b) we can improve efficiency by checking flags instead of inspecting strings. (c) The fix for PR71767 was a largish hammer and we want to reduce the number of symbols that are made linker- visible. This first patch is largely typographical changes with no functional difference intended: - Tries to ensure that there's no overlap between the symbols used in the Mach-O case and those declared in the i386 or rs6000 port trees. - Some improvement to comments. - Makes the naming of the symbol flags consistent with other uses. - Provides a predicate macro for each use. gcc/ChangeLog: 2019-10-07 Iain Sandoe * config/darwin.c (machopic_symbol_defined_p): Use symbol flag predicates instead of accessing bits directly. (machopic_indirect_call_target): Likewise. (machopic_output_indirection): Likewise. (darwin_encode_section_info): Improve description. Use renamed symbol flags. Use predicate macros for variables and functions. * config/darwin.h: Rename MACHO_SYMBOL_VARIABLE to MACHO_SYMBOL_FLAG_VARIABLE. Rename MACHO_SYMBOL_DEFINED to MACHO_SYMBOL_FLAG_DEFINED. Rename MACHO_SYMBOL_STATIC to MACHO_SYMBOL_FLAG_STATIC. (MACHO_SYMBOL_VARIABLE_P): New. (MACHO_SYMBOL_DEFINED_P):New. (MACHO_SYMBOL_STATIC_P): New. * config/i386/darwin.h (MACHO_SYMBOL_FLAG_VARIABLE): Delete. (SYMBOL_FLAG_SUBT_DEP): New. * config/rs6000/darwin.h (SYMBOL_FLAG_SUBT_DEP): New. From-SVN: r276674 --- gcc/ChangeLog | 19 +++++++++++++++++++ gcc/config/darwin.c | 47 +++++++++++++++++++++++++++++----------------- gcc/config/darwin.h | 25 ++++++++++++++++-------- gcc/config/i386/darwin.h | 6 ++---- gcc/config/rs6000/darwin.h | 3 +++ 5 files changed, 71 insertions(+), 29 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7d8aa95..021d406 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2019-10-07 Iain Sandoe + + * config/darwin.c (machopic_symbol_defined_p): Use symbol flag + predicates instead of accessing bits directly. + (machopic_indirect_call_target): Likewise. + (machopic_output_indirection): Likewise. + (darwin_encode_section_info): Improve description. Use renamed + symbol flags. Use predicate macros for variables and functions. + * config/darwin.h: + Rename MACHO_SYMBOL_VARIABLE to MACHO_SYMBOL_FLAG_VARIABLE. + Rename MACHO_SYMBOL_DEFINED to MACHO_SYMBOL_FLAG_DEFINED. + Rename MACHO_SYMBOL_STATIC to MACHO_SYMBOL_FLAG_STATIC. + (MACHO_SYMBOL_VARIABLE_P): New. + (MACHO_SYMBOL_DEFINED_P):New. + (MACHO_SYMBOL_STATIC_P): New. + * config/i386/darwin.h (MACHO_SYMBOL_FLAG_VARIABLE): Delete. + (SYMBOL_FLAG_SUBT_DEP): New. + * config/rs6000/darwin.h (SYMBOL_FLAG_SUBT_DEP): New. + 2019-10-07 Jozef Lawrynowicz * config/msp430/msp430.c (msp430_file_end): s/msp_/msp430_/ diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 5673982..45e0d74 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -76,7 +76,7 @@ along with GCC; see the file COPYING3. If not see setting the second word in the .non_lazy_symbol_pointer data structure to symbol. See indirect_data for the code that handles the extra indirection, and machopic_output_indirection and its use - of MACHO_SYMBOL_STATIC for the code that handles @code{static} + of MACHO_SYMBOL_FLAG_STATIC for the code that handles @code{static} symbol indirection. */ typedef struct GTY(()) cdtor_record { @@ -249,7 +249,7 @@ name_needs_quotes (const char *name) int machopic_symbol_defined_p (rtx sym_ref) { - if (SYMBOL_REF_FLAGS (sym_ref) & MACHO_SYMBOL_FLAG_DEFINED) + if (MACHO_SYMBOL_DEFINED_P (sym_ref)) return true; /* If a symbol references local and is not an extern to this @@ -258,7 +258,7 @@ machopic_symbol_defined_p (rtx sym_ref) { /* If the symbol references a variable and the variable is a common symbol, then this symbol is not defined. */ - if (SYMBOL_REF_FLAGS (sym_ref) & MACHO_SYMBOL_FLAG_VARIABLE) + if (MACHO_SYMBOL_VARIABLE_P (sym_ref)) { tree decl = SYMBOL_REF_DECL (sym_ref); if (!decl) @@ -797,8 +797,7 @@ machopic_indirect_call_target (rtx target) if (MACHOPIC_INDIRECT && GET_CODE (XEXP (target, 0)) == SYMBOL_REF - && !(SYMBOL_REF_FLAGS (XEXP (target, 0)) - & MACHO_SYMBOL_FLAG_DEFINED)) + && ! MACHO_SYMBOL_DEFINED_P (XEXP (target, 0))) { rtx sym_ref = XEXP (target, 0); const char *stub_name = machopic_indirection_name (sym_ref, @@ -1167,14 +1166,14 @@ machopic_output_indirection (machopic_indirection **slot, FILE *asm_out_file) assemble_name (asm_out_file, sym_name); fprintf (asm_out_file, "\n"); - /* Variables that are marked with MACHO_SYMBOL_STATIC need to + /* Variables that are marked with MACHO_SYMBOL_FLAG_STATIC need to have their symbol name instead of 0 in the second entry of the non-lazy symbol pointer data structure when they are defined. This allows the runtime to rebind newer instances of the translation unit with the original instance of the symbol. */ - if ((SYMBOL_REF_FLAGS (symbol) & MACHO_SYMBOL_STATIC) + if (MACHO_SYMBOL_STATIC_P (symbol) && machopic_symbol_defined_p (symbol)) init = gen_rtx_SYMBOL_REF (Pmode, sym_name); @@ -1205,23 +1204,37 @@ machopic_operand_p (rtx op) && XINT (XEXP (op, 0), 1) == UNSPEC_MACHOPIC_OFFSET); } -/* This function records whether a given name corresponds to a defined - or undefined function or variable, for machopic_classify_ident to - use later. */ +/* This function: + computes and caches a series of flags that characterise the symbol's + properties that affect Mach-O code gen (including accidental cases + from older toolchains). + + TODO: + Here we also need to do enough analysis to determine if a symbol's + name needs to be made linker-visible. This is more tricky - since + it depends on whether we've previously seen a global weak definition + in the same section. + */ void -darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) +darwin_encode_section_info (tree decl, rtx rtl, int first) { - rtx sym_ref; + /* Careful not to prod global register variables. */ + if (!MEM_P (rtl)) + return; - /* Do the standard encoding things first. */ + /* Do the standard encoding things first; this sets: + SYMBOL_FLAG_FUNCTION, + SYMBOL_FLAG_LOCAL, (binds_local_p) + TLS_MODEL, SYMBOL_FLAG_SMALL + SYMBOL_FLAG_EXTERNAL. */ default_encode_section_info (decl, rtl, first); - if (TREE_CODE (decl) != FUNCTION_DECL && TREE_CODE (decl) != VAR_DECL) + if (! VAR_OR_FUNCTION_DECL_P (decl)) return; - sym_ref = XEXP (rtl, 0); - if (TREE_CODE (decl) == VAR_DECL) + rtx sym_ref = XEXP (rtl, 0); + if (VAR_P (decl)) SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_VARIABLE; if (!DECL_EXTERNAL (decl) @@ -1234,7 +1247,7 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_DEFINED; if (! TREE_PUBLIC (decl)) - SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_STATIC; + SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_STATIC; } void diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 93dc638..39c54cc 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -812,21 +812,30 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS]; #undef TARGET_ASM_MARK_DECL_PRESERVED #define TARGET_ASM_MARK_DECL_PRESERVED darwin_mark_decl_preserved -/* Set on a symbol with SYMBOL_FLAG_FUNCTION or - MACHO_SYMBOL_FLAG_VARIABLE to indicate that the function or - variable has been defined in this translation unit. - When porting Mach-O to new architectures you need to make - sure these aren't clobbered by the backend. */ +/* Any port using this header needs to define the first available + subtarget symbol bit: SYMBOL_FLAG_SUBT_DEP. */ -#define MACHO_SYMBOL_FLAG_VARIABLE (SYMBOL_FLAG_MACH_DEP) -#define MACHO_SYMBOL_FLAG_DEFINED ((SYMBOL_FLAG_MACH_DEP) << 1) +/* Is a variable. */ +#define MACHO_SYMBOL_FLAG_VARIABLE (SYMBOL_FLAG_SUBT_DEP) +#define MACHO_SYMBOL_VARIABLE_P(RTX) \ + ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_VARIABLE) != 0) + +/* Set on a symbol with SYMBOL_FLAG_FUNCTION or MACHO_SYMBOL_FLAG_VARIABLE + to indicate that the function or variable is considered defined in this + translation unit. */ + +#define MACHO_SYMBOL_FLAG_DEFINED ((SYMBOL_FLAG_SUBT_DEP) << 2) +#define MACHO_SYMBOL_DEFINED_P(RTX) \ + ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_DEFINED) != 0) /* Set on a symbol to indicate when fix-and-continue style code generation is being used and the symbol refers to a static symbol that should be rebound from new instances of a translation unit to the original instance of the data. */ -#define MACHO_SYMBOL_STATIC ((SYMBOL_FLAG_MACH_DEP) << 2) +#define MACHO_SYMBOL_FLAG_STATIC ((SYMBOL_FLAG_SUBT_DEP) << 5) +#define MACHO_SYMBOL_STATIC_P(RTX) \ + ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_STATIC) != 0) /* Symbolic names for various things we might know about a symbol. */ diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index 385d253..bdb36f0 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -324,10 +324,8 @@ along with GCC; see the file COPYING3. If not see } \ } -/* This needs to move since i386 uses the first flag and other flags are - used in Mach-O. */ -#undef MACHO_SYMBOL_FLAG_VARIABLE -#define MACHO_SYMBOL_FLAG_VARIABLE ((SYMBOL_FLAG_MACH_DEP) << 3) +/* First available SYMBOL flag bit for use by subtargets. */ +#define SYMBOL_FLAG_SUBT_DEP (SYMBOL_FLAG_MACH_DEP << 5) #undef MACHOPIC_NL_SYMBOL_PTR_SECTION #define MACHOPIC_NL_SYMBOL_PTR_SECTION \ diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index a626325..1081967 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -506,6 +506,9 @@ do { \ this will need to be modified similar to the x86 case. */ #define TARGET_FOLD_BUILTIN SUBTARGET_FOLD_BUILTIN +/* First available SYMBOL flag bit for use by subtargets. */ +#define SYMBOL_FLAG_SUBT_DEP (SYMBOL_FLAG_MACH_DEP) + /* Use standard DWARF numbering for DWARF debugging information. */ #define RS6000_USE_DWARF_NUMBERING -- cgit v1.1 From b393e5ede4064d6c2da289ed0b66b8e80e033c54 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Mon, 7 Oct 2019 20:21:50 +0000 Subject: [Darwin, machopic 1/n] Consider visibility in indirections. For weak, hidden vars the indirection should just be as normal, that is that the indirections for such symbols should appear in the non-lazy symbol pointers table, not in the .data section. gcc/ChangeLog: 2019-10-07 Iain Sandoe * config/darwin.c (machopic_output_indirection): Don't put hidden symbol indirections into the .data section, use the non-lazy symbol pointers section as normal. (darwin_encode_section_info): Record if a symbol is hidden. * config/darwin.h (MACHO_SYMBOL_FLAG_HIDDEN_VIS): New. (MACHO_SYMBOL_HIDDEN_VIS_P): New. From-SVN: r276675 --- gcc/ChangeLog | 9 +++++++++ gcc/config/darwin.c | 7 +++++++ gcc/config/darwin.h | 6 ++++++ 3 files changed, 22 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 021d406..af5ac09 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2019-10-07 Iain Sandoe + * config/darwin.c (machopic_output_indirection): Don't put + hidden symbol indirections into the .data section, use the + non-lazy symbol pointers section as normal. + (darwin_encode_section_info): Record if a symbol is hidden. + * config/darwin.h (MACHO_SYMBOL_FLAG_HIDDEN_VIS): New. + (MACHO_SYMBOL_HIDDEN_VIS_P): New. + +2019-10-07 Iain Sandoe + * config/darwin.c (machopic_symbol_defined_p): Use symbol flag predicates instead of accessing bits directly. (machopic_indirect_call_target): Likewise. diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 45e0d74..869e850 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1120,6 +1120,7 @@ machopic_output_indirection (machopic_indirection **slot, FILE *asm_out_file) machopic_output_stub (asm_out_file, sym, stub); } else if (! indirect_data (symbol) + && ! MACHO_SYMBOL_HIDDEN_VIS_P (symbol) && (machopic_symbol_defined_p (symbol) || SYMBOL_REF_LOCAL_P (symbol))) { @@ -1237,6 +1238,12 @@ darwin_encode_section_info (tree decl, rtx rtl, int first) if (VAR_P (decl)) SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_VARIABLE; + /* For Darwin, if we have specified visibility and it's not the default + that's counted 'hidden'. */ + if (DECL_VISIBILITY_SPECIFIED (decl) + && DECL_VISIBILITY (decl) != VISIBILITY_DEFAULT) + SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_HIDDEN_VIS; + if (!DECL_EXTERNAL (decl) && (!TREE_PUBLIC (decl) || !DECL_WEAK (decl)) && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (decl)) diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 39c54cc..87e1eb6 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -828,6 +828,12 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS]; #define MACHO_SYMBOL_DEFINED_P(RTX) \ ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_DEFINED) != 0) +/* Set on a symbol that has specified non-default visibility. */ + +#define MACHO_SYMBOL_FLAG_HIDDEN_VIS ((SYMBOL_FLAG_SUBT_DEP) << 3) +#define MACHO_SYMBOL_HIDDEN_VIS_P(RTX) \ + ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_HIDDEN_VIS) != 0) + /* Set on a symbol to indicate when fix-and-continue style code generation is being used and the symbol refers to a static symbol that should be rebound from new instances of a translation unit to -- cgit v1.1 From 795fe3d2c663337d8a1ae1347db172d54fd96c12 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 7 Oct 2019 21:04:07 +0000 Subject: msp430.md: Group zero_extend* insns together. 2019-10-07 Jozef Lawrynowicz * config/msp430/msp430.md: Group zero_extend* insns together. From-SVN: r276679 --- gcc/ChangeLog | 4 ++ gcc/config/msp430/msp430.md | 117 ++++++++++++++++++++++---------------------- 2 files changed, 62 insertions(+), 59 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af5ac09..36debb6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-10-07 Jozef Lawrynowicz + + * config/msp430/msp430.md: Group zero_extend* insns together. + 2019-10-07 Iain Sandoe * config/darwin.c (machopic_output_indirection): Don't put diff --git a/gcc/config/msp430/msp430.md b/gcc/config/msp430/msp430.md index ebd9c85..5bca727 100644 --- a/gcc/config/msp430/msp430.md +++ b/gcc/config/msp430/msp430.md @@ -559,15 +559,11 @@ AND%X0\t#0xff, %0" ) -;; Eliminate extraneous zero-extends mysteriously created by gcc. -(define_peephole2 - [(set (match_operand:HI 0 "register_operand") - (zero_extend:HI (match_operand:QI 1 "general_operand"))) - (set (match_operand:HI 2 "register_operand") - (zero_extend:HI (match_operand:QI 3 "register_operand")))] - "REGNO (operands[0]) == REGNO (operands[2]) && REGNO (operands[2]) == REGNO (operands[3])" - [(set (match_dup 0) - (zero_extend:HI (match_dup 1)))] +(define_insn "zero_extendqisi2" + [(set (match_operand:SI 0 "nonimmediate_operand" "=r") + (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "rm")))] + "" + "MOV%X1.B\t%1,%L0 { CLR\t%H0" ) (define_insn "zero_extendhipsi2" @@ -578,40 +574,6 @@ MOVX\t%1, %0 MOVX.A\t%1, %0" ) - -(define_insn "truncpsihi2" - [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=rm") - (truncate:HI (match_operand:PSI 1 "register_operand" "r")))] - "" - "MOVX\t%1, %0" -) - -(define_insn "extendhisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=r") - (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r")))] - "" - { return msp430x_extendhisi (operands); } -) - -(define_insn "extendhipsi2" - [(set (match_operand:PSI 0 "nonimmediate_operand" "=r") - (subreg:PSI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) 0))] - "msp430x" - "RLAM.A #4, %0 { RRAM.A #4, %0" -) - -;; Look for cases where integer/pointer conversions are suboptimal due -;; to missing patterns, despite us not having opcodes for these -;; patterns. Doing these manually allows for alternate optimization -;; paths. - -(define_insn "zero_extendqisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=r") - (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "rm")))] - "" - "MOV%X1.B\t%1,%L0 { CLR\t%H0" -) - (define_insn "zero_extendhisi2" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm,r") (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0,r")))] @@ -630,22 +592,6 @@ MOV.W\t%1,%0" ) -(define_insn "extend_and_shift1_hipsi2" - [(set (subreg:SI (match_operand:PSI 0 "nonimmediate_operand" "=r") 0) - (ashift:SI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) - (const_int 1)))] - "msp430x" - "RLAM.A #4, %0 { RRAM.A #3, %0" -) - -(define_insn "extend_and_shift2_hipsi2" - [(set (subreg:SI (match_operand:PSI 0 "nonimmediate_operand" "=r") 0) - (ashift:SI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) - (const_int 2)))] - "msp430x" - "RLAM.A #4, %0 { RRAM.A #2, %0" -) - ; Nasty - we are sign-extending a 20-bit PSI value in one register into ; two adjacent 16-bit registers to make an SI value. There is no MSP430X ; instruction that will do this, so we push the 20-bit value onto the stack @@ -680,6 +626,59 @@ " ) +;; Eliminate extraneous zero-extends mysteriously created by gcc. +(define_peephole2 + [(set (match_operand:HI 0 "register_operand") + (zero_extend:HI (match_operand:QI 1 "general_operand"))) + (set (match_operand:HI 2 "register_operand") + (zero_extend:HI (match_operand:QI 3 "register_operand")))] + "REGNO (operands[0]) == REGNO (operands[2]) && REGNO (operands[2]) == REGNO (operands[3])" + [(set (match_dup 0) + (zero_extend:HI (match_dup 1)))] +) + +(define_insn "truncpsihi2" + [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=rm") + (truncate:HI (match_operand:PSI 1 "register_operand" "r")))] + "" + "MOVX\t%1, %0" +) + +(define_insn "extendhisi2" + [(set (match_operand:SI 0 "nonimmediate_operand" "=r") + (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r")))] + "" + { return msp430x_extendhisi (operands); } +) + +(define_insn "extendhipsi2" + [(set (match_operand:PSI 0 "nonimmediate_operand" "=r") + (subreg:PSI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) 0))] + "msp430x" + "RLAM.A #4, %0 { RRAM.A #4, %0" +) + +;; Look for cases where integer/pointer conversions are suboptimal due +;; to missing patterns, despite us not having opcodes for these +;; patterns. Doing these manually allows for alternate optimization +;; paths. + +(define_insn "extend_and_shift1_hipsi2" + [(set (subreg:SI (match_operand:PSI 0 "nonimmediate_operand" "=r") 0) + (ashift:SI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) + (const_int 1)))] + "msp430x" + "RLAM.A #4, %0 { RRAM.A #3, %0" +) + +(define_insn "extend_and_shift2_hipsi2" + [(set (subreg:SI (match_operand:PSI 0 "nonimmediate_operand" "=r") 0) + (ashift:SI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) + (const_int 2)))] + "msp430x" + "RLAM.A #4, %0 { RRAM.A #2, %0" +) + ;; We also need to be able to sign-extend pointer types (eg ptrdiff_t). ;; Since (we assume) pushing a 20-bit value onto the stack zero-extends ;; it, we use a different method here. -- cgit v1.1 From cac52161c501abb93ded17a8f41b4a6310dbdab0 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 7 Oct 2019 21:22:04 +0000 Subject: Revert: 2019-10-07 Jozef Lawrynowicz * config/msp430/msp430.md: Revert: Group zero_extend* insns together. From-SVN: r276680 --- gcc/ChangeLog | 4 -- gcc/config/msp430/msp430.md | 117 ++++++++++++++++++++++---------------------- 2 files changed, 59 insertions(+), 62 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36debb6..af5ac09 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,7 +1,3 @@ -2019-10-07 Jozef Lawrynowicz - - * config/msp430/msp430.md: Group zero_extend* insns together. - 2019-10-07 Iain Sandoe * config/darwin.c (machopic_output_indirection): Don't put diff --git a/gcc/config/msp430/msp430.md b/gcc/config/msp430/msp430.md index 5bca727..ebd9c85 100644 --- a/gcc/config/msp430/msp430.md +++ b/gcc/config/msp430/msp430.md @@ -559,11 +559,15 @@ AND%X0\t#0xff, %0" ) -(define_insn "zero_extendqisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=r") - (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "rm")))] - "" - "MOV%X1.B\t%1,%L0 { CLR\t%H0" +;; Eliminate extraneous zero-extends mysteriously created by gcc. +(define_peephole2 + [(set (match_operand:HI 0 "register_operand") + (zero_extend:HI (match_operand:QI 1 "general_operand"))) + (set (match_operand:HI 2 "register_operand") + (zero_extend:HI (match_operand:QI 3 "register_operand")))] + "REGNO (operands[0]) == REGNO (operands[2]) && REGNO (operands[2]) == REGNO (operands[3])" + [(set (match_dup 0) + (zero_extend:HI (match_dup 1)))] ) (define_insn "zero_extendhipsi2" @@ -574,6 +578,40 @@ MOVX\t%1, %0 MOVX.A\t%1, %0" ) + +(define_insn "truncpsihi2" + [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=rm") + (truncate:HI (match_operand:PSI 1 "register_operand" "r")))] + "" + "MOVX\t%1, %0" +) + +(define_insn "extendhisi2" + [(set (match_operand:SI 0 "nonimmediate_operand" "=r") + (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r")))] + "" + { return msp430x_extendhisi (operands); } +) + +(define_insn "extendhipsi2" + [(set (match_operand:PSI 0 "nonimmediate_operand" "=r") + (subreg:PSI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) 0))] + "msp430x" + "RLAM.A #4, %0 { RRAM.A #4, %0" +) + +;; Look for cases where integer/pointer conversions are suboptimal due +;; to missing patterns, despite us not having opcodes for these +;; patterns. Doing these manually allows for alternate optimization +;; paths. + +(define_insn "zero_extendqisi2" + [(set (match_operand:SI 0 "nonimmediate_operand" "=r") + (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "rm")))] + "" + "MOV%X1.B\t%1,%L0 { CLR\t%H0" +) + (define_insn "zero_extendhisi2" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm,r") (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0,r")))] @@ -592,6 +630,22 @@ MOV.W\t%1,%0" ) +(define_insn "extend_and_shift1_hipsi2" + [(set (subreg:SI (match_operand:PSI 0 "nonimmediate_operand" "=r") 0) + (ashift:SI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) + (const_int 1)))] + "msp430x" + "RLAM.A #4, %0 { RRAM.A #3, %0" +) + +(define_insn "extend_and_shift2_hipsi2" + [(set (subreg:SI (match_operand:PSI 0 "nonimmediate_operand" "=r") 0) + (ashift:SI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) + (const_int 2)))] + "msp430x" + "RLAM.A #4, %0 { RRAM.A #2, %0" +) + ; Nasty - we are sign-extending a 20-bit PSI value in one register into ; two adjacent 16-bit registers to make an SI value. There is no MSP430X ; instruction that will do this, so we push the 20-bit value onto the stack @@ -626,59 +680,6 @@ " ) -;; Eliminate extraneous zero-extends mysteriously created by gcc. -(define_peephole2 - [(set (match_operand:HI 0 "register_operand") - (zero_extend:HI (match_operand:QI 1 "general_operand"))) - (set (match_operand:HI 2 "register_operand") - (zero_extend:HI (match_operand:QI 3 "register_operand")))] - "REGNO (operands[0]) == REGNO (operands[2]) && REGNO (operands[2]) == REGNO (operands[3])" - [(set (match_dup 0) - (zero_extend:HI (match_dup 1)))] -) - -(define_insn "truncpsihi2" - [(set (match_operand:HI 0 "msp430_nonimmediate_operand" "=rm") - (truncate:HI (match_operand:PSI 1 "register_operand" "r")))] - "" - "MOVX\t%1, %0" -) - -(define_insn "extendhisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=r") - (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r")))] - "" - { return msp430x_extendhisi (operands); } -) - -(define_insn "extendhipsi2" - [(set (match_operand:PSI 0 "nonimmediate_operand" "=r") - (subreg:PSI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) 0))] - "msp430x" - "RLAM.A #4, %0 { RRAM.A #4, %0" -) - -;; Look for cases where integer/pointer conversions are suboptimal due -;; to missing patterns, despite us not having opcodes for these -;; patterns. Doing these manually allows for alternate optimization -;; paths. - -(define_insn "extend_and_shift1_hipsi2" - [(set (subreg:SI (match_operand:PSI 0 "nonimmediate_operand" "=r") 0) - (ashift:SI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) - (const_int 1)))] - "msp430x" - "RLAM.A #4, %0 { RRAM.A #3, %0" -) - -(define_insn "extend_and_shift2_hipsi2" - [(set (subreg:SI (match_operand:PSI 0 "nonimmediate_operand" "=r") 0) - (ashift:SI (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")) - (const_int 2)))] - "msp430x" - "RLAM.A #4, %0 { RRAM.A #2, %0" -) - ;; We also need to be able to sign-extend pointer types (eg ptrdiff_t). ;; Since (we assume) pushing a 20-bit value onto the stack zero-extends ;; it, we use a different method here. -- cgit v1.1 From b238b34ea47222ffca7addc5fe4e8c052ade88b3 Mon Sep 17 00:00:00 2001 From: Prathamesh Kulkarni Date: Mon, 7 Oct 2019 23:44:49 +0000 Subject: re PR tree-optimization/91532 ([SVE] Redundant predicated store in gcc.target/aarch64/fmla_2.c) 2019-10-07 Prathamesh Kulkarni Richard Biener PR tree-optimization/91532 * tree-if-conv.c: Include tree-ssa-dse.h. (ifcvt_local_dce): Change param from bb to loop, and call dse_classify_store. (tree_if_conversion): Pass loop instead of loop->header as arg to ifcvt_local_dce. * tree-ssa-dse.c: Include tree-ssa-dse.h. (delete_dead_or_redundant_assignment): Remove static qualifier from declaration, and add prototype in tree-ssa-dse.h. (dse_store_status): Move to tree-ssa-dse.h. (dse_classify_store): Remove static qualifier and add new tree param stop_at_vuse, and add prototype in tree-ssa-dse.h. * tree-ssa-dse.h: New header. Co-Authored-By: Richard Biener From-SVN: r276681 --- gcc/ChangeLog | 17 +++++++++++++++++ gcc/tree-if-conv.c | 24 ++++++++++++++++++++++-- gcc/tree-ssa-dse.c | 22 ++++++++++------------ gcc/tree-ssa-dse.h | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 14 deletions(-) create mode 100644 gcc/tree-ssa-dse.h (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af5ac09..51edea9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2019-10-07 Prathamesh Kulkarni + Richard Biener + + PR tree-optimization/91532 + * tree-if-conv.c: Include tree-ssa-dse.h. + (ifcvt_local_dce): Change param from bb to loop, + and call dse_classify_store. + (tree_if_conversion): Pass loop instead of loop->header as arg + to ifcvt_local_dce. + * tree-ssa-dse.c: Include tree-ssa-dse.h. + (delete_dead_or_redundant_assignment): Remove static qualifier from + declaration, and add prototype in tree-ssa-dse.h. + (dse_store_status): Move to tree-ssa-dse.h. + (dse_classify_store): Remove static qualifier and add new tree param + stop_at_vuse, and add prototype in tree-ssa-dse.h. + * tree-ssa-dse.h: New header. + 2019-10-07 Iain Sandoe * config/darwin.c (machopic_output_indirection): Don't put diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 822aae5..af49813 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -120,6 +120,7 @@ along with GCC; see the file COPYING3. If not see #include "fold-const.h" #include "tree-ssa-sccvn.h" #include "tree-cfgcleanup.h" +#include "tree-ssa-dse.h" /* Only handle PHIs with no more arguments unless we are asked to by simd pragma. */ @@ -2873,7 +2874,7 @@ ifcvt_split_critical_edges (class loop *loop, bool aggressive_if_conv) loop vectorization. */ static void -ifcvt_local_dce (basic_block bb) +ifcvt_local_dce (class loop *loop) { gimple *stmt; gimple *stmt1; @@ -2890,6 +2891,10 @@ ifcvt_local_dce (basic_block bb) replace_uses_by (name_pair->first, name_pair->second); redundant_ssa_names.release (); + /* The loop has a single BB only. */ + basic_block bb = loop->header; + tree latch_vdef = NULL_TREE; + worklist.create (64); /* Consider all phi as live statements. */ for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi)) @@ -2897,6 +2902,8 @@ ifcvt_local_dce (basic_block bb) phi = gsi_stmt (gsi); gimple_set_plf (phi, GF_PLF_2, true); worklist.safe_push (phi); + if (virtual_operand_p (gimple_phi_result (phi))) + latch_vdef = PHI_ARG_DEF_FROM_EDGE (phi, loop_latch_edge (loop)); } /* Consider load/store statements, CALL and COND as live. */ for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) @@ -2960,6 +2967,19 @@ ifcvt_local_dce (basic_block bb) while (!gsi_end_p (gsi)) { stmt = gsi_stmt (gsi); + if (gimple_store_p (stmt)) + { + tree lhs = gimple_get_lhs (stmt); + ao_ref write; + ao_ref_init (&write, lhs); + + if (dse_classify_store (&write, stmt, false, NULL, NULL, latch_vdef) + == DSE_STORE_DEAD) + delete_dead_or_redundant_assignment (&gsi, "dead"); + gsi_next (&gsi); + continue; + } + if (gimple_plf (stmt, GF_PLF_2)) { gsi_next (&gsi); @@ -3070,7 +3090,7 @@ tree_if_conversion (class loop *loop, vec *preds) todo |= do_rpo_vn (cfun, loop_preheader_edge (loop), exit_bbs); /* Delete dead predicate computations. */ - ifcvt_local_dce (loop->header); + ifcvt_local_dce (loop); BITMAP_FREE (exit_bbs); todo |= TODO_cleanup_cfg; diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index ba67884..d8f7089 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see #include "params.h" #include "alias.h" #include "tree-ssa-loop.h" +#include "tree-ssa-dse.h" /* This file implements dead store elimination. @@ -76,21 +77,13 @@ along with GCC; see the file COPYING3. If not see fact, they are the same transformation applied to different views of the CFG. */ -static void delete_dead_or_redundant_assignment (gimple_stmt_iterator *, const char *); +void delete_dead_or_redundant_assignment (gimple_stmt_iterator *, const char *); static void delete_dead_or_redundant_call (gimple_stmt_iterator *, const char *); /* Bitmap of blocks that have had EH statements cleaned. We should remove their dead edges eventually. */ static bitmap need_eh_cleanup; -/* Return value from dse_classify_store */ -enum dse_store_status -{ - DSE_STORE_LIVE, - DSE_STORE_MAYBE_PARTIAL_DEAD, - DSE_STORE_DEAD -}; - /* STMT is a statement that may write into memory. Analyze it and initialize WRITE to describe how STMT affects memory. @@ -662,10 +655,10 @@ dse_optimize_redundant_stores (gimple *stmt) if only clobber statements influenced the classification result. Returns the classification. */ -static dse_store_status +dse_store_status dse_classify_store (ao_ref *ref, gimple *stmt, bool byte_tracking_enabled, sbitmap live_bytes, - bool *by_clobber_p = NULL) + bool *by_clobber_p, tree stop_at_vuse) { gimple *temp; int cnt = 0; @@ -701,6 +694,11 @@ dse_classify_store (ao_ref *ref, gimple *stmt, } else defvar = gimple_vdef (temp); + + /* If we're instructed to stop walking at region boundary, do so. */ + if (defvar == stop_at_vuse) + return DSE_STORE_LIVE; + auto_vec defs; gimple *phi_def = NULL; FOR_EACH_IMM_USE_STMT (use_stmt, ui, defvar) @@ -901,7 +899,7 @@ delete_dead_or_redundant_call (gimple_stmt_iterator *gsi, const char *type) /* Delete a dead store at GSI, which is a gimple assignment. */ -static void +void delete_dead_or_redundant_assignment (gimple_stmt_iterator *gsi, const char *type) { gimple *stmt = gsi_stmt (*gsi); diff --git a/gcc/tree-ssa-dse.h b/gcc/tree-ssa-dse.h new file mode 100644 index 0000000..a5eccbd --- /dev/null +++ b/gcc/tree-ssa-dse.h @@ -0,0 +1,36 @@ +/* Support routines for dead store elimination. + Copyright (C) 2019 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#ifndef GCC_TREE_SSA_DSE_H +#define GCC_TREE_SSA_DSE_H + +/* Return value from dse_classify_store */ +enum dse_store_status +{ + DSE_STORE_LIVE, + DSE_STORE_MAYBE_PARTIAL_DEAD, + DSE_STORE_DEAD +}; + +dse_store_status dse_classify_store (ao_ref *, gimple *, bool, sbitmap, + bool * = NULL, tree = NULL); + +void delete_dead_or_redundant_assignment (gimple_stmt_iterator *, const char *); + +#endif /* GCC_TREE_SSA_DSE_H */ -- cgit v1.1 From b11df8983de352246b68c1485121d4aa8f26a5bb Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 8 Oct 2019 00:16:15 +0000 Subject: Daily bump. From-SVN: r276685 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 19cc974..c440771 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20191007 +20191008 -- cgit v1.1 From fbb2a6dcf8abbd1a605544597442e3d67984a455 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 8 Oct 2019 01:37:45 +0100 Subject: Make C2X imply -fno-fp-int-builtin-inexact. Since TS 18661-1 has been integrated into C2X, this patch makes C2X imply -fno-fp-int-builtin-inexact. Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc: * doc/invoke.texi (-ffp-int-builtin-inexact): Document -fno-fp-int-builtin-inexact default for C2X. gcc/c-family: * c-opts.c (c_common_post_options): Set -fno-fp-int-builtin-inexact for C2X. gcc/testsuite: * gcc.dg/torture/builtin-fp-int-inexact-c2x.c: New test. From-SVN: r276686 --- gcc/ChangeLog | 5 +++++ gcc/c-family/ChangeLog | 5 +++++ gcc/c-family/c-opts.c | 6 ++++++ gcc/doc/invoke.texi | 8 ++++---- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact-c2x.c | 7 +++++++ 6 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact-c2x.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 51edea9..23e0a25 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Joseph Myers + + * doc/invoke.texi (-ffp-int-builtin-inexact): Document + -fno-fp-int-builtin-inexact default for C2X. + 2019-10-07 Prathamesh Kulkarni Richard Biener diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 7deaff0..93077ff 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Joseph Myers + + * c-opts.c (c_common_post_options): Set + -fno-fp-int-builtin-inexact for C2X. + 2019-10-05 Jakub Jelinek PR c++/91369 - Implement P0784R7: constexpr new diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 949d96a..4ad24bd 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -826,6 +826,12 @@ c_common_post_options (const char **pfilename) else flag_permitted_flt_eval_methods = PERMITTED_FLT_EVAL_METHODS_C11; + /* C2X Annex F does not permit certain built-in functions to raise + "inexact". */ + if (flag_isoc2x + && !global_options_set.x_flag_fp_int_builtin_inexact) + flag_fp_int_builtin_inexact = 0; + /* By default we use C99 inline semantics in GNU99 or C99 mode. C99 inline semantics are not supported in GNU89 or C89 mode. */ if (flag_gnu89_inline == -1) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 1077930..20e10c0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -10809,12 +10809,12 @@ Do not allow the built-in functions @code{ceil}, @code{floor}, double} variants, to generate code that raises the ``inexact'' floating-point exception for noninteger arguments. ISO C99 and C11 allow these functions to raise the ``inexact'' exception, but ISO/IEC -TS 18661-1:2014, the C bindings to IEEE 754-2008, does not allow these -functions to do so. +TS 18661-1:2014, the C bindings to IEEE 754-2008, as integrated into +ISO C2X, does not allow these functions to do so. The default is @option{-ffp-int-builtin-inexact}, allowing the -exception to be raised. This option does nothing unless -@option{-ftrapping-math} is in effect. +exception to be raised, unless C2X or a later C standard is selected. +This option does nothing unless @option{-ftrapping-math} is in effect. Even if @option{-fno-fp-int-builtin-inexact} is used, if the functions generate a call to a library function then the ``inexact'' exception diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b55e272..4555fc8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-10-08 Joseph Myers + + * gcc.dg/torture/builtin-fp-int-inexact-c2x.c: New test. + 2019-10-07 Jozef Lawrynowicz * gcc.target/msp430/430x-insns.c: New test. diff --git a/gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact-c2x.c b/gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact-c2x.c new file mode 100644 index 0000000..039cb53 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact-c2x.c @@ -0,0 +1,7 @@ +/* Test C2X enables -fno-fp-int-builtin-inexact. */ +/* { dg-do run } */ +/* { dg-options "-std=c2x" } */ +/* { dg-add-options c99_runtime } */ +/* { dg-require-effective-target fenv_exceptions } */ + +#include "builtin-fp-int-inexact.c" -- cgit v1.1 From 813982933f392afe8779da466bf0c034fab66ac8 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 8 Oct 2019 08:24:40 +0000 Subject: [AArch64] Limit simd-abi-9.c function body test to LP64 On ILP32 targets, there's an extra UXTW instruction to extend the incoming pointer before the load. It doesn't seem worth complicating the test for that, since all we're checking is that an optimisation takes place, and that optimisation isn't related to pointer size. 2019-10-08 Richard Sandiford gcc/testsuite/ * gcc.target/aarch64/torture/simd-abi-9.c: Require LP64 for the function body test. From-SVN: r276688 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/aarch64/torture/simd-abi-9.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4555fc8..a7c5bc7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Richard Sandiford + + * gcc.target/aarch64/torture/simd-abi-9.c: Require LP64 for + the function body test. + 2019-10-08 Joseph Myers * gcc.dg/torture/builtin-fp-int-inexact-c2x.c: New test. diff --git a/gcc/testsuite/gcc.target/aarch64/torture/simd-abi-9.c b/gcc/testsuite/gcc.target/aarch64/torture/simd-abi-9.c index aaa0316..1119d00 100644 --- a/gcc/testsuite/gcc.target/aarch64/torture/simd-abi-9.c +++ b/gcc/testsuite/gcc.target/aarch64/torture/simd-abi-9.c @@ -6,7 +6,7 @@ int callee (void); /* -** caller: +** caller: { target lp64 } ** ldr (w[0-9]+), \[x0\] ** cbn?z \1, [^\n]* ** ... -- cgit v1.1 From 5cfa327dc009e429da3711680ab10122763417a3 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 8 Oct 2019 11:35:56 +0200 Subject: Remove '>>>' merge marker from changelog From-SVN: r276689 --- gcc/fortran/ChangeLog | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 84ee818..6e98130 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -153,7 +153,6 @@ (lang_decl): Add new optional_arg field. (GFC_DECL_OPTIONAL_ARGUMENT): New macro. ->>>>>>> .r276463 2019-10-01 David Malcolm * error.c (gfc_diagnostic_starter): Clear the prefix before -- cgit v1.1 From 8beaf167f7ca723101e87da432870b65ff521e99 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 8 Oct 2019 10:49:27 +0000 Subject: Fortran - Improve OpenMP/OpenACC diagnostic gcc/fortran/ * match.h (gfc_match_omp_eos_error): Renamed from gfc_match_omp_eos. * openmp.c (gfc_match_omp_eos): Make static. (gfc_match_omp_eos_error): New. * parse.c (matchs, matchdo, matchds): Do as done for 'matcho' - if error occurred after OpenMP/OpenACC directive matched, do not try other directives. (decode_oacc_directive, decode_omp_directive): Call new function instead. testsuite/ * gfortran.dg/goacc/continuation-free-form.f95: Update dg-error. From-SVN: r276694 --- gcc/fortran/ChangeLog | 11 +++ gcc/fortran/match.h | 2 +- gcc/fortran/openmp.c | 13 ++- gcc/fortran/parse.c | 103 +++++++++++---------- gcc/testsuite/ChangeLog | 4 + .../gfortran.dg/goacc/continuation-free-form.f95 | 4 +- 6 files changed, 86 insertions(+), 51 deletions(-) (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6e98130..309d4ef 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,14 @@ +2019-10-08 Tobias Burnus + + * match.h (gfc_match_omp_eos_error): Renamed from gfc_match_omp_eos. + * openmp.c (gfc_match_omp_eos): Make static. + (gfc_match_omp_eos_error): New. + * parse.c (matchs, matchdo, matchds): Do as done for 'matcho' - + if error occurred after OpenMP/OpenACC directive matched, do not + try other directives. + (decode_oacc_directive, decode_omp_directive): Call new function + instead. + 2019-10-05 Steven G. Kargl PR fortran/47045 diff --git a/gcc/fortran/match.h b/gcc/fortran/match.h index 1bd78b1..611d796 100644 --- a/gcc/fortran/match.h +++ b/gcc/fortran/match.h @@ -151,7 +151,7 @@ match gfc_match_oacc_exit_data (void); match gfc_match_oacc_routine (void); /* OpenMP directive matchers. */ -match gfc_match_omp_eos (void); +match gfc_match_omp_eos_error (void); match gfc_match_omp_atomic (void); match gfc_match_omp_barrier (void); match gfc_match_omp_cancel (void); diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 7df7384..cd28384 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -31,7 +31,7 @@ along with GCC; see the file COPYING3. If not see /* Match an end of OpenMP directive. End of OpenMP directive is optional whitespace, followed by '\n' or comment '!'. */ -match +static match gfc_match_omp_eos (void) { locus old_loc; @@ -57,6 +57,17 @@ gfc_match_omp_eos (void) return MATCH_NO; } +match +gfc_match_omp_eos_error (void) +{ + if (gfc_match_omp_eos() == MATCH_YES) + return MATCH_YES; + + gfc_error ("Unexpected junk at %C"); + return MATCH_ERROR; +} + + /* Free an omp_clauses structure. */ void diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 4d34345..03fc716 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -674,15 +674,15 @@ decode_oacc_directive (void) match ("declare", gfc_match_oacc_declare, ST_OACC_DECLARE); break; case 'e': - matcha ("end atomic", gfc_match_omp_eos, ST_OACC_END_ATOMIC); - matcha ("end data", gfc_match_omp_eos, ST_OACC_END_DATA); - matcha ("end host_data", gfc_match_omp_eos, ST_OACC_END_HOST_DATA); - matcha ("end kernels loop", gfc_match_omp_eos, ST_OACC_END_KERNELS_LOOP); - matcha ("end kernels", gfc_match_omp_eos, ST_OACC_END_KERNELS); - matcha ("end loop", gfc_match_omp_eos, ST_OACC_END_LOOP); - matcha ("end parallel loop", gfc_match_omp_eos, + matcha ("end atomic", gfc_match_omp_eos_error, ST_OACC_END_ATOMIC); + matcha ("end data", gfc_match_omp_eos_error, ST_OACC_END_DATA); + matcha ("end host_data", gfc_match_omp_eos_error, ST_OACC_END_HOST_DATA); + matcha ("end kernels loop", gfc_match_omp_eos_error, ST_OACC_END_KERNELS_LOOP); + matcha ("end kernels", gfc_match_omp_eos_error, ST_OACC_END_KERNELS); + matcha ("end loop", gfc_match_omp_eos_error, ST_OACC_END_LOOP); + matcha ("end parallel loop", gfc_match_omp_eos_error, ST_OACC_END_PARALLEL_LOOP); - matcha ("end parallel", gfc_match_omp_eos, ST_OACC_END_PARALLEL); + matcha ("end parallel", gfc_match_omp_eos_error, ST_OACC_END_PARALLEL); matcha ("enter data", gfc_match_oacc_enter_data, ST_OACC_ENTER_DATA); matcha ("exit data", gfc_match_oacc_exit_data, ST_OACC_EXIT_DATA); break; @@ -738,14 +738,17 @@ decode_oacc_directive (void) and if spec_only, goto do_spec_only without actually matching. */ #define matchs(keyword, subr, st) \ do { \ + match m2; \ if (spec_only && gfc_match (keyword) == MATCH_YES) \ goto do_spec_only; \ - if (match_word_omp_simd (keyword, subr, &old_locus, \ - &simd_matched) == MATCH_YES) \ + if ((m2 = match_word_omp_simd (keyword, subr, &old_locus, \ + &simd_matched)) == MATCH_YES) \ { \ ret = st; \ goto finish; \ } \ + else if (m2 == MATCH_ERROR) \ + goto error_handling; \ else \ undo_new_statement (); \ } while (0) @@ -776,12 +779,15 @@ decode_oacc_directive (void) /* Like match, but set a flag simd_matched if keyword matched. */ #define matchds(keyword, subr, st) \ do { \ - if (match_word_omp_simd (keyword, subr, &old_locus, \ - &simd_matched) == MATCH_YES) \ + match m2; \ + if ((m2 = match_word_omp_simd (keyword, subr, &old_locus, \ + &simd_matched)) == MATCH_YES) \ { \ ret = st; \ goto finish; \ } \ + else if (m2 == MATCH_ERROR) \ + goto error_handling; \ else \ undo_new_statement (); \ } while (0) @@ -789,14 +795,17 @@ decode_oacc_directive (void) /* Like match, but don't match anything if not -fopenmp. */ #define matchdo(keyword, subr, st) \ do { \ + match m2; \ if (!flag_openmp) \ ; \ - else if (match_word (keyword, subr, &old_locus) \ + else if ((m2 = match_word (keyword, subr, &old_locus)) \ == MATCH_YES) \ { \ ret = st; \ goto finish; \ } \ + else if (m2 == MATCH_ERROR) \ + goto error_handling; \ else \ undo_new_statement (); \ } while (0) @@ -889,63 +898,63 @@ decode_omp_directive (void) matcho ("do", gfc_match_omp_do, ST_OMP_DO); break; case 'e': - matcho ("end atomic", gfc_match_omp_eos, ST_OMP_END_ATOMIC); + matcho ("end atomic", gfc_match_omp_eos_error, ST_OMP_END_ATOMIC); matcho ("end critical", gfc_match_omp_end_critical, ST_OMP_END_CRITICAL); - matchs ("end distribute parallel do simd", gfc_match_omp_eos, + matchs ("end distribute parallel do simd", gfc_match_omp_eos_error, ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD); - matcho ("end distribute parallel do", gfc_match_omp_eos, + matcho ("end distribute parallel do", gfc_match_omp_eos_error, ST_OMP_END_DISTRIBUTE_PARALLEL_DO); - matchs ("end distribute simd", gfc_match_omp_eos, + matchs ("end distribute simd", gfc_match_omp_eos_error, ST_OMP_END_DISTRIBUTE_SIMD); - matcho ("end distribute", gfc_match_omp_eos, ST_OMP_END_DISTRIBUTE); + matcho ("end distribute", gfc_match_omp_eos_error, ST_OMP_END_DISTRIBUTE); matchs ("end do simd", gfc_match_omp_end_nowait, ST_OMP_END_DO_SIMD); matcho ("end do", gfc_match_omp_end_nowait, ST_OMP_END_DO); - matchs ("end simd", gfc_match_omp_eos, ST_OMP_END_SIMD); - matcho ("end master", gfc_match_omp_eos, ST_OMP_END_MASTER); - matchs ("end ordered", gfc_match_omp_eos, ST_OMP_END_ORDERED); - matchs ("end parallel do simd", gfc_match_omp_eos, + matchs ("end simd", gfc_match_omp_eos_error, ST_OMP_END_SIMD); + matcho ("end master", gfc_match_omp_eos_error, ST_OMP_END_MASTER); + matchs ("end ordered", gfc_match_omp_eos_error, ST_OMP_END_ORDERED); + matchs ("end parallel do simd", gfc_match_omp_eos_error, ST_OMP_END_PARALLEL_DO_SIMD); - matcho ("end parallel do", gfc_match_omp_eos, ST_OMP_END_PARALLEL_DO); - matcho ("end parallel sections", gfc_match_omp_eos, + matcho ("end parallel do", gfc_match_omp_eos_error, ST_OMP_END_PARALLEL_DO); + matcho ("end parallel sections", gfc_match_omp_eos_error, ST_OMP_END_PARALLEL_SECTIONS); - matcho ("end parallel workshare", gfc_match_omp_eos, + matcho ("end parallel workshare", gfc_match_omp_eos_error, ST_OMP_END_PARALLEL_WORKSHARE); - matcho ("end parallel", gfc_match_omp_eos, ST_OMP_END_PARALLEL); + matcho ("end parallel", gfc_match_omp_eos_error, ST_OMP_END_PARALLEL); matcho ("end sections", gfc_match_omp_end_nowait, ST_OMP_END_SECTIONS); matcho ("end single", gfc_match_omp_end_single, ST_OMP_END_SINGLE); - matcho ("end target data", gfc_match_omp_eos, ST_OMP_END_TARGET_DATA); - matchs ("end target parallel do simd", gfc_match_omp_eos, + matcho ("end target data", gfc_match_omp_eos_error, ST_OMP_END_TARGET_DATA); + matchs ("end target parallel do simd", gfc_match_omp_eos_error, ST_OMP_END_TARGET_PARALLEL_DO_SIMD); - matcho ("end target parallel do", gfc_match_omp_eos, + matcho ("end target parallel do", gfc_match_omp_eos_error, ST_OMP_END_TARGET_PARALLEL_DO); - matcho ("end target parallel", gfc_match_omp_eos, + matcho ("end target parallel", gfc_match_omp_eos_error, ST_OMP_END_TARGET_PARALLEL); - matchs ("end target simd", gfc_match_omp_eos, ST_OMP_END_TARGET_SIMD); + matchs ("end target simd", gfc_match_omp_eos_error, ST_OMP_END_TARGET_SIMD); matchs ("end target teams distribute parallel do simd", - gfc_match_omp_eos, + gfc_match_omp_eos_error, ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD); - matcho ("end target teams distribute parallel do", gfc_match_omp_eos, + matcho ("end target teams distribute parallel do", gfc_match_omp_eos_error, ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO); - matchs ("end target teams distribute simd", gfc_match_omp_eos, + matchs ("end target teams distribute simd", gfc_match_omp_eos_error, ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD); - matcho ("end target teams distribute", gfc_match_omp_eos, + matcho ("end target teams distribute", gfc_match_omp_eos_error, ST_OMP_END_TARGET_TEAMS_DISTRIBUTE); - matcho ("end target teams", gfc_match_omp_eos, ST_OMP_END_TARGET_TEAMS); - matcho ("end target", gfc_match_omp_eos, ST_OMP_END_TARGET); - matcho ("end taskgroup", gfc_match_omp_eos, ST_OMP_END_TASKGROUP); - matchs ("end taskloop simd", gfc_match_omp_eos, + matcho ("end target teams", gfc_match_omp_eos_error, ST_OMP_END_TARGET_TEAMS); + matcho ("end target", gfc_match_omp_eos_error, ST_OMP_END_TARGET); + matcho ("end taskgroup", gfc_match_omp_eos_error, ST_OMP_END_TASKGROUP); + matchs ("end taskloop simd", gfc_match_omp_eos_error, ST_OMP_END_TASKLOOP_SIMD); - matcho ("end taskloop", gfc_match_omp_eos, ST_OMP_END_TASKLOOP); - matcho ("end task", gfc_match_omp_eos, ST_OMP_END_TASK); - matchs ("end teams distribute parallel do simd", gfc_match_omp_eos, + matcho ("end taskloop", gfc_match_omp_eos_error, ST_OMP_END_TASKLOOP); + matcho ("end task", gfc_match_omp_eos_error, ST_OMP_END_TASK); + matchs ("end teams distribute parallel do simd", gfc_match_omp_eos_error, ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD); - matcho ("end teams distribute parallel do", gfc_match_omp_eos, + matcho ("end teams distribute parallel do", gfc_match_omp_eos_error, ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO); - matchs ("end teams distribute simd", gfc_match_omp_eos, + matchs ("end teams distribute simd", gfc_match_omp_eos_error, ST_OMP_END_TEAMS_DISTRIBUTE_SIMD); - matcho ("end teams distribute", gfc_match_omp_eos, + matcho ("end teams distribute", gfc_match_omp_eos_error, ST_OMP_END_TEAMS_DISTRIBUTE); - matcho ("end teams", gfc_match_omp_eos, ST_OMP_END_TEAMS); + matcho ("end teams", gfc_match_omp_eos_error, ST_OMP_END_TEAMS); matcho ("end workshare", gfc_match_omp_end_nowait, ST_OMP_END_WORKSHARE); break; @@ -979,7 +988,7 @@ decode_omp_directive (void) break; case 's': matcho ("sections", gfc_match_omp_sections, ST_OMP_SECTIONS); - matcho ("section", gfc_match_omp_eos, ST_OMP_SECTION); + matcho ("section", gfc_match_omp_eos_error, ST_OMP_SECTION); matcho ("single", gfc_match_omp_single, ST_OMP_SINGLE); break; case 't': diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a7c5bc7..f4819f2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-10-08 Tobias Burnus + + * gfortran.dg/goacc/continuation-free-form.f95: Update dg-error. + 2019-10-08 Richard Sandiford * gcc.target/aarch64/torture/simd-abi-9.c: Require LP64 for diff --git a/gcc/testsuite/gfortran.dg/goacc/continuation-free-form.f95 b/gcc/testsuite/gfortran.dg/goacc/continuation-free-form.f95 index 1c9a3f3..b904f7b 100644 --- a/gcc/testsuite/gfortran.dg/goacc/continuation-free-form.f95 +++ b/gcc/testsuite/gfortran.dg/goacc/continuation-free-form.f95 @@ -16,8 +16,8 @@ program test x = x + 0.3 enddo ! continuation must begin with sentinel - !$acc end parallel & ! { dg-error "Unclassifiable OpenACC directive" } + !$acc end parallel & ! { dg-error "Unexpected junk" } ! loop print *, x -end \ No newline at end of file +end -- cgit v1.1 From 65b67cf390bc0240a91730e8eb95d7a7b2d8aca0 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 8 Oct 2019 12:30:44 +0000 Subject: Fortran - fix OpenMP 'target simd' gcc/fortran/ * parse.c (parse_executable): Add missing ST_OMP_TARGET_SIMD. libgomp/ * testsuite/libgomp.fortran/target-simd.f90: New. From-SVN: r276698 --- gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/parse.c | 1 + 2 files changed, 5 insertions(+) (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 309d4ef..b5bef54 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,9 @@ 2019-10-08 Tobias Burnus + * parse.c (parse_executable): Add missing ST_OMP_TARGET_SIMD. + +2019-10-08 Tobias Burnus + * match.h (gfc_match_omp_eos_error): Renamed from gfc_match_omp_eos. * openmp.c (gfc_match_omp_eos): Make static. (gfc_match_omp_eos_error): New. diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 03fc716..15f6bf2 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -5534,6 +5534,7 @@ parse_executable (gfc_statement st) case ST_OMP_SIMD: case ST_OMP_TARGET_PARALLEL_DO: case ST_OMP_TARGET_PARALLEL_DO_SIMD: + case ST_OMP_TARGET_SIMD: case ST_OMP_TARGET_TEAMS_DISTRIBUTE: case ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO: case ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD: -- cgit v1.1 From 69f8c1aef5cdcc54d5cb2ca4f99f4f26c2f822a9 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 8 Oct 2019 13:39:03 +0000 Subject: tree-vectorizer.h (_stmt_vec_info::v_reduc_type): Remove. 2019-10-08 Richard Biener * tree-vectorizer.h (_stmt_vec_info::v_reduc_type): Remove. (_stmt_vec_info::is_reduc_info): Add. (STMT_VINFO_VEC_REDUCTION_TYPE): Remove. (vectorizable_condition): Remove. (vectorizable_shift): Likewise. (vectorizable_reduction): Adjust. (info_for_reduction): New. * tree-vect-loop.c (vect_force_simple_reduction): Fold into... (vect_analyze_scalar_cycles_1): ... here. (vect_analyze_loop_operations): Adjust. (needs_fold_left_reduction_p): Simplify for single caller. (vect_is_simple_reduction): Likewise. Remove stmt restriction for nested cycles not part of double reductions. (vect_model_reduction_cost): Pass in the reduction type. (info_for_reduction): New function. (vect_create_epilog_for_reduction): Use it, access reduction meta off the stmt info it returns. Use STMT_VINFO_REDUC_TYPE instead of STMT_VINFO_VEC_REDUCTION_TYPE. (vectorize_fold_left_reduction): Remove pointless assert. (vectorizable_reduction): Analyze the full reduction when visiting the outermost PHI. Simplify. Use STMT_VINFO_REDUC_TYPE instead of STMT_VINFO_VEC_REDUCTION_TYPE. Direct reduction stmt code-generation to vectorizable_* in most cases. Verify code-generation only for cases handled by vect_transform_reductuon. (vect_transform_reduction): Use info_for_reduction to get at reduction meta. Simplify. (vect_transform_cycle_phi): Likewise. (vectorizable_live_operation): Likewise. * tree-vect-patterns.c (vect_reassociating_reduction_p): Look at the PHI node for STMT_VINFO_REDUC_TYPE. * tree-vect-slp.c (vect_schedule_slp_instance): Remove no longer necessary code. * tree-vect-stmts.c (vectorizable_shift): Make static again. (vectorizable_condition): Likewise. Get at reduction related info via info_for_reduction. (vect_analyze_stmt): Adjust. (vect_transform_stmt): Likewise. * tree-vectorizer.c (vec_info::new_stmt_vec_info): Initialize STMT_VINFO_REDUC_TYPE instead of STMT_VINFO_VEC_REDUCTION_TYPE. * gcc.dg/vect/pr65947-1.c: Adjust. * gcc.dg/vect/pr65947-13.c: Likewise. * gcc.dg/vect/pr65947-14.c: Likewise. * gcc.dg/vect/pr65947-4.c: Likewise. * gcc.dg/vect/pr80631-1.c: Likewise. * gcc.dg/vect/pr80631-2.c: Likewise. From-SVN: r276700 --- gcc/ChangeLog | 43 +++ gcc/testsuite/ChangeLog | 9 + gcc/testsuite/gcc.dg/vect/pr65947-1.c | 2 +- gcc/testsuite/gcc.dg/vect/pr65947-13.c | 2 +- gcc/testsuite/gcc.dg/vect/pr65947-14.c | 2 +- gcc/testsuite/gcc.dg/vect/pr65947-4.c | 2 +- gcc/testsuite/gcc.dg/vect/pr80631-1.c | 2 +- gcc/testsuite/gcc.dg/vect/pr80631-2.c | 2 +- gcc/tree-vect-loop.c | 591 ++++++++++++++------------------- gcc/tree-vect-patterns.c | 8 +- gcc/tree-vect-slp.c | 11 - gcc/tree-vect-stmts.c | 113 +++---- gcc/tree-vectorizer.c | 2 +- gcc/tree-vectorizer.h | 19 +- 14 files changed, 379 insertions(+), 429 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 23e0a25..984a05d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,46 @@ +2019-10-08 Richard Biener + + * tree-vectorizer.h (_stmt_vec_info::v_reduc_type): Remove. + (_stmt_vec_info::is_reduc_info): Add. + (STMT_VINFO_VEC_REDUCTION_TYPE): Remove. + (vectorizable_condition): Remove. + (vectorizable_shift): Likewise. + (vectorizable_reduction): Adjust. + (info_for_reduction): New. + * tree-vect-loop.c (vect_force_simple_reduction): Fold into... + (vect_analyze_scalar_cycles_1): ... here. + (vect_analyze_loop_operations): Adjust. + (needs_fold_left_reduction_p): Simplify for single caller. + (vect_is_simple_reduction): Likewise. Remove stmt restriction + for nested cycles not part of double reductions. + (vect_model_reduction_cost): Pass in the reduction type. + (info_for_reduction): New function. + (vect_create_epilog_for_reduction): Use it, access reduction + meta off the stmt info it returns. Use STMT_VINFO_REDUC_TYPE + instead of STMT_VINFO_VEC_REDUCTION_TYPE. + (vectorize_fold_left_reduction): Remove pointless assert. + (vectorizable_reduction): Analyze the full reduction when + visiting the outermost PHI. Simplify. Use STMT_VINFO_REDUC_TYPE + instead of STMT_VINFO_VEC_REDUCTION_TYPE. Direct reduction + stmt code-generation to vectorizable_* in most cases. Verify + code-generation only for cases handled by + vect_transform_reductuon. + (vect_transform_reduction): Use info_for_reduction to get at + reduction meta. Simplify. + (vect_transform_cycle_phi): Likewise. + (vectorizable_live_operation): Likewise. + * tree-vect-patterns.c (vect_reassociating_reduction_p): Look + at the PHI node for STMT_VINFO_REDUC_TYPE. + * tree-vect-slp.c (vect_schedule_slp_instance): Remove no + longer necessary code. + * tree-vect-stmts.c (vectorizable_shift): Make static again. + (vectorizable_condition): Likewise. Get at reduction related + info via info_for_reduction. + (vect_analyze_stmt): Adjust. + (vect_transform_stmt): Likewise. + * tree-vectorizer.c (vec_info::new_stmt_vec_info): Initialize + STMT_VINFO_REDUC_TYPE instead of STMT_VINFO_VEC_REDUCTION_TYPE. + 2019-10-08 Joseph Myers * doc/invoke.texi (-ffp-int-builtin-inexact): Document diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f4819f2..fb2264f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2019-10-08 Richard Biener + + * gcc.dg/vect/pr65947-1.c: Adjust. + * gcc.dg/vect/pr65947-13.c: Likewise. + * gcc.dg/vect/pr65947-14.c: Likewise. + * gcc.dg/vect/pr65947-4.c: Likewise. + * gcc.dg/vect/pr80631-1.c: Likewise. + * gcc.dg/vect/pr80631-2.c: Likewise. + 2019-10-08 Tobias Burnus * gfortran.dg/goacc/continuation-free-form.f95: Update dg-error. diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-1.c b/gcc/testsuite/gcc.dg/vect/pr65947-1.c index 879819d..b81baed 100644 --- a/gcc/testsuite/gcc.dg/vect/pr65947-1.c +++ b/gcc/testsuite/gcc.dg/vect/pr65947-1.c @@ -42,4 +42,4 @@ main (void) /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */ /* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target vect_fold_extract_last } } } */ -/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" { target { ! vect_fold_extract_last } } } } */ +/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 2 "vect" { target { ! vect_fold_extract_last } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-13.c b/gcc/testsuite/gcc.dg/vect/pr65947-13.c index e1d3ff5..4ad5262 100644 --- a/gcc/testsuite/gcc.dg/vect/pr65947-13.c +++ b/gcc/testsuite/gcc.dg/vect/pr65947-13.c @@ -41,5 +41,5 @@ main (void) } /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */ -/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" { xfail vect_fold_extract_last } } } */ +/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 2 "vect" { xfail vect_fold_extract_last } } } */ /* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target vect_fold_extract_last } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-14.c b/gcc/testsuite/gcc.dg/vect/pr65947-14.c index 9f1e4e1..d0194f2 100644 --- a/gcc/testsuite/gcc.dg/vect/pr65947-14.c +++ b/gcc/testsuite/gcc.dg/vect/pr65947-14.c @@ -42,4 +42,4 @@ main (void) /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */ /* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target vect_fold_extract_last } } } */ -/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" { target { ! vect_fold_extract_last } } } } */ +/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 2 "vect" { target { ! vect_fold_extract_last } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-4.c b/gcc/testsuite/gcc.dg/vect/pr65947-4.c index 186e03a..4055710 100644 --- a/gcc/testsuite/gcc.dg/vect/pr65947-4.c +++ b/gcc/testsuite/gcc.dg/vect/pr65947-4.c @@ -42,5 +42,5 @@ main (void) /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */ /* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target vect_fold_extract_last } } } */ -/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" { target { ! vect_fold_extract_last } } } } */ +/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 2 "vect" { target { ! vect_fold_extract_last } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr80631-1.c b/gcc/testsuite/gcc.dg/vect/pr80631-1.c index f240519..b531fe6 100644 --- a/gcc/testsuite/gcc.dg/vect/pr80631-1.c +++ b/gcc/testsuite/gcc.dg/vect/pr80631-1.c @@ -73,4 +73,4 @@ main () /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 5 "vect" { target vect_condition } } } */ /* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 10 "vect" { target vect_fold_extract_last } } } */ -/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 10 "vect" { target { { ! vect_fold_extract_last } && vect_condition } } } } */ +/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 5 "vect" { target { { ! vect_fold_extract_last } && vect_condition } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr80631-2.c b/gcc/testsuite/gcc.dg/vect/pr80631-2.c index b334ca2..07f1a72 100644 --- a/gcc/testsuite/gcc.dg/vect/pr80631-2.c +++ b/gcc/testsuite/gcc.dg/vect/pr80631-2.c @@ -72,5 +72,5 @@ main () } /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 5 "vect" { target vect_condition } } } */ -/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 10 "vect" { target vect_condition xfail vect_fold_extract_last } } } */ +/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 5 "vect" { target vect_condition xfail vect_fold_extract_last } } } */ /* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 10 "vect" { target vect_fold_extract_last } } } */ diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 3db4a5c..f63bb85 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -154,8 +154,8 @@ along with GCC; see the file COPYING3. If not see */ static void vect_estimate_min_profitable_iters (loop_vec_info, int *, int *); -static stmt_vec_info vect_force_simple_reduction (loop_vec_info, stmt_vec_info, - bool *, bool); +static stmt_vec_info vect_is_simple_reduction (loop_vec_info, stmt_vec_info, + bool *); /* Subroutine of vect_determine_vf_for_stmt that handles only one statement. VECTYPE_MAYBE_SET_P is true if STMT_VINFO_VECTYPE @@ -561,19 +561,19 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, class loop *loop) && STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_unknown_def_type); stmt_vec_info reduc_stmt_info - = vect_force_simple_reduction (loop_vinfo, stmt_vinfo, - &double_reduc, false); + = vect_is_simple_reduction (loop_vinfo, stmt_vinfo, &double_reduc); if (reduc_stmt_info) { - if (double_reduc) - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, + STMT_VINFO_REDUC_DEF (stmt_vinfo) = reduc_stmt_info; + STMT_VINFO_REDUC_DEF (reduc_stmt_info) = stmt_vinfo; + if (double_reduc) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_NOTE, vect_location, "Detected double reduction.\n"); STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_double_reduction_def; - STMT_VINFO_DEF_TYPE (reduc_stmt_info) - = vect_double_reduction_def; + STMT_VINFO_DEF_TYPE (reduc_stmt_info) = vect_double_reduction_def; } else { @@ -1558,8 +1558,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo) == vect_double_reduction_def) || STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle) && ! PURE_SLP_STMT (stmt_info)) - ok = vectorizable_reduction (stmt_info, NULL, NULL, NULL, NULL, - &cost_vec); + ok = vectorizable_reduction (stmt_info, NULL, NULL, &cost_vec); } /* SLP PHIs are tested by vect_slp_analyze_node_operations. */ @@ -2554,8 +2553,7 @@ vect_valid_reduction_input_p (stmt_vec_info def_stmt_info) overflow must wrap. */ static bool -needs_fold_left_reduction_p (tree type, tree_code code, - bool need_wrapping_integral_overflow) +needs_fold_left_reduction_p (tree type, tree_code code) { /* CHECKME: check for !flag_finite_math_only too? */ if (SCALAR_FLOAT_TYPE_P (type)) @@ -2573,10 +2571,6 @@ needs_fold_left_reduction_p (tree type, tree_code code, { if (!operation_no_trapping_overflow (type, code)) return true; - if (need_wrapping_integral_overflow - && !TYPE_OVERFLOW_WRAPS (type) - && operation_can_overflow (code)) - return true; return false; } @@ -2752,9 +2746,7 @@ check_reduction_path (dump_user_location_t loc, loop_p loop, gphi *phi, static stmt_vec_info vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, - bool *double_reduc, - bool need_wrapping_integral_overflow, - enum vect_reduction_type *v_reduc_type) + bool *double_reduc) { gphi *phi = as_a (phi_info->stmt); class loop *loop = (gimple_bb (phi))->loop_father; @@ -2770,7 +2762,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, bool phi_def; *double_reduc = false; - *v_reduc_type = TREE_CODE_REDUCTION; + STMT_VINFO_REDUC_TYPE (phi_info) = TREE_CODE_REDUCTION; tree phi_name = PHI_RESULT (phi); /* ??? If there are no uses of the PHI result the inner loop reduction @@ -2928,22 +2920,6 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, if (nested_in_vect_loop && !check_reduction) { - /* FIXME: Even for non-reductions code generation is funneled - through vectorizable_reduction for the stmt defining the - PHI latch value. So we have to artificially restrict ourselves - for the supported operations. */ - switch (get_gimple_rhs_class (code)) - { - case GIMPLE_BINARY_RHS: - case GIMPLE_TERNARY_RHS: - break; - default: - /* Not supported by vectorizable_reduction. */ - if (dump_enabled_p ()) - report_vect_op (MSG_MISSED_OPTIMIZATION, def_stmt, - "nested cycle: not handled operation: "); - return NULL; - } if (dump_enabled_p ()) report_vect_op (MSG_NOTE, def_stmt, "detected nested cycle: "); return def_stmt_info; @@ -2959,7 +2935,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, if (code == COND_EXPR) { if (! nested_in_vect_loop) - *v_reduc_type = COND_REDUCTION; + STMT_VINFO_REDUC_TYPE (phi_info) = COND_REDUCTION; op3 = gimple_assign_rhs1 (def_stmt); if (COMPARISON_CLASS_P (op3)) @@ -3043,10 +3019,9 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, and therefore vectorizing reductions in the inner-loop during outer-loop vectorization is safe. */ if (check_reduction - && *v_reduc_type == TREE_CODE_REDUCTION - && needs_fold_left_reduction_p (type, code, - need_wrapping_integral_overflow)) - *v_reduc_type = FOLD_LEFT_REDUCTION; + && STMT_VINFO_REDUC_TYPE (phi_info) == TREE_CODE_REDUCTION + && needs_fold_left_reduction_p (type, code)) + STMT_VINFO_REDUC_TYPE (phi_info) = FOLD_LEFT_REDUCTION; /* Reduction is safe. We're dealing with one of the following: 1) integer arithmetic and no trapv @@ -3142,30 +3117,6 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, return NULL; } -/* Wrapper around vect_is_simple_reduction, which will modify code - in-place if it enables detection of more reductions. Arguments - as there. */ - -static stmt_vec_info -vect_force_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, - bool *double_reduc, - bool need_wrapping_integral_overflow) -{ - enum vect_reduction_type v_reduc_type; - stmt_vec_info def_info - = vect_is_simple_reduction (loop_info, phi_info, double_reduc, - need_wrapping_integral_overflow, - &v_reduc_type); - if (def_info) - { - STMT_VINFO_REDUC_TYPE (phi_info) = v_reduc_type; - STMT_VINFO_REDUC_DEF (phi_info) = def_info; - STMT_VINFO_REDUC_TYPE (def_info) = v_reduc_type; - STMT_VINFO_REDUC_DEF (def_info) = phi_info; - } - return def_info; -} - /* Calculate cost of peeling the loop PEEL_ITERS_PROLOGUE times. */ int vect_get_known_peeling_cost (loop_vec_info loop_vinfo, int peel_iters_prologue, @@ -3754,6 +3705,7 @@ have_whole_vector_shift (machine_mode mode) static void vect_model_reduction_cost (stmt_vec_info stmt_info, internal_fn reduc_fn, + vect_reduction_type reduction_type, int ncopies, stmt_vector_for_cost *cost_vec) { int prologue_cost = 0, epilogue_cost = 0, inside_cost; @@ -3768,8 +3720,6 @@ vect_model_reduction_cost (stmt_vec_info stmt_info, internal_fn reduc_fn, loop = LOOP_VINFO_LOOP (loop_vinfo); /* Condition reductions generate two reductions in the loop. */ - vect_reduction_type reduction_type - = STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info); if (reduction_type == COND_REDUCTION) ncopies *= 2; @@ -4208,6 +4158,32 @@ get_initial_defs_for_reduction (slp_tree slp_node, gsi_insert_seq_on_edge_immediate (pe, ctor_seq); } +/* For a statement STMT_INFO taking part in a reduction operation return + the stmt_vec_info the meta information is stored on. */ + +stmt_vec_info +info_for_reduction (stmt_vec_info stmt_info) +{ + stmt_info = vect_orig_stmt (stmt_info); + gcc_assert (STMT_VINFO_REDUC_DEF (stmt_info)); + if (!is_a (stmt_info->stmt)) + stmt_info = STMT_VINFO_REDUC_DEF (stmt_info); + gphi *phi = as_a (stmt_info->stmt); + if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def) + { + if (gimple_phi_num_args (phi) == 1) + stmt_info = STMT_VINFO_REDUC_DEF (stmt_info); + } + else if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle) + { + edge pe = loop_preheader_edge (gimple_bb (phi)->loop_father); + stmt_vec_info info + = stmt_info->vinfo->lookup_def (PHI_ARG_DEF_FROM_EDGE (phi, pe)); + if (info && STMT_VINFO_DEF_TYPE (info) == vect_double_reduction_def) + stmt_info = info; + } + return stmt_info; +} /* Function vect_create_epilog_for_reduction @@ -4261,6 +4237,8 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info, slp_tree slp_node, slp_instance slp_node_instance) { + stmt_vec_info reduc_info = info_for_reduction (stmt_info); + gcc_assert (reduc_info->is_reduc_info); loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info); /* For double reductions we need to get at the inner loop reduction stmt which has the meta info attached. Our stmt_info is that of the @@ -4278,8 +4256,8 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info, } gphi *reduc_def_stmt = as_a (STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info))->stmt); - enum tree_code code = STMT_VINFO_REDUC_CODE (stmt_info); - internal_fn reduc_fn = STMT_VINFO_REDUC_FN (stmt_info); + enum tree_code code = STMT_VINFO_REDUC_CODE (reduc_info); + internal_fn reduc_fn = STMT_VINFO_REDUC_FN (reduc_info); tree neutral_op = NULL_TREE; if (slp_node) neutral_op @@ -4345,15 +4323,14 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info, loop_preheader_edge (loop)); /* Optimize: for induction condition reduction, if we can't use zero for induc_val, use initial_def. */ - if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) - == INTEGER_INDUC_COND_REDUCTION) - induc_val = STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL (stmt_info); + if (STMT_VINFO_REDUC_TYPE (reduc_info) == INTEGER_INDUC_COND_REDUCTION) + induc_val = STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL (reduc_info); else if (double_reduc) ; else if (nested_in_vect_loop) ; else - adjustment_def = STMT_VINFO_REDUC_EPILOGUE_ADJUSTMENT (stmt_info); + adjustment_def = STMT_VINFO_REDUC_EPILOGUE_ADJUSTMENT (reduc_info); } unsigned vec_num; @@ -4383,7 +4360,7 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info, The first match will be a 1 to allow 0 to be used for non-matching indexes. If there are no matches at all then the vector will be all zeroes. */ - if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == COND_REDUCTION) + if (STMT_VINFO_REDUC_TYPE (reduc_info) == COND_REDUCTION) { tree indx_before_incr, indx_after_incr; poly_uint64 nunits_out = TYPE_VECTOR_SUBPARTS (vectype); @@ -4616,7 +4593,7 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info, else new_phi_result = PHI_RESULT (new_phis[0]); - if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == COND_REDUCTION + if (STMT_VINFO_REDUC_TYPE (reduc_info) == COND_REDUCTION && reduc_fn != IFN_LAST) { /* For condition reductions, we have a vector (NEW_PHI_RESULT) containing @@ -4725,7 +4702,7 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info, gsi_insert_seq_before (&exit_gsi, stmts, GSI_SAME_STMT); scalar_results.safe_push (new_temp); } - else if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == COND_REDUCTION + else if (STMT_VINFO_REDUC_TYPE (reduc_info) == COND_REDUCTION && reduc_fn == IFN_LAST) { /* Condition reduction without supported IFN_REDUC_MAX. Generate @@ -4838,8 +4815,7 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info, gimple_set_lhs (epilog_stmt, new_temp); gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT); - if ((STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) - == INTEGER_INDUC_COND_REDUCTION) + if ((STMT_VINFO_REDUC_TYPE (reduc_info) == INTEGER_INDUC_COND_REDUCTION) && induc_val) { /* Earlier we set the initial value to be a vector if induc_val @@ -5201,8 +5177,7 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info, scalar_results.safe_push (new_temp); } - if ((STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) - == INTEGER_INDUC_COND_REDUCTION) + if ((STMT_VINFO_REDUC_TYPE (reduc_info) == INTEGER_INDUC_COND_REDUCTION) && induc_val) { /* Earlier we set the initial value to be a vector if induc_val @@ -5486,8 +5461,6 @@ vectorize_fold_left_reduction (stmt_vec_info stmt_info, gcc_assert (!nested_in_vect_loop_p (loop, stmt_info)); gcc_assert (ncopies == 1); gcc_assert (TREE_CODE_LENGTH (code) == binary_op); - gcc_assert (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) - == FOLD_LEFT_REDUCTION); if (slp_node) gcc_assert (known_eq (TYPE_VECTOR_SUBPARTS (vectype_out), @@ -5762,8 +5735,7 @@ build_vect_cond_expr (enum tree_code code, tree vop[3], tree mask, does *NOT* necessarily hold for reduction patterns. */ bool -vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, - stmt_vec_info *vec_stmt, slp_tree slp_node, +vectorizable_reduction (stmt_vec_info stmt_info, slp_tree slp_node, slp_instance slp_node_instance, stmt_vector_for_cost *cost_vec) { @@ -5774,9 +5746,7 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, class loop *loop = LOOP_VINFO_LOOP (loop_vinfo); enum tree_code code; internal_fn reduc_fn; - machine_mode vec_mode; int op_type; - optab optab; enum vect_def_type dt, cond_reduc_dt = vect_unknown_def_type; stmt_vec_info cond_stmt_vinfo = NULL; tree scalar_type; @@ -5799,6 +5769,69 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, && STMT_VINFO_DEF_TYPE (stmt_info) != vect_nested_cycle) return false; + /* The stmt we store reduction analysis meta on. */ + stmt_vec_info reduc_info = info_for_reduction (stmt_info); + reduc_info->is_reduc_info = true; + + if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle) + { + if (is_a (stmt_info->stmt)) + { + /* Analysis for double-reduction is done on the outer + loop PHI, nested cycles have no further restrictions. */ + STMT_VINFO_TYPE (stmt_info) = cycle_phi_info_type; + /* For nested cycles we want to let regular vectorizable_* + routines handle code-generation. */ + if (STMT_VINFO_DEF_TYPE (reduc_info) != vect_double_reduction_def) + { + stmt_info = STMT_VINFO_REDUC_DEF (stmt_info); + STMT_VINFO_DEF_TYPE (stmt_info) = vect_internal_def; + STMT_VINFO_DEF_TYPE (vect_stmt_to_vectorize (stmt_info)) + = vect_internal_def; + } + } + else + STMT_VINFO_TYPE (stmt_info) = reduc_vec_info_type; + return true; + } + + stmt_vec_info orig_stmt_of_analysis = stmt_info; + if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def + || STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def) + { + if (!is_a (stmt_info->stmt)) + { + STMT_VINFO_TYPE (stmt_info) = reduc_vec_info_type; + return true; + } + if (slp_node) + { + slp_node_instance->reduc_phis = slp_node; + /* ??? We're leaving slp_node to point to the PHIs, we only + need it to get at the number of vector stmts which wasn't + yet initialized for the instance root. */ + } + if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def) + stmt_info = vect_stmt_to_vectorize (STMT_VINFO_REDUC_DEF (stmt_info)); + else /* STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def */ + { + use_operand_p use_p; + gimple *use_stmt; + bool res = single_imm_use (gimple_phi_result (stmt_info->stmt), + &use_p, &use_stmt); + gcc_assert (res); + stmt_info = loop_vinfo->lookup_stmt (use_stmt); + stmt_info = vect_stmt_to_vectorize (STMT_VINFO_REDUC_DEF (stmt_info)); + } + /* STMT_VINFO_REDUC_DEF doesn't point to the first but the last + element. */ + if (slp_node && REDUC_GROUP_FIRST_ELEMENT (stmt_info)) + { + gcc_assert (!REDUC_GROUP_NEXT_ELEMENT (stmt_info)); + stmt_info = REDUC_GROUP_FIRST_ELEMENT (stmt_info); + } + } + if (nested_in_vect_loop_p (loop, stmt_info)) { loop = loop->inner; @@ -5809,18 +5842,6 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, gcc_assert (slp_node && REDUC_GROUP_FIRST_ELEMENT (stmt_info) == stmt_info); - if (is_a (stmt_info->stmt)) - { - /* Analysis is fully done on the reduction stmt invocation. */ - gcc_assert (! vec_stmt); - - if (slp_node) - slp_node_instance->reduc_phis = slp_node; - - STMT_VINFO_TYPE (stmt_info) = cycle_phi_info_type; - return true; - } - /* 1. Is vectorizable reduction? */ /* Not supportable if the reduction variable is used in the loop, unless it's a reduction chain. */ @@ -5898,13 +5919,10 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, The last use is the reduction variable. In case of nested cycle this assumption is not true: we use reduc_index to record the index of the reduction variable. */ - stmt_vec_info reduc_def_info; - if (orig_stmt_info) - reduc_def_info = STMT_VINFO_REDUC_DEF (orig_stmt_info); - else - reduc_def_info = STMT_VINFO_REDUC_DEF (stmt_info); - gcc_assert (reduc_def_info); - gphi *reduc_def_phi = as_a (reduc_def_info->stmt); + stmt_vec_info phi_info = STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info)); + /* PHIs should not participate in patterns. */ + gcc_assert (!STMT_VINFO_RELATED_STMT (phi_info)); + gphi *reduc_def_phi = as_a (phi_info->stmt); tree reduc_def = PHI_RESULT (reduc_def_phi); int reduc_index = -1; for (i = 0; i < op_type; i++) @@ -5973,7 +5991,7 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, directy used in stmt. */ if (reduc_index == -1) { - if (STMT_VINFO_REDUC_TYPE (stmt_info) == FOLD_LEFT_REDUCTION) + if (STMT_VINFO_REDUC_TYPE (phi_info) == FOLD_LEFT_REDUCTION) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, @@ -5998,17 +6016,10 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, return false; } - /* PHIs should not participate in patterns. */ - gcc_assert (!STMT_VINFO_RELATED_STMT (reduc_def_info)); - enum vect_reduction_type v_reduc_type - = STMT_VINFO_REDUC_TYPE (reduc_def_info); - stmt_vec_info tmp = STMT_VINFO_REDUC_DEF (reduc_def_info); - - if (!vec_stmt) - STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) = v_reduc_type; + enum vect_reduction_type v_reduc_type = STMT_VINFO_REDUC_TYPE (phi_info); + STMT_VINFO_REDUC_TYPE (reduc_info) = v_reduc_type; /* If we have a condition reduction, see if we can simplify it further. */ - if (v_reduc_type == COND_REDUCTION - && !vec_stmt) + if (v_reduc_type == COND_REDUCTION) { /* TODO: We can't yet handle reduction chains, since we need to treat each COND_EXPR in the chain specially, not just the last one. @@ -6037,7 +6048,7 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "optimizing condition reduction with" " FOLD_EXTRACT_LAST.\n"); - STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) = EXTRACT_LAST_REDUCTION; + STMT_VINFO_REDUC_TYPE (reduc_info) = EXTRACT_LAST_REDUCTION; } else if (cond_reduc_dt == vect_induction_def) { @@ -6077,12 +6088,14 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, } if (cond_reduc_val) { - STMT_VINFO_VEC_COND_REDUC_CODE (stmt_info) - = cond_reduc_op_code; - STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL (stmt_info) + if (dump_enabled_p ()) + dump_printf_loc (MSG_NOTE, vect_location, + "condition expression based on " + "integer induction.\n"); + STMT_VINFO_VEC_COND_REDUC_CODE (reduc_info) = cond_reduc_op_code; + STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL (reduc_info) = cond_reduc_val; - STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) - = INTEGER_INDUC_COND_REDUCTION; + STMT_VINFO_REDUC_TYPE (reduc_info) = INTEGER_INDUC_COND_REDUCTION; } } else if (cond_reduc_dt == vect_constant_def) @@ -6107,30 +6120,21 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, "condition expression based on " "compile time constant.\n"); /* Record reduction code at analysis stage. */ - STMT_VINFO_VEC_COND_REDUC_CODE (stmt_info) + STMT_VINFO_VEC_COND_REDUC_CODE (reduc_info) = integer_onep (e) ? MAX_EXPR : MIN_EXPR; - STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) - = CONST_COND_REDUCTION; + STMT_VINFO_REDUC_TYPE (reduc_info) = CONST_COND_REDUCTION; } } } } - if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == INTEGER_INDUC_COND_REDUCTION - && dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, - "condition expression based on " - "integer induction.\n"); - if (orig_stmt_info) - gcc_assert (tmp == orig_stmt_info - || REDUC_GROUP_FIRST_ELEMENT (tmp) == orig_stmt_info); - else + if (REDUC_GROUP_FIRST_ELEMENT (stmt_info)) /* We changed STMT to be the first stmt in reduction chain, hence we check that in this case the first element in the chain is STMT. */ - gcc_assert (tmp == stmt_info - || REDUC_GROUP_FIRST_ELEMENT (tmp) == stmt_info); + gcc_assert (REDUC_GROUP_FIRST_ELEMENT (STMT_VINFO_REDUC_DEF (phi_info)) + == vect_orig_stmt (stmt_info)); - if (STMT_VINFO_LIVE_P (reduc_def_info)) + if (STMT_VINFO_LIVE_P (phi_info)) return false; if (slp_node) @@ -6140,25 +6144,16 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, gcc_assert (ncopies >= 1); - vec_mode = TYPE_MODE (vectype_in); poly_uint64 nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out); if (nested_cycle) { - basic_block def_bb = gimple_bb (reduc_def_phi); - class loop *def_stmt_loop = def_bb->loop_father; - tree def_arg = PHI_ARG_DEF_FROM_EDGE (reduc_def_phi, - loop_preheader_edge (def_stmt_loop)); - stmt_vec_info def_arg_stmt_info = loop_vinfo->lookup_def (def_arg); - if (def_arg_stmt_info - && (STMT_VINFO_DEF_TYPE (def_arg_stmt_info) - == vect_double_reduction_def)) - double_reduc = true; - gcc_assert (!double_reduc || STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_outer_by_reduction); + gcc_assert (STMT_VINFO_DEF_TYPE (reduc_info) + == vect_double_reduction_def); + double_reduc = true; } - vect_reduction_type reduction_type - = STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info); + vect_reduction_type reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info); if ((double_reduc || reduction_type != TREE_CODE_REDUCTION) && ncopies > 1) { @@ -6169,78 +6164,6 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, return false; } - if (code == COND_EXPR) - { - /* Only call during the analysis stage, otherwise we'll lose - STMT_VINFO_TYPE. */ - gcc_assert (nested_cycle || reduc_index > 0); - if (!vec_stmt && !vectorizable_condition (stmt_info, gsi, NULL, - true, reduc_index, - NULL, cost_vec)) - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "unsupported condition in reduction\n"); - return false; - } - } - else if (code == LSHIFT_EXPR || code == RSHIFT_EXPR - || code == LROTATE_EXPR || code == RROTATE_EXPR) - { - /* Only call during the analysis stage, otherwise we'll lose - STMT_VINFO_TYPE. We only support this for nested cycles - without double reductions at the moment. */ - if (!nested_cycle - || double_reduc - || (!vec_stmt && !vectorizable_shift (stmt_info, gsi, NULL, - NULL, cost_vec))) - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "unsupported shift or rotation in reduction\n"); - return false; - } - } - else - { - /* 4. Supportable by target? */ - - /* 4.1. check support for the operation in the loop */ - optab = optab_for_tree_code (code, vectype_in, optab_default); - if (!optab) - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "no optab.\n"); - - return false; - } - - if (optab_handler (optab, vec_mode) == CODE_FOR_nothing) - { - if (dump_enabled_p ()) - dump_printf (MSG_NOTE, "op not supported by target.\n"); - - if (maybe_ne (GET_MODE_SIZE (vec_mode), UNITS_PER_WORD) - || !vect_worthwhile_without_simd_p (loop_vinfo, code)) - return false; - - if (dump_enabled_p ()) - dump_printf (MSG_NOTE, "proceeding using word mode.\n"); - } - - /* Worthwhile without SIMD support? */ - if (!VECTOR_MODE_P (TYPE_MODE (vectype_in)) - && !vect_worthwhile_without_simd_p (loop_vinfo, code)) - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not worthwhile without SIMD support.\n"); - - return false; - } - } - /* 4.2. Check support for the epilog operation. If STMT represents a reduction pattern, then the type of the @@ -6285,7 +6208,6 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, reduction variable, and get the tree-code from orig_stmt. */ orig_code = gimple_assign_rhs_code (orig_stmt_info->stmt); gcc_assert (vectype_out); - vec_mode = TYPE_MODE (vectype_out); } else { @@ -6301,11 +6223,11 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, if (reduction_type == CONST_COND_REDUCTION || reduction_type == INTEGER_INDUC_COND_REDUCTION) { - orig_code = STMT_VINFO_VEC_COND_REDUC_CODE (stmt_info); + orig_code = STMT_VINFO_VEC_COND_REDUC_CODE (reduc_info); gcc_assert (orig_code == MAX_EXPR || orig_code == MIN_EXPR); } } - STMT_VINFO_REDUC_CODE (stmt_info) = orig_code; + STMT_VINFO_REDUC_CODE (reduc_info) = orig_code; reduc_fn = IFN_LAST; @@ -6353,7 +6275,7 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, OPTIMIZE_FOR_SPEED)) reduc_fn = IFN_REDUC_MAX; } - STMT_VINFO_REDUC_FN (stmt_info) = reduc_fn; + STMT_VINFO_REDUC_FN (reduc_info) = reduc_fn; if (reduction_type != EXTRACT_LAST_REDUCTION && (!nested_cycle || double_reduc) @@ -6436,7 +6358,7 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, which each SLP statement has its own initial value and in which that value needs to be repeated for every instance of the statement within the initial vector. */ - unsigned int group_size = SLP_TREE_SCALAR_STMTS (slp_node).length (); + unsigned int group_size = SLP_INSTANCE_GROUP_SIZE (slp_node_instance); scalar_mode elt_mode = SCALAR_TYPE_MODE (TREE_TYPE (vectype_out)); if (!neutral_op && !can_duplicate_and_interleave_p (group_size, elt_mode)) @@ -6467,22 +6389,8 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, constant fits the type in the pattern recognition pass. */ if (code == DOT_PROD_EXPR && !types_compatible_p (TREE_TYPE (ops[0]), TREE_TYPE (ops[1]))) - { - gcc_unreachable (); - /* No testcase for this. PR49478. */ - if (TREE_CODE (ops[0]) == INTEGER_CST) - ops[0] = fold_convert (TREE_TYPE (ops[1]), ops[0]); - else if (TREE_CODE (ops[1]) == INTEGER_CST) - ops[1] = fold_convert (TREE_TYPE (ops[0]), ops[1]); - else - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "invalid types in dot-prod\n"); - - return false; - } - } + /* No testcase for this. PR49478. */ + gcc_unreachable (); if (reduction_type == COND_REDUCTION) { @@ -6551,6 +6459,52 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, && vect_stmt_to_vectorize (use_stmt_info) == stmt_info) single_defuse_cycle = true; + if (single_defuse_cycle + || code == DOT_PROD_EXPR + || code == WIDEN_SUM_EXPR + || code == SAD_EXPR) + { + gcc_assert (code != COND_EXPR); + + /* 4. Supportable by target? */ + + /* 4.1. check support for the operation in the loop */ + optab optab = optab_for_tree_code (code, vectype_in, optab_default); + if (!optab) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "no optab.\n"); + + return false; + } + + machine_mode vec_mode = TYPE_MODE (vectype_in); + if (optab_handler (optab, vec_mode) == CODE_FOR_nothing) + { + if (dump_enabled_p ()) + dump_printf (MSG_NOTE, "op not supported by target.\n"); + + if (maybe_ne (GET_MODE_SIZE (vec_mode), UNITS_PER_WORD) + || !vect_worthwhile_without_simd_p (loop_vinfo, code)) + return false; + + if (dump_enabled_p ()) + dump_printf (MSG_NOTE, "proceeding using word mode.\n"); + } + + /* Worthwhile without SIMD support? */ + if (!VECTOR_MODE_P (TYPE_MODE (vectype_in)) + && !vect_worthwhile_without_simd_p (loop_vinfo, code)) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "not worthwhile without SIMD support.\n"); + + return false; + } + } + /* If the reduction stmt is one of the patterns that have lane reduction embedded we cannot handle the case of ! single_defuse_cycle. */ if ((ncopies > 1 @@ -6575,10 +6529,8 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, vec_loop_masks *masks = &LOOP_VINFO_MASKS (loop_vinfo); bool mask_by_cond_expr = use_mask_by_cond_expr_p (code, cond_fn, vectype_in); - /* transformation not required. */ - gcc_assert (!vec_stmt); - - vect_model_reduction_cost (stmt_info, reduc_fn, ncopies, cost_vec); + vect_model_reduction_cost (stmt_info, reduc_fn, reduction_type, ncopies, + cost_vec); if (loop_vinfo && LOOP_VINFO_CAN_FULLY_MASK_P (loop_vinfo)) { if (reduction_type != FOLD_LEFT_REDUCTION @@ -6609,7 +6561,18 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, && reduction_type == FOLD_LEFT_REDUCTION) dump_printf_loc (MSG_NOTE, vect_location, "using an in-order (fold-left) reduction.\n"); - STMT_VINFO_TYPE (stmt_info) = reduc_vec_info_type; + STMT_VINFO_TYPE (orig_stmt_of_analysis) = cycle_phi_info_type; + /* All but single defuse-cycle optimized, lane-reducing and fold-left + reductions go through their own vectorizable_* routines. */ + if (!single_defuse_cycle + && code != DOT_PROD_EXPR + && code != WIDEN_SUM_EXPR + && code != SAD_EXPR + && reduction_type != FOLD_LEFT_REDUCTION) + { + STMT_VINFO_DEF_TYPE (stmt_info) = vect_internal_def; + STMT_VINFO_DEF_TYPE (vect_orig_stmt (stmt_info)) = vect_internal_def; + } return true; } @@ -6632,13 +6595,15 @@ vect_transform_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, bool single_defuse_cycle = false; int j; tree ops[3]; - bool nested_cycle = false; int vec_num; + stmt_vec_info reduc_info = info_for_reduction (stmt_info); + gcc_assert (reduc_info->is_reduc_info); + if (nested_in_vect_loop_p (loop, stmt_info)) { loop = loop->inner; - nested_cycle = true; + gcc_assert (STMT_VINFO_DEF_TYPE (reduc_info) == vect_double_reduction_def); } gassign *stmt = as_a (stmt_info->stmt); @@ -6674,10 +6639,8 @@ vect_transform_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, The last use is the reduction variable. In case of nested cycle this assumption is not true: we use reduc_index to record the index of the reduction variable. */ - stmt_vec_info reduc_def_info - = STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info)); - gcc_assert (reduc_def_info); - gphi *reduc_def_phi = as_a (reduc_def_info->stmt); + stmt_vec_info phi_info = STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info)); + gphi *reduc_def_phi = as_a (phi_info->stmt); tree reduc_def = PHI_RESULT (reduc_def_phi); int reduc_index = -1; for (i = 0; i < op_type; i++) @@ -6718,19 +6681,12 @@ vect_transform_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, if (!vectype_in) vectype_in = vectype_out; - if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == INTEGER_INDUC_COND_REDUCTION - && dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, - "condition expression based on " - "integer induction.\n"); - if (slp_node) ncopies = 1; else ncopies = vect_get_num_copies (loop_vinfo, vectype_in); - vect_reduction_type reduction_type - = STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info); + vect_reduction_type reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info); /* In case of widenning multiplication by a constant, we update the type of the constant to be the type of the other operand. We check that the @@ -6814,18 +6770,16 @@ vect_transform_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, if (reduction_type == FOLD_LEFT_REDUCTION) { - internal_fn reduc_fn = STMT_VINFO_REDUC_FN (stmt_info); + internal_fn reduc_fn = STMT_VINFO_REDUC_FN (reduc_info); return vectorize_fold_left_reduction (stmt_info, gsi, vec_stmt, slp_node, reduc_def_phi, code, reduc_fn, ops, vectype_in, reduc_index, masks); } - if (reduction_type == EXTRACT_LAST_REDUCTION) - { - gcc_assert (!slp_node && reduc_index > 0); - return vectorizable_condition (stmt_info, gsi, vec_stmt, - true, reduc_index, NULL, NULL); - } + gcc_assert (single_defuse_cycle + || code == DOT_PROD_EXPR + || code == WIDEN_SUM_EXPR + || code == SAD_EXPR); /* Create the destination vector */ tree scalar_dest = gimple_assign_lhs (stmt); @@ -6842,20 +6796,6 @@ vect_transform_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, for (j = 0; j < ncopies; j++) { - if (code == COND_EXPR) - { - gcc_assert (!slp_node && (nested_cycle || reduc_index > 0)); - vectorizable_condition (stmt_info, gsi, vec_stmt, true, - reduc_index, NULL, NULL); - break; - } - if (code == LSHIFT_EXPR - || code == RSHIFT_EXPR) - { - vectorizable_shift (stmt_info, gsi, vec_stmt, slp_node, NULL); - break; - } - /* Handle uses. */ if (j == 0) { @@ -7015,17 +6955,13 @@ vect_transform_cycle_phi (stmt_vec_info stmt_info, stmt_vec_info *vec_stmt, gphi *phi = as_a (stmt_info->stmt); tree phi_result = gimple_phi_result (phi); - if (STMT_VINFO_REDUC_TYPE (stmt_info) == FOLD_LEFT_REDUCTION) - /* Leave the scalar phi in place. Note that checking - STMT_VINFO_VEC_REDUCTION_TYPE (as below) only works - for reductions involving a single statement. */ - return true; - stmt_vec_info reduc_stmt_info = STMT_VINFO_REDUC_DEF (stmt_info); reduc_stmt_info = vect_stmt_to_vectorize (reduc_stmt_info); + stmt_vec_info reduc_info = info_for_reduction (stmt_info); + gcc_assert (reduc_info->is_reduc_info); - if (STMT_VINFO_VEC_REDUCTION_TYPE (reduc_stmt_info) - == EXTRACT_LAST_REDUCTION) + if (STMT_VINFO_REDUC_TYPE (reduc_info) == EXTRACT_LAST_REDUCTION + || STMT_VINFO_REDUC_TYPE (reduc_info) == FOLD_LEFT_REDUCTION) /* Leave the scalar phi in place. */ return true; @@ -7091,8 +7027,7 @@ vect_transform_cycle_phi (stmt_vec_info stmt_info, stmt_vec_info *vec_stmt, stmt_vec_info first = REDUC_GROUP_FIRST_ELEMENT (reduc_stmt_info); tree neutral_op = neutral_op_for_slp_reduction (slp_node, - STMT_VINFO_REDUC_CODE - (first ? first : reduc_stmt_info), + STMT_VINFO_REDUC_CODE (reduc_info), first != NULL); get_initial_defs_for_reduction (slp_node_instance->reduc_phis, &vec_initial_defs, vec_num, @@ -7107,27 +7042,20 @@ vect_transform_cycle_phi (stmt_vec_info stmt_info, stmt_vec_info *vec_stmt, /* Optimize: if initial_def is for REDUC_MAX smaller than the base and we can't use zero for induc_val, use initial_def. Similarly for REDUC_MIN and initial_def larger than the base. */ - if (STMT_VINFO_VEC_REDUCTION_TYPE (reduc_stmt_info) - == INTEGER_INDUC_COND_REDUCTION) + if (STMT_VINFO_REDUC_TYPE (reduc_info) == INTEGER_INDUC_COND_REDUCTION) { - tree induc_val - = STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL (reduc_stmt_info); + tree induc_val = STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL (reduc_info); if (TREE_CODE (initial_def) == INTEGER_CST - && (STMT_VINFO_VEC_REDUCTION_TYPE (reduc_stmt_info) - == INTEGER_INDUC_COND_REDUCTION) && !integer_zerop (induc_val) - && (((STMT_VINFO_VEC_COND_REDUC_CODE (reduc_stmt_info) - == MAX_EXPR) + && (((STMT_VINFO_VEC_COND_REDUC_CODE (reduc_info) == MAX_EXPR) && tree_int_cst_lt (initial_def, induc_val)) - || ((STMT_VINFO_VEC_COND_REDUC_CODE (reduc_stmt_info) - == MIN_EXPR) + || ((STMT_VINFO_VEC_COND_REDUC_CODE (reduc_info) == MIN_EXPR) && tree_int_cst_lt (induc_val, initial_def)))) { induc_val = initial_def; /* Communicate we used the initial_def to epilouge generation. */ - STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL (reduc_stmt_info) - = NULL_TREE; + STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL (reduc_info) = NULL_TREE; } vec_initial_def = build_vector_from_val (vectype_out, induc_val); } @@ -7142,24 +7070,13 @@ vect_transform_cycle_phi (stmt_vec_info stmt_info, stmt_vec_info *vec_stmt, { tree adjustment_def = NULL_TREE; tree *adjustment_defp = &adjustment_def; - enum tree_code code = STMT_VINFO_REDUC_CODE (reduc_stmt_info); - /* ??? For the outer loop PHI we have to do a bit of searching - to find the stmt with the code. reduc_stmt_info here is the - loop-closed PHI of the inner reduction which means we can look - at its single-arg def. */ + enum tree_code code = STMT_VINFO_REDUC_CODE (reduc_info); if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def) - { - tree def = gimple_phi_arg_def - (as_a (reduc_stmt_info->stmt), 0); - code = STMT_VINFO_REDUC_CODE - (vect_stmt_to_vectorize (loop_vinfo->lookup_def (def))); - adjustment_defp = NULL; - } + adjustment_defp = NULL; vec_initial_def = get_initial_def_for_reduction (reduc_stmt_info, code, initial_def, adjustment_defp); - STMT_VINFO_REDUC_EPILOGUE_ADJUSTMENT (reduc_stmt_info) - = adjustment_def; + STMT_VINFO_REDUC_EPILOGUE_ADJUSTMENT (reduc_info) = adjustment_def; } vec_initial_defs.create (1); vec_initial_defs.quick_push (vec_initial_def); @@ -7894,30 +7811,26 @@ vectorizable_live_operation (stmt_vec_info stmt_info, /* The last stmt of a reduction is live and vectorized via vect_create_epilog_for_reduction. vectorizable_reduction assessed validity so just trigger the transform here. */ - if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def - || STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def) + if (STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info))) { if (!vec_stmt) return true; - if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def) + if (slp_node) { - if (STMT_VINFO_REDUC_TYPE (stmt_info) == FOLD_LEFT_REDUCTION - || (STMT_VINFO_REDUC_TYPE (stmt_info) == COND_REDUCTION - && (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) - == EXTRACT_LAST_REDUCTION))) + /* For reduction chains the meta-info is attached to + the group leader. */ + if (REDUC_GROUP_FIRST_ELEMENT (stmt_info)) + stmt_info = REDUC_GROUP_FIRST_ELEMENT (stmt_info); + /* For SLP reductions we vectorize the epilogue for + all involved stmts together. */ + else if (slp_index != 0) return true; - if (slp_node) - { - /* For reduction chains the meta-info is attached to - the group leader. */ - if (REDUC_GROUP_FIRST_ELEMENT (stmt_info)) - stmt_info = REDUC_GROUP_FIRST_ELEMENT (stmt_info); - /* For SLP reductions we vectorize the epilogue for - all involved stmts together. */ - else if (slp_index != 0) - return true; - } } + stmt_vec_info reduc_info = info_for_reduction (stmt_info); + gcc_assert (reduc_info->is_reduc_info); + if (STMT_VINFO_REDUC_TYPE (reduc_info) == FOLD_LEFT_REDUCTION + || STMT_VINFO_REDUC_TYPE (reduc_info) == EXTRACT_LAST_REDUCTION) + return true; vect_create_epilog_for_reduction (stmt_info, slp_node, slp_node_instance); return true; diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 09db74b..f9c7408 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -838,9 +838,11 @@ vect_convert_output (stmt_vec_info stmt_info, tree type, gimple *pattern_stmt, static bool vect_reassociating_reduction_p (stmt_vec_info stmt_vinfo) { - return (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def - ? STMT_VINFO_REDUC_TYPE (stmt_vinfo) != FOLD_LEFT_REDUCTION - : REDUC_GROUP_FIRST_ELEMENT (stmt_vinfo) != NULL); + if (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def) + return (STMT_VINFO_REDUC_TYPE (STMT_VINFO_REDUC_DEF (stmt_vinfo)) + != FOLD_LEFT_REDUCTION); + else + return REDUC_GROUP_FIRST_ELEMENT (stmt_vinfo) != NULL; } /* As above, but also require it to have code CODE and to be a reduction diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 9b86b67..77b18ba 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -3957,17 +3957,6 @@ vect_schedule_slp_instance (slp_tree node, slp_instance instance, stmt_vec_info last_stmt_info = vect_find_last_scalar_stmt_in_slp (node); si = gsi_for_stmt (last_stmt_info->stmt); - /* Mark the first element of the reduction chain as reduction to properly - transform the node. In the analysis phase only the last element of the - chain is marked as reduction. */ - if (!STMT_VINFO_GROUPED_ACCESS (stmt_info) - && REDUC_GROUP_FIRST_ELEMENT (stmt_info) - && REDUC_GROUP_FIRST_ELEMENT (stmt_info) == stmt_info) - { - STMT_VINFO_DEF_TYPE (stmt_info) = vect_reduction_def; - STMT_VINFO_TYPE (stmt_info) = reduc_vec_info_type; - } - /* Handle two-operation SLP nodes by vectorizing the group with both operations and then performing a merge. */ if (SLP_TREE_TWO_OPERATORS (node)) diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index cac7410..9ebd3e3 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -5501,7 +5501,7 @@ vect_supportable_shift (enum tree_code code, tree scalar_type) stmt to replace it, put it in VEC_STMT, and insert it at GSI. Return true if STMT_INFO is vectorizable in this way. */ -bool +static bool vectorizable_shift (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, stmt_vec_info *vec_stmt, slp_tree slp_node, stmt_vector_for_cost *cost_vec) @@ -9776,10 +9776,9 @@ vect_is_simple_cond (tree cond, vec_info *vinfo, Return true if STMT_INFO is vectorizable in this way. */ -bool +static bool vectorizable_condition (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, - stmt_vec_info *vec_stmt, bool for_reduction, - int reduc_index, + stmt_vec_info *vec_stmt, slp_tree slp_node, stmt_vector_for_cost *cost_vec) { vec_info *vinfo = stmt_info->vinfo; @@ -9812,17 +9811,36 @@ vectorizable_condition (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo) return false; - if (for_reduction && STMT_SLP_TYPE (stmt_info)) + /* Is vectorizable conditional operation? */ + gassign *stmt = dyn_cast (stmt_info->stmt); + if (!stmt) return false; - vect_reduction_type reduction_type - = STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info); - if (!for_reduction) + code = gimple_assign_rhs_code (stmt); + if (code != COND_EXPR) + return false; + + stmt_vec_info reduc_info = NULL; + int reduc_index = -1; + vect_reduction_type reduction_type = TREE_CODE_REDUCTION; + bool for_reduction + = STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info)) != NULL; + if (for_reduction) + { + if (STMT_SLP_TYPE (stmt_info)) + return false; + reduc_info = info_for_reduction (stmt_info); + reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info); + reduc_index = STMT_VINFO_REDUC_IDX (stmt_info); + gcc_assert (reduction_type != EXTRACT_LAST_REDUCTION + || reduc_index != -1); + } + else { if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def) return false; - /* FORNOW: not yet supported. */ + /* FORNOW: only supported as part of a reduction. */ if (STMT_VINFO_LIVE_P (stmt_info)) { if (dump_enabled_p ()) @@ -9832,16 +9850,6 @@ vectorizable_condition (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, } } - /* Is vectorizable conditional operation? */ - gassign *stmt = dyn_cast (stmt_info->stmt); - if (!stmt) - return false; - - code = gimple_assign_rhs_code (stmt); - - if (code != COND_EXPR) - return false; - tree vectype = STMT_VINFO_VECTYPE (stmt_info); tree vectype1 = NULL_TREE, vectype2 = NULL_TREE; @@ -10665,12 +10673,10 @@ vect_analyze_stmt (stmt_vec_info stmt_info, bool *need_to_vectorize, || vectorizable_load (stmt_info, NULL, NULL, node, node_instance, cost_vec) || vectorizable_store (stmt_info, NULL, NULL, node, cost_vec) - || vectorizable_reduction (stmt_info, NULL, NULL, node, - node_instance, cost_vec) + || vectorizable_reduction (stmt_info, node, node_instance, cost_vec) || vectorizable_induction (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_shift (stmt_info, NULL, NULL, node, cost_vec) - || vectorizable_condition (stmt_info, NULL, NULL, false, -1, node, - cost_vec) + || vectorizable_condition (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_comparison (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_lc_phi (stmt_info, NULL, node)); @@ -10689,8 +10695,7 @@ vect_analyze_stmt (stmt_vec_info stmt_info, bool *need_to_vectorize, || vectorizable_load (stmt_info, NULL, NULL, node, node_instance, cost_vec) || vectorizable_store (stmt_info, NULL, NULL, node, cost_vec) - || vectorizable_condition (stmt_info, NULL, NULL, false, -1, node, - cost_vec) + || vectorizable_condition (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_comparison (stmt_info, NULL, NULL, node, cost_vec)); } @@ -10796,8 +10801,7 @@ vect_transform_stmt (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, break; case condition_vec_info_type: - done = vectorizable_condition (stmt_info, gsi, &vec_stmt, false, -1, - slp_node, NULL); + done = vectorizable_condition (stmt_info, gsi, &vec_stmt, slp_node, NULL); gcc_assert (done); break; @@ -10895,20 +10899,22 @@ vect_transform_stmt (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, /* If this stmt defines a value used on a backedge, update the vectorized PHIs. */ stmt_vec_info orig_stmt_info = vect_orig_stmt (stmt_info); - if (!slp_node && STMT_VINFO_REDUC_DEF (orig_stmt_info) - && STMT_VINFO_REDUC_TYPE (orig_stmt_info) != FOLD_LEFT_REDUCTION - && (STMT_VINFO_REDUC_TYPE (orig_stmt_info) != COND_REDUCTION - || (STMT_VINFO_VEC_REDUCTION_TYPE (orig_stmt_info) - != EXTRACT_LAST_REDUCTION)) - && is_a (STMT_VINFO_REDUC_DEF (orig_stmt_info)->stmt)) - { - gphi *phi = as_a (STMT_VINFO_REDUC_DEF (orig_stmt_info)->stmt); - if (dominated_by_p (CDI_DOMINATORS, - gimple_bb (orig_stmt_info->stmt), gimple_bb (phi))) + stmt_vec_info reduc_info; + if (STMT_VINFO_REDUC_DEF (orig_stmt_info) + && (reduc_info = info_for_reduction (orig_stmt_info)) + && STMT_VINFO_REDUC_TYPE (reduc_info) != FOLD_LEFT_REDUCTION + && STMT_VINFO_REDUC_TYPE (reduc_info) != EXTRACT_LAST_REDUCTION) + { + gphi *phi; + if (!slp_node + && (phi = dyn_cast + (STMT_VINFO_REDUC_DEF (orig_stmt_info)->stmt)) + && dominated_by_p (CDI_DOMINATORS, + gimple_bb (orig_stmt_info->stmt), gimple_bb (phi))) { edge e = loop_latch_edge (gimple_bb (phi)->loop_father); stmt_vec_info phi_info - = STMT_VINFO_VEC_STMT (STMT_VINFO_REDUC_DEF (orig_stmt_info)); + = STMT_VINFO_VEC_STMT (STMT_VINFO_REDUC_DEF (orig_stmt_info)); stmt_vec_info vec_stmt = STMT_VINFO_VEC_STMT (stmt_info); do { @@ -10921,24 +10927,19 @@ vect_transform_stmt (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, while (phi_info); gcc_assert (!vec_stmt); } - } - else if (slp_node && STMT_VINFO_REDUC_DEF (orig_stmt_info) - /* Going back and forth via STMT_VINFO_REDUC_DEF gets us to the - stmt with the reduction meta in case of reduction groups. */ - && (STMT_VINFO_REDUC_TYPE - (STMT_VINFO_REDUC_DEF (STMT_VINFO_REDUC_DEF (orig_stmt_info))) - != FOLD_LEFT_REDUCTION) - && slp_node != slp_node_instance->reduc_phis) - { - slp_tree phi_node = slp_node_instance->reduc_phis; - gphi *phi = as_a (SLP_TREE_SCALAR_STMTS (phi_node)[0]->stmt); - edge e = loop_latch_edge (gimple_bb (phi)->loop_father); - gcc_assert (SLP_TREE_VEC_STMTS (phi_node).length () - == SLP_TREE_VEC_STMTS (slp_node).length ()); - for (unsigned i = 0; i < SLP_TREE_VEC_STMTS (phi_node).length (); ++i) - add_phi_arg (as_a (SLP_TREE_VEC_STMTS (phi_node)[i]->stmt), - gimple_get_lhs (SLP_TREE_VEC_STMTS (slp_node)[i]->stmt), - e, gimple_phi_arg_location (phi, e->dest_idx)); + else if (slp_node + && slp_node != slp_node_instance->reduc_phis) + { + slp_tree phi_node = slp_node_instance->reduc_phis; + gphi *phi = as_a (SLP_TREE_SCALAR_STMTS (phi_node)[0]->stmt); + edge e = loop_latch_edge (gimple_bb (phi)->loop_father); + gcc_assert (SLP_TREE_VEC_STMTS (phi_node).length () + == SLP_TREE_VEC_STMTS (slp_node).length ()); + for (unsigned i = 0; i < SLP_TREE_VEC_STMTS (phi_node).length (); ++i) + add_phi_arg (as_a (SLP_TREE_VEC_STMTS (phi_node)[i]->stmt), + gimple_get_lhs (SLP_TREE_VEC_STMTS (slp_node)[i]->stmt), + e, gimple_phi_arg_location (phi, e->dest_idx)); + } } /* Handle stmts whose DEF is used outside the loop-nest that is diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index 800c99f..3e8637f 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -637,7 +637,7 @@ vec_info::new_stmt_vec_info (gimple *stmt) STMT_VINFO_TYPE (res) = undef_vec_info_type; STMT_VINFO_RELEVANT (res) = vect_unused_in_scope; STMT_VINFO_VECTORIZABLE (res) = true; - STMT_VINFO_VEC_REDUCTION_TYPE (res) = TREE_CODE_REDUCTION; + STMT_VINFO_REDUC_TYPE (res) = TREE_CODE_REDUCTION; STMT_VINFO_VEC_COND_REDUC_CODE (res) = ERROR_MARK; STMT_VINFO_REDUC_CODE (res) = ERROR_MARK; STMT_VINFO_REDUC_FN (res) = IFN_LAST; diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 837fb5a..71ea6ad 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -933,9 +933,6 @@ public: for loop vectorization. */ vect_memory_access_type memory_access_type; - /* For reduction loops, this is the type of reduction. */ - enum vect_reduction_type v_reduc_type; - /* For CONST_COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION, the reduction code. */ enum tree_code cond_reduc_code; @@ -947,7 +944,7 @@ public: tree reduc_epilogue_adjustment; /* On a reduction PHI the reduction type as detected by - vect_force_simple_reduction. */ + vect_is_simple_reduction and vectorizable_reduction. */ enum vect_reduction_type reduc_type; /* The original reduction code, to be used in the epilogue. */ @@ -964,6 +961,9 @@ public: corresponding PHI. */ stmt_vec_info reduc_def; + /* Whether on this stmt reduction meta is recorded. */ + bool is_reduc_info; + /* The number of scalar stmt references from active SLP instances. */ unsigned int num_slp_uses; @@ -1046,7 +1046,6 @@ STMT_VINFO_BB_VINFO (stmt_vec_info stmt_vinfo) #define STMT_VINFO_STRIDED_P(S) (S)->strided_p #define STMT_VINFO_MEMORY_ACCESS_TYPE(S) (S)->memory_access_type #define STMT_VINFO_SIMD_LANE_ACCESS_P(S) (S)->simd_lane_access_p -#define STMT_VINFO_VEC_REDUCTION_TYPE(S) (S)->v_reduc_type #define STMT_VINFO_VEC_COND_REDUC_CODE(S) (S)->cond_reduc_code #define STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL(S) (S)->induc_cond_initial_val #define STMT_VINFO_REDUC_EPILOGUE_ADJUSTMENT(S) (S)->reduc_epilogue_adjustment @@ -1556,12 +1555,6 @@ extern bool vect_transform_stmt (stmt_vec_info, gimple_stmt_iterator *, extern void vect_remove_stores (stmt_vec_info); extern opt_result vect_analyze_stmt (stmt_vec_info, bool *, slp_tree, slp_instance, stmt_vector_for_cost *); -extern bool vectorizable_condition (stmt_vec_info, gimple_stmt_iterator *, - stmt_vec_info *, bool, int, slp_tree, - stmt_vector_for_cost *); -extern bool vectorizable_shift (stmt_vec_info, gimple_stmt_iterator *, - stmt_vec_info *, slp_tree, - stmt_vector_for_cost *); extern void vect_get_load_cost (stmt_vec_info, int, bool, unsigned int *, unsigned int *, stmt_vector_for_cost *, @@ -1644,6 +1637,7 @@ extern void vect_record_loop_mask (loop_vec_info, vec_loop_masks *, unsigned int, tree); extern tree vect_get_loop_mask (gimple_stmt_iterator *, vec_loop_masks *, unsigned int, tree, unsigned int); +extern stmt_vec_info info_for_reduction (stmt_vec_info); /* Drive for loop transformation stage. */ extern class loop *vect_transform_loop (loop_vec_info); @@ -1653,8 +1647,7 @@ extern bool vectorizable_live_operation (stmt_vec_info, gimple_stmt_iterator *, slp_tree, slp_instance, int, stmt_vec_info *, stmt_vector_for_cost *); -extern bool vectorizable_reduction (stmt_vec_info, gimple_stmt_iterator *, - stmt_vec_info *, slp_tree, slp_instance, +extern bool vectorizable_reduction (stmt_vec_info, slp_tree, slp_instance, stmt_vector_for_cost *); extern bool vectorizable_induction (stmt_vec_info, gimple_stmt_iterator *, stmt_vec_info *, slp_tree, -- cgit v1.1 From 17ce4f48733cdefcd672f8ec5eb104c86984e492 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 8 Oct 2019 15:08:35 +0000 Subject: Change the library search path when using --with-advance-toolchain From: Tulio Magno Quites Machado Filho Remove all -L directories from LINK_OS_EXTRA_SPEC32 and LINK_OS_EXTRA_SPEC64 so that user directories specified at build time have higher preference over the advance toolchain libraries. Set MD_STARTFILE_PREFIX to $prefix/lib/ and MD_STARTFILE_PREFIX_1 to $at/lib/ so that a compiler library has preference over the Advance Toolchain libraries. * config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and LINK_OS_EXTRA_SPEC64 to MD_STARTFILE_PREFIX and MD_STARTFILE_PREFIX_1 when using --with-advance-toolchain. From-SVN: r276702 --- gcc/ChangeLog | 6 ++++++ gcc/config.gcc | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 984a05d..bee9431 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-08 Tulio Magno Quites Machado Filho + + * config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and + LINK_OS_EXTRA_SPEC64 to MD_STARTFILE_PREFIX and + MD_STARTFILE_PREFIX_1 when using --with-advance-toolchain. + 2019-10-08 Richard Biener * tree-vectorizer.h (_stmt_vec_info::v_reduc_type): Remove. diff --git a/gcc/config.gcc b/gcc/config.gcc index 481bc95..511aeb4 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4782,14 +4782,12 @@ case "${target}" in echo "#undef LINK_OS_EXTRA_SPEC32" echo "#define LINK_OS_EXTRA_SPEC32" \ "\"%(link_os_new_dtags)" \ - "-rpath $prefix/lib -rpath $at/lib" \ - "-L $prefix/lib -L $at/lib\"" + "-rpath $prefix/lib -rpath $at/lib\"" echo echo "#undef LINK_OS_EXTRA_SPEC64" echo "#define LINK_OS_EXTRA_SPEC64" \ "\"%(link_os_new_dtags)" \ - "-rpath $prefix/lib64 -rpath $at/lib64" \ - "-L $prefix/lib64 -L $at/lib64\"" + "-rpath $prefix/lib64 -rpath $at/lib64\"" echo echo "#undef LINK_OS_NEW_DTAGS_SPEC" echo "#define LINK_OS_NEW_DTAGS_SPEC" \ @@ -4802,7 +4800,10 @@ case "${target}" in echo "#define MD_EXEC_PREFIX \"$at/bin/\"" echo echo "#undef MD_STARTFILE_PREFIX" - echo "#define MD_STARTFILE_PREFIX \"$at/lib/\"") \ + echo "#define MD_STARTFILE_PREFIX \"$prefix/lib/\"" + echo + echo "#undef MD_STARTFILE_PREFIX_1" + echo "#define MD_STARTFILE_PREFIX_1 \"$at/lib/\"") \ > advance-toolchain.h else echo "Unknown advance-toolchain $with_advance_toolchain" -- cgit v1.1 From 0de558660a7a7b013a857cbb41a02750aad78456 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Tue, 8 Oct 2019 15:33:50 +0000 Subject: re PR testsuite/92025 (gcc.dg/Wstringop-overflow-12.c XPASSes) gcc/testsuite/ChangeLog: PR tetsuite/92025 * gcc.dg/Wstringop-overflow-12.c: Remove xfail. 2019-10-08 Richard Biener From-SVN: r276703 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/Wstringop-overflow-12.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fb2264f..895c06f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Martin Sebor + + PR tetsuite/92025 + * gcc.dg/Wstringop-overflow-12.c: Remove xfail. + 2019-10-08 Richard Biener * gcc.dg/vect/pr65947-1.c: Adjust. diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-12.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-12.c index 04fa114..5a05f5c 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-12.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-12.c @@ -39,7 +39,7 @@ void test_memcpy_array_cst_range_off (const void *s) T (d + SR (-7, -1), 1); T (d + SR (-2, -1), 3); /* { dg-warning "writing 3 bytes into a region of size 2 " "pr85350" { xfail *-*-* } } */ - T (d + UR (1, 2), 1); /* { dg-warning "writing 1 byte into a region of size 0 " "pr89350" { xfail *-*-* } } */ + T (d + UR (1, 2), 1); /* { dg-warning "writing 1 byte into a region of size 0 " } */ } -- cgit v1.1 From ff2640e58c4f0dfdb71b1828295f5c186a9685da Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Tue, 8 Oct 2019 16:26:39 +0000 Subject: DR 685 - Integral promotion of enum ignores fixed underlying type. * g++.dg/cpp0x/scoped_enum9.C: New test. From-SVN: r276705 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/scoped_enum9.C | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/scoped_enum9.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 895c06f..f3da169 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Marek Polacek + + DR 685 - Integral promotion of enum ignores fixed underlying type. + * g++.dg/cpp0x/scoped_enum9.C: New test. + 2019-10-08 Martin Sebor PR tetsuite/92025 diff --git a/gcc/testsuite/g++.dg/cpp0x/scoped_enum9.C b/gcc/testsuite/g++.dg/cpp0x/scoped_enum9.C new file mode 100644 index 0000000..f38f26d --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/scoped_enum9.C @@ -0,0 +1,11 @@ +// DR 685 - Integral promotion of enumeration ignores fixed underlying type. +// { dg-do compile { target c++11 } } + +enum E: long { e }; + +void f(int); +int f(long); + +void g() { + int k = f(e); +} -- cgit v1.1 From 8cad1ad5ade3fac0a2a796361bf5400d5f385036 Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Tue, 8 Oct 2019 16:31:16 +0000 Subject: re PR fortran/91801 (ICE in gfc_simplify_reshape, at fortran/simplify.c:6733) 2019-10-08 Steven G. Kargl PR fortran/91801 * simplify.c (gfc_simplify_reshape): Convert a gcc_assert into a gfc_error as a user can easily hit the condition. 2019-10-08 Steven G. Kargl PR fortran/91801 * gfortran.dg/pr91801.f90: New test. From-SVN: r276706 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/simplify.c | 10 +++++++++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/pr91801.f90 | 7 +++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/pr91801.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b5bef54..7847042 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2019-10-08 Steven G. Kargl + + PR fortran/91801 + * simplify.c (gfc_simplify_reshape): Convert a gcc_assert into a + gfc_error as a user can easily hit the condition. + 2019-10-08 Tobias Burnus * parse.c (parse_executable): Add missing ST_OMP_TARGET_SIMD. diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 8c1577e..fa5aefe 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -6762,7 +6762,15 @@ gfc_simplify_reshape (gfc_expr *source, gfc_expr *shape_exp, gfc_extract_int (e, &order[i]); - gcc_assert (order[i] >= 1 && order[i] <= rank); + if (order[i] < 1 || order[i] > rank) + { + gfc_error ("Element with a value of %d in ORDER at %L must be " + "in the range [1, ..., %d] for the RESHAPE intrinsic " + "near %L", order[i], &order_exp->where, rank, + &shape_exp->where); + return &gfc_bad_expr; + } + order[i]--; if (x[order[i]] != 0) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f3da169..cad47cc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Steven G. Kargl + + PR fortran/91801 + * gfortran.dg/pr91801.f90: New test. + 2019-10-08 Marek Polacek DR 685 - Integral promotion of enum ignores fixed underlying type. diff --git a/gcc/testsuite/gfortran.dg/pr91801.f90 b/gcc/testsuite/gfortran.dg/pr91801.f90 new file mode 100644 index 0000000..d2d82b8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr91801.f90 @@ -0,0 +1,7 @@ +! { dg-do compile } +! PR fortran/91801 +! Code contributed by Gerhard Steinmetz +program p + integer, parameter :: a(2) = [2,0] ! { dg-error "Element with a value of" } + print *, reshape([1,2,3,4,5,6], [2,3], order=a) ! { dg-error "for the RESHAPE intrinsic near" } +end -- cgit v1.1 From fe42ae7cf57616f53a17544b614b425076d694db Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 8 Oct 2019 19:01:55 +0200 Subject: re PR rtl-optimization/91994 (r276327 breaks -mvzeroupper) PR target/91994 * config/i386/i386.c (x86_avx_u128_mode_needed): Use SSE_REG instead of ALL_SSE_REG to check if function call preserves some 256-bit SSE registers. From-SVN: r276707 --- gcc/ChangeLog | 9 ++++++++- gcc/config/i386/i386.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bee9431..b032263 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-10-08 Uroš Bizjak + + PR target/91994 + * config/i386/i386.c (x86_avx_u128_mode_needed): Use SSE_REG + instead of ALL_SSE_REG to check if function call preserves some + 256-bit SSE registers. + 2019-10-08 Tulio Magno Quites Machado Filho * config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and @@ -116,7 +123,7 @@ * config/i386/i386-expand.c (ix86_expand_floorceildf_32, ix86_expand_rounddf_32): Reorder functions. - * config/i386/i386-protos.h: Update.. + * config/i386/i386-protos.h: Update. 2019-10-07 Jozef Lawrynowicz diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 083e228..1a272d9 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -13530,7 +13530,7 @@ ix86_avx_u128_mode_needed (rtx_insn *insn) modes wider than 256 bits. It's only safe to issue a vzeroupper if all SSE registers are clobbered. */ const function_abi &abi = insn_callee_abi (insn); - if (!hard_reg_set_subset_p (reg_class_contents[ALL_SSE_REGS], + if (!hard_reg_set_subset_p (reg_class_contents[SSE_REGS], abi.mode_clobbers (V4DImode))) return AVX_U128_ANY; -- cgit v1.1 From a3fc4326ca94323e24693b907ce4352a70d4de8f Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Tue, 8 Oct 2019 19:09:04 +0000 Subject: [Darwin, machopic 2/n] Compute and cache indirection rules. This caches a check for the requirement to indirect a symbol in the Darwin ABI, and uses it where needed. We also ensure that we place the indirection pointers into the non-lazy symbol pointers section. Other placements have occurred with various platform toolchains - but these seem to have been unintentional so we match current platform toolchains. gcc/ChangeLog: 2019-10-08 Iain Sandoe * config/darwin.c (machopic_indirect_data_reference): Check for required indirections before making direct access to defined values. (machopic_output_indirection): Place the indirected pointes for required indirections into the non-lazy symbol pointers section. (darwin_encode_section_info): * config/darwin.h (MACHO_SYMBOL_FLAG_MUST_INDIRECT): New. (MACHO_SYMBOL_MUST_INDIRECT_P): New. From-SVN: r276708 --- gcc/ChangeLog | 11 +++++++++++ gcc/config/darwin.c | 17 +++++++++++++++-- gcc/config/darwin.h | 9 +++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b032263..823d13d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2019-10-08 Iain Sandoe + + * config/darwin.c (machopic_indirect_data_reference): Check for + required indirections before making direct access to defined + values. + (machopic_output_indirection): Place the indirected pointes for + required indirections into the non-lazy symbol pointers section. + (darwin_encode_section_info): + * config/darwin.h (MACHO_SYMBOL_FLAG_MUST_INDIRECT): New. + (MACHO_SYMBOL_MUST_INDIRECT_P): New. + 2019-10-08 Uroš Bizjak PR target/91994 diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 869e850..f8d7059 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -665,7 +665,7 @@ machopic_indirect_data_reference (rtx orig, rtx reg) /* some other cpu -- writeme! */ gcc_unreachable (); } - else if (defined) + else if (defined && ! MACHO_SYMBOL_MUST_INDIRECT_P (orig)) { rtx offset = NULL; if (DARWIN_PPC || HAVE_lo_sum) @@ -1120,6 +1120,7 @@ machopic_output_indirection (machopic_indirection **slot, FILE *asm_out_file) machopic_output_stub (asm_out_file, sym, stub); } else if (! indirect_data (symbol) + && ! MACHO_SYMBOL_MUST_INDIRECT_P (symbol) && ! MACHO_SYMBOL_HIDDEN_VIS_P (symbol) && (machopic_symbol_defined_p (symbol) || SYMBOL_REF_LOCAL_P (symbol))) @@ -1238,11 +1239,17 @@ darwin_encode_section_info (tree decl, rtx rtl, int first) if (VAR_P (decl)) SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_VARIABLE; + /* Only really common if there's no initialiser. */ + bool really_common_p = (DECL_COMMON (decl) + && (DECL_INITIAL (decl) == NULL + || (!in_lto_p + && DECL_INITIAL (decl) == error_mark_node))); + /* For Darwin, if we have specified visibility and it's not the default that's counted 'hidden'. */ if (DECL_VISIBILITY_SPECIFIED (decl) && DECL_VISIBILITY (decl) != VISIBILITY_DEFAULT) - SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_HIDDEN_VIS; + SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_HIDDEN_VIS; if (!DECL_EXTERNAL (decl) && (!TREE_PUBLIC (decl) || !DECL_WEAK (decl)) @@ -1255,6 +1262,12 @@ darwin_encode_section_info (tree decl, rtx rtl, int first) if (! TREE_PUBLIC (decl)) SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_STATIC; + + /* Short cut check for Darwin 'must indirect' rules. */ + if (really_common_p + || (DECL_WEAK (decl) && ! MACHO_SYMBOL_HIDDEN_VIS_P (sym_ref)) + || lookup_attribute ("weakref", DECL_ATTRIBUTES (decl))) + SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_MUST_INDIRECT; } void diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 87e1eb6..7fab869 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -820,6 +820,15 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS]; #define MACHO_SYMBOL_VARIABLE_P(RTX) \ ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_VARIABLE) != 0) +/* Set on a symbol that must be indirected, even when there is a + definition in the TU. The ABI mandates that common symbols are so + indirected, as are weak. If 'fix-and-continue' is operational then + data symbols might also be. */ + +#define MACHO_SYMBOL_FLAG_MUST_INDIRECT ((SYMBOL_FLAG_SUBT_DEP) << 1) +#define MACHO_SYMBOL_MUST_INDIRECT_P(RTX) \ + ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_MUST_INDIRECT) != 0) + /* Set on a symbol with SYMBOL_FLAG_FUNCTION or MACHO_SYMBOL_FLAG_VARIABLE to indicate that the function or variable is considered defined in this translation unit. */ -- cgit v1.1 From e86fc0d7a8df5799c195cd5ff0486e0bdbe6c661 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Tue, 8 Oct 2019 19:24:22 +0000 Subject: [Darwin] Remove code deprecated in 4.x. This removes some code that should be dead. Given no reported problems from the warning since 4.6 this seems reasonable. gcc/ChangeLog: 2019-10-08 Iain Sandoe * config/darwin.c (machopic_select_section): Remove dead code for old Objective-C section selection method, replace with unreachable. From-SVN: r276709 --- gcc/ChangeLog | 5 ++++ gcc/config/darwin.c | 77 +++-------------------------------------------------- 2 files changed, 9 insertions(+), 73 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 823d13d..f82d7f5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-10-08 Iain Sandoe + * config/darwin.c (machopic_select_section): Remove dead code for + old Objective-C section selection method, replace with unreachable. + +2019-10-08 Iain Sandoe + * config/darwin.c (machopic_indirect_data_reference): Check for required indirections before making direct access to defined values. diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index f8d7059..679e0c2 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1696,83 +1696,14 @@ machopic_select_section (tree decl, else return base_section; } - /* c) legacy meta-data selection. */ - else if (TREE_CODE (decl) == VAR_DECL + else if (flag_next_runtime + && VAR_P (decl) && DECL_NAME (decl) && TREE_CODE (DECL_NAME (decl)) == IDENTIFIER_NODE && IDENTIFIER_POINTER (DECL_NAME (decl)) - && flag_next_runtime && !strncmp (IDENTIFIER_POINTER (DECL_NAME (decl)), "_OBJC_", 6)) - { - const char *name = IDENTIFIER_POINTER (DECL_NAME (decl)); - static bool warned_objc_46 = false; - /* We shall assert that zero-sized objects are an error in ObjC - meta-data. */ - gcc_assert (tree_to_uhwi (DECL_SIZE_UNIT (decl)) != 0); - - /* ??? This mechanism for determining the metadata section is - broken when LTO is in use, since the frontend that generated - the data is not identified. We will keep the capability for - the short term - in case any non-Objective-C programs are using - it to place data in specified sections. */ - if (!warned_objc_46) - { - location_t loc = DECL_SOURCE_LOCATION (decl); - warning_at (loc, 0, "the use of _OBJC_-prefixed variable names" - " to select meta-data sections is deprecated at 4.6" - " and will be removed in 4.7"); - warned_objc_46 = true; - } - - if (!strncmp (name, "_OBJC_CLASS_METHODS_", 20)) - return darwin_sections[objc_cls_meth_section]; - else if (!strncmp (name, "_OBJC_INSTANCE_METHODS_", 23)) - return darwin_sections[objc_inst_meth_section]; - else if (!strncmp (name, "_OBJC_CATEGORY_CLASS_METHODS_", 29)) - return darwin_sections[objc_cat_cls_meth_section]; - else if (!strncmp (name, "_OBJC_CATEGORY_INSTANCE_METHODS_", 32)) - return darwin_sections[objc_cat_inst_meth_section]; - else if (!strncmp (name, "_OBJC_CLASS_VARIABLES_", 22)) - return darwin_sections[objc_class_vars_section]; - else if (!strncmp (name, "_OBJC_INSTANCE_VARIABLES_", 25)) - return darwin_sections[objc_instance_vars_section]; - else if (!strncmp (name, "_OBJC_CLASS_PROTOCOLS_", 22)) - return darwin_sections[objc_cat_cls_meth_section]; - else if (!strncmp (name, "_OBJC_CLASS_NAME_", 17)) - return darwin_sections[objc_class_names_section]; - else if (!strncmp (name, "_OBJC_METH_VAR_NAME_", 20)) - return darwin_sections[objc_meth_var_names_section]; - else if (!strncmp (name, "_OBJC_METH_VAR_TYPE_", 20)) - return darwin_sections[objc_meth_var_types_section]; - else if (!strncmp (name, "_OBJC_CLASS_REFERENCES", 22)) - return darwin_sections[objc_cls_refs_section]; - else if (!strncmp (name, "_OBJC_CLASS_", 12)) - return darwin_sections[objc_class_section]; - else if (!strncmp (name, "_OBJC_METACLASS_", 16)) - return darwin_sections[objc_meta_class_section]; - else if (!strncmp (name, "_OBJC_CATEGORY_", 15)) - return darwin_sections[objc_category_section]; - else if (!strncmp (name, "_OBJC_SELECTOR_REFERENCES", 25)) - return darwin_sections[objc_selector_refs_section]; - else if (!strncmp (name, "_OBJC_SELECTOR_FIXUP", 20)) - return darwin_sections[objc_selector_fixup_section]; - else if (!strncmp (name, "_OBJC_SYMBOLS", 13)) - return darwin_sections[objc_symbols_section]; - else if (!strncmp (name, "_OBJC_MODULES", 13)) - return darwin_sections[objc_module_info_section]; - else if (!strncmp (name, "_OBJC_IMAGE_INFO", 16)) - return darwin_sections[objc_image_info_section]; - else if (!strncmp (name, "_OBJC_PROTOCOL_INSTANCE_METHODS_", 32)) - return darwin_sections[objc_cat_inst_meth_section]; - else if (!strncmp (name, "_OBJC_PROTOCOL_CLASS_METHODS_", 29)) - return darwin_sections[objc_cat_cls_meth_section]; - else if (!strncmp (name, "_OBJC_PROTOCOL_REFS_", 20)) - return darwin_sections[objc_cat_cls_meth_section]; - else if (!strncmp (name, "_OBJC_PROTOCOL_", 15)) - return darwin_sections[objc_protocol_section]; - else - return base_section; - } + /* c) legacy meta-data selection was deprecated at 4.6, removed now. */ + gcc_unreachable (); return base_section; } -- cgit v1.1 From 7c3ed632601bf485335a7fe00d1db34b23ebacd2 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Tue, 8 Oct 2019 19:48:27 +0000 Subject: PR middle-end/92026 - gcc.dg/Wstringop-overflow-18.c FAIL PR middle-end/92026 - gcc.dg/Wstringop-overflow-18.c FAIL PR middle-end/92014 - bogus warning: writing 8 bytes into a region of size 1 in timezone/zic.c gcc/ChangeLog: * tree-ssa-strlen.c (count_nonzero_bytes): Avoid recursing for MEM_REF again once nbytes has been set. Set the access size when not yet set. gcc/testsuite/ChangeLog: PR middle-end/92014 * gcc.dg/Wstringop-overflow-19.c: New test. From-SVN: r276711 --- gcc/ChangeLog | 7 +++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/Wstringop-overflow-19.c | 27 +++++++++++++++++++++++++++ gcc/tree-ssa-strlen.c | 28 +++++++++++++++++----------- 4 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/Wstringop-overflow-19.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f82d7f5..4bf0470 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-10-08 Martin Sebor + + PR middle-end/92026 + PR middle-end/92014 + * tree-ssa-strlen.c (count_nonzero_bytes): Avoid recursing for MEM_REF + again once nbytes has been set. Set the access size when not yet set. + 2019-10-08 Iain Sandoe * config/darwin.c (machopic_select_section): Remove dead code for diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cad47cc..1b6c04a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Martin Sebor + + PR middle-end/92014 + * gcc.dg/Wstringop-overflow-19.c: New test. + 2019-10-08 Steven G. Kargl PR fortran/91801 diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-19.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-19.c new file mode 100644 index 0000000..cf866b3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-19.c @@ -0,0 +1,27 @@ +/* PR middle-end/92014 - bogus warning: writing 8 bytes into a region + of size 1 in timezone/zic.c + { dg-do compile } + { dg-options "-O2 -Wall" } */ + +struct +{ + char *s1, *s2; + char c; +} z; + + +void f (char **a, int i, int j) +{ + char * cp = __builtin_strchr (a[i], '%'); + + if (cp && *++cp != 's') + return; + + z.s1 = __builtin_strdup (a[i]); + if (!z.s1) __builtin_abort (); + + z.s2 = __builtin_strdup (a[j]); + if (!z.s2) __builtin_abort (); + + z.c = cp ? *cp : '\0'; // { dg-bogus "\\\[-Wstringop-overflow" } +} diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index d68df19..c2866e0 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -3741,13 +3741,16 @@ int ssa_name_limit_t::next_ssa_name (tree ssa_name) return 0; } -/* Determine the minimum and maximum number of leading non-zero bytes +/* Determines the minimum and maximum number of leading non-zero bytes in the representation of EXP and set LENRANGE[0] and LENRANGE[1] - to each. Set LENRANGE[2] to the total number of bytes in - the representation. Set *NULTREM if the representation contains - a zero byte, and set *ALLNUL if all the bytes are zero. Avoid - recursing deeper than the limits in SNLIM allow. Return true - on success and false otherwise. */ + to each. Sets LENRANGE[2] to the total number of bytes in + the representation. Sets *NULTREM if the representation contains + a zero byte, and sets *ALLNUL if all the bytes are zero. + OFFSET and NBYTES are the offset into the representation and + the size of the access to it determined from a MEM_REF or zero + for other expressions. + Avoid recursing deeper than the limits in SNLIM allow. + Returns true on success and false otherwise. */ static bool count_nonzero_bytes (tree exp, unsigned HOST_WIDE_INT offset, @@ -3769,15 +3772,13 @@ count_nonzero_bytes (tree exp, unsigned HOST_WIDE_INT offset, return false; len -= offset; - size -= offset; - - if (size < nbytes) - return false; if (len < lenrange[0]) lenrange[0] = len; if (lenrange[1] < len) lenrange[1] = len; + if (lenrange[2] < nbytes) + lenrange[2] = nbytes; if (!si->full_string_p) *nulterm = false; @@ -3843,6 +3844,9 @@ count_nonzero_bytes (tree exp, unsigned HOST_WIDE_INT offset, if (TREE_CODE (exp) == MEM_REF) { + if (nbytes) + return false; + tree arg = TREE_OPERAND (exp, 0); tree off = TREE_OPERAND (exp, 1); @@ -3910,8 +3914,10 @@ count_nonzero_bytes (tree exp, unsigned HOST_WIDE_INT offset, lenrange[0] = 0; prep = NULL; } - else + else if (!nbytes) nbytes = repsize; + else if (nbytes < repsize) + return false; } if (!nbytes) -- cgit v1.1 From ac87f0f3459a57f03503e51aeffc54bb6ef36b90 Mon Sep 17 00:00:00 2001 From: Dmitrij Pochepko Date: Tue, 8 Oct 2019 21:50:05 +0000 Subject: re PR tree-optimization/90836 (Missing popcount pattern matching) 2019-10-08 Dmitrij Pochepko PR tree-optimization/90836 * gcc/match.pd (popcount): New pattern. From-SVN: r276721 --- gcc/ChangeLog | 5 +++++ gcc/match.pd | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4bf0470..1045a47 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Dmitrij Pochepko + + PR tree-optimization/90836 + * gcc/match.pd (popcount): New pattern. + 2019-10-08 Martin Sebor PR middle-end/92026 diff --git a/gcc/match.pd b/gcc/match.pd index e3ac06c..2c82287 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -5689,6 +5689,64 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (cmp (popcount @0) integer_zerop) (rep @0 { build_zero_cst (TREE_TYPE (@0)); })))) +#if GIMPLE +/* 64- and 32-bits branchless implementations of popcount are detected: + + int popcount64c (uint64_t x) + { + x -= (x >> 1) & 0x5555555555555555ULL; + x = (x & 0x3333333333333333ULL) + ((x >> 2) & 0x3333333333333333ULL); + x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0fULL; + return (x * 0x0101010101010101ULL) >> 56; + } + + int popcount32c (uint32_t x) + { + x -= (x >> 1) & 0x55555555; + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + x = (x + (x >> 4)) & 0x0f0f0f0f; + return (x * 0x01010101) >> 24; + } */ +(simplify + (rshift + (mult + (bit_and + (plus:c + (rshift @8 INTEGER_CST@5) + (plus:c@8 + (bit_and @6 INTEGER_CST@7) + (bit_and + (rshift + (minus@6 + @0 + (bit_and + (rshift @0 INTEGER_CST@4) + INTEGER_CST@11)) + INTEGER_CST@10) + INTEGER_CST@9))) + INTEGER_CST@3) + INTEGER_CST@2) + INTEGER_CST@1) + /* Check constants and optab. */ + (with + { + unsigned prec = TYPE_PRECISION (type); + int shift = 64 - prec; + const unsigned HOST_WIDE_INT c1 = 0x0101010101010101ULL >> shift, + c2 = 0x0F0F0F0F0F0F0F0FULL >> shift, + c3 = 0x3333333333333333ULL >> shift, + c4 = 0x5555555555555555ULL >> shift; + } + (if (prec <= 64 && TYPE_UNSIGNED (type) && tree_to_uhwi (@4) == 1 + && tree_to_uhwi (@10) == 2 && tree_to_uhwi (@5) == 4 + && tree_to_uhwi (@1) == prec - 8 && tree_to_uhwi (@2) == c1 + && tree_to_uhwi (@3) == c2 && tree_to_uhwi (@9) == c3 + && tree_to_uhwi (@7) == c3 && tree_to_uhwi (@11) == c4 + && direct_internal_fn_supported_p (IFN_POPCOUNT, type, + OPTIMIZE_FOR_BOTH)) + (convert (IFN_POPCOUNT:type @0))))) +#endif + /* Simplify: a = a1 op a2 -- cgit v1.1 From 0eeb34b29937338a8087216c49d3837b69107238 Mon Sep 17 00:00:00 2001 From: Dmitrij Pochepko Date: Tue, 8 Oct 2019 21:53:03 +0000 Subject: re PR tree-optimization/90836 (Missing popcount pattern matching) 2019-10-08 Dmitrij Pochepko PR tree-optimization/90836 * lib/target-supports.exp (check_effective_target_popcount) (check_effective_target_popcountll): New effective targets. * gcc.dg/tree-ssa/popcount4.c: New test. * gcc.dg/tree-ssa/popcount4l.c: New test. * gcc.dg/tree-ssa/popcount4ll.c: New test. From-SVN: r276722 --- gcc/testsuite/ChangeLog | 9 +++++++++ gcc/testsuite/gcc.dg/tree-ssa/popcount4.c | 22 +++++++++++++++++++++ gcc/testsuite/gcc.dg/tree-ssa/popcount4l.c | 30 +++++++++++++++++++++++++++++ gcc/testsuite/gcc.dg/tree-ssa/popcount4ll.c | 19 ++++++++++++++++++ gcc/testsuite/lib/target-supports.exp | 23 ++++++++++++++++++++++ 5 files changed, 103 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/popcount4.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/popcount4l.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/popcount4ll.c (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1b6c04a..d9d73db 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2019-10-08 Dmitrij Pochepko + + PR tree-optimization/90836 + * lib/target-supports.exp (check_effective_target_popcount) + (check_effective_target_popcountll): New effective targets. + * gcc.dg/tree-ssa/popcount4.c: New test. + * gcc.dg/tree-ssa/popcount4l.c: New test. + * gcc.dg/tree-ssa/popcount4ll.c: New test. + 2019-10-08 Martin Sebor PR middle-end/92014 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/popcount4.c b/gcc/testsuite/gcc.dg/tree-ssa/popcount4.c new file mode 100644 index 0000000..bfb563b --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/popcount4.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target popcount } */ +/* { dg-require-effective-target int32plus } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +const unsigned m1 = 0x55555555UL; +const unsigned m2 = 0x33333333UL; +const unsigned m4 = 0x0F0F0F0FUL; +const unsigned h01 = 0x01010101UL; +const int shift = 24; + +int popcount64c(unsigned x) +{ + x -= (x >> 1) & m1; + x = (x & m2) + ((x >> 2) & m2); + x = (x + (x >> 4)) & m4; + return (x * h01) >> shift; +} + +/* { dg-final { scan-tree-dump-times "\.POPCOUNT" 1 "optimized" } } */ + + diff --git a/gcc/testsuite/gcc.dg/tree-ssa/popcount4l.c b/gcc/testsuite/gcc.dg/tree-ssa/popcount4l.c new file mode 100644 index 0000000..69fb2d1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/popcount4l.c @@ -0,0 +1,30 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target popcountl } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +#if __SIZEOF_LONG__ == 4 +const unsigned long m1 = 0x55555555UL; +const unsigned long m2 = 0x33333333UL; +const unsigned long m4 = 0x0F0F0F0FUL; +const unsigned long h01 = 0x01010101UL; +const int shift = 24; +#else +const unsigned long m1 = 0x5555555555555555UL; +const unsigned long m2 = 0x3333333333333333UL; +const unsigned long m4 = 0x0f0f0f0f0f0f0f0fUL; +const unsigned long h01 = 0x0101010101010101UL; +const int shift = 56; +#endif + + +int popcount64c(unsigned long x) +{ + x -= (x >> 1) & m1; + x = (x & m2) + ((x >> 2) & m2); + x = (x + (x >> 4)) & m4; + return (x * h01) >> shift; +} + +/* { dg-final { scan-tree-dump-times "\.POPCOUNT" 1 "optimized" } } */ + + diff --git a/gcc/testsuite/gcc.dg/tree-ssa/popcount4ll.c b/gcc/testsuite/gcc.dg/tree-ssa/popcount4ll.c new file mode 100644 index 0000000..191d957 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/popcount4ll.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target popcountll } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +const unsigned long long m1 = 0x5555555555555555ULL; +const unsigned long long m2 = 0x3333333333333333ULL; +const unsigned long long m4 = 0x0F0F0F0F0F0F0F0FULL; +const unsigned long long h01 = 0x0101010101010101ULL; +const int shift = 56; + +int popcount64c(unsigned long long x) +{ + x -= (x >> 1) & m1; + x = (x & m2) + ((x >> 2) & m2); + x = (x + (x >> 4)) & m4; + return (x * h01) >> shift; +} + +/* { dg-final { scan-tree-dump-times "\.POPCOUNT" 1 "optimized" } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index a7b76b6..179202f 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -6933,6 +6933,29 @@ proc check_effective_target_popcountl { } { } "" ] } +# Return 1 if the target supports popcount on long long. + +proc check_effective_target_popcountll { } { + return [check_no_messages_and_pattern popcountll "!\\(call" rtl-expand { + int foo (long long b) + { + return __builtin_popcountll (b); + } + } "" ] +} + + +# Return 1 if the target supports popcount on int. + +proc check_effective_target_popcount { } { + return [check_no_messages_and_pattern popcount "!\\(call" rtl-expand { + int foo (int b) + { + return __builtin_popcount (b); + } + } "" ] +} + # Return 1 if the target supports atomic operations on "long long" # and can execute them. # -- cgit v1.1 From d470060d06c45592514858b0a4c87bd71cd91c9b Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Tue, 8 Oct 2019 22:12:54 +0000 Subject: PR c++/92001 - missing -Wclass-memaccess with array as first argument to memset gcc/cp/ChangeLog: PR c++/92001 * call.c (maybe_warn_class_memaccess): Handle arrays. gcc/testsuite/ChangeLog: PR c++/92001 * g++.dg/Wclass-memaccess-5.C: New test. From-SVN: r276725 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/call.c | 4 +++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/Wclass-memaccess-5.C | 18 ++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/Wclass-memaccess-5.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 90cab94..0e8d930 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Martin Sebor + + PR c++/92001 + * call.c (maybe_warn_class_memaccess): Handle arrays. + 2019-10-07 Paolo Carlini * call.c (resolve_args): Use cp_expr_loc_or_input_loc in one place. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 6c9acac..4ed424f 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -8911,7 +8911,9 @@ maybe_warn_class_memaccess (location_t loc, tree fndecl, unsigned srcidx = !dstidx; tree dest = (*args)[dstidx]; - if (!TREE_TYPE (dest) || !INDIRECT_TYPE_P (TREE_TYPE (dest))) + if (!TREE_TYPE (dest) + || (TREE_CODE (TREE_TYPE (dest)) != ARRAY_TYPE + && !INDIRECT_TYPE_P (TREE_TYPE (dest)))) return; tree srctype = NULL_TREE; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d9d73db..3f189e3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Martin Sebor + + PR c++/92001 + * g++.dg/Wclass-memaccess-5.C: New test. + 2019-10-08 Dmitrij Pochepko PR tree-optimization/90836 diff --git a/gcc/testsuite/g++.dg/Wclass-memaccess-5.C b/gcc/testsuite/g++.dg/Wclass-memaccess-5.C new file mode 100644 index 0000000..d0fffea --- /dev/null +++ b/gcc/testsuite/g++.dg/Wclass-memaccess-5.C @@ -0,0 +1,18 @@ +/* PR c++/92001 - missing -Wclass-memaccess with array as first argument + to memset + { dg-do compile } + { dg-options "-Wall" } */ + +extern "C" void* memset (void*, int, __SIZE_TYPE__); + +struct S { S (); }; + +void test_array_access (S *p, S (*pa)[2], S (&r)[3]) +{ + S a[1]; + memset (a, 0, sizeof a); // { dg-warning "-Wclass-memaccess" } + + memset (*pa, 0, sizeof *pa); // { dg-warning "-Wclass-memaccess" } + + memset (r, 0, sizeof r); // { dg-warning "-Wclass-memaccess" } +} -- cgit v1.1 From ffbef318488159e807d93c0cf43f0d72417e5dfc Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 9 Oct 2019 00:16:22 +0000 Subject: Daily bump. From-SVN: r276750 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index c440771..70f16fc 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20191008 +20191009 -- cgit v1.1 From 4e78c6883f97bf45eeb1ad3041dcf2e2de01912c Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 9 Oct 2019 01:14:02 +0000 Subject: use call-clobbered reg to disalign the stack Some x86 tests of stack realignment, that disaligned the stack with pushes and pops, failed when the compiler was configured to tune for a target that preferred to accumulate outgoing arguments: the stack space is reserved before the asm push, the call sequence overwrites the saved register, and then the asm pop restores the overwritten value. Since that's a call-preserved register in 32-bit mode, it should be preserved unchanged, but isn't. Merely changing the register to a call-clobbered one would be enough, but the tests would remain fragile and prone to failure due to other optimizations, so I arranged for the compiler to be made aware of the register used for the push and the pop, so it won't use it for something else, and forced the function to use a frame pointer, so that it won't use stack pointer offsets for local variables: the offsets would likely be wrong between the asm push and pop. for gcc/testsuite/ChangeLog * gcc.target/i386/20060512-1.c (sse2_test): Use a call-clobbered register variable for stack-disaligning push and pop. Require a frame pointer. * gcc.target/i386/20060512-3.c (sse2_test): Likewise. From-SVN: r276751 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/i386/20060512-1.c | 16 +++++++++------- gcc/testsuite/gcc.target/i386/20060512-3.c | 7 ++++--- 3 files changed, 20 insertions(+), 10 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3f189e3..a1f3966 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-10-08 Alexandre Oliva + + * gcc.target/i386/20060512-1.c (sse2_test): Use a + call-clobbered register variable for stack-disaligning push + and pop. Require a frame pointer. + * gcc.target/i386/20060512-3.c (sse2_test): Likewise. + 2019-10-08 Martin Sebor PR c++/92001 diff --git a/gcc/testsuite/gcc.target/i386/20060512-1.c b/gcc/testsuite/gcc.target/i386/20060512-1.c index ec163a9..fe95f6d 100644 --- a/gcc/testsuite/gcc.target/i386/20060512-1.c +++ b/gcc/testsuite/gcc.target/i386/20060512-1.c @@ -7,11 +7,11 @@ #include #ifdef __x86_64__ -# define PUSH "pushq %rsi" -# define POP "popq %rsi" +# define REG "rcx" +# define WIDTH "q" #else -# define PUSH "pushl %esi" -# define POP "popl %esi" +# define REG "ecx" +# define WIDTH "l" #endif __m128i __attribute__ ((__noinline__)) @@ -30,13 +30,15 @@ self_aligning_function (int x, int y) int g_1 = 20; int g_2 = 22; -static void +static void __attribute__ ((__optimize__ ("-fno-omit-frame-pointer"))) sse2_test (void) { int result; - asm (PUSH); /* Misalign runtime stack. */ + register int __attribute__ ((__mode__ (__word__))) reg asm (REG); + asm volatile ("push" WIDTH "\t%0" /* Disalign runtime stack. */ + : : "r" (reg) : "memory"); result = self_aligning_function (g_1, g_2); if (result != 42) abort (); - asm (POP); + asm volatile ("pop" WIDTH "\t%0" : "=r" (reg)); } diff --git a/gcc/testsuite/gcc.target/i386/20060512-3.c b/gcc/testsuite/gcc.target/i386/20060512-3.c index 3370b9e..0cebb47 100644 --- a/gcc/testsuite/gcc.target/i386/20060512-3.c +++ b/gcc/testsuite/gcc.target/i386/20060512-3.c @@ -23,13 +23,14 @@ self_aligning_function (int x, int y) int g_1 = 20; int g_2 = 22; -static void +static void __attribute__ ((__optimize__ ("-fno-omit-frame-pointer"))) sse2_test (void) { int result; - asm ("pushl %esi"); /* Disalign runtime stack. */ + register int reg asm ("ecx"); + asm ("pushl\t%0": : "r" (reg) : "memory"); /* Disalign runtime stack. */ result = self_aligning_function (g_1, g_2); if (result != 42) abort (); - asm ("popl %esi"); + asm ("popl\t%0" : "=r" (reg)); } -- cgit v1.1 From f78347996e02a8a767a525bfb764e769afe29d67 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 9 Oct 2019 07:02:22 +0000 Subject: tree-vectorizer.h (_stmt_vec_info::reduc_vectype_in): New. 2019-10-08 Richard Biener * tree-vectorizer.h (_stmt_vec_info::reduc_vectype_in): New. (_stmt_vec_info::force_single_cycle): Likewise. (STMT_VINFO_FORCE_SINGLE_CYCLE): New. (STMT_VINFO_REDUC_VECTYPE_IN): Likewise. * tree-vect-loop.c (vectorizable_reduction): Set STMT_VINFO_REDUC_VECTYPE_IN and STMT_VINFO_FORCE_SINGLE_CYCLE. (vect_transform_reduction): Use them to remove redundant code. (vect_transform_cycle_phi): Likewise. From-SVN: r276752 --- gcc/ChangeLog | 11 +++ gcc/tree-vect-loop.c | 188 ++++++++------------------------------------------ gcc/tree-vectorizer.h | 8 +++ 3 files changed, 49 insertions(+), 158 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1045a47..0214310 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2019-10-08 Richard Biener + + * tree-vectorizer.h (_stmt_vec_info::reduc_vectype_in): New. + (_stmt_vec_info::force_single_cycle): Likewise. + (STMT_VINFO_FORCE_SINGLE_CYCLE): New. + (STMT_VINFO_REDUC_VECTYPE_IN): Likewise. + * tree-vect-loop.c (vectorizable_reduction): Set + STMT_VINFO_REDUC_VECTYPE_IN and STMT_VINFO_FORCE_SINGLE_CYCLE. + (vect_transform_reduction): Use them to remove redundant code. + (vect_transform_cycle_phi): Likewise. + 2019-10-08 Dmitrij Pochepko PR tree-optimization/90836 diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index f63bb85..a9ea0ca 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -5983,9 +5983,13 @@ vectorizable_reduction (stmt_vec_info stmt_info, slp_tree slp_node, } } } - if (!vectype_in) vectype_in = vectype_out; + STMT_VINFO_REDUC_VECTYPE_IN (reduc_info) = vectype_in; + /* For the SSA cycle we store on each participating stmt the operand index + where the cycle continues. Store the one relevant for the actual + operation in the reduction meta. */ + STMT_VINFO_REDUC_IDX (reduc_info) = reduc_index; /* When vectorizing a reduction chain w/o SLP the reduction PHI is not directy used in stmt. */ @@ -6457,7 +6461,7 @@ vectorizable_reduction (stmt_vec_info stmt_info, slp_tree slp_node, && (!STMT_VINFO_IN_PATTERN_P (use_stmt_info) || !STMT_VINFO_PATTERN_DEF_SEQ (use_stmt_info)) && vect_stmt_to_vectorize (use_stmt_info) == stmt_info) - single_defuse_cycle = true; + STMT_VINFO_FORCE_SINGLE_CYCLE (reduc_info) = single_defuse_cycle = true; if (single_defuse_cycle || code == DOT_PROD_EXPR @@ -6584,17 +6588,11 @@ vect_transform_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, stmt_vec_info *vec_stmt, slp_tree slp_node) { tree vectype_out = STMT_VINFO_VECTYPE (stmt_info); - tree vectype_in = NULL_TREE; loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info); class loop *loop = LOOP_VINFO_LOOP (loop_vinfo); - enum tree_code code; - int op_type; - bool is_simple_use; int i; int ncopies; - bool single_defuse_cycle = false; int j; - tree ops[3]; int vec_num; stmt_vec_info reduc_info = info_for_reduction (stmt_info); @@ -6607,30 +6605,20 @@ vect_transform_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, } gassign *stmt = as_a (stmt_info->stmt); + enum tree_code code = gimple_assign_rhs_code (stmt); + int op_type = TREE_CODE_LENGTH (code); /* Flatten RHS. */ - switch (get_gimple_rhs_class (gimple_assign_rhs_code (stmt))) + tree ops[3]; + switch (get_gimple_rhs_class (code)) { - case GIMPLE_BINARY_RHS: - code = gimple_assign_rhs_code (stmt); - op_type = TREE_CODE_LENGTH (code); - gcc_assert (op_type == binary_op); - ops[0] = gimple_assign_rhs1 (stmt); - ops[1] = gimple_assign_rhs2 (stmt); - break; - case GIMPLE_TERNARY_RHS: - code = gimple_assign_rhs_code (stmt); - op_type = TREE_CODE_LENGTH (code); - gcc_assert (op_type == ternary_op); + ops[2] = gimple_assign_rhs3 (stmt); + /* Fall thru. */ + case GIMPLE_BINARY_RHS: ops[0] = gimple_assign_rhs1 (stmt); ops[1] = gimple_assign_rhs2 (stmt); - ops[2] = gimple_assign_rhs3 (stmt); break; - - case GIMPLE_UNARY_RHS: - return false; - default: gcc_unreachable (); } @@ -6641,110 +6629,19 @@ vect_transform_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, reduction variable. */ stmt_vec_info phi_info = STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info)); gphi *reduc_def_phi = as_a (phi_info->stmt); - tree reduc_def = PHI_RESULT (reduc_def_phi); - int reduc_index = -1; - for (i = 0; i < op_type; i++) - { - /* The condition of COND_EXPR is checked in vectorizable_condition(). */ - if (i == 0 && code == COND_EXPR) - continue; - - stmt_vec_info def_stmt_info; - enum vect_def_type dt; - tree tem; - is_simple_use = vect_is_simple_use (ops[i], loop_vinfo, &dt, &tem, - &def_stmt_info); - gcc_assert (is_simple_use); - if (dt == vect_reduction_def - && ops[i] == reduc_def) - { - reduc_index = i; - continue; - } - else if (tem) - { - /* To properly compute ncopies we are interested in the widest - input type in case we're looking at a widening accumulation. */ - if (!vectype_in - || (GET_MODE_SIZE (SCALAR_TYPE_MODE (TREE_TYPE (vectype_in))) - < GET_MODE_SIZE (SCALAR_TYPE_MODE (TREE_TYPE (tem))))) - vectype_in = tem; - } - - if (dt == vect_nested_cycle - && ops[i] == reduc_def) - { - reduc_index = i; - } - } - - if (!vectype_in) - vectype_in = vectype_out; + int reduc_index = STMT_VINFO_REDUC_IDX (reduc_info); + tree vectype_in = STMT_VINFO_REDUC_VECTYPE_IN (reduc_info); if (slp_node) - ncopies = 1; - else - ncopies = vect_get_num_copies (loop_vinfo, vectype_in); - - vect_reduction_type reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info); - - /* In case of widenning multiplication by a constant, we update the type - of the constant to be the type of the other operand. We check that the - constant fits the type in the pattern recognition pass. */ - if (code == DOT_PROD_EXPR - && !types_compatible_p (TREE_TYPE (ops[0]), TREE_TYPE (ops[1]))) { - gcc_unreachable (); - /* No testcase for this. PR49478. */ - if (TREE_CODE (ops[0]) == INTEGER_CST) - ops[0] = fold_convert (TREE_TYPE (ops[1]), ops[0]); - else if (TREE_CODE (ops[1]) == INTEGER_CST) - ops[1] = fold_convert (TREE_TYPE (ops[0]), ops[1]); + ncopies = 1; + vec_num = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node); } - - /* In case the vectorization factor (VF) is bigger than the number - of elements that we can fit in a vectype (nunits), we have to generate - more than one vector stmt - i.e - we need to "unroll" the - vector stmt by a factor VF/nunits. For more details see documentation - in vectorizable_operation. */ - - /* If the reduction is used in an outer loop we need to generate - VF intermediate results, like so (e.g. for ncopies=2): - r0 = phi (init, r0) - r1 = phi (init, r1) - r0 = x0 + r0; - r1 = x1 + r1; - (i.e. we generate VF results in 2 registers). - In this case we have a separate def-use cycle for each copy, and therefore - for each copy we get the vector def for the reduction variable from the - respective phi node created for this copy. - - Otherwise (the reduction is unused in the loop nest), we can combine - together intermediate results, like so (e.g. for ncopies=2): - r = phi (init, r) - r = x0 + r; - r = x1 + r; - (i.e. we generate VF/2 results in a single register). - In this case for each copy we get the vector def for the reduction variable - from the vectorized reduction operation generated in the previous iteration. - - This only works when we see both the reduction PHI and its only consumer - in vectorizable_reduction and there are no intermediate stmts - participating. */ - stmt_vec_info use_stmt_info; - tree reduc_phi_result = gimple_phi_result (reduc_def_phi); - if (ncopies > 1 - && (STMT_VINFO_RELEVANT (stmt_info) <= vect_used_only_live) - && (use_stmt_info = loop_vinfo->lookup_single_use (reduc_phi_result)) - && (!STMT_VINFO_IN_PATTERN_P (use_stmt_info) - || !STMT_VINFO_PATTERN_DEF_SEQ (use_stmt_info)) - && vect_stmt_to_vectorize (use_stmt_info) == stmt_info) - single_defuse_cycle = true; - - if (slp_node) - vec_num = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node); else - vec_num = 1; + { + ncopies = vect_get_num_copies (loop_vinfo, vectype_in); + vec_num = 1; + } internal_fn cond_fn = get_conditional_internal_fn (code); vec_loop_masks *masks = &LOOP_VINFO_MASKS (loop_vinfo); @@ -6768,6 +6665,7 @@ vect_transform_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, bool masked_loop_p = LOOP_VINFO_FULLY_MASKED_P (loop_vinfo); + vect_reduction_type reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info); if (reduction_type == FOLD_LEFT_REDUCTION) { internal_fn reduc_fn = STMT_VINFO_REDUC_FN (reduc_info); @@ -6776,6 +6674,7 @@ vect_transform_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, reduc_fn, ops, vectype_in, reduc_index, masks); } + bool single_defuse_cycle = STMT_VINFO_FORCE_SINGLE_CYCLE (reduc_info); gcc_assert (single_defuse_cycle || code == DOT_PROD_EXPR || code == WIDEN_SUM_EXPR @@ -6935,10 +6834,8 @@ vect_transform_cycle_phi (stmt_vec_info stmt_info, stmt_vec_info *vec_stmt, slp_tree slp_node, slp_instance slp_node_instance) { tree vectype_out = STMT_VINFO_VECTYPE (stmt_info); - tree vectype_in = NULL_TREE; loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info); class loop *loop = LOOP_VINFO_LOOP (loop_vinfo); - enum vect_def_type dt; int i; int ncopies; stmt_vec_info prev_phi_info; @@ -6952,9 +6849,6 @@ vect_transform_cycle_phi (stmt_vec_info stmt_info, stmt_vec_info *vec_stmt, nested_cycle = true; } - gphi *phi = as_a (stmt_info->stmt); - tree phi_result = gimple_phi_result (phi); - stmt_vec_info reduc_stmt_info = STMT_VINFO_REDUC_DEF (stmt_info); reduc_stmt_info = vect_stmt_to_vectorize (reduc_stmt_info); stmt_vec_info reduc_info = info_for_reduction (stmt_info); @@ -6965,26 +6859,8 @@ vect_transform_cycle_phi (stmt_vec_info stmt_info, stmt_vec_info *vec_stmt, /* Leave the scalar phi in place. */ return true; - if (gassign *reduc_stmt = dyn_cast (reduc_stmt_info->stmt)) - for (unsigned k = 1; k < gimple_num_ops (reduc_stmt); ++k) - { - tree op = gimple_op (reduc_stmt, k); - if (op == phi_result) - continue; - if (k == 1 && gimple_assign_rhs_code (reduc_stmt) == COND_EXPR) - continue; - bool is_simple_use = vect_is_simple_use (op, loop_vinfo, &dt); - gcc_assert (is_simple_use); - if (dt == vect_constant_def || dt == vect_external_def) - continue; - if (!vectype_in - || (GET_MODE_SIZE (SCALAR_TYPE_MODE (TREE_TYPE (vectype_in))) - < GET_MODE_SIZE (SCALAR_TYPE_MODE (TREE_TYPE (op))))) - vectype_in = get_vectype_for_scalar_type (TREE_TYPE (op)); - break; - } - /* For a nested cycle we might end up with an operation like - phi_result * phi_result. */ + tree vectype_in = STMT_VINFO_REDUC_VECTYPE_IN (reduc_info); + /* For a nested cycle we do not fill the above. */ if (!vectype_in) vectype_in = STMT_VINFO_VECTYPE (stmt_info); gcc_assert (vectype_in); @@ -7003,19 +6879,15 @@ vect_transform_cycle_phi (stmt_vec_info stmt_info, stmt_vec_info *vec_stmt, ncopies = vect_get_num_copies (loop_vinfo, vectype_in); } - /* Check whether we can use a single PHI node and accumulate + /* Check whether we should use a single PHI node and accumulate vectors to one before the backedge. */ - stmt_vec_info use_stmt_info; - if (ncopies > 1 - && STMT_VINFO_RELEVANT (reduc_stmt_info) <= vect_used_only_live - && (use_stmt_info = loop_vinfo->lookup_single_use (phi_result)) - && (!STMT_VINFO_IN_PATTERN_P (use_stmt_info) - || !STMT_VINFO_PATTERN_DEF_SEQ (use_stmt_info)) - && vect_stmt_to_vectorize (use_stmt_info) == reduc_stmt_info) + if (STMT_VINFO_FORCE_SINGLE_CYCLE (reduc_info)) ncopies = 1; /* Create the destination vector */ - tree vec_dest = vect_create_destination_var (phi_result, vectype_out); + gphi *phi = as_a (stmt_info->stmt); + tree vec_dest = vect_create_destination_var (gimple_phi_result (phi), + vectype_out); /* Get the loop-entry arguments. */ tree vec_initial_def; diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 71ea6ad..484de4f 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -961,6 +961,12 @@ public: corresponding PHI. */ stmt_vec_info reduc_def; + /* The vector input type relevant for reduction vectorization. */ + tree reduc_vectype_in; + + /* Whether we force a single cycle PHI during reduction vectorization. */ + bool force_single_cycle; + /* Whether on this stmt reduction meta is recorded. */ bool is_reduc_info; @@ -1050,6 +1056,7 @@ STMT_VINFO_BB_VINFO (stmt_vec_info stmt_vinfo) #define STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL(S) (S)->induc_cond_initial_val #define STMT_VINFO_REDUC_EPILOGUE_ADJUSTMENT(S) (S)->reduc_epilogue_adjustment #define STMT_VINFO_REDUC_IDX(S) (S)->reduc_idx +#define STMT_VINFO_FORCE_SINGLE_CYCLE(S) (S)->force_single_cycle #define STMT_VINFO_DR_WRT_VEC_LOOP(S) (S)->dr_wrt_vec_loop #define STMT_VINFO_DR_BASE_ADDRESS(S) (S)->dr_wrt_vec_loop.base_address @@ -1083,6 +1090,7 @@ STMT_VINFO_BB_VINFO (stmt_vec_info stmt_vinfo) #define STMT_VINFO_REDUC_CODE(S) (S)->reduc_code #define STMT_VINFO_REDUC_FN(S) (S)->reduc_fn #define STMT_VINFO_REDUC_DEF(S) (S)->reduc_def +#define STMT_VINFO_REDUC_VECTYPE_IN(S) (S)->reduc_vectype_in #define STMT_VINFO_SLP_VECT_ONLY(S) (S)->slp_vect_only_p #define DR_GROUP_FIRST_ELEMENT(S) \ -- cgit v1.1 From 34a829a041ae0b8e002c20b9ee8c7497efd862d2 Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Wed, 9 Oct 2019 08:49:08 +0000 Subject: * config/avr/avr.md: Fix typo in a comment. From-SVN: r276755 --- gcc/config/avr/avr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index e85bf49..f711d4e 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -344,7 +344,7 @@ }) -;; Defining nonlocal_goto_receiver means we must also define this. +;; Defining nonlocal_goto_receiver means we must also define this ;; even though its function is identical to that in builtins.c (define_expand "nonlocal_goto" -- cgit v1.1 From e3423d768d880f6a9687c2ee0c2e44b8292d44ad Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Wed, 9 Oct 2019 09:05:04 +0000 Subject: avr-mmcu.texi: Re-generate because config/avr/avr-devices.c was changed in r269487. * doc/avr-mmcu.texi: Re-generate because config/avr/avr-devices.c was changed in r269487. From-SVN: r276756 --- gcc/doc/avr-mmcu.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/doc/avr-mmcu.texi b/gcc/doc/avr-mmcu.texi index ea0161e..99cd93c 100644 --- a/gcc/doc/avr-mmcu.texi +++ b/gcc/doc/avr-mmcu.texi @@ -21,7 +21,7 @@ @*@var{mcu}@tie{}= @code{ata5272}, @code{ata6616c}, @code{attiny13}, @code{attiny13a}, @code{attiny2313}, @code{attiny2313a}, @code{attiny24}, @code{attiny24a}, @code{attiny25}, @code{attiny261}, @code{attiny261a}, @code{attiny43u}, @code{attiny4313}, @code{attiny44}, @code{attiny44a}, @code{attiny441}, @code{attiny45}, @code{attiny461}, @code{attiny461a}, @code{attiny48}, @code{attiny828}, @code{attiny84}, @code{attiny84a}, @code{attiny841}, @code{attiny85}, @code{attiny861}, @code{attiny861a}, @code{attiny87}, @code{attiny88}, @code{at86rf401}. @item avr3 -``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory. +``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory. @*@var{mcu}@tie{}= @code{at43usb355}, @code{at76c711}. @item avr31 -- cgit v1.1 From 4a8841c0413d52261a8d024577381582d07a866a Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 9 Oct 2019 13:36:33 +0000 Subject: tree-vect-loop.c (vect_is_simple_reduction): Simplify and allow stmts other than GIMPLE_ASSIGN in nested cycles. 2019-10-09 Richard Biener * tree-vect-loop.c (vect_is_simple_reduction): Simplify and allow stmts other than GIMPLE_ASSIGN in nested cycles. * gcc.dg/vect/vect-outer-call-1.c: New testcase. From-SVN: r276760 --- gcc/ChangeLog | 5 ++ gcc/testsuite/ChangeLog | 4 ++ gcc/testsuite/gcc.dg/vect/vect-outer-call-1.c | 22 +++++++ gcc/tree-vect-loop.c | 89 +++++++++------------------ 4 files changed, 59 insertions(+), 61 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/vect/vect-outer-call-1.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0214310..330e13b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-09 Richard Biener + + * tree-vect-loop.c (vect_is_simple_reduction): Simplify and + allow stmts other than GIMPLE_ASSIGN in nested cycles. + 2019-10-08 Richard Biener * tree-vectorizer.h (_stmt_vec_info::reduc_vectype_in): New. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a1f3966..4c7dfe7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-10-09 Richard Biener + + * gcc.dg/vect/vect-outer-call-1.c: New testcase. + 2019-10-08 Alexandre Oliva * gcc.target/i386/20060512-1.c (sse2_test): Use a diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-call-1.c b/gcc/testsuite/gcc.dg/vect/vect-outer-call-1.c new file mode 100644 index 0000000..f26d422 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-call-1.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_float } */ +/* { dg-additional-options "-fno-math-errno" } */ + +void +foo (float * __restrict x, float *y, int n, int m) +{ + if (m > 0) + for (int i = 0; i < n; ++i) + { + float tem = x[i], tem1; + for (int j = 0; j < m; ++j) + { + tem += y[j]; + tem1 = tem; + tem = __builtin_sqrtf (tem); + } + x[i] = tem - tem1; + } +} + +/* { dg-final { scan-tree-dump "OUTER LOOP VECTORIZED" "vect" { target { vect_call_sqrtf } } } } */ diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index a9ea0ca..1435210 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -2756,10 +2756,8 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, enum tree_code orig_code, code; tree op1, op2, op3 = NULL_TREE, op4 = NULL_TREE; tree type; - tree name; imm_use_iterator imm_iter; use_operand_p use_p; - bool phi_def; *double_reduc = false; STMT_VINFO_REDUC_TYPE (phi_info) = TREE_CODE_REDUCTION; @@ -2791,44 +2789,24 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, phi_use_stmt = use_stmt; } - edge latch_e = loop_latch_edge (loop); - tree loop_arg = PHI_ARG_DEF_FROM_EDGE (phi, latch_e); - if (TREE_CODE (loop_arg) != SSA_NAME) + tree latch_def = PHI_ARG_DEF_FROM_EDGE (phi, loop_latch_edge (loop)); + if (TREE_CODE (latch_def) != SSA_NAME) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "reduction: not ssa_name: %T\n", loop_arg); + "reduction: not ssa_name: %T\n", latch_def); return NULL; } - stmt_vec_info def_stmt_info = loop_info->lookup_def (loop_arg); + stmt_vec_info def_stmt_info = loop_info->lookup_def (latch_def); if (!def_stmt_info || !flow_bb_inside_loop_p (loop, gimple_bb (def_stmt_info->stmt))) return NULL; - if (gassign *def_stmt = dyn_cast (def_stmt_info->stmt)) - { - name = gimple_assign_lhs (def_stmt); - phi_def = false; - } - else if (gphi *def_stmt = dyn_cast (def_stmt_info->stmt)) - { - name = PHI_RESULT (def_stmt); - phi_def = true; - } - else - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "reduction: unhandled reduction operation: %G", - def_stmt_info->stmt); - return NULL; - } - unsigned nlatch_def_loop_uses = 0; auto_vec lcphis; bool inner_loop_of_double_reduc = false; - FOR_EACH_IMM_USE_FAST (use_p, imm_iter, name) + FOR_EACH_IMM_USE_FAST (use_p, imm_iter, latch_def) { gimple *use_stmt = USE_STMT (use_p); if (is_gimple_debug (use_stmt)) @@ -2846,11 +2824,21 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, } } + /* If we are vectorizing an inner reduction we are executing that + in the original order only in case we are not dealing with a + double reduction. */ + if (nested_in_vect_loop && !inner_loop_of_double_reduc) + { + if (dump_enabled_p ()) + report_vect_op (MSG_NOTE, def_stmt_info->stmt, + "detected nested cycle: "); + return def_stmt_info; + } + /* If this isn't a nested cycle or if the nested cycle reduction value is used ouside of the inner loop we cannot handle uses of the reduction value. */ - if ((!nested_in_vect_loop || inner_loop_of_double_reduc) - && (nlatch_def_loop_uses > 1 || nphi_def_loop_uses > 1)) + if (nlatch_def_loop_uses > 1 || nphi_def_loop_uses > 1) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, @@ -2860,9 +2848,8 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, /* If DEF_STMT is a phi node itself, we expect it to have a single argument defined in the inner loop. */ - if (phi_def) + if (gphi *def_stmt = dyn_cast (def_stmt_info->stmt)) { - gphi *def_stmt = as_a (def_stmt_info->stmt); op1 = PHI_ARG_DEF (def_stmt, 0); if (gimple_phi_num_args (def_stmt) != 1 @@ -2895,35 +2882,16 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, return NULL; } - /* If we are vectorizing an inner reduction we are executing that - in the original order only in case we are not dealing with a - double reduction. */ - bool check_reduction = true; - if (flow_loop_nested_p (vect_loop, loop)) - { - gphi *lcphi; - unsigned i; - check_reduction = false; - FOR_EACH_VEC_ELT (lcphis, i, lcphi) - FOR_EACH_IMM_USE_FAST (use_p, imm_iter, gimple_phi_result (lcphi)) - { - gimple *use_stmt = USE_STMT (use_p); - if (is_gimple_debug (use_stmt)) - continue; - if (! flow_bb_inside_loop_p (vect_loop, gimple_bb (use_stmt))) - check_reduction = true; - } - } - - gassign *def_stmt = as_a (def_stmt_info->stmt); - code = orig_code = gimple_assign_rhs_code (def_stmt); - - if (nested_in_vect_loop && !check_reduction) + gassign *def_stmt = dyn_cast (def_stmt_info->stmt); + if (!def_stmt) { if (dump_enabled_p ()) - report_vect_op (MSG_NOTE, def_stmt, "detected nested cycle: "); - return def_stmt_info; + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "reduction: unhandled reduction operation: %G", + def_stmt_info->stmt); + return NULL; } + code = orig_code = gimple_assign_rhs_code (def_stmt); /* We can handle "res -= x[i]", which is non-associative by simply rewriting this into "res += -x[i]". Avoid changing @@ -3018,8 +2986,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, vectorizing an outer-loop: the inner-loop is executed sequentially, and therefore vectorizing reductions in the inner-loop during outer-loop vectorization is safe. */ - if (check_reduction - && STMT_VINFO_REDUC_TYPE (phi_info) == TREE_CODE_REDUCTION + if (STMT_VINFO_REDUC_TYPE (phi_info) == TREE_CODE_REDUCTION && needs_fold_left_reduction_p (type, code)) STMT_VINFO_REDUC_TYPE (phi_info) = FOLD_LEFT_REDUCTION; @@ -3066,9 +3033,9 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, return def_stmt_info; } - /* Look for the expression computing loop_arg from loop PHI result. */ + /* Look for the expression computing latch_def from loop PHI result. */ auto_vec > path; - if (check_reduction_path (vect_location, loop, phi, loop_arg, code, + if (check_reduction_path (vect_location, loop, phi, latch_def, code, path)) { /* Try building an SLP reduction chain for which the additional -- cgit v1.1 From 8cb6a77590957942e124b34e0bb0827d1404f341 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 9 Oct 2019 17:17:19 +0000 Subject: decl.c (grok_ctor_properties): Use DECL_SOURCE_LOCATION. /cp 2019-10-09 Paolo Carlini * decl.c (grok_ctor_properties): Use DECL_SOURCE_LOCATION. * typeck.c (cp_build_binary_op): Use the op_location_t argument in many error messages. /testsuite 2019-10-09 Paolo Carlini * c-c++-common/Waddress-1.c: Test locations too. * c-c++-common/Wpointer-compare-1.c: Likewise. * c-c++-common/Wshift-count-negative-1.c: Likewise. * c-c++-common/Wshift-count-overflow-1.c: Likewise. * c-c++-common/Wshift-negative-value-1.c: Likewise. * c-c++-common/Wshift-negative-value-2.c: Likewise. * c-c++-common/Wshift-negative-value-5.c: Likewise. * c-c++-common/pr48418.c: Likewise. * c-c++-common/pr65830.c: Likewise. * c-c++-common/pr69764.c: Likewise. * g++.dg/cpp0x/constexpr-array-ptr10.C: Likewise. * g++.dg/cpp0x/nullptr37.C: Likewise. * g++.dg/template/crash126.C: Likewise. * g++.dg/template/crash129.C: Likewise. * g++.dg/warn/Wextra-3.C: Likewise. * g++.dg/warn/Wfloat-equal-1.C: Likewise. * g++.dg/warn/Wstring-literal-comparison-1.C: Likewise. * g++.dg/warn/Wstring-literal-comparison-2.C: Likewise. * g++.dg/warn/pointer-integer-comparison.C: Likewise. * g++.old-deja/g++.jason/crash8.C: Likewise. From-SVN: r276763 --- gcc/cp/ChangeLog | 6 ++ gcc/cp/decl.c | 3 +- gcc/cp/typeck.c | 81 ++++++++++++---------- gcc/testsuite/ChangeLog | 23 ++++++ gcc/testsuite/c-c++-common/Waddress-1.c | 8 +-- gcc/testsuite/c-c++-common/Wpointer-compare-1.c | 40 +++++------ .../c-c++-common/Wshift-count-negative-1.c | 4 +- .../c-c++-common/Wshift-count-overflow-1.c | 4 +- .../c-c++-common/Wshift-negative-value-1.c | 6 +- .../c-c++-common/Wshift-negative-value-2.c | 6 +- .../c-c++-common/Wshift-negative-value-5.c | 6 +- gcc/testsuite/c-c++-common/pr48418.c | 16 ++--- gcc/testsuite/c-c++-common/pr65830.c | 8 +-- gcc/testsuite/c-c++-common/pr69764.c | 12 ++-- gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr10.C | 16 ++--- gcc/testsuite/g++.dg/cpp0x/nullptr37.C | 72 +++++++++---------- gcc/testsuite/g++.dg/template/crash126.C | 2 +- gcc/testsuite/g++.dg/template/crash129.C | 2 +- gcc/testsuite/g++.dg/warn/Wextra-3.C | 8 +-- gcc/testsuite/g++.dg/warn/Wfloat-equal-1.C | 8 +-- .../g++.dg/warn/Wstring-literal-comparison-1.C | 2 +- .../g++.dg/warn/Wstring-literal-comparison-2.C | 2 +- .../g++.dg/warn/pointer-integer-comparison.C | 12 ++-- gcc/testsuite/g++.old-deja/g++.jason/crash8.C | 2 +- 24 files changed, 194 insertions(+), 155 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0e8d930..d75ea5d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2019-10-09 Paolo Carlini + + * decl.c (grok_ctor_properties): Use DECL_SOURCE_LOCATION. + * typeck.c (cp_build_binary_op): Use the op_location_t argument + in many error messages. + 2019-10-08 Martin Sebor PR c++/92001 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index e405367..72c02af 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -13738,7 +13738,8 @@ grok_ctor_properties (const_tree ctype, const_tree decl) or implicitly defined), there's no need to worry about their existence. Theoretically, they should never even be instantiated, but that's hard to forestall. */ - error ("invalid constructor; you probably meant %<%T (const %T&)%>", + error_at (DECL_SOURCE_LOCATION (decl), + "invalid constructor; you probably meant %<%T (const %T&)%>", ctype, ctype); return false; } diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index d549450..1d9e9b8 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -4475,7 +4475,8 @@ cp_build_binary_op (const op_location_t &location, if (t != error_mark_node) { if (complain & tf_error) - permerror (input_location, "assuming cast to type %qT from overloaded function", + permerror (location, + "assuming cast to type %qT from overloaded function", TREE_TYPE (t)); op0 = t; } @@ -4486,7 +4487,8 @@ cp_build_binary_op (const op_location_t &location, if (t != error_mark_node) { if (complain & tf_error) - permerror (input_location, "assuming cast to type %qT from overloaded function", + permerror (location, + "assuming cast to type %qT from overloaded function", TREE_TYPE (t)); op1 = t; } @@ -4809,16 +4811,16 @@ cp_build_binary_op (const op_location_t &location, { if ((complain & tf_warning) && c_inhibit_evaluation_warnings == 0) - warning (OPT_Wshift_count_negative, - "right shift count is negative"); + warning_at (location, OPT_Wshift_count_negative, + "right shift count is negative"); } else { if (compare_tree_int (const_op1, TYPE_PRECISION (type0)) >= 0 && (complain & tf_warning) && c_inhibit_evaluation_warnings == 0) - warning (OPT_Wshift_count_overflow, - "right shift count >= width of type"); + warning_at (location, OPT_Wshift_count_overflow, + "right shift count >= width of type"); } } /* Avoid converting op1 to result_type later. */ @@ -4856,24 +4858,24 @@ cp_build_binary_op (const op_location_t &location, && tree_int_cst_sgn (const_op0) < 0 && (complain & tf_warning) && c_inhibit_evaluation_warnings == 0) - warning (OPT_Wshift_negative_value, - "left shift of negative value"); + warning_at (location, OPT_Wshift_negative_value, + "left shift of negative value"); if (TREE_CODE (const_op1) == INTEGER_CST) { if (tree_int_cst_lt (const_op1, integer_zero_node)) { if ((complain & tf_warning) && c_inhibit_evaluation_warnings == 0) - warning (OPT_Wshift_count_negative, - "left shift count is negative"); + warning_at (location, OPT_Wshift_count_negative, + "left shift count is negative"); } else if (compare_tree_int (const_op1, TYPE_PRECISION (type0)) >= 0) { if ((complain & tf_warning) && c_inhibit_evaluation_warnings == 0) - warning (OPT_Wshift_count_overflow, - "left shift count >= width of type"); + warning_at (location, OPT_Wshift_count_overflow, + "left shift count >= width of type"); } else if (TREE_CODE (const_op0) == INTEGER_CST && (complain & tf_warning)) @@ -4920,8 +4922,9 @@ cp_build_binary_op (const op_location_t &location, if ((complain & tf_warning) && c_inhibit_evaluation_warnings == 0 && (FLOAT_TYPE_P (type0) || FLOAT_TYPE_P (type1))) - warning (OPT_Wfloat_equal, - "comparing floating-point with %<==%> or % is unsafe"); + warning_at (location, OPT_Wfloat_equal, + "comparing floating-point with %<==%> " + "or % is unsafe"); if (complain & tf_warning) { tree stripped_orig_op0 = tree_strip_any_location_wrapper (orig_op0); @@ -4930,8 +4933,9 @@ cp_build_binary_op (const op_location_t &location, && !integer_zerop (cp_fully_fold (op1))) || (TREE_CODE (stripped_orig_op1) == STRING_CST && !integer_zerop (cp_fully_fold (op0)))) - warning (OPT_Waddress, "comparison with string literal results " - "in unspecified behavior"); + warning_at (location, OPT_Waddress, + "comparison with string literal results in " + "unspecified behavior"); } build_type = boolean_type_node; @@ -4955,11 +4959,11 @@ cp_build_binary_op (const op_location_t &location, if (char_type_p (TREE_TYPE (orig_op1))) { auto_diagnostic_group d; - if (warning (OPT_Wpointer_compare, - "comparison between pointer and zero character " - "constant")) - inform (input_location, - "did you mean to dereference the pointer?"); + if (warning_at (location, OPT_Wpointer_compare, + "comparison between pointer and zero character " + "constant")) + inform (location, + "did you mean to dereference the pointer?"); } warn_for_null_address (location, op0, complain); } @@ -4978,10 +4982,10 @@ cp_build_binary_op (const op_location_t &location, if (char_type_p (TREE_TYPE (orig_op0))) { auto_diagnostic_group d; - if (warning (OPT_Wpointer_compare, + if (warning_at (location, OPT_Wpointer_compare, "comparison between pointer and zero character " "constant")) - inform (input_location, + inform (location, "did you mean to dereference the pointer?"); } warn_for_null_address (location, op1, complain); @@ -4996,8 +5000,9 @@ cp_build_binary_op (const op_location_t &location, else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { result_type = type0; - if (complain & tf_error) - permerror (input_location, "ISO C++ forbids comparison between pointer and integer"); + if (complain & tf_error) + permerror (location, "ISO C++ forbids comparison between " + "pointer and integer"); else return error_mark_node; } @@ -5005,7 +5010,8 @@ cp_build_binary_op (const op_location_t &location, { result_type = type1; if (complain & tf_error) - permerror (input_location, "ISO C++ forbids comparison between pointer and integer"); + permerror (location, "ISO C++ forbids comparison between " + "pointer and integer"); else return error_mark_node; } @@ -5191,8 +5197,9 @@ cp_build_binary_op (const op_location_t &location, || TREE_CODE (orig_op1) == STRING_CST) { if (complain & tf_warning) - warning (OPT_Waddress, "comparison with string literal results " - "in unspecified behavior"); + warning_at (location, OPT_Waddress, + "comparison with string literal results " + "in unspecified behavior"); } if (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE) @@ -5267,15 +5274,15 @@ cp_build_binary_op (const op_location_t &location, { result_type = type0; if (extra_warnings && (complain & tf_warning)) - warning (OPT_Wextra, - "ordered comparison of pointer with integer zero"); + warning_at (location, OPT_Wextra, + "ordered comparison of pointer with integer zero"); } else if (code1 == POINTER_TYPE && null_ptr_cst_p (orig_op0)) { result_type = type1; if (extra_warnings && (complain & tf_warning)) - warning (OPT_Wextra, - "ordered comparison of pointer with integer zero"); + warning_at (location, OPT_Wextra, + "ordered comparison of pointer with integer zero"); } else if (null_ptr_cst_p (orig_op0) && null_ptr_cst_p (orig_op1)) /* One of the operands must be of nullptr_t type. */ @@ -5284,16 +5291,18 @@ cp_build_binary_op (const op_location_t &location, { result_type = type0; if (complain & tf_error) - permerror (input_location, "ISO C++ forbids comparison between pointer and integer"); - else + permerror (location, "ISO C++ forbids comparison between " + "pointer and integer"); + else return error_mark_node; } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { result_type = type1; if (complain & tf_error) - permerror (input_location, "ISO C++ forbids comparison between pointer and integer"); - else + permerror (location, "ISO C++ forbids comparison between " + "pointer and integer"); + else return error_mark_node; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4c7dfe7..26a3fcc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,26 @@ +2019-10-09 Paolo Carlini + + * c-c++-common/Waddress-1.c: Test locations too. + * c-c++-common/Wpointer-compare-1.c: Likewise. + * c-c++-common/Wshift-count-negative-1.c: Likewise. + * c-c++-common/Wshift-count-overflow-1.c: Likewise. + * c-c++-common/Wshift-negative-value-1.c: Likewise. + * c-c++-common/Wshift-negative-value-2.c: Likewise. + * c-c++-common/Wshift-negative-value-5.c: Likewise. + * c-c++-common/pr48418.c: Likewise. + * c-c++-common/pr65830.c: Likewise. + * c-c++-common/pr69764.c: Likewise. + * g++.dg/cpp0x/constexpr-array-ptr10.C: Likewise. + * g++.dg/cpp0x/nullptr37.C: Likewise. + * g++.dg/template/crash126.C: Likewise. + * g++.dg/template/crash129.C: Likewise. + * g++.dg/warn/Wextra-3.C: Likewise. + * g++.dg/warn/Wfloat-equal-1.C: Likewise. + * g++.dg/warn/Wstring-literal-comparison-1.C: Likewise. + * g++.dg/warn/Wstring-literal-comparison-2.C: Likewise. + * g++.dg/warn/pointer-integer-comparison.C: Likewise. + * g++.old-deja/g++.jason/crash8.C: Likewise. + 2019-10-09 Richard Biener * gcc.dg/vect/vect-outer-call-1.c: New testcase. diff --git a/gcc/testsuite/c-c++-common/Waddress-1.c b/gcc/testsuite/c-c++-common/Waddress-1.c index 8df5d2f..9790a31 100644 --- a/gcc/testsuite/c-c++-common/Waddress-1.c +++ b/gcc/testsuite/c-c++-common/Waddress-1.c @@ -8,8 +8,8 @@ int foo () { return "foo1" != (void *) 0 /* { dg-bogus "comparison with string literal results in unspecified behavior" } */ - && "foo2" != (const char *) ((void *) 0) /* { dg-bogus "comparison with string literal results in unspecified behavior" } */ - && "foo3" != (const char *) ((void *) (10 - 10)) /* { dg-bogus "comparison with string literal results in unspecified behavior" } */ - && "foo4" != (const char *) ((void *) (&e - &e)) /* { dg-warning "comparison with string literal results in unspecified behavior" "" { target c } } */ - && "foo5" != "foo6"; /* { dg-warning "comparison with string literal results in unspecified behavior" } */ + && "foo2" != (const char *) ((void *) 0) /* { dg-bogus "comparison with string literal results in unspecified behavior" } */ + && "foo3" != (const char *) ((void *) (10 - 10)) /* { dg-bogus "comparison with string literal results in unspecified behavior" } */ + && "foo4" != (const char *) ((void *) (&e - &e)) /* { dg-warning "15:comparison with string literal results in unspecified behavior" "" { target c } } */ + && "foo5" != "foo6"; /* { dg-warning "15:comparison with string literal results in unspecified behavior" } */ } diff --git a/gcc/testsuite/c-c++-common/Wpointer-compare-1.c b/gcc/testsuite/c-c++-common/Wpointer-compare-1.c index 440341e..808a0fd 100644 --- a/gcc/testsuite/c-c++-common/Wpointer-compare-1.c +++ b/gcc/testsuite/c-c++-common/Wpointer-compare-1.c @@ -8,25 +8,25 @@ f1 (int *p, int **q) { int r = 0; - r += p == '\0'; /* { dg-warning "comparison between pointer and zero character" } */ - r += p == L'\0'; /* { dg-warning "comparison between pointer and zero character" } */ - r += p != '\0'; /* { dg-warning "comparison between pointer and zero character" } */ - r += p != L'\0'; /* { dg-warning "comparison between pointer and zero character" } */ + r += p == '\0'; /* { dg-warning "10:comparison between pointer and zero character" } */ + r += p == L'\0'; /* { dg-warning "10:comparison between pointer and zero character" } */ + r += p != '\0'; /* { dg-warning "10:comparison between pointer and zero character" } */ + r += p != L'\0'; /* { dg-warning "10:comparison between pointer and zero character" } */ - r += '\0' == p; /* { dg-warning "comparison between pointer and zero character" } */ - r += L'\0' == p; /* { dg-warning "comparison between pointer and zero character" } */ - r += '\0' != p; /* { dg-warning "comparison between pointer and zero character" } */ - r += L'\0' != p; /* { dg-warning "comparison between pointer and zero character" } */ + r += '\0' == p; /* { dg-warning "13:comparison between pointer and zero character" } */ + r += L'\0' == p; /* { dg-warning "14:comparison between pointer and zero character" } */ + r += '\0' != p; /* { dg-warning "13:comparison between pointer and zero character" } */ + r += L'\0' != p; /* { dg-warning "14:comparison between pointer and zero character" } */ - r += q == '\0'; /* { dg-warning "comparison between pointer and zero character" } */ - r += q == L'\0'; /* { dg-warning "comparison between pointer and zero character" } */ - r += q != '\0'; /* { dg-warning "comparison between pointer and zero character" } */ - r += q != L'\0'; /* { dg-warning "comparison between pointer and zero character" } */ + r += q == '\0'; /* { dg-warning "10:comparison between pointer and zero character" } */ + r += q == L'\0'; /* { dg-warning "10:comparison between pointer and zero character" } */ + r += q != '\0'; /* { dg-warning "10:comparison between pointer and zero character" } */ + r += q != L'\0'; /* { dg-warning "10:comparison between pointer and zero character" } */ - r += '\0' == q; /* { dg-warning "comparison between pointer and zero character" } */ - r += L'\0' == q; /* { dg-warning "comparison between pointer and zero character" } */ - r += '\0' != q; /* { dg-warning "comparison between pointer and zero character" } */ - r += L'\0' != q; /* { dg-warning "comparison between pointer and zero character" } */ + r += '\0' == q; /* { dg-warning "13:comparison between pointer and zero character" } */ + r += L'\0' == q; /* { dg-warning "14:comparison between pointer and zero character" } */ + r += '\0' != q; /* { dg-warning "13:comparison between pointer and zero character" } */ + r += L'\0' != q; /* { dg-warning "14:comparison between pointer and zero character" } */ return r; } @@ -55,11 +55,11 @@ f3 (int *p) { int r = 0; - r += p == (char) 0; /* { dg-warning "comparison between pointer and zero character" } */ - r += p != (char) 0; /* { dg-warning "comparison between pointer and zero character" } */ + r += p == (char) 0; /* { dg-warning "10:comparison between pointer and zero character" } */ + r += p != (char) 0; /* { dg-warning "10:comparison between pointer and zero character" } */ - r += (char) 0 == p; /* { dg-warning "comparison between pointer and zero character" } */ - r += (char) 0 != p; /* { dg-warning "comparison between pointer and zero character" } */ + r += (char) 0 == p; /* { dg-warning "17:comparison between pointer and zero character" } */ + r += (char) 0 != p; /* { dg-warning "17:comparison between pointer and zero character" } */ return r; } diff --git a/gcc/testsuite/c-c++-common/Wshift-count-negative-1.c b/gcc/testsuite/c-c++-common/Wshift-count-negative-1.c index d883393..6807b98 100644 --- a/gcc/testsuite/c-c++-common/Wshift-count-negative-1.c +++ b/gcc/testsuite/c-c++-common/Wshift-count-negative-1.c @@ -3,6 +3,6 @@ void foo() { - unsigned i1 = 1U << -1; /* { dg-warning "left shift count is negative" } */ - unsigned i2 = 1U >> -1; /* { dg-warning "right shift count is negative" } */ + unsigned i1 = 1U << -1; /* { dg-warning "20:left shift count is negative" } */ + unsigned i2 = 1U >> -1; /* { dg-warning "20:right shift count is negative" } */ } diff --git a/gcc/testsuite/c-c++-common/Wshift-count-overflow-1.c b/gcc/testsuite/c-c++-common/Wshift-count-overflow-1.c index 4d29d57..47225e4 100644 --- a/gcc/testsuite/c-c++-common/Wshift-count-overflow-1.c +++ b/gcc/testsuite/c-c++-common/Wshift-count-overflow-1.c @@ -3,6 +3,6 @@ void foo() { - unsigned i1 = 1U << (sizeof(unsigned) * __CHAR_BIT__); /* { dg-warning "left shift count >= width of type" } */ - unsigned i2 = 1U >> (sizeof(unsigned) * __CHAR_BIT__); /* { dg-warning "right shift count >= width of type" } */ + unsigned i1 = 1U << (sizeof(unsigned) * __CHAR_BIT__); /* { dg-warning "20:left shift count >= width of type" } */ + unsigned i2 = 1U >> (sizeof(unsigned) * __CHAR_BIT__); /* { dg-warning "20:right shift count >= width of type" } */ } diff --git a/gcc/testsuite/c-c++-common/Wshift-negative-value-1.c b/gcc/testsuite/c-c++-common/Wshift-negative-value-1.c index 7df1804..d58d8b9 100644 --- a/gcc/testsuite/c-c++-common/Wshift-negative-value-1.c +++ b/gcc/testsuite/c-c++-common/Wshift-negative-value-1.c @@ -6,7 +6,7 @@ enum E { A = 0 << 1, B = 1 << 1, - C = -1 << 1, /* { dg-warning "left shift of negative value|not an integer constant" } */ + C = -1 << 1, /* { dg-warning "10:left shift of negative value|not an integer constant" } */ /* { dg-error "left operand of shift expression" "shift" { target c++ } .-1 } */ D = 0 >> 1, E = 1 >> 1, @@ -23,10 +23,10 @@ left (int x) int r = 0; r += z << x; r += o << x; - r += m << x; /* { dg-warning "left shift of negative value" } */ + r += m << x; /* { dg-warning "10:left shift of negative value" } */ r += 0 << x; r += 1 << x; - r += -1 << x; /* { dg-warning "left shift of negative value" } */ + r += -1 << x; /* { dg-warning "11:left shift of negative value" } */ r += -1U << x; return r; } diff --git a/gcc/testsuite/c-c++-common/Wshift-negative-value-2.c b/gcc/testsuite/c-c++-common/Wshift-negative-value-2.c index 3a60ed7e..9f435e8 100644 --- a/gcc/testsuite/c-c++-common/Wshift-negative-value-2.c +++ b/gcc/testsuite/c-c++-common/Wshift-negative-value-2.c @@ -6,7 +6,7 @@ enum E { A = 0 << 1, B = 1 << 1, - C = -1 << 1, /* { dg-warning "left shift of negative value" } */ + C = -1 << 1, /* { dg-warning "10:left shift of negative value" } */ /* { dg-error "not an integer constant" "no constant" { target c++ } .-1 } */ /* { dg-error "left operand of shift expression" "shift" { target c++ } .-2 } */ D = 0 >> 1, @@ -24,10 +24,10 @@ left (int x) int r = 0; r += z << x; r += o << x; - r += m << x; /* { dg-warning "left shift of negative value" } */ + r += m << x; /* { dg-warning "10:left shift of negative value" } */ r += 0 << x; r += 1 << x; - r += -1 << x; /* { dg-warning "left shift of negative value" } */ + r += -1 << x; /* { dg-warning "11:left shift of negative value" } */ r += -1U << x; return r; } diff --git a/gcc/testsuite/c-c++-common/Wshift-negative-value-5.c b/gcc/testsuite/c-c++-common/Wshift-negative-value-5.c index 74ecd1e..3c3e74c 100644 --- a/gcc/testsuite/c-c++-common/Wshift-negative-value-5.c +++ b/gcc/testsuite/c-c++-common/Wshift-negative-value-5.c @@ -7,7 +7,7 @@ enum E { A = 0 << 1, B = 1 << 1, - C = -1 << 1, /* { dg-warning "left shift of negative value" } */ + C = -1 << 1, /* { dg-warning "10:left shift of negative value" } */ D = 0 >> 1, E = 1 >> 1, F = -1 >> 1 @@ -23,10 +23,10 @@ left (int x) int r = 0; r += z << x; r += o << x; - r += m << x; /* { dg-warning "left shift of negative value" } */ + r += m << x; /* { dg-warning "10:left shift of negative value" } */ r += 0 << x; r += 1 << x; - r += -1 << x; /* { dg-warning "left shift of negative value" } */ + r += -1 << x; /* { dg-warning "11:left shift of negative value" } */ r += -1U << x; return r; } diff --git a/gcc/testsuite/c-c++-common/pr48418.c b/gcc/testsuite/c-c++-common/pr48418.c index 95ff855..1732854 100644 --- a/gcc/testsuite/c-c++-common/pr48418.c +++ b/gcc/testsuite/c-c++-common/pr48418.c @@ -8,13 +8,13 @@ foo (int x) const int a = sizeof (int) * __CHAR_BIT__; const int b = -7; int c = 0; - c += x << a; /* { dg-warning "left shift count >= width of type" } */ - c += x << b; /* { dg-warning "left shift count is negative" } */ - c += x << (sizeof (int) * __CHAR_BIT__); /* { dg-warning "left shift count >= width of type" } */ - c += x << -7; /* { dg-warning "left shift count is negative" } */ - c += x >> a; /* { dg-warning "right shift count >= width of type" } */ - c += x >> b; /* { dg-warning "right shift count is negative" } */ - c += x >> (sizeof (int) * __CHAR_BIT__); /* { dg-warning "right shift count >= width of type" } */ - c += x >> -7; /* { dg-warning "right shift count is negative" } */ + c += x << a; /* { dg-warning "10:left shift count >= width of type" } */ + c += x << b; /* { dg-warning "10:left shift count is negative" } */ + c += x << (sizeof (int) * __CHAR_BIT__); /* { dg-warning "10:left shift count >= width of type" } */ + c += x << -7; /* { dg-warning "10:left shift count is negative" } */ + c += x >> a; /* { dg-warning "10:right shift count >= width of type" } */ + c += x >> b; /* { dg-warning "10:right shift count is negative" } */ + c += x >> (sizeof (int) * __CHAR_BIT__); /* { dg-warning "10:right shift count >= width of type" } */ + c += x >> -7; /* { dg-warning "10:right shift count is negative" } */ return c; } diff --git a/gcc/testsuite/c-c++-common/pr65830.c b/gcc/testsuite/c-c++-common/pr65830.c index e115f18..73eb97c 100644 --- a/gcc/testsuite/c-c++-common/pr65830.c +++ b/gcc/testsuite/c-c++-common/pr65830.c @@ -8,9 +8,9 @@ foo (int x) const int a = sizeof (int) * __CHAR_BIT__; const int b = -7; int c = 0; - c += x << a; /* { dg-bogus "left shift count >= width of type" } */ - c += x << b; /* { dg-bogus "left shift count is negative" } */ - c += x >> a; /* { dg-bogus "right shift count >= width of type" } */ - c += x >> b; /* { dg-bogus "right shift count is negative" } */ + c += x << a; /* { dg-bogus "10:left shift count >= width of type" } */ + c += x << b; /* { dg-bogus "10:left shift count is negative" } */ + c += x >> a; /* { dg-bogus "10:right shift count >= width of type" } */ + c += x >> b; /* { dg-bogus "10:right shift count is negative" } */ return c; } diff --git a/gcc/testsuite/c-c++-common/pr69764.c b/gcc/testsuite/c-c++-common/pr69764.c index 79623ec..146f258 100644 --- a/gcc/testsuite/c-c++-common/pr69764.c +++ b/gcc/testsuite/c-c++-common/pr69764.c @@ -4,35 +4,35 @@ unsigned char fn1 (unsigned char a) { - return a >> ~6; /* { dg-warning "right shift count is negative" } */ + return a >> ~6; /* { dg-warning "12:right shift count is negative" } */ } unsigned short fn2 (unsigned short a) { - return a >> ~6; /* { dg-warning "right shift count is negative" } */ + return a >> ~6; /* { dg-warning "12:right shift count is negative" } */ } unsigned int fn3 (unsigned int a) { - return a >> ~6; /* { dg-warning "right shift count is negative" } */ + return a >> ~6; /* { dg-warning "12:right shift count is negative" } */ } unsigned char fn4 (unsigned char a) { - return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */ + return a >> 0xff03; /* { dg-warning "12:right shift count >= width of type" } */ } unsigned short fn5 (unsigned short a) { - return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */ + return a >> 0xff03; /* { dg-warning "12:right shift count >= width of type" } */ } unsigned int fn6 (unsigned int a) { - return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */ + return a >> 0xff03; /* { dg-warning "12:right shift count >= width of type" } */ } diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr10.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr10.C index 2ff7c4d..b1d47cf 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr10.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr10.C @@ -19,18 +19,18 @@ constexpr int *p0 = &i; constexpr bool b0 = p0; // { dg-warning "address of .A::i." } constexpr bool b1 = p0 == 0; // { dg-warning "address of .A::i." } constexpr bool b2 = p0 != 0; // { dg-warning "address of .A::i." } -constexpr bool b3 = p0 < 0; // { dg-warning "ordered comparison" } -constexpr bool b4 = p0 <= 0; // { dg-warning "ordered comparison" } -constexpr bool b5 = p0 > 0; // { dg-warning "ordered comparison" } -constexpr bool b6 = p0 >= 0; // { dg-warning "ordered comparison" } +constexpr bool b3 = p0 < 0; // { dg-warning "25:ordered comparison" } +constexpr bool b4 = p0 <= 0; // { dg-warning "25:ordered comparison" } +constexpr bool b5 = p0 > 0; // { dg-warning "25:ordered comparison" } +constexpr bool b6 = p0 >= 0; // { dg-warning "25:ordered comparison" } constexpr bool b7 = !p0; // { dg-warning "address of .A::i." } constexpr bool b8 = 0 == p0; // { dg-warning "address of .A::i." } constexpr bool b9 = 0 != p0; // { dg-warning "address of .A::i." } -constexpr bool b10 = 0 < p0; // { dg-warning "ordered comparison" } -constexpr bool b11 = 0 <= p0; // { dg-warning "ordered comparison" } -constexpr bool b12 = 0 > p0; // { dg-warning "ordered comparison" } -constexpr bool b13 = 0 >= p0; // { dg-warning "ordered comparison" } +constexpr bool b10 = 0 < p0; // { dg-warning "24:ordered comparison" } +constexpr bool b11 = 0 <= p0; // { dg-warning "24:ordered comparison" } +constexpr bool b12 = 0 > p0; // { dg-warning "24:ordered comparison" } +constexpr bool b13 = 0 >= p0; // { dg-warning "24:ordered comparison" } } diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr37.C b/gcc/testsuite/g++.dg/cpp0x/nullptr37.C index e746a28..6bcc8e81 100644 --- a/gcc/testsuite/g++.dg/cpp0x/nullptr37.C +++ b/gcc/testsuite/g++.dg/cpp0x/nullptr37.C @@ -6,41 +6,41 @@ f1 (int *p, int **q) { int r = 0; - r += p == '\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += p == L'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += p == u'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += p == U'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += p != '\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += p != L'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += p != u'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += p != U'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } + r += p == '\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += p == L'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += p == u'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += p == U'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += p != '\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += p != L'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += p != u'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += p != U'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } - r += '\0' == p; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += L'\0' == p; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += u'\0' == p; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += U'\0' == p; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += '\0' != p; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += L'\0' != p; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += u'\0' != p; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += U'\0' != p; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } + r += '\0' == p; // { dg-error "13:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += L'\0' == p; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += u'\0' == p; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += U'\0' == p; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += '\0' != p; // { dg-error "13:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += L'\0' != p; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += u'\0' != p; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += U'\0' != p; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } - r += q == '\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += q == L'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += q == u'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += q == U'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += q != '\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += q != L'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += q != u'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += q != U'\0'; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } + r += q == '\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += q == L'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += q == u'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += q == U'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += q != '\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += q != L'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += q != u'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += q != U'\0'; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } - r += '\0' == q; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += L'\0' == q; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += u'\0' == q; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += U'\0' == q; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += '\0' != q; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += L'\0' != q; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += u'\0' != q; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += U'\0' != q; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } + r += '\0' == q; // { dg-error "13:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += L'\0' == q; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += u'\0' == q; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += U'\0' == q; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += '\0' != q; // { dg-error "13:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += L'\0' != q; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += u'\0' != q; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += U'\0' != q; // { dg-error "14:ISO C\\+\\+ forbids comparison between pointer and integer" } return r; } @@ -68,11 +68,11 @@ f3 (int *p) { int r = 0; - r += p == (char) 0; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += p != (char) 0; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } + r += p == (char) 0; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += p != (char) 0; // { dg-error "10:ISO C\\+\\+ forbids comparison between pointer and integer" } - r += (char) 0 == p; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } - r += (char) 0 != p; // { dg-error "ISO C\\+\\+ forbids comparison between pointer and integer" } + r += (char) 0 == p; // { dg-error "17:ISO C\\+\\+ forbids comparison between pointer and integer" } + r += (char) 0 != p; // { dg-error "17:ISO C\\+\\+ forbids comparison between pointer and integer" } return r; } diff --git a/gcc/testsuite/g++.dg/template/crash126.C b/gcc/testsuite/g++.dg/template/crash126.C index 903cab8..892bc45 100644 --- a/gcc/testsuite/g++.dg/template/crash126.C +++ b/gcc/testsuite/g++.dg/template/crash126.C @@ -4,7 +4,7 @@ template < class T, class > struct A { A (); A (A &); - A (A < T, T >); // { dg-error "invalid constructor" } + A (A < T, T >); // { dg-error "3:invalid constructor" } }; void f () diff --git a/gcc/testsuite/g++.dg/template/crash129.C b/gcc/testsuite/g++.dg/template/crash129.C index 9f56b80..3bb9e57 100644 --- a/gcc/testsuite/g++.dg/template/crash129.C +++ b/gcc/testsuite/g++.dg/template/crash129.C @@ -1,5 +1,5 @@ // PR c++/79626 template struct b -{ b(); b(b &); b(b< a, a >); }; // { dg-error "invalid constructor" } +{ b(); b(b &); b(b< a, a >); }; // { dg-error "16:invalid constructor" } int c(b< int, int >(b< int, int >()); // { dg-error "" } diff --git a/gcc/testsuite/g++.dg/warn/Wextra-3.C b/gcc/testsuite/g++.dg/warn/Wextra-3.C index 04fdbba..1bf2a6e 100644 --- a/gcc/testsuite/g++.dg/warn/Wextra-3.C +++ b/gcc/testsuite/g++.dg/warn/Wextra-3.C @@ -3,7 +3,7 @@ extern void* p; -int f1() { return ( p < 0 ? 1 : 0 ); } // { dg-warning "ordered comparison" } -int f2() { return ( p <= 0 ? 1 : 0 ); } // { dg-warning "ordered comparison" } -int f3() { return ( p > 0 ? 1 : 0 ); } // { dg-warning "ordered comparison" } -int f4() { return ( p >= 0 ? 1 : 0 ); } // { dg-warning "ordered comparison" } +int f1() { return ( p < 0 ? 1 : 0 ); } // { dg-warning "23:ordered comparison" } +int f2() { return ( p <= 0 ? 1 : 0 ); } // { dg-warning "23:ordered comparison" } +int f3() { return ( p > 0 ? 1 : 0 ); } // { dg-warning "23:ordered comparison" } +int f4() { return ( p >= 0 ? 1 : 0 ); } // { dg-warning "23:ordered comparison" } diff --git a/gcc/testsuite/g++.dg/warn/Wfloat-equal-1.C b/gcc/testsuite/g++.dg/warn/Wfloat-equal-1.C index 1b23611..1da0488 100644 --- a/gcc/testsuite/g++.dg/warn/Wfloat-equal-1.C +++ b/gcc/testsuite/g++.dg/warn/Wfloat-equal-1.C @@ -4,7 +4,7 @@ double a, b; _Complex double c, d; -int f(void) { return a == b; } /* { dg-warning "comparing floating-point" } */ -int g(void) { return c == d; } /* { dg-warning "comparing floating-point" } */ -int h(void) { return a != b; } /* { dg-warning "comparing floating-point" } */ -int i(void) { return c != d; } /* { dg-warning "comparing floating-point" } */ +int f(void) { return a == b; } /* { dg-warning "24:comparing floating-point" } */ +int g(void) { return c == d; } /* { dg-warning "24:comparing floating-point" } */ +int h(void) { return a != b; } /* { dg-warning "24:comparing floating-point" } */ +int i(void) { return c != d; } /* { dg-warning "24:comparing floating-point" } */ diff --git a/gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-1.C b/gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-1.C index 97e3176..8663642 100644 --- a/gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-1.C +++ b/gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-1.C @@ -4,7 +4,7 @@ int test1(char *ptr) { - return ptr == "foo"; /* { dg-warning "comparison with string" } */ + return ptr == "foo"; /* { dg-warning "14:comparison with string" } */ } int test2() diff --git a/gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-2.C b/gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-2.C index 3eb91ee..fed4c5a 100644 --- a/gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-2.C +++ b/gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-2.C @@ -4,7 +4,7 @@ int test1(char *ptr) { - return ptr == "foo"; /* { dg-warning "comparison with string" } */ + return ptr == "foo"; /* { dg-warning "14:comparison with string" } */ } int test2() diff --git a/gcc/testsuite/g++.dg/warn/pointer-integer-comparison.C b/gcc/testsuite/g++.dg/warn/pointer-integer-comparison.C index c6b75a7..a0683ca 100644 --- a/gcc/testsuite/g++.dg/warn/pointer-integer-comparison.C +++ b/gcc/testsuite/g++.dg/warn/pointer-integer-comparison.C @@ -3,24 +3,24 @@ int foo (int i, void *p) { - if (i == p) // { dg-warning "ISO C.. forbids comparison between pointer and integer" } + if (i == p) // { dg-warning "9:ISO C.. forbids comparison between pointer and integer" } return 0; - else if (i != p) // { dg-warning "ISO C.. forbids comparison between pointer and integer" } + else if (i != p) // { dg-warning "14:ISO C.. forbids comparison between pointer and integer" } return 1; } int bar (int i, void *p) { - if (i < p) // { dg-warning "ISO C.. forbids comparison between pointer and integer" } + if (i < p) // { dg-warning "9:ISO C.. forbids comparison between pointer and integer" } return 0; - else if (i >= p) // { dg-warning "ISO C.. forbids comparison between pointer and integer" } + else if (i >= p) // { dg-warning "14:ISO C.. forbids comparison between pointer and integer" } return 1; } int baz (int i, void *p) { - if (i <= p) // { dg-warning "ISO C.. forbids comparison between pointer and integer" } + if (i <= p) // { dg-warning "9:ISO C.. forbids comparison between pointer and integer" } return 0; - else if (i > p) // { dg-warning "ISO C.. forbids comparison between pointer and integer" } + else if (i > p) // { dg-warning "14:ISO C.. forbids comparison between pointer and integer" } return 1; } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash8.C b/gcc/testsuite/g++.old-deja/g++.jason/crash8.C index 061652d..317627a 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash8.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/crash8.C @@ -1,7 +1,7 @@ // { dg-do assemble } struct A { A(); - A(A); // { dg-error "" } copy ctor must take reference + A(A); // { dg-error "3:invalid constructor" } copy ctor must take reference }; int main() { -- cgit v1.1 From cb57504a550158913258e5be8ddb991376475efb Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 9 Oct 2019 13:20:32 -0400 Subject: Update the concepts implementation to conform to C++20. gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for concepts when -std=c++2a. Bump __cpp_concepts to 201907. * c.opt: Add -Wconcepts-ts. * c-opts.c (c_common_post_options): Warn when -fconcepts is used with -std=c++2a. Disable warning for -fconcepts in C++20 mode. (set_std_cxx2a): Enable concepts by default. gcc/cp/ * call.c (build_new_function_call): Don't evaluate concepts here. (constraint_failure): Don't record the template. (print_z_candidate): Don't extract the template. * class.c (add_method): When overloading, hide ineligible special member fns. (check_methods): Set TYPE_HAS_COMPLEX_* here. * constexpr.c (cxx_eval_constant_expression): Evaluate concepts. (maybe_initialize_fundef_copies_table): Remove. (get_fundef_copy): Use hash_map_safe_get_or_insert. (clear_cv_and_fold_caches): Clear the satisfaction cache. * constraint.cc (known_non_bool_p): New. (parsing_constraint_expression_sentinel): Renamed from expanding_constraint_sentinel. (check_constraint_operands): New. (check_constraint_atom): New. (finish_constraint_binary_op): New. (finish_constraint_or_expr): Likewise. (finish_constraint_and_expr): Likewise. (finish_constraint_primary_expr): Likewise. (combine_constraint_expressions): New. (finish_requires_expr): Add location parm. (get_concept_definition): Return the initializer of concept definitions. (get_template_head_requirements): New. (get_trailing_function_requirements): New. (deduce_constrained_parameter): Check if the identifier or template-id is a concept definition. (resolve_concept_definition_check): Removed. (resolve_variable_concept_check): Removed. (resolve_concept_check): New. (resolve_constraint_check): Handle concept definitions. converting arguments. (function_concept_check_p): Removed. (variable_concept_check_p): Removed. (unpack_concept_check): New. (get_concept_check_template): New. (build_call_check): Moved and renamed to build_function_check. (build_concept_check_arguments): make static. (build_function_check): Always do overload resolution in order to force conversion of template arguments (i.e., actually check that the use of a concept is valid). (build_standard_check): Renamed from build_real_concept_check. (build_real_concept_check): Build checks for C++2a concepts by (build_wildcard_concept_check): New. (build_concept_check): Use build_real_concept_check. New overload. (build_constraints): Save expressions, not normalized constraints. (build_concept_id): New. Pass tf_warning_or_error. (build_type_constraint): New. (finish_type_constraints): New. (associate_classtype_constraints): Also add constraints to union types. Note the original declaration in errors. Don't return error_mark_node in order to avoid an assertion later. (push_down_pack_expansion): Remove. (finish_shorthand_constraint): Make fold expressions, not naked parameter packs. Always apply the constraint to each template argument. (check_introduction_list): New. Fail if not enough names are introduced. (finish_template_introduction): Don't normalize constraints. Pass tsubst flags. Check for insufficient introductions. (placeholder_extract_concept_and_args): Handle the template-id case. Unpack function concept checks correctly. (tsubst_simple_requirement): Return errors if they occur. Don't process as a template. (tsubst_type_requirement): Likewise. (type_deducible_p): New. Wrap the input expression in parens for the purpose of deduction. (expression_convertible_t): New. (tsubst_compound_requirement): Use new deduction, conversion predicates. (tsubst_nested_requirement): Return errors if they occur. Don't process as a template. Instantiate and evaluate the nested requirement. (tsubst_valid_expression_requirement): New. (tsubst_simple_requirement): Use tsubst_valid_expression_requirement. (tsubst_compound_requirement): Use tsubst_valid_expression_requirement. (check_constaint_variables): New. (tsubst_constraint_variables): Check that type substitutions are valid. (tsubst_requires_expr): Likewise. Produce new requires-exprs during template substitution. Copy the previous local specialization stack, so references to non-local parameters can be found. Use cp_unevaluated. (tsubst_constraint): New. Don't evaluate concept checks. (subst_info): New. (norm_info): New. Used to build a normalization tree for concept check diagnostics. (debug_parameter_mapping): New. (debug_argument_list): New. (expand_concept): Removed. (normalize_logical_operation): Pass subst_info through call. (normalize_pack_expansion): Remove. (normalize_simple_requirement): Removed (normalize_type_requirement): Removed (normalize_compound_requirement): Removed (normalize_nested_requirement): Removed (normalize_requirement): Removed (normalize_requirements): Removed (normalize_requires_expression): Removed (normalize_variable_concept_check): Removed. (normalize_function_concept_check): Removed. (normalize_concept_check): Merged all normalize_*_check here. Substitute through written template arguments before normalizing the definition. Only substitute the innermost template arguments. (check_for_logical_overloads): Delete. (map_arguments): New. Associate template parameters with arguments. (build_parameter_mapping): New. Extract used parameters. (normalize_expression): Rewrite. (normalize_conjunction): Removed (normalize_disjunction): Removed (normalize_predicate_constraint): Removed (normalize_parameterized_constraint): Removed (normalized_map): New variable. (get_normalized_constraints): New entry point for normalization. Establishes a timer. (get_normalized_constraints_from_info): New. (get_normalized_constraints_from_decl): New. Turn on template processing prior to normalization. Handle inheriting ctors. Build the normalization arguments from the full set of template parameters of the most general template. This guarantees that we have no concrete arguments in the parameter mapping (e.g., from template members of class templates). Cache normalizations. (normalize_concept_definition): New. Cache normalizations. (normalize_template_requirements): New. (normalize_nontemplate_requirements): New. (normalize_constraint_expression): New. (tsubst_parameter_mapping): New. (get_mapped_args): New. (parameter_mapping_equivalent_p): New. Use template_args_equal. (atomic_constraints_identical_p): New. (hash_atomic_constraint): New. (satisfying_constraint_p): New. Guard against recursive evaluation of constraints during satisfaction. (satisfy_conjunction): New. (satisfy_disjunction): New. (sat_entry): New class for hashing satisfaction results. (sat_hasher): New hash traits. (sat_cache): New. (get_satisfaction): New. Returns cached satisfaction result. (save_satisfaction): New. Caches a satisfaction result. (clear_satisfaction_cache): New. (satisfaction_cache): New. Helps manage satisfaction cache requests. (decl_satisfied_cache): New. (satisfy_atom): New. (satisfy_constraint_r): New. (satisfy_constraint): Use new satisfaction algorithm. (evaluate_concept_check): New. (evaluate_concept): Removed. (evaluate_function_concept): Removed. (evaluate_variable_concept): Removed. (satisfy_constraint_expression): New. (constraint_expression_satisfied_p): New. (constraints_satisfied_p): Use strip_inheriting_ctors. Use push_/pop_access_scope. (more_constrained): Normalize before calling out to subsumption. Allow classes as arguments. (strictly_subsumes): Allow non-templates as arguments. Accept a new template argument. (weakly_subsumes): New. (at_least_as_constrained): Removed. (diagnose_other_expression): Removed. (diagnose_predicate_constraint): Removed. (diagnose_pack_expansion): Removed. (diagnose_check_constraint): Removed. (diagnose_logical_constraint): Removed. (diagnose_expression_constraint): Removed. (diagnose_type_constraint): Removed. (diagnose_implicit_conversion_constraint): Removed. (diagnose_argument_deduction_constraint): Removed. (diagnose_exception_constraint): Removed. (diagnose_parameterized_constraint): Removed. (diagnose_argument_deduction_constraint): Removed. (diagnose_argument_deduction_constraint): Removed. (diagnose_argument_deduction_constraint): Removed. (diagnose_trait_expr): New. (diagnose_requires_expr): New. (diagnose_atomic_constraint): New. (diagnose_valid_expression) Stop wrongly diagnosing valid expressions. Don't substitute as if in template decls. This causes substitution to generate expressions that aren't suitable for use with the noexcept routines. (diagnose_valid_type) Likewise. (diagnose_compound_requirement) Actually emit diagnostics for the causes of errors.Call force_paren_expr_uneval. (diagnose_declaration_constraints): Turn on template processing to suppress certain analyses. * cp-objcp-common.c (cp_common_init_ts): Make concepts typed. (cp_get_debug_type): Use hash_map_safe_*. * cp-tree.h: New function declarations for semantic actions, other facilities. Remove declaration no longer used or needed. Remove unused _CONSTR macros. (LANG_DECL_HAS_MIN): Add CONCEPT_DECL. (template_info_decl_check): Factor macro check into an inline function. (DECL_TEMPLATE_INFO): Use new check facility. (finish_concept_definition): New. Don't invalid concept declarations with invalid initializers. (find_template_parameters): New. (concept_definition_p): New. (concept_check_p): New. (variable_concept_check_p): New. (force_paren_expr_uneval): New. (ovl_iterator::using_p): A USING_DECL by itself was also introduced by a using-declaration. (struct tree_template_info): Use tree_base instead of tree_common. Add tmpl and args fields. (TI_TEMPLATE, TI_ARGS): Adjust. (DECLTYPE_FOR_INIT_CAPTURE): Remove. (CONSTR_CHECK, CONSTR_INFO, CONSTR_EXPR, CONSTR_CONTEXT): New. (ATOMIC_CONSTR_MAP, TRAIT_EXPR_LOCATION): New. (struct tree_trait_expr): Add locus field. (enum tsubst_flags): Add tf_norm as a hint to generate normalization context when diagnosing constraint failure. * cp-tree.def: Remove unused _CONSTR nodes and rename PRED_CONSTR to ATOMIC_CONSTR. (CONCEPT_DECL): New. * cxx-pretty-print.c: Remove constraint printing code. (pp_cxx_concept_definition): New. (pp_cxx_template_declaration): Print concept definitions. (pp_cxx_check_constraint): Update printing for concept definitions. (pp_cxx_nested_name_specifier): Fix a weird case where we're printing '::::' for concepts. (simple_type_specifier): Print requirements for placeholder types. (pp_cxx_constrained_type_spec): Print the associated requirements of a placeholder type. (pp_cxx_compound_requirement): Add space before the '->'. (pp_cxx_parameter_mapping): Print the parameter mapping. (pp_cxx_atomic_constraint): Use the function above. * decl.c (redeclaration_error_message): New error for concepts. (grokdeclarator): Check for and disallow decltype(auto) in parameter declarations. (grokfndecl): Don't normalize constraints. Add check for constraints on declaration. (grokvardecl): Don't normalize constraints. (grok_special_member_properties): Don't set TYPE_HAS_COMPLEX_*. (function_requirements_equivalent_p): New. Compare trailing requires clauses. Compare combined constraints in pre-C++20 mode. (decls_match): Compare trailing requires clauses. Compare template heads for function templates. Remove old constraint comparison. Simplify comparison of functions, function templates. (duplicate_function_template_decls): New. Refactor a nasty if condition into a single predicate. (require_deduced_type): Don't complain if we already complained about deduction failure. (finish_function): Perform auto deduction to ensure that constraints are checked even when functions contain no return statements. Only do auto deduction if we haven't previously seen any return statements. This prevents multiple diagnostics of the same error. (store_decomp_type): Remove. (cp_finish_decomp): Use hash_map_safe_put. * error.c: Remove constraint printing code. (dump_decl): Dump concept definitions. Handle wildcard declarations. (dump_template_decl): Likewise. (dump_type): Print associated requirements for placeholder types. (rebuild_concept_check): New. (maybe_print_single_constraint_context): New. (maybe_print_constraint_context): Recursively print nested contexts. * init.c (get_nsdmi): Use hash_map_safe_*. * lambda.c (maybe_add_lambda_conv_op): Bail if deduction failed. (add_capture): Copy parameter packs from init. (lambda_capture_field_type): Always use auto for init-capture. * logic.cc: Completely rewrite. (constraint_hash): New. (clause/ctor): Save atoms in the hash table. (replace): Save atoms during replacement. (insert): Save atoms during insertion. (contains): Only search the hash table for containment. (clause): Keep a hash of atomic constraints. (clause::clause): Explicitly copy the hash table when copying. (disjunction_p, conjunction_p, atomic_p, dnf_size, cnf_size): New. (diagnose_constraint_size): New. (subsumes_constraints_nonnull): Compare the sizes of normalized formula to determine the cheapest decomposition. * name-lookup.c (diagnose_name_conflict): Diagnose name issues with concepts. (matching_fn_p): Check constraints. (push_class_level_binding_1): Move overloaded functions case down, accept FUNCTION_DECL as target_decl. * parser.c (enum required_token): New required token for auto. (make_location): Add overload taking lexer as last parm. (cp_parser_required_error): Diagnose missing auto. (cp_parser_diagnose_ungrouped_constraint_plain): New. (cp_parser_diagnose_ungrouped_constraint_plain): New. (cp_parser_constraint_primary_expression): New. Tentatively parse the primary expression. If that fails tentatively parse a lower precedence expression in order to diagnose the error. (cp_parser_check_non_logical_constraint): New. Performs a trial parse of the right-hand-side of non-logical operators in order to generate good diagnostics. (cp_parser_constraint_logical_and_expression): New. (cp_parser_constraint_logical_or_expression): New. (cp_parser_requires_clause_expression): New. (cp_parser_requires_clause): Renamed to cp_parser_constraint_expression. (cp_parser_requires_clause_opt): Parse the requires-clause differently in -fconcepts and -std=c++2a modes. (cp_parser_requirement_list): Rename to cp_parser_requirement_seq. Rewrite so that semicolons are parsed along with requirements, not the sequence. (cp_parser_simple_requirement): Expect a semicolon at end. (cp_parser_compound_requirement): Expect a semicolon at end. Only allow trailing-return-type with -fconcepts-ts. (cp_parser_nested_requirement): Expect a semicolon at end. Parse constraint-expressions. (cp_parser_concept_definition): New. Don't fail parsing the concept definition if the initializer is ill-formed. Don't declare the concept before parsing the initializer. (cp_parser_constraint_expression): Declare earlier. (cp_parser_type_requirement): Current scope is not valid. (cp_parser_requires_expression): Commit to the tentative parse. (cp_parser_decl_specifier_seq): Warn when concept appears to be used as a decl-specifier. (cp_parser_template_declaration_after_parameters): Parse concept definitions. (cp_parser_template_id): Don't try to resolve a concept template-id yet. (cp_parser_template_id_expr): Resolve it as a concept check. (cp_parser_decl_specifier_seq): Warn on 'concept bool'. (cp_parser_type_parameter): Combine expressions not constraints. (cp_parser_explicit_template_declaration): Combine expressions not constraints. (cp_parser_maybe_concept_name): Removed. (cp_parser_simple_type_specifier): Handle an error condition of a bad constrained type specifier. Expect auto or decltype after a concept name. Also handle the case where we have a template-id as a concept check. (cp_parser_template_introduction): Diagnose errors on invalid introductions. Give up if it doesn't start with a concept name. Pedwarn if not -fconcepts-ts. (synthesize_implicit_template_parm): Don't do consistent binding. Use a new flag for constrained parameters. Combine expressions, not constraints. Fail if we get a placeholder in block scope. Placeholders that do not constrain types are not allowed in parameter declarations, so don't handle them. (cp_parser_placeholder_type_specifier): New. Implement parsing of placeholder type specifiers following a concept name or partial concept check. Disallow decltype(auto) parameters. (cp_parser_nested_name_specifier_opt): If the token is already CPP_NESTED_NAME_SPECIFIER, leave it alone. (cp_parser_id_expression, cp_parser_unqualified_id): Call cp_parser_template_id_expr. (cp_parser_placeholder_type_specifier): Add tentative parm. Don't expect a WILDCARD_DECL. (cp_parser_trait_expr): Pass trait_loc down. (cp_parser_postfix_expression): Do set location of dependent member call. * pt.c (finish_concept_definition): New. (push_template_decl_real): Handle concept definitions. (start_concept_definition): Let push_template_decl_real handle the creation of the template. (get_constraints): Return null if the table hasn't been initialized. (tsubst_copy_and_build): Build template-id expressions for concept checks. [TRAIT_EXPR]: Pass trait_loc down. (lookup_template_class_1): Add the template name to the constraint failure diagnostic. (lookup_and_finish_template_variable): Build concept checks with the correct arguments. (tsubst_function_decl): Don't substitute through constraints. Always associate constraints with functions. (template_parm_level_and_index): Make non-static. (for_each_template_parm_r): Handle requires expressions. (keep_template_parm): New. (find_template_parameters): New. (more_specialized_fn): Change how winners and losers are chosen. (make_constrained_auto): Don't normalize constraints. (template_parameters_equivalent_p): New. Compare template parameters. Add a comparison for implicitly vs. explicitly declared parameters. (template_parameter_lists_equivalent_p): New. Compare template parameter lists. (template_requirements_equivalent_p): New. (template_heads_equivalent_p): New. Compare template heads. (template_parameter_constraints_equivalent_p): New. (is_compatible_template_arg): Use weakly_subsumes. (maybe_new_partial_specialization): Use new constraint comparison for finding specializations. (process_partial_specialization): Pass main template as argument. (more_specialized_partial_spec): Don't immediately return when detecting a winner. (make_constrained_auto): Handle concept definitions. (do_auto_deduction): Update auto deduction for new concept model. Extract the function concept correctly; rename constr to check to reflect the kind of node. (tsubst): Adjust wildcard argument during substitution. [DECLTYPE_TYPE]: Remove init-capture handling. (tsubst_copy_and_build): Build concept checks, not template ids. Defer checks of function concepts. Handle concepts before variable templates. Handle calls to function concepts explicitly. (coerce_template_parms): Use concept_definition_p. Handle a deduction error where a potentially empty pack can be supplied after the last parameter of a concept. (finish_template_variable): Don't process concepts here. (instantiation_dependent_r): Use concept_check_p. (tsubst_template_args): Make non-static. (make_constrained_placeholder_type): New. Refactored from make_constrained_auto. (make_constrained_auto) Use make_constrained_placeholder_type. (make_constrained_decltype_auto) New. (tsubst_function_parms): New. (value_dependent_expression_p) [TEMPLATE_ID_EXPR]: Use concept_definition_p. (push_access_scope, pop_access_scope): No longer static. (tsubst_template_parm): Substitute TEMPLATE_PARM_CONSTRAINTS. (tsubst_friend_function): Use tsubst_constraint. Use generic_targs_for. (get_underlying_template) Use generic_targs_for. (uses_parameter_packs): Return tree. (gen_elem_of_pack_expansion_instantiation): Don't push local_specialization_stack. (prepend_one_capture): New. (tsubst_lambda_expr): Use prepend_one_capture. Don't touch local_specializations. (template_parms_level_to_args): No longer static. (add_outermost_template_args): Likewise. (find_template_parameter_info): New. Provide context for finding template parameters. (keep_template_parm): Don't keep parameters declared at depth levels greater than those of the template parameters of the source declaration. Don't propagate cv-qualified types. Return 0, so we find all template parameters, not the just first. (any_template_parm_r): New. Handle cases that are mishandled by for_each_template_parm_r. (generic_targs_for): Factor out of coerce_template_args_for_ttp. (tsubst_argument_pack): Factor out of tsubst_template_args. (constraint_sat_entry): Removed. (constraint_sat_hasher): Removed. (concept_spec_entry): Removed. (concept_spec_hasher): Removed. (constraint_memos): Removed. (concept_memos): Removed. (lookup_constraint_satisfaction): Removed. (memoize_constraint_satisfaction): Removed. (lookup_concept_satisfaction): Removed. (memoize_concept_satisfaction): Removed. (concept_expansions): Removed. (get_concept_expansion): Removed. (save_concept_expansion): Removed. (init_constraint_processing): Remove initialization of non-existing resources. (find_template_requirement): New. Search for the sub-requirement within the associated constraints. (convert_generic_types_to_packs): Also transform the associated constraint and update the current template requirements. (store_defaulted_ttp, lookup_defaulted_ttp): Remove. (add_defaults_to_ttp): Use hash_map_safe_*. * semantics.c (finish_call_expr): Diagnose calls to concepts. Handle concept checks explicitly. (finish_id_expression): Evaluate variable concepts as part of id-expression processing. Don't treat variable concepts as variables, and don't process function concepts as plain id-expressions. (force_paren_expr): Add even_uneval parm. (finish_trait_expr): Add location parm. * tree.c (special_memfn_p): New. (cp_expr_location): Handle TRAIT_EXPR. * typeck.c (check_return_expr): Actually use the diagnostic kind when performing return-type deduction. * typeck2.c (build_functional_cast): Don't rely on the location of 'auto'. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_concepts): Check for std=c++2a. gcc/ * doc/invoke.texi: Document -fconcepts-ts. From-SVN: r276764 --- gcc/ChangeLog | 4 + gcc/c-family/ChangeLog | 14 + gcc/c-family/c-cppbuiltin.c | 8 +- gcc/c-family/c-opts.c | 11 + gcc/c-family/c.opt | 4 + gcc/cp/ChangeLog | 458 +++ gcc/cp/call.c | 54 +- gcc/cp/class.c | 3 + gcc/cp/config-lang.in | 1 + gcc/cp/constexpr.c | 22 +- gcc/cp/constraint.cc | 3769 ++++++++++---------- gcc/cp/cp-objcp-common.c | 9 +- gcc/cp/cp-tree.def | 72 +- gcc/cp/cp-tree.h | 358 +- gcc/cp/cxx-pretty-print.c | 197 +- gcc/cp/decl.c | 172 +- gcc/cp/error.c | 202 +- gcc/cp/lambda.c | 4 +- gcc/cp/logic.cc | 1183 +++--- gcc/cp/name-lookup.c | 11 +- gcc/cp/parser.c | 951 +++-- gcc/cp/pt.c | 956 +++-- gcc/cp/search.c | 5 +- gcc/cp/semantics.c | 55 +- gcc/cp/typeck.c | 3 +- gcc/cp/typeck2.c | 5 +- gcc/doc/invoke.texi | 17 +- gcc/testsuite/ChangeLog | 5 + gcc/testsuite/g++.dg/concepts/alias1.C | 16 - gcc/testsuite/g++.dg/concepts/alias2.C | 14 - gcc/testsuite/g++.dg/concepts/alias3.C | 14 - gcc/testsuite/g++.dg/concepts/alias4.C | 20 - gcc/testsuite/g++.dg/concepts/auto1.C | 2 +- gcc/testsuite/g++.dg/concepts/auto3.C | 2 +- gcc/testsuite/g++.dg/concepts/auto4.C | 4 +- gcc/testsuite/g++.dg/concepts/class-deduction1.C | 2 +- gcc/testsuite/g++.dg/concepts/class-deduction2.C | 10 - gcc/testsuite/g++.dg/concepts/class.C | 53 - gcc/testsuite/g++.dg/concepts/class1.C | 15 - gcc/testsuite/g++.dg/concepts/class2.C | 15 - gcc/testsuite/g++.dg/concepts/class3.C | 15 - gcc/testsuite/g++.dg/concepts/class4.C | 22 - gcc/testsuite/g++.dg/concepts/class5.C | 2 +- gcc/testsuite/g++.dg/concepts/class6.C | 4 +- gcc/testsuite/g++.dg/concepts/constrained-parm.C | 14 - gcc/testsuite/g++.dg/concepts/debug1.C | 8 +- gcc/testsuite/g++.dg/concepts/decl-diagnose.C | 8 +- .../g++.dg/concepts/deduction-constraint1.C | 2 +- gcc/testsuite/g++.dg/concepts/diagnostic1.C | 12 +- gcc/testsuite/g++.dg/concepts/disjunction1.C | 60 - gcc/testsuite/g++.dg/concepts/dr1430.C | 9 +- gcc/testsuite/g++.dg/concepts/equiv.C | 2 +- gcc/testsuite/g++.dg/concepts/equiv2.C | 12 +- gcc/testsuite/g++.dg/concepts/explicit-inst1.C | 22 - gcc/testsuite/g++.dg/concepts/explicit-inst2.C | 25 - gcc/testsuite/g++.dg/concepts/explicit-inst3.C | 28 - gcc/testsuite/g++.dg/concepts/explicit-inst4.C | 18 - gcc/testsuite/g++.dg/concepts/explicit-spec1.C | 32 - gcc/testsuite/g++.dg/concepts/explicit-spec2.C | 14 - gcc/testsuite/g++.dg/concepts/explicit-spec3.C | 14 - gcc/testsuite/g++.dg/concepts/explicit-spec4.C | 51 - gcc/testsuite/g++.dg/concepts/explicit-spec5.C | 22 - gcc/testsuite/g++.dg/concepts/explicit-spec6.C | 19 - gcc/testsuite/g++.dg/concepts/expression.C | 12 +- gcc/testsuite/g++.dg/concepts/expression2.C | 12 +- gcc/testsuite/g++.dg/concepts/expression3.C | 2 +- gcc/testsuite/g++.dg/concepts/feature-macro.C | 6 - gcc/testsuite/g++.dg/concepts/fn-concept1.C | 2 +- gcc/testsuite/g++.dg/concepts/fn-concept2.C | 2 +- .../g++.dg/concepts/fn-generic-member-ool.C | 1 - gcc/testsuite/g++.dg/concepts/fn1.C | 2 +- gcc/testsuite/g++.dg/concepts/fn10.C | 4 +- gcc/testsuite/g++.dg/concepts/fn2.C | 2 +- gcc/testsuite/g++.dg/concepts/fn3.C | 2 +- gcc/testsuite/g++.dg/concepts/fn4.C | 2 +- gcc/testsuite/g++.dg/concepts/fn5.C | 2 +- gcc/testsuite/g++.dg/concepts/fn6.C | 2 +- gcc/testsuite/g++.dg/concepts/fn7.C | 4 +- gcc/testsuite/g++.dg/concepts/fn8.C | 2 +- gcc/testsuite/g++.dg/concepts/fn9.C | 2 +- gcc/testsuite/g++.dg/concepts/friend1.C | 35 - gcc/testsuite/g++.dg/concepts/friend2.C | 21 - gcc/testsuite/g++.dg/concepts/generic-fn-err.C | 8 +- gcc/testsuite/g++.dg/concepts/generic-fn.C | 2 +- gcc/testsuite/g++.dg/concepts/iconv1.C | 21 - gcc/testsuite/g++.dg/concepts/inherit-ctor1.C | 28 +- gcc/testsuite/g++.dg/concepts/inherit-ctor2.C | 19 - gcc/testsuite/g++.dg/concepts/inherit-ctor3.C | 9 +- gcc/testsuite/g++.dg/concepts/inherit-ctor4.C | 19 - gcc/testsuite/g++.dg/concepts/intro1.C | 2 +- gcc/testsuite/g++.dg/concepts/intro2.C | 2 +- gcc/testsuite/g++.dg/concepts/intro3.C | 2 +- gcc/testsuite/g++.dg/concepts/intro4.C | 12 +- gcc/testsuite/g++.dg/concepts/intro5.C | 9 +- gcc/testsuite/g++.dg/concepts/intro6.C | 2 +- gcc/testsuite/g++.dg/concepts/intro7.C | 6 +- gcc/testsuite/g++.dg/concepts/lambda1.C | 32 - gcc/testsuite/g++.dg/concepts/locations1.C | 4 +- gcc/testsuite/g++.dg/concepts/member-concept.C | 10 - gcc/testsuite/g++.dg/concepts/memfun-err.C | 37 - gcc/testsuite/g++.dg/concepts/memfun.C | 112 - gcc/testsuite/g++.dg/concepts/memfun2.C | 22 - gcc/testsuite/g++.dg/concepts/memtmpl1.C | 16 - .../g++.dg/concepts/partial-concept-id1.C | 33 +- .../g++.dg/concepts/partial-concept-id2.C | 2 +- gcc/testsuite/g++.dg/concepts/partial-spec.C | 16 - gcc/testsuite/g++.dg/concepts/partial-spec2.C | 33 - gcc/testsuite/g++.dg/concepts/partial-spec3.C | 8 - gcc/testsuite/g++.dg/concepts/partial-spec4.C | 50 - gcc/testsuite/g++.dg/concepts/partial-spec5.C | 2 +- gcc/testsuite/g++.dg/concepts/partial-spec6.C | 25 - gcc/testsuite/g++.dg/concepts/placeholder1.C | 35 - gcc/testsuite/g++.dg/concepts/placeholder2.C | 23 +- gcc/testsuite/g++.dg/concepts/placeholder3.C | 6 +- gcc/testsuite/g++.dg/concepts/placeholder4.C | 6 +- gcc/testsuite/g++.dg/concepts/placeholder5.C | 8 +- gcc/testsuite/g++.dg/concepts/placeholder6.C | 7 +- gcc/testsuite/g++.dg/concepts/pr58500.C | 7 - gcc/testsuite/g++.dg/concepts/pr58534.C | 7 - gcc/testsuite/g++.dg/concepts/pr58535.C | 7 - gcc/testsuite/g++.dg/concepts/pr58536.C | 10 - gcc/testsuite/g++.dg/concepts/pr58548.C | 8 - gcc/testsuite/g++.dg/concepts/pr58549.C | 8 - gcc/testsuite/g++.dg/concepts/pr60052.C | 15 - gcc/testsuite/g++.dg/concepts/pr60053.C | 15 - gcc/testsuite/g++.dg/concepts/pr60064.C | 21 - gcc/testsuite/g++.dg/concepts/pr60065.C | 8 - gcc/testsuite/g++.dg/concepts/pr60377.C | 9 - gcc/testsuite/g++.dg/concepts/pr60390.C | 26 - gcc/testsuite/g++.dg/concepts/pr60391.C | 9 - gcc/testsuite/g++.dg/concepts/pr60573.C | 28 - gcc/testsuite/g++.dg/concepts/pr65552.C | 20 - gcc/testsuite/g++.dg/concepts/pr65575.C | 24 - gcc/testsuite/g++.dg/concepts/pr65634.C | 2 +- gcc/testsuite/g++.dg/concepts/pr65636.C | 2 +- gcc/testsuite/g++.dg/concepts/pr65681.C | 65 +- gcc/testsuite/g++.dg/concepts/pr65848.C | 2 +- gcc/testsuite/g++.dg/concepts/pr65854.C | 25 - gcc/testsuite/g++.dg/concepts/pr66091.C | 20 - gcc/testsuite/g++.dg/concepts/pr67249.C | 2 +- gcc/testsuite/g++.dg/concepts/pr67544.C | 3 +- gcc/testsuite/g++.dg/concepts/pr67595.C | 8 +- gcc/testsuite/g++.dg/concepts/pr67655.C | 2 +- gcc/testsuite/g++.dg/concepts/pr68434.C | 2 +- gcc/testsuite/g++.dg/concepts/pr68683.C | 25 - gcc/testsuite/g++.dg/concepts/pr71127.C | 7 +- gcc/testsuite/g++.dg/concepts/pr71128.C | 4 +- gcc/testsuite/g++.dg/concepts/pr71131.C | 7 +- gcc/testsuite/g++.dg/concepts/pr71368.C | 26 - gcc/testsuite/g++.dg/concepts/pr71385.C | 2 +- gcc/testsuite/g++.dg/concepts/pr71965.C | 27 - gcc/testsuite/g++.dg/concepts/pr80471.C | 23 - gcc/testsuite/g++.dg/concepts/pr84330.C | 7 +- gcc/testsuite/g++.dg/concepts/pr84979-2.C | 41 - gcc/testsuite/g++.dg/concepts/pr84979-3.C | 45 - gcc/testsuite/g++.dg/concepts/pr84979.C | 9 - gcc/testsuite/g++.dg/concepts/pr84980.C | 6 - gcc/testsuite/g++.dg/concepts/pr85065.C | 6 +- gcc/testsuite/g++.dg/concepts/pr85265.C | 6 - .../g++.dg/concepts/regress/alias-decl-42.C | 18 - gcc/testsuite/g++.dg/concepts/req-neg1.C | 11 - gcc/testsuite/g++.dg/concepts/req1.C | 29 - gcc/testsuite/g++.dg/concepts/req10.C | 19 - gcc/testsuite/g++.dg/concepts/req11.C | 29 - gcc/testsuite/g++.dg/concepts/req12.C | 26 - gcc/testsuite/g++.dg/concepts/req13.C | 14 - gcc/testsuite/g++.dg/concepts/req14.C | 15 - gcc/testsuite/g++.dg/concepts/req15.C | 22 - gcc/testsuite/g++.dg/concepts/req16.C | 20 - gcc/testsuite/g++.dg/concepts/req17.C | 21 - gcc/testsuite/g++.dg/concepts/req18.C | 18 - gcc/testsuite/g++.dg/concepts/req19.C | 14 - gcc/testsuite/g++.dg/concepts/req2.C | 20 - gcc/testsuite/g++.dg/concepts/req20.C | 21 - gcc/testsuite/g++.dg/concepts/req3.C | 17 - gcc/testsuite/g++.dg/concepts/req4.C | 19 - gcc/testsuite/g++.dg/concepts/req5.C | 19 - gcc/testsuite/g++.dg/concepts/req6.C | 19 - gcc/testsuite/g++.dg/concepts/req7.C | 25 - gcc/testsuite/g++.dg/concepts/req8.C | 17 - gcc/testsuite/g++.dg/concepts/req9.C | 25 - gcc/testsuite/g++.dg/concepts/template-parm1.C | 35 - gcc/testsuite/g++.dg/concepts/template-parm10.C | 18 - gcc/testsuite/g++.dg/concepts/template-parm11.C | 2 +- gcc/testsuite/g++.dg/concepts/template-parm12.C | 4 +- gcc/testsuite/g++.dg/concepts/template-parm2.C | 2 +- gcc/testsuite/g++.dg/concepts/template-parm3.C | 2 +- gcc/testsuite/g++.dg/concepts/template-parm4.C | 2 +- gcc/testsuite/g++.dg/concepts/template-parm5.C | 20 - gcc/testsuite/g++.dg/concepts/template-parm6.C | 42 - gcc/testsuite/g++.dg/concepts/template-parm7.C | 45 - gcc/testsuite/g++.dg/concepts/template-parm8.C | 22 - gcc/testsuite/g++.dg/concepts/template-parm9.C | 19 - .../g++.dg/concepts/template-template-parm1.C | 2 +- gcc/testsuite/g++.dg/concepts/traits1.C | 98 - gcc/testsuite/g++.dg/concepts/traits2.C | 99 - gcc/testsuite/g++.dg/concepts/var-concept1.C | 2 +- gcc/testsuite/g++.dg/concepts/var-concept2.C | 2 +- gcc/testsuite/g++.dg/concepts/var-concept3.C | 15 +- gcc/testsuite/g++.dg/concepts/var-concept4.C | 2 +- gcc/testsuite/g++.dg/concepts/var-concept5.C | 6 +- gcc/testsuite/g++.dg/concepts/var-concept6.C | 2 +- gcc/testsuite/g++.dg/concepts/var-concept7.C | 4 +- gcc/testsuite/g++.dg/concepts/var-templ1.C | 2 +- gcc/testsuite/g++.dg/concepts/var-templ2.C | 2 +- gcc/testsuite/g++.dg/concepts/var-templ3.C | 2 +- gcc/testsuite/g++.dg/concepts/variadic1.C | 2 +- gcc/testsuite/g++.dg/concepts/variadic2.C | 9 +- gcc/testsuite/g++.dg/concepts/variadic3.C | 2 +- gcc/testsuite/g++.dg/concepts/variadic4.C | 11 +- gcc/testsuite/g++.dg/cpp0x/auto52.C | 2 +- gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-access1.C | 15 + gcc/testsuite/g++.dg/cpp2a/concepts-alias.C | 25 + gcc/testsuite/g++.dg/cpp2a/concepts-alias2.C | 12 + gcc/testsuite/g++.dg/cpp2a/concepts-class.C | 115 + gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C | 4 + gcc/testsuite/g++.dg/cpp2a/concepts-complete1.C | 11 + .../g++.dg/cpp2a/concepts-constrained-parm.C | 13 + gcc/testsuite/g++.dg/cpp2a/concepts-decltype.C | 67 + gcc/testsuite/g++.dg/cpp2a/concepts-defarg1.C | 7 + gcc/testsuite/g++.dg/cpp2a/concepts-dep1.C | 5 + gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C | 14 + .../g++.dg/cpp2a/concepts-explicit-inst1.C | 23 + .../g++.dg/cpp2a/concepts-explicit-inst2.C | 24 + .../g++.dg/cpp2a/concepts-explicit-inst3.C | 27 + .../g++.dg/cpp2a/concepts-explicit-inst4.C | 17 + .../g++.dg/cpp2a/concepts-explicit-spec1.C | 31 + .../g++.dg/cpp2a/concepts-explicit-spec2.C | 13 + .../g++.dg/cpp2a/concepts-explicit-spec3.C | 13 + .../g++.dg/cpp2a/concepts-explicit-spec4.C | 50 + .../g++.dg/cpp2a/concepts-explicit-spec5.C | 21 + .../g++.dg/cpp2a/concepts-explicit-spec6.C | 18 + .../g++.dg/cpp2a/concepts-feature-macro.C | 5 + gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C | 248 ++ gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C | 111 + gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C | 49 + gcc/testsuite/g++.dg/cpp2a/concepts-fnparm1.C | 10 + gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C | 34 + gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C | 20 + gcc/testsuite/g++.dg/cpp2a/concepts-friend3.C | 20 + gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C | 22 + .../g++.dg/cpp2a/concepts-inherit-ctor2.C | 18 + .../g++.dg/cpp2a/concepts-inherit-ctor4.C | 18 + .../g++.dg/cpp2a/concepts-inherit-ctor5.C | 18 + gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C | 33 + gcc/testsuite/g++.dg/cpp2a/concepts-locations1.C | 22 + .../g++.dg/cpp2a/concepts-member-concept.C | 21 + gcc/testsuite/g++.dg/cpp2a/concepts-memfun-err.C | 35 + gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C | 111 + gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl1.C | 17 + gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl2.C | 15 + gcc/testsuite/g++.dg/cpp2a/concepts-nested1.C | 13 + gcc/testsuite/g++.dg/cpp2a/concepts-noexcept1.C | 25 + gcc/testsuite/g++.dg/cpp2a/concepts-p1141.C | 98 + gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec.C | 16 + .../g++.dg/cpp2a/concepts-partial-spec2.C | 38 + .../g++.dg/cpp2a/concepts-partial-spec3.C | 8 + .../g++.dg/cpp2a/concepts-partial-spec4.C | 49 + .../g++.dg/cpp2a/concepts-partial-spec5.C | 12 + .../g++.dg/cpp2a/concepts-partial-spec6.C | 24 + gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C | 14 + gcc/testsuite/g++.dg/cpp2a/concepts-pr58500.C | 7 + gcc/testsuite/g++.dg/cpp2a/concepts-pr58534.C | 7 + gcc/testsuite/g++.dg/cpp2a/concepts-pr58535.C | 7 + gcc/testsuite/g++.dg/cpp2a/concepts-pr58536.C | 10 + gcc/testsuite/g++.dg/cpp2a/concepts-pr58548.C | 8 + gcc/testsuite/g++.dg/cpp2a/concepts-pr58549.C | 8 + gcc/testsuite/g++.dg/cpp2a/concepts-pr59200.C | 19 + gcc/testsuite/g++.dg/cpp2a/concepts-pr60052.C | 15 + gcc/testsuite/g++.dg/cpp2a/concepts-pr60053.C | 15 + gcc/testsuite/g++.dg/cpp2a/concepts-pr60064.C | 21 + gcc/testsuite/g++.dg/cpp2a/concepts-pr60065.C | 8 + gcc/testsuite/g++.dg/cpp2a/concepts-pr60377.C | 9 + gcc/testsuite/g++.dg/cpp2a/concepts-pr60390.C | 26 + gcc/testsuite/g++.dg/cpp2a/concepts-pr60391.C | 9 + gcc/testsuite/g++.dg/cpp2a/concepts-pr60573.C | 28 + gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C | 18 + gcc/testsuite/g++.dg/cpp2a/concepts-pr65575.C | 23 + gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C | 18 + gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C | 8 + gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C | 59 + gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C | 22 + gcc/testsuite/g++.dg/cpp2a/concepts-pr66091.C | 21 + gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C | 16 + gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C | 80 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C | 51 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C | 25 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C | 121 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C | 26 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C | 10 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C | 8 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-1.C | 32 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-2.C | 36 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-3.C | 21 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C | 14 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-5.C | 17 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C | 24 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C | 22 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C | 30 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C | 14 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C | 63 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67685.C | 7 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C | 13 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C | 15 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C | 15 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C | 26 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C | 20 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C | 61 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C | 162 + gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C | 32 + gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-1.C | 13 + gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-2.C | 14 + gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C | 48 + gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C | 18 + gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C | 25 + gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C | 34 + gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C | 48 + gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C | 28 + gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C | 14 + gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C | 24 + gcc/testsuite/g++.dg/cpp2a/concepts-pr72415.C | 22 + gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C | 18 + gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C | 7 + gcc/testsuite/g++.dg/cpp2a/concepts-pr80471.C | 23 + gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C | 14 + gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C | 33 + gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C | 17 + gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C | 32 + gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C | 38 + gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C | 11 + gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-2.C | 41 + gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-3.C | 45 + gcc/testsuite/g++.dg/cpp2a/concepts-pr84979.C | 9 + gcc/testsuite/g++.dg/cpp2a/concepts-pr84980.C | 4 + gcc/testsuite/g++.dg/cpp2a/concepts-pr85265.C | 7 + gcc/testsuite/g++.dg/cpp2a/concepts-pr85706.C | 10 + gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C | 19 + gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C | 19 + gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C | 10 + gcc/testsuite/g++.dg/cpp2a/concepts-requires1.C | 71 + gcc/testsuite/g++.dg/cpp2a/concepts-requires10.C | 32 + gcc/testsuite/g++.dg/cpp2a/concepts-requires11.C | 21 + gcc/testsuite/g++.dg/cpp2a/concepts-requires12.C | 21 + gcc/testsuite/g++.dg/cpp2a/concepts-requires13.C | 20 + gcc/testsuite/g++.dg/cpp2a/concepts-requires14.C | 24 + gcc/testsuite/g++.dg/cpp2a/concepts-requires15.C | 15 + gcc/testsuite/g++.dg/cpp2a/concepts-requires16.C | 47 + gcc/testsuite/g++.dg/cpp2a/concepts-requires17.C | 11 + gcc/testsuite/g++.dg/cpp2a/concepts-requires2.C | 74 + gcc/testsuite/g++.dg/cpp2a/concepts-requires3.C | 32 + gcc/testsuite/g++.dg/cpp2a/concepts-requires4.C | 15 + gcc/testsuite/g++.dg/cpp2a/concepts-requires5.C | 45 + gcc/testsuite/g++.dg/cpp2a/concepts-requires6.C | 34 + gcc/testsuite/g++.dg/cpp2a/concepts-requires7.C | 16 + gcc/testsuite/g++.dg/cpp2a/concepts-requires8.C | 17 + gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C | 21 + gcc/testsuite/g++.dg/cpp2a/concepts-sfinae1.C | 10 + .../g++.dg/cpp2a/concepts-template-parm1.C | 19 + .../g++.dg/cpp2a/concepts-template-parm10.C | 10 + .../g++.dg/cpp2a/concepts-template-parm2.C | 15 + .../g++.dg/cpp2a/concepts-template-parm5.C | 9 + .../g++.dg/cpp2a/concepts-template-parm6.C | 44 + .../g++.dg/cpp2a/concepts-template-parm8.C | 21 + .../g++.dg/cpp2a/concepts-template-parm9.C | 18 + gcc/testsuite/g++.dg/cpp2a/concepts-traits1.C | 97 + gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C | 98 + gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C | 49 + gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C | 260 ++ gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C | 251 ++ gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C | 34 + gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C | 10 + gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C | 72 + gcc/testsuite/g++.dg/cpp2a/concepts-using1.C | 17 + gcc/testsuite/g++.dg/cpp2a/concepts.C | 57 + gcc/testsuite/g++.dg/cpp2a/concepts1.C | 27 + gcc/testsuite/g++.dg/cpp2a/concepts2.C | 69 + gcc/testsuite/g++.dg/cpp2a/concepts3.C | 48 + gcc/testsuite/g++.dg/cpp2a/concepts4.C | 10 + gcc/testsuite/g++.dg/cpp2a/cond-triv2.C | 30 + gcc/testsuite/lib/g++-dg.exp | 2 +- gcc/testsuite/lib/target-supports.exp | 2 +- gcc/timevar.def | 5 +- 383 files changed, 10769 insertions(+), 6045 deletions(-) delete mode 100644 gcc/testsuite/g++.dg/concepts/alias1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/alias2.C delete mode 100644 gcc/testsuite/g++.dg/concepts/alias3.C delete mode 100644 gcc/testsuite/g++.dg/concepts/alias4.C delete mode 100644 gcc/testsuite/g++.dg/concepts/class-deduction2.C delete mode 100644 gcc/testsuite/g++.dg/concepts/class.C delete mode 100644 gcc/testsuite/g++.dg/concepts/class1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/class2.C delete mode 100644 gcc/testsuite/g++.dg/concepts/class3.C delete mode 100644 gcc/testsuite/g++.dg/concepts/class4.C delete mode 100644 gcc/testsuite/g++.dg/concepts/constrained-parm.C delete mode 100644 gcc/testsuite/g++.dg/concepts/disjunction1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/explicit-inst1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/explicit-inst2.C delete mode 100644 gcc/testsuite/g++.dg/concepts/explicit-inst3.C delete mode 100644 gcc/testsuite/g++.dg/concepts/explicit-inst4.C delete mode 100644 gcc/testsuite/g++.dg/concepts/explicit-spec1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/explicit-spec2.C delete mode 100644 gcc/testsuite/g++.dg/concepts/explicit-spec3.C delete mode 100644 gcc/testsuite/g++.dg/concepts/explicit-spec4.C delete mode 100644 gcc/testsuite/g++.dg/concepts/explicit-spec5.C delete mode 100644 gcc/testsuite/g++.dg/concepts/explicit-spec6.C delete mode 100644 gcc/testsuite/g++.dg/concepts/feature-macro.C delete mode 100644 gcc/testsuite/g++.dg/concepts/friend1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/friend2.C delete mode 100644 gcc/testsuite/g++.dg/concepts/iconv1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/inherit-ctor2.C delete mode 100644 gcc/testsuite/g++.dg/concepts/inherit-ctor4.C delete mode 100644 gcc/testsuite/g++.dg/concepts/lambda1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/member-concept.C delete mode 100644 gcc/testsuite/g++.dg/concepts/memfun-err.C delete mode 100644 gcc/testsuite/g++.dg/concepts/memfun.C delete mode 100644 gcc/testsuite/g++.dg/concepts/memfun2.C delete mode 100644 gcc/testsuite/g++.dg/concepts/memtmpl1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/partial-spec.C delete mode 100644 gcc/testsuite/g++.dg/concepts/partial-spec2.C delete mode 100644 gcc/testsuite/g++.dg/concepts/partial-spec3.C delete mode 100644 gcc/testsuite/g++.dg/concepts/partial-spec4.C delete mode 100644 gcc/testsuite/g++.dg/concepts/partial-spec6.C delete mode 100644 gcc/testsuite/g++.dg/concepts/placeholder1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr58500.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr58534.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr58535.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr58536.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr58548.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr58549.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr60052.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr60053.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr60064.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr60065.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr60377.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr60390.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr60391.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr60573.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr65552.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr65575.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr65854.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr66091.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr68683.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr71368.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr71965.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr80471.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr84979-2.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr84979-3.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr84979.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr84980.C delete mode 100644 gcc/testsuite/g++.dg/concepts/pr85265.C delete mode 100644 gcc/testsuite/g++.dg/concepts/regress/alias-decl-42.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req-neg1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req10.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req11.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req12.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req13.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req14.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req15.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req16.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req17.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req18.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req19.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req2.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req20.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req3.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req4.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req5.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req6.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req7.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req8.C delete mode 100644 gcc/testsuite/g++.dg/concepts/req9.C delete mode 100644 gcc/testsuite/g++.dg/concepts/template-parm1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/template-parm10.C delete mode 100644 gcc/testsuite/g++.dg/concepts/template-parm5.C delete mode 100644 gcc/testsuite/g++.dg/concepts/template-parm6.C delete mode 100644 gcc/testsuite/g++.dg/concepts/template-parm7.C delete mode 100644 gcc/testsuite/g++.dg/concepts/template-parm8.C delete mode 100644 gcc/testsuite/g++.dg/concepts/template-parm9.C delete mode 100644 gcc/testsuite/g++.dg/concepts/traits1.C delete mode 100644 gcc/testsuite/g++.dg/concepts/traits2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-access1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-alias.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-alias2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-class.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-complete1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-constrained-parm.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-decltype.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-defarg1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-dep1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst4.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec6.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-feature-macro.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-fnparm1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-friend3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor4.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor5.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-locations1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-member-concept.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-memfun-err.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-nested1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-noexcept1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-p1141.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec4.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec5.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec6.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr58500.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr58534.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr58535.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr58536.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr58548.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr58549.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr59200.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr60052.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr60053.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr60064.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr60065.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr60377.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr60390.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr60391.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr60573.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr65575.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr66091.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-5.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67685.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr72415.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr80471.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr84979.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr84980.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr85265.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr85706.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires10.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires11.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires12.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires13.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires14.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires15.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires16.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires17.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires4.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires5.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires6.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires7.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires8.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-sfinae1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-template-parm1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-template-parm10.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-template-parm2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-template-parm5.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-template-parm6.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-template-parm8.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-template-parm9.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-traits1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-using1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts2.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts3.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts4.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/cond-triv2.C (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 330e13b..a02d211 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-10-08 Jason Merrill + + * doc/invoke.texi: Document -fconcepts-ts. + 2019-10-09 Richard Biener * tree-vect-loop.c (vect_is_simple_reduction): Simplify and diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 93077ff..3012f8b 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,17 @@ +2019-10-08 Andrew Sutton + Jason Merrill + + Update the concepts implementation to conform to the C++20 + specification, improve compile times, and generally clean up + the implementation. + + * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for + concepts when -std=c++2a. Bump __cpp_concepts to 201907. + * c.opt: Add -Wconcepts-ts. + * c-opts.c (c_common_post_options): Warn when -fconcepts is used + with -std=c++2a. Disable warning for -fconcepts in C++20 mode. + (set_std_cxx2a): Enable concepts by default. + 2019-10-08 Joseph Myers * c-opts.c (c_common_post_options): Set diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 9e0ce42..d9941e7 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -992,7 +992,13 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__cpp_constexpr_dynamic_alloc=201907"); } if (flag_concepts) - cpp_define (pfile, "__cpp_concepts=201507"); + { + if (cxx_dialect >= cxx2a) + /* FIXME: Update this to the value required by the IS. */ + cpp_define (pfile, "__cpp_concepts=201907"); + else + cpp_define (pfile, "__cpp_concepts=201507"); + } if (flag_tm) /* Use a value smaller than the 201505 specified in the TS, since we don't yet support atomic_cancel. */ diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 4ad24bd..0fffe60 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -1034,6 +1034,16 @@ c_common_post_options (const char **pfilename) if (warn_return_type == -1 && c_dialect_cxx ()) warn_return_type = 1; + /* C++2a is the final version of concepts. We still use -fconcepts + to know when concepts are enabled. Note that -fconcepts-ts can + be used to include additional features, although modified to + work with the standard. */ + if (cxx_dialect >= cxx2a) + flag_concepts = 1; + else if (flag_concepts) + /* For -std=c++17 -fconcepts, imply -fconcepts-ts. */ + flag_concepts_ts = 1; + if (num_in_fnames > 1) error ("too many filenames given; type %<%s %s%> for usage", progname, "--help"); @@ -1713,6 +1723,7 @@ set_std_cxx2a (int iso) flag_isoc94 = 1; flag_isoc99 = 1; flag_isoc11 = 1; + /* C++2a includes concepts. */ cxx_dialect = cxx2a; lang_hooks.name = "GNU C++17"; /* Pretend C++17 until standardization. */ } diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 88bbe2e..8f6867b 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1427,6 +1427,10 @@ fconcepts C++ ObjC++ Var(flag_concepts) Enable support for C++ concepts. +fconcepts-ts +C++ ObjC++ Var(flag_concepts_ts) Init(0) +Enable certain features present in the Concepts TS. + fcond-mismatch C ObjC C++ ObjC++ Allow the arguments of the '?' operator to have different types. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d75ea5d..e633823 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,461 @@ +2019-10-08 Andrew Sutton + Jason Merrill + + Update the concepts implementation to conform to the C++20 + specification, improve compile times, and generally clean up + the implementation. + * call.c (build_new_function_call): Don't evaluate concepts here. + (constraint_failure): Don't record the template. + (print_z_candidate): Don't extract the template. + * class.c (add_method): When overloading, hide ineligible special + member fns. + (check_methods): Set TYPE_HAS_COMPLEX_* here. + * constexpr.c (cxx_eval_constant_expression): Evaluate concepts. + (maybe_initialize_fundef_copies_table): Remove. + (get_fundef_copy): Use hash_map_safe_get_or_insert. + (clear_cv_and_fold_caches): Clear the satisfaction cache. + * constraint.cc (known_non_bool_p): New. + (parsing_constraint_expression_sentinel): Renamed from + expanding_constraint_sentinel. + (check_constraint_operands): New. + (check_constraint_atom): New. + (finish_constraint_binary_op): New. + (finish_constraint_or_expr): Likewise. + (finish_constraint_and_expr): Likewise. + (finish_constraint_primary_expr): Likewise. + (combine_constraint_expressions): New. + (finish_requires_expr): Add location parm. + (get_concept_definition): Return the initializer of concept definitions. + (get_template_head_requirements): New. + (get_trailing_function_requirements): New. + (deduce_constrained_parameter): Check if the identifier or template-id + is a concept definition. + (resolve_concept_definition_check): Removed. + (resolve_variable_concept_check): Removed. + (resolve_concept_check): New. + (resolve_constraint_check): Handle concept definitions. + converting arguments. + (function_concept_check_p): Removed. + (variable_concept_check_p): Removed. + (unpack_concept_check): New. + (get_concept_check_template): New. + (build_call_check): Moved and renamed to build_function_check. + (build_concept_check_arguments): make static. + (build_function_check): Always do overload resolution + in order to force conversion of template arguments (i.e., actually + check that the use of a concept is valid). + (build_standard_check): Renamed from build_real_concept_check. + (build_real_concept_check): Build checks for C++2a concepts by + (build_wildcard_concept_check): New. + (build_concept_check): Use build_real_concept_check. New overload. + (build_constraints): Save expressions, not normalized constraints. + (build_concept_id): New. Pass tf_warning_or_error. + (build_type_constraint): New. + (finish_type_constraints): New. + (associate_classtype_constraints): Also add constraints to union + types. Note the original declaration in errors. Don't return + error_mark_node in order to avoid an assertion later. + (push_down_pack_expansion): Remove. + (finish_shorthand_constraint): Make fold expressions, not naked + parameter packs. Always apply the constraint to each template argument. + (check_introduction_list): New. Fail if not enough + names are introduced. + (finish_template_introduction): Don't normalize constraints. Pass + tsubst flags. Check for insufficient introductions. + (placeholder_extract_concept_and_args): Handle the template-id case. + Unpack function concept checks correctly. + (tsubst_simple_requirement): Return errors if they occur. Don't + process as a template. + (tsubst_type_requirement): Likewise. + (type_deducible_p): New. Wrap the input expression in parens for the + purpose of deduction. + (expression_convertible_t): New. + (tsubst_compound_requirement): Use new deduction, conversion predicates. + (tsubst_nested_requirement): Return errors if they occur. Don't + process as a template. Instantiate and evaluate the nested requirement. + (tsubst_valid_expression_requirement): New. + (tsubst_simple_requirement): Use tsubst_valid_expression_requirement. + (tsubst_compound_requirement): Use tsubst_valid_expression_requirement. + (check_constaint_variables): New. + (tsubst_constraint_variables): Check that type substitutions are valid. + (tsubst_requires_expr): Likewise. Produce new requires-exprs during + template substitution. Copy the previous local specialization stack, + so references to non-local parameters can be found. Use cp_unevaluated. + (tsubst_constraint): New. Don't evaluate concept checks. + (subst_info): New. + (norm_info): New. Used to build a normalization tree for concept check + diagnostics. + (debug_parameter_mapping): New. + (debug_argument_list): New. + (expand_concept): Removed. + (normalize_logical_operation): Pass subst_info through call. + (normalize_pack_expansion): Remove. + (normalize_simple_requirement): Removed + (normalize_type_requirement): Removed + (normalize_compound_requirement): Removed + (normalize_nested_requirement): Removed + (normalize_requirement): Removed + (normalize_requirements): Removed + (normalize_requires_expression): Removed + (normalize_variable_concept_check): Removed. + (normalize_function_concept_check): Removed. + (normalize_concept_check): Merged all normalize_*_check here. + Substitute through written template arguments before normalizing the + definition. Only substitute the innermost template arguments. + (check_for_logical_overloads): Delete. + (map_arguments): New. Associate template parameters with arguments. + (build_parameter_mapping): New. Extract used parameters. + (normalize_expression): Rewrite. + (normalize_conjunction): Removed + (normalize_disjunction): Removed + (normalize_predicate_constraint): Removed + (normalize_parameterized_constraint): Removed + (normalized_map): New variable. + (get_normalized_constraints): New entry point for normalization. + Establishes a timer. + (get_normalized_constraints_from_info): New. + (get_normalized_constraints_from_decl): New. Turn on template processing + prior to normalization. Handle inheriting ctors. Build the + normalization arguments from the full set of template parameters of the + most general template. This guarantees that we have no concrete arguments + in the parameter mapping (e.g., from template members of class + templates). Cache normalizations. + (normalize_concept_definition): New. Cache normalizations. + (normalize_template_requirements): New. + (normalize_nontemplate_requirements): New. + (normalize_constraint_expression): New. + (tsubst_parameter_mapping): New. + (get_mapped_args): New. + (parameter_mapping_equivalent_p): New. Use template_args_equal. + (atomic_constraints_identical_p): New. + (hash_atomic_constraint): New. + (satisfying_constraint_p): New. Guard against recursive evaluation of + constraints during satisfaction. + (satisfy_conjunction): New. + (satisfy_disjunction): New. + (sat_entry): New class for hashing satisfaction results. + (sat_hasher): New hash traits. + (sat_cache): New. + (get_satisfaction): New. Returns cached satisfaction result. + (save_satisfaction): New. Caches a satisfaction result. + (clear_satisfaction_cache): New. + (satisfaction_cache): New. Helps manage satisfaction cache requests. + (decl_satisfied_cache): New. + (satisfy_atom): New. + (satisfy_constraint_r): New. + (satisfy_constraint): Use new satisfaction algorithm. + (evaluate_concept_check): New. + (evaluate_concept): Removed. + (evaluate_function_concept): Removed. + (evaluate_variable_concept): Removed. + (satisfy_constraint_expression): New. + (constraint_expression_satisfied_p): New. + (constraints_satisfied_p): Use strip_inheriting_ctors. Use + push_/pop_access_scope. + (more_constrained): Normalize before calling out to subsumption. Allow + classes as arguments. + (strictly_subsumes): Allow non-templates as arguments. Accept a new + template argument. + (weakly_subsumes): New. + (at_least_as_constrained): Removed. + (diagnose_other_expression): Removed. + (diagnose_predicate_constraint): Removed. + (diagnose_pack_expansion): Removed. + (diagnose_check_constraint): Removed. + (diagnose_logical_constraint): Removed. + (diagnose_expression_constraint): Removed. + (diagnose_type_constraint): Removed. + (diagnose_implicit_conversion_constraint): Removed. + (diagnose_argument_deduction_constraint): Removed. + (diagnose_exception_constraint): Removed. + (diagnose_parameterized_constraint): Removed. + (diagnose_argument_deduction_constraint): Removed. + (diagnose_argument_deduction_constraint): Removed. + (diagnose_argument_deduction_constraint): Removed. + (diagnose_trait_expr): New. + (diagnose_requires_expr): New. + (diagnose_atomic_constraint): New. + (diagnose_valid_expression) Stop wrongly diagnosing valid expressions. + Don't substitute as if in template decls. This causes substitution + to generate expressions that aren't suitable for use with the noexcept + routines. + (diagnose_valid_type) Likewise. + (diagnose_compound_requirement) Actually emit diagnostics for + the causes of errors.Call force_paren_expr_uneval. + (diagnose_declaration_constraints): Turn on template processing to + suppress certain analyses. + * cp-objcp-common.c (cp_common_init_ts): Make concepts typed. + (cp_get_debug_type): Use hash_map_safe_*. + * cp-tree.h: New function declarations for semantic actions, other + facilities. Remove declaration no longer used or needed. Remove + unused _CONSTR macros. + (LANG_DECL_HAS_MIN): Add CONCEPT_DECL. + (template_info_decl_check): Factor macro check into an inline function. + (DECL_TEMPLATE_INFO): Use new check facility. + (finish_concept_definition): New. Don't invalid concept declarations + with invalid initializers. + (find_template_parameters): New. + (concept_definition_p): New. + (concept_check_p): New. + (variable_concept_check_p): New. + (force_paren_expr_uneval): New. + (ovl_iterator::using_p): A USING_DECL by itself was also + introduced by a using-declaration. + (struct tree_template_info): Use tree_base instead of + tree_common. Add tmpl and args fields. + (TI_TEMPLATE, TI_ARGS): Adjust. + (DECLTYPE_FOR_INIT_CAPTURE): Remove. + (CONSTR_CHECK, CONSTR_INFO, CONSTR_EXPR, CONSTR_CONTEXT): New. + (ATOMIC_CONSTR_MAP, TRAIT_EXPR_LOCATION): New. + (struct tree_trait_expr): Add locus field. + (enum tsubst_flags): Add tf_norm as a hint to generate normalization + context when diagnosing constraint failure. + * cp-tree.def: Remove unused _CONSTR nodes and rename PRED_CONSTR + to ATOMIC_CONSTR. + (CONCEPT_DECL): New. + * cxx-pretty-print.c: Remove constraint printing code. + (pp_cxx_concept_definition): New. + (pp_cxx_template_declaration): Print concept definitions. + (pp_cxx_check_constraint): Update printing for concept definitions. + (pp_cxx_nested_name_specifier): Fix a weird + case where we're printing '::::' for concepts. + (simple_type_specifier): Print requirements for placeholder types. + (pp_cxx_constrained_type_spec): Print the associated requirements of + a placeholder type. + (pp_cxx_compound_requirement): Add space before the '->'. + (pp_cxx_parameter_mapping): Print the parameter mapping. + (pp_cxx_atomic_constraint): Use the function above. + * decl.c (redeclaration_error_message): New error for concepts. + (grokdeclarator): Check for and disallow decltype(auto) in parameter + declarations. + (grokfndecl): Don't normalize constraints. Add check for constraints + on declaration. + (grokvardecl): Don't normalize constraints. + (grok_special_member_properties): Don't set TYPE_HAS_COMPLEX_*. + (function_requirements_equivalent_p): New. Compare trailing + requires clauses. Compare combined constraints in pre-C++20 mode. + (decls_match): Compare trailing requires clauses. Compare template + heads for function templates. Remove old constraint comparison. + Simplify comparison of functions, function templates. + (duplicate_function_template_decls): New. Refactor a nasty if + condition into a single predicate. + (require_deduced_type): Don't complain if we already complained about + deduction failure. + (finish_function): Perform auto deduction to ensure that constraints + are checked even when functions contain no return statements. Only do + auto deduction if we haven't previously seen any return statements. + This prevents multiple diagnostics of the same error. + (store_decomp_type): Remove. + (cp_finish_decomp): Use hash_map_safe_put. + * error.c: Remove constraint printing code. + (dump_decl): Dump concept definitions. Handle wildcard declarations. + (dump_template_decl): Likewise. + (dump_type): Print associated requirements for placeholder + types. + (rebuild_concept_check): New. + (maybe_print_single_constraint_context): New. + (maybe_print_constraint_context): Recursively print nested contexts. + * init.c (get_nsdmi): Use hash_map_safe_*. + * lambda.c (maybe_add_lambda_conv_op): Bail if deduction failed. + (add_capture): Copy parameter packs from init. + (lambda_capture_field_type): Always use auto for init-capture. + * logic.cc: Completely rewrite. + (constraint_hash): New. + (clause/ctor): Save atoms in the hash table. + (replace): Save atoms during replacement. + (insert): Save atoms during insertion. + (contains): Only search the hash table for containment. + (clause): Keep a hash of atomic constraints. + (clause::clause): Explicitly copy the hash table when copying. + (disjunction_p, conjunction_p, atomic_p, dnf_size, cnf_size): New. + (diagnose_constraint_size): New. + (subsumes_constraints_nonnull): Compare the sizes of normalized formula + to determine the cheapest decomposition. + * name-lookup.c (diagnose_name_conflict): Diagnose name issues with + concepts. + (matching_fn_p): Check constraints. + (push_class_level_binding_1): Move overloaded functions case down, + accept FUNCTION_DECL as target_decl. + * parser.c (enum required_token): New required token for auto. + (make_location): Add overload taking lexer as last parm. + (cp_parser_required_error): Diagnose missing auto. + (cp_parser_diagnose_ungrouped_constraint_plain): New. + (cp_parser_diagnose_ungrouped_constraint_plain): New. + (cp_parser_constraint_primary_expression): New. Tentatively parse the + primary expression. If that fails tentatively parse a lower + precedence expression in order to diagnose the error. + (cp_parser_check_non_logical_constraint): New. Performs a trial + parse of the right-hand-side of non-logical operators in order to + generate good diagnostics. + (cp_parser_constraint_logical_and_expression): New. + (cp_parser_constraint_logical_or_expression): New. + (cp_parser_requires_clause_expression): New. + (cp_parser_requires_clause): Renamed to cp_parser_constraint_expression. + (cp_parser_requires_clause_opt): Parse the requires-clause differently + in -fconcepts and -std=c++2a modes. + (cp_parser_requirement_list): Rename to cp_parser_requirement_seq. + Rewrite so that semicolons are parsed + along with requirements, not the sequence. + (cp_parser_simple_requirement): Expect a semicolon at end. + (cp_parser_compound_requirement): Expect a semicolon at end. Only + allow trailing-return-type with -fconcepts-ts. + (cp_parser_nested_requirement): Expect a semicolon at end. Parse + constraint-expressions. + (cp_parser_concept_definition): New. Don't fail parsing the concept + definition if the initializer is ill-formed. Don't declare the concept + before parsing the initializer. + (cp_parser_constraint_expression): Declare earlier. + (cp_parser_type_requirement): Current scope is not valid. + (cp_parser_requires_expression): Commit to the tentative parse. + (cp_parser_decl_specifier_seq): Warn when concept appears to be used + as a decl-specifier. + (cp_parser_template_declaration_after_parameters): Parse concept + definitions. + (cp_parser_template_id): Don't try to resolve a concept template-id yet. + (cp_parser_template_id_expr): Resolve it as a concept check. + (cp_parser_decl_specifier_seq): Warn on 'concept bool'. + (cp_parser_type_parameter): Combine expressions not + constraints. + (cp_parser_explicit_template_declaration): Combine expressions not + constraints. + (cp_parser_maybe_concept_name): Removed. + (cp_parser_simple_type_specifier): Handle an error condition of + a bad constrained type specifier. Expect auto or decltype after + a concept name. Also handle the case where we have a template-id + as a concept check. + (cp_parser_template_introduction): Diagnose errors on invalid + introductions. Give up if it doesn't start with a concept name. + Pedwarn if not -fconcepts-ts. + (synthesize_implicit_template_parm): Don't do consistent binding. + Use a new flag for constrained parameters. Combine expressions, + not constraints. Fail if we get a placeholder in block scope. + Placeholders that do not constrain types are not allowed in parameter + declarations, so don't handle them. + (cp_parser_placeholder_type_specifier): New. Implement parsing of + placeholder type specifiers following a concept name or partial + concept check. Disallow decltype(auto) parameters. + (cp_parser_nested_name_specifier_opt): If the token is already + CPP_NESTED_NAME_SPECIFIER, leave it alone. + (cp_parser_id_expression, cp_parser_unqualified_id): Call + cp_parser_template_id_expr. + (cp_parser_placeholder_type_specifier): Add tentative parm. Don't + expect a WILDCARD_DECL. + (cp_parser_trait_expr): Pass trait_loc down. + (cp_parser_postfix_expression): Do set location of dependent member + call. + * pt.c (finish_concept_definition): New. + (push_template_decl_real): Handle concept definitions. + (start_concept_definition): Let push_template_decl_real handle the + creation of the template. + (get_constraints): Return null if the table hasn't been initialized. + (tsubst_copy_and_build): Build template-id expressions for concept + checks. + [TRAIT_EXPR]: Pass trait_loc down. + (lookup_template_class_1): Add the template name to the constraint + failure diagnostic. + (lookup_and_finish_template_variable): Build concept checks + with the correct arguments. + (tsubst_function_decl): Don't substitute through constraints. + Always associate constraints with functions. + (template_parm_level_and_index): Make non-static. + (for_each_template_parm_r): Handle requires expressions. + (keep_template_parm): New. + (find_template_parameters): New. + (more_specialized_fn): Change how winners and losers are chosen. + (make_constrained_auto): Don't normalize constraints. + (template_parameters_equivalent_p): New. Compare template + parameters. Add a comparison for implicitly vs. explicitly declared + parameters. + (template_parameter_lists_equivalent_p): New. Compare template + parameter lists. + (template_requirements_equivalent_p): New. + (template_heads_equivalent_p): New. Compare template heads. + (template_parameter_constraints_equivalent_p): New. + (is_compatible_template_arg): Use weakly_subsumes. + (maybe_new_partial_specialization): Use new constraint comparison + for finding specializations. + (process_partial_specialization): Pass main template as argument. + (more_specialized_partial_spec): Don't immediately return when + detecting a winner. + (make_constrained_auto): Handle concept definitions. + (do_auto_deduction): Update auto deduction for new concept model. + Extract the function concept correctly; rename constr to check to + reflect the kind of node. + (tsubst): Adjust wildcard argument during substitution. + [DECLTYPE_TYPE]: Remove init-capture handling. + (tsubst_copy_and_build): Build concept checks, not template ids. + Defer checks of function concepts. Handle concepts before variable + templates. Handle calls to function concepts explicitly. + (coerce_template_parms): Use concept_definition_p. Handle a deduction + error where a potentially empty pack can be supplied after the last + parameter of a concept. + (finish_template_variable): Don't process concepts here. + (instantiation_dependent_r): Use concept_check_p. + (tsubst_template_args): Make non-static. + (make_constrained_placeholder_type): New. Refactored from + make_constrained_auto. + (make_constrained_auto) Use make_constrained_placeholder_type. + (make_constrained_decltype_auto) New. + (tsubst_function_parms): New. + (value_dependent_expression_p) [TEMPLATE_ID_EXPR]: Use + concept_definition_p. + (push_access_scope, pop_access_scope): No longer static. + (tsubst_template_parm): Substitute TEMPLATE_PARM_CONSTRAINTS. + (tsubst_friend_function): Use tsubst_constraint. Use generic_targs_for. + (get_underlying_template) Use generic_targs_for. + (uses_parameter_packs): Return tree. + (gen_elem_of_pack_expansion_instantiation): Don't push + local_specialization_stack. + (prepend_one_capture): New. + (tsubst_lambda_expr): Use prepend_one_capture. Don't touch + local_specializations. + (template_parms_level_to_args): No longer static. + (add_outermost_template_args): Likewise. + (find_template_parameter_info): New. Provide context for finding + template parameters. + (keep_template_parm): Don't keep parameters declared at depth levels + greater than those of the template parameters of the source declaration. + Don't propagate cv-qualified types. Return 0, so we find all template + parameters, not the just first. + (any_template_parm_r): New. Handle cases that are mishandled by + for_each_template_parm_r. + (generic_targs_for): Factor out of coerce_template_args_for_ttp. + (tsubst_argument_pack): Factor out of tsubst_template_args. + (constraint_sat_entry): Removed. + (constraint_sat_hasher): Removed. + (concept_spec_entry): Removed. + (concept_spec_hasher): Removed. + (constraint_memos): Removed. + (concept_memos): Removed. + (lookup_constraint_satisfaction): Removed. + (memoize_constraint_satisfaction): Removed. + (lookup_concept_satisfaction): Removed. + (memoize_concept_satisfaction): Removed. + (concept_expansions): Removed. + (get_concept_expansion): Removed. + (save_concept_expansion): Removed. + (init_constraint_processing): Remove initialization of non-existing + resources. + (find_template_requirement): New. Search for the sub-requirement + within the associated constraints. + (convert_generic_types_to_packs): Also transform the associated + constraint and update the current template requirements. + (store_defaulted_ttp, lookup_defaulted_ttp): Remove. + (add_defaults_to_ttp): Use hash_map_safe_*. + * semantics.c (finish_call_expr): Diagnose calls to concepts. + Handle concept checks explicitly. + (finish_id_expression): Evaluate variable concepts as part of + id-expression processing. Don't treat variable concepts as variables, + and don't process function concepts as plain id-expressions. + (force_paren_expr): Add even_uneval parm. + (finish_trait_expr): Add location parm. + * tree.c (special_memfn_p): New. + (cp_expr_location): Handle TRAIT_EXPR. + * typeck.c (check_return_expr): Actually use the diagnostic kind + when performing return-type deduction. + * typeck2.c (build_functional_cast): Don't rely on the location of + 'auto'. + 2019-10-09 Paolo Carlini * decl.c (grok_ctor_properties): Use DECL_SOURCE_LOCATION. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 4ed424f..d36564d 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -717,24 +717,12 @@ inherited_ctor_rejection (void) return r; } -// Build a constraint failure record, saving information into the -// template_instantiation field of the rejection. If FN is not a template -// declaration, the TMPL member is the FN declaration and TARGS is empty. +/* Build a constraint failure record. */ static struct rejection_reason * -constraint_failure (tree fn) +constraint_failure (void) { struct rejection_reason *r = alloc_rejection (rr_constraint_failure); - if (tree ti = DECL_TEMPLATE_INFO (fn)) - { - r->u.template_instantiation.tmpl = TI_TEMPLATE (ti); - r->u.template_instantiation.targs = TI_ARGS (ti); - } - else - { - r->u.template_instantiation.tmpl = fn; - r->u.template_instantiation.targs = NULL_TREE; - } return r; } @@ -2251,10 +2239,9 @@ add_function_candidate (struct z_candidate **candidates, /* Second, for a function to be viable, its constraints must be satisfied. */ - if (flag_concepts && viable - && !constraints_satisfied_p (fn)) + if (flag_concepts && viable && !constraints_satisfied_p (fn)) { - reason = constraint_failure (fn); + reason = constraint_failure (); viable = false; } @@ -3729,11 +3716,7 @@ print_z_candidate (location_t loc, const char *msgstr, "class type is invalid"); break; case rr_constraint_failure: - { - tree tmpl = r->u.template_instantiation.tmpl; - tree args = r->u.template_instantiation.targs; - diagnose_constraints (cloc, tmpl, args); - } + diagnose_constraints (cloc, fn, NULL_TREE); break; case rr_inherited_ctor: inform (cloc, " an inherited constructor is not a candidate for " @@ -4532,25 +4515,7 @@ build_new_function_call (tree fn, vec **args, through flags so that later we can use it to decide whether to warn about peculiar null pointer conversion. */ if (TREE_CODE (fn) == TEMPLATE_ID_EXPR) - { - /* If overload resolution selects a specialization of a - function concept for non-dependent template arguments, - the expression is true if the constraints are satisfied - and false otherwise. - - NOTE: This is an extension of Concepts Lite TS that - allows constraints to be used in expressions. */ - if (flag_concepts && !processing_template_decl) - { - tree tmpl = DECL_TI_TEMPLATE (cand->fn); - tree targs = DECL_TI_ARGS (cand->fn); - tree decl = DECL_TEMPLATE_RESULT (tmpl); - if (DECL_DECLARED_CONCEPT_P (decl)) - return evaluate_function_concept (decl, targs); - } - - flags |= LOOKUP_EXPLICIT_TMPL_ARGS; - } + flags |= LOOKUP_EXPLICIT_TMPL_ARGS; result = build_over_call (cand, flags, complain); } @@ -10828,8 +10793,11 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn, return winner; } - // C++ Concepts - // or, if not that, F1 is more constrained than F2. + /* Concepts: ... or, if not that, F1 is more constrained than F2. + + FIXME: For function templates with no winner, this subsumption may + be computed a separate time. This needs to be validated, and if + so, the redundant check removed. */ if (flag_concepts && DECL_P (cand1->fn) && DECL_P (cand2->fn)) { winner = more_constrained (cand1->fn, cand2->fn); diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 4abcfaf..b6afdc4 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -7189,6 +7189,9 @@ finish_struct_1 (tree t) /* Finish debugging output for this type. */ rest_of_type_compilation (t, ! LOCAL_CLASS_P (t)); + /* Recalculate satisfaction that might depend on completeness. */ + clear_satisfaction_cache (); + if (TYPE_TRANSPARENT_AGGR (t)) { tree field = first_field (t); diff --git a/gcc/cp/config-lang.in b/gcc/cp/config-lang.in index 6e5f046..adfe1b2 100644 --- a/gcc/cp/config-lang.in +++ b/gcc/cp/config-lang.in @@ -39,6 +39,7 @@ gtfiles="\ \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-format.c \ \$(srcdir)/c-family/c-cppbuiltin.c \$(srcdir)/c-family/c-pragma.c \ \$(srcdir)/cp/call.c \$(srcdir)/cp/class.c \$(srcdir)/cp/constexpr.c \ +\$(srcdir)/cp/constraint.cc \ \$(srcdir)/cp/cp-gimplify.c \ \$(srcdir)/cp/cp-lang.c \$(srcdir)/cp/cp-objcp-common.c \ \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \ diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index f50cc04..ea50234 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -5523,7 +5523,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, '!requires (T t) { ... }' which is not transformed into a constraint. */ if (!processing_template_decl) - return evaluate_constraint_expression (t, NULL_TREE); + return satisfy_constraint_expression (t); else *non_constant_p = true; return t; @@ -5539,6 +5539,20 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, r = void_node; break; + case TEMPLATE_ID_EXPR: + { + /* We can evaluate template-id that refers to a concept only if + the template arguments are non-dependent. */ + if (!concept_definition_p (TREE_OPERAND (t, 0))) + internal_error ("unexpected template-id %qE", t); + + if (!processing_template_decl) + return satisfy_constraint_expression (t); + else + *non_constant_p = true; + return t; + } + case ASM_EXPR: if (!ctx->quiet) inline_asm_in_constexpr_error (cp_expr_loc_or_input_loc (t)); @@ -5980,13 +5994,15 @@ clear_cv_cache (void) cv_cache->empty (); } -/* Dispose of the whole CV_CACHE and FOLD_CACHE. */ +/* Dispose of the whole CV_CACHE, FOLD_CACHE, and satisfaction caches. */ void -clear_cv_and_fold_caches (void) +clear_cv_and_fold_caches (bool sat /*= true*/) { clear_cv_cache (); clear_fold_cache (); + if (sat) + clear_satisfaction_cache (); } /* Internal function handling expressions in templates for diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc index c7a172c..db4a818 100644 --- a/gcc/cp/constraint.cc +++ b/gcc/cp/constraint.cc @@ -46,89 +46,189 @@ along with GCC; see the file COPYING3. If not see #include "toplev.h" #include "type-utils.h" +static tree satisfaction_value (tree t); + +/* When we're parsing or substuting a constraint expression, we have slightly + different expression semantics. In particular, we don't want to reduce a + concept-id to a satisfaction value. */ + +processing_constraint_expression_sentinel:: +processing_constraint_expression_sentinel () +{ + ++scope_chain->x_processing_constraint; +} + +processing_constraint_expression_sentinel:: +~processing_constraint_expression_sentinel () +{ + --scope_chain->x_processing_constraint; +} + +bool +processing_constraint_expression_p () +{ + return scope_chain->x_processing_constraint != 0; +} + /*--------------------------------------------------------------------------- - Operations on constraints + Constraint expressions ---------------------------------------------------------------------------*/ -/* Returns true if C is a constraint tree code. Note that ERROR_MARK - is a valid constraint. */ +/* Information provided to substitution. */ + +struct subst_info +{ + subst_info (tsubst_flags_t cmp, tree in) + : complain (cmp), in_decl (in) + { } + + /* True if we should not diagnose errors. */ + bool quiet() const + { + return complain == tf_none; + } + + /* True if we should diagnose errors. */ + bool noisy() const + { + return !quiet (); + } + + tsubst_flags_t complain; + tree in_decl; +}; + +/* True if T is known to be some type other than bool. Note that this + is false for dependent types and errors. */ static inline bool -constraint_p (tree_code c) +known_non_bool_p (tree t) { - return ((PRED_CONSTR <= c && c <= DISJ_CONSTR) - || c == EXPR_PACK_EXPANSION - || c == ERROR_MARK); + return (t && !WILDCARD_TYPE_P (t) && TREE_CODE (t) != BOOLEAN_TYPE); } -/* Returns true if T is a constraint. Note that error_mark_node - is a valid constraint. */ +static bool +check_constraint_atom (cp_expr expr) +{ + if (known_non_bool_p (TREE_TYPE (expr))) + { + error_at (expr.get_location (), + "constraint expression does not have type %"); + return false; + } -bool -constraint_p (tree t) + /* Check that we're using function concepts correctly. */ + if (concept_check_p (expr)) + { + tree id = unpack_concept_check (expr); + tree tmpl = TREE_OPERAND (id, 0); + if (OVL_P (tmpl) && TREE_CODE (expr) == TEMPLATE_ID_EXPR) + { + error_at (EXPR_LOC_OR_LOC (expr, input_location), + "function concept must be called"); + return false; + } + } + + return true; +} + +static bool +check_constraint_operands (location_t, cp_expr lhs, cp_expr rhs) { - return constraint_p (TREE_CODE (t)); + return check_constraint_atom (lhs) && check_constraint_atom (rhs); } -/* Returns the conjunction of two constraints A and B. Note that - conjoining a non-null constraint with NULL_TREE is an identity - operation. That is, for non-null A, +/* Validate the semantic properties of the constraint expression. */ + +static cp_expr +finish_constraint_binary_op (location_t loc, + tree_code code, + cp_expr lhs, + cp_expr rhs) +{ + gcc_assert (processing_constraint_expression_p ()); + if (lhs == error_mark_node || rhs == error_mark_node) + return error_mark_node; + if (!check_constraint_operands (loc, lhs, rhs)) + return error_mark_node; + tree overload; + tree expr = build_x_binary_op (loc, code, + lhs, TREE_CODE (lhs), + rhs, TREE_CODE (rhs), + &overload, tf_none); + /* When either operand is dependent, the overload set may be non-empty. */ + if (expr == error_mark_node) + return error_mark_node; + SET_EXPR_LOCATION (expr, loc); + return expr; +} - conjoin_constraints(a, NULL_TREE) == a +cp_expr +finish_constraint_or_expr (location_t loc, cp_expr lhs, cp_expr rhs) +{ + return finish_constraint_binary_op (loc, TRUTH_ORIF_EXPR, lhs, rhs); +} - and +cp_expr +finish_constraint_and_expr (location_t loc, cp_expr lhs, cp_expr rhs) +{ + return finish_constraint_binary_op (loc, TRUTH_ANDIF_EXPR, lhs, rhs); +} - conjoin_constraints (NULL_TREE, a) == a +cp_expr +finish_constraint_primary_expr (cp_expr expr) +{ + if (expr == error_mark_node) + return error_mark_node; + if (!check_constraint_atom (expr)) + return cp_expr (error_mark_node, expr.get_location ()); + return expr; +} - If both A and B are NULL_TREE, the result is also NULL_TREE. */ +/* Combine two constraint-expressions with a logical-and. */ tree -conjoin_constraints (tree a, tree b) -{ - gcc_assert (a ? constraint_p (a) : true); - gcc_assert (b ? constraint_p (b) : true); - if (a) - return b ? build_nt (CONJ_CONSTR, a, b) : a; - else if (b) - return b; - else - return NULL_TREE; +combine_constraint_expressions (tree lhs, tree rhs) +{ + processing_constraint_expression_sentinel pce; + if (!lhs) + return rhs; + if (!rhs) + return lhs; + return finish_constraint_and_expr (input_location, lhs, rhs); } -/* Transform the vector of expressions in the T into a conjunction - of requirements. T must be a TREE_VEC. */ +/* Extract the template-id from a concept check. For standard and variable + checks, this is simply T. For function concept checks, this is the + called function. */ tree -conjoin_constraints (tree t) +unpack_concept_check (tree t) { - gcc_assert (TREE_CODE (t) == TREE_VEC); - tree r = NULL_TREE; - for (int i = 0; i < TREE_VEC_LENGTH (t); ++i) - r = conjoin_constraints (r, TREE_VEC_ELT (t, i)); - return r; + gcc_assert (concept_check_p (t)); + + if (TREE_CODE (t) == CALL_EXPR) + t = CALL_EXPR_FN (t); + + gcc_assert (TREE_CODE (t) == TEMPLATE_ID_EXPR); + return t; } -/* Returns true if T is a call expression to a function - concept. */ +/* Extract the TEMPLATE_DECL from a concept check. */ -bool -function_concept_check_p (tree t) +tree +get_concept_check_template (tree t) { - gcc_assert (TREE_CODE (t) == CALL_EXPR); - tree fn = CALL_EXPR_FN (t); - if (fn != NULL_TREE - && TREE_CODE (fn) == TEMPLATE_ID_EXPR) - { - tree f1 = OVL_FIRST (TREE_OPERAND (fn, 0)); - if (TREE_CODE (f1) == TEMPLATE_DECL - && DECL_DECLARED_CONCEPT_P (DECL_TEMPLATE_RESULT (f1))) - return true; - } - return false; + tree id = unpack_concept_check (t); + tree tmpl = TREE_OPERAND (id, 0); + if (OVL_P (tmpl)) + tmpl = OVL_FIRST (tmpl); + return tmpl; } -/* Returns true if any of the arguments in the template - argument list is a wildcard or wildcard pack. */ +/* Returns true if any of the arguments in the template argument list is + a wildcard or wildcard pack. */ bool contains_wildcard_p (tree args) @@ -142,38 +242,6 @@ contains_wildcard_p (tree args) return false; } -/* Build a new call expression, but don't actually generate a - new function call. We just want the tree, not the semantics. */ - -inline tree -build_call_check (tree id) -{ - ++processing_template_decl; - vec *fargs = make_tree_vector(); - tree call = finish_call_expr (id, &fargs, false, false, tf_none); - release_tree_vector (fargs); - --processing_template_decl; - return call; -} - -/* Build an expression that will check a variable concept. If any - argument contains a wildcard, don't try to finish the variable - template because we can't substitute into a non-existent - declaration. */ - -tree -build_variable_check (tree id) -{ - gcc_assert (TREE_CODE (id) == TEMPLATE_ID_EXPR); - if (contains_wildcard_p (TREE_OPERAND (id, 1))) - return id; - - ++processing_template_decl; - tree var = finish_template_variable (id); - --processing_template_decl; - return var; -} - /*--------------------------------------------------------------------------- Resolution of qualified concept names ---------------------------------------------------------------------------*/ @@ -200,13 +268,12 @@ build_variable_check (tree id) the complete set of arguments substituted into the parameter list. */ static tree -resolve_constraint_check (tree ovl, tree args) +resolve_function_concept_overload (tree ovl, tree args) { int nerrs = 0; tree cands = NULL_TREE; for (lkp_iterator iter (ovl); iter; ++iter) { - // Get the next template overload. tree tmpl = *iter; if (TREE_CODE (tmpl) != TEMPLATE_DECL) continue; @@ -252,7 +319,7 @@ resolve_constraint_check (tree ovl, tree args) does not denote a constraint check, return NULL. */ tree -resolve_constraint_check (tree call) +resolve_function_concept_check (tree call) { gcc_assert (TREE_CODE (call) == CALL_EXPR); @@ -279,37 +346,40 @@ resolve_constraint_check (tree call) } tree args = TREE_OPERAND (target, 1); - return resolve_constraint_check (ovl, args); + return resolve_function_concept_overload (ovl, args); } -/* Returns a pair containing the checked variable concept - and its associated prototype parameter. The result - is a TREE_LIST whose TREE_VALUE is the variable concept - and whose TREE_PURPOSE is the prototype parameter. */ +/* Returns a pair containing the checked concept and its associated + prototype parameter. The result is a TREE_LIST whose TREE_VALUE + is the concept (non-template) and whose TREE_PURPOSE contains + the converted template arguments, including the deduced prototype + parameter (in position 0). */ tree -resolve_variable_concept_check (tree id) +resolve_concept_check (tree check) { + gcc_assert (concept_check_p (check)); + tree id = unpack_concept_check (check); tree tmpl = TREE_OPERAND (id, 0); - tree args = TREE_OPERAND (id, 1); - if (!variable_concept_p (tmpl)) - return NULL_TREE; + /* If this is an overloaded function concept, perform overload + resolution (this only happens when deducing prototype parameters + and template introductions). */ + if (TREE_CODE (tmpl) == OVERLOAD) + { + if (OVL_CHAIN (tmpl)) + return resolve_function_concept_check (check); + tmpl = OVL_FIRST (tmpl); + } - /* Make sure that we have the right parameters before - assuming that it works. Note that failing to deduce - will result in diagnostics. */ + tree args = TREE_OPERAND (id, 1); tree parms = INNERMOST_TEMPLATE_PARMS (DECL_TEMPLATE_PARMS (tmpl)); ++processing_template_decl; tree result = coerce_template_parms (parms, args, tmpl); --processing_template_decl; - if (result != error_mark_node) - { - tree decl = DECL_TEMPLATE_RESULT (tmpl); - return build_tree_list (result, decl); - } - else + if (result == error_mark_node) return error_mark_node; + return build_tree_list (result, DECL_TEMPLATE_RESULT (tmpl)); } /* Given a call expression or template-id expression to a concept EXPR @@ -321,14 +391,7 @@ resolve_variable_concept_check (tree id) bool deduce_constrained_parameter (tree expr, tree& check, tree& proto) { - tree info = NULL_TREE; - if (TREE_CODE (expr) == TEMPLATE_ID_EXPR) - info = resolve_variable_concept_check (expr); - else if (TREE_CODE (expr) == CALL_EXPR) - info = resolve_constraint_check (expr); - else - gcc_unreachable (); - + tree info = resolve_concept_check (expr); if (info && info != error_mark_node) { check = TREE_VALUE (info); @@ -338,6 +401,7 @@ deduce_constrained_parameter (tree expr, tree& check, tree& proto) proto = TREE_TYPE (arg); return true; } + check = proto = NULL_TREE; return false; } @@ -346,127 +410,39 @@ deduce_constrained_parameter (tree expr, tree& check, tree& proto) deduce the concept being checked and return the template arguments. Returns NULL_TREE if deduction fails. */ static tree -deduce_concept_introduction (tree expr) +deduce_concept_introduction (tree check) { - tree info = NULL_TREE; - if (TREE_CODE (expr) == TEMPLATE_ID_EXPR) - info = resolve_variable_concept_check (expr); - else if (TREE_CODE (expr) == CALL_EXPR) - info = resolve_constraint_check (expr); - else - gcc_unreachable (); - + tree info = resolve_concept_check (check); if (info && info != error_mark_node) return TREE_PURPOSE (info); return NULL_TREE; } -namespace { - -/*--------------------------------------------------------------------------- - Constraint implication learning ----------------------------------------------------------------------------*/ - -/* The implication context determines how we memoize concept checks. - Given two checks C1 and C2, the direction of implication depends - on whether we are learning implications of a conjunction or disjunction. - For example: - - template concept bool C = ...; - template concept bool D = C && true; - - From this, we can learn that D implies C. We cannot learn, - without further testing, that C does not imply D. If, for - example, C were defined as true, then these constraints would - be logically equivalent. - - In rare cases, we may start with a logical equivalence. For example: - - template concept bool C = ...; - template concept bool D = C; +/* Build a constrained placeholder type where SPEC is a type-constraint. + SPEC can be anything were concept_definition_p is true. - Here, we learn that C implies D and vice versa. */ - -enum implication_context -{ - conjunction_cxt, /* C1 implies C2. */ - disjunction_cxt, /* C2 implies C1. */ - equivalence_cxt /* C1 implies C2, C2 implies C1. */ -}; - -void learn_implications(tree, tree, implication_context); - -void -learn_implication (tree parent, tree child, implication_context cxt) -{ - switch (cxt) - { - case conjunction_cxt: - save_subsumption_result (parent, child, true); - break; - case disjunction_cxt: - save_subsumption_result (child, parent, true); - break; - case equivalence_cxt: - save_subsumption_result (parent, child, true); - save_subsumption_result (child, parent, true); - break; - } -} + If DECLTYPE_P is true, then the placeholder is decltype(auto). -void -learn_logical_operation (tree parent, tree constr, implication_context cxt) -{ - learn_implications (parent, TREE_OPERAND (constr, 0), cxt); - learn_implications (parent, TREE_OPERAND (constr, 1), cxt); -} + Returns a pair whose FIRST is the concept being checked and whose + SECOND is the prototype parameter. */ -void -learn_implications (tree parent, tree constr, implication_context cxt) +tree_pair +finish_type_constraints (tree spec, tree args, tsubst_flags_t complain) { - switch (TREE_CODE (constr)) - { - case CHECK_CONSTR: - return learn_implication (parent, constr, cxt); - - case CONJ_CONSTR: - if (cxt == disjunction_cxt) - return; - return learn_logical_operation (parent, constr, cxt); + gcc_assert (concept_definition_p (spec)); - case DISJ_CONSTR: - if (cxt == conjunction_cxt) - return; - return learn_logical_operation (parent, constr, cxt); - - default: - break; - } -} - -/* Quickly scan the top-level constraints of CONSTR to learn and - cache logical relations between concepts. The search does not - include conjunctions of disjunctions or vice versa. */ - -void -learn_implications (tree tmpl, tree args, tree constr) -{ - /* Don't memoize relations between non-dependent arguemnts. It's not - helpful. */ - if (!uses_template_parms (args)) - return; + /* Build an initial concept check. */ + tree check = build_type_constraint (spec, args, complain); + if (check == error_mark_node) + return std::make_pair (error_mark_node, NULL_TREE); - /* Build a check constraint for the purpose of caching. */ - tree parent = build_nt (CHECK_CONSTR, tmpl, args); + /* Extract the concept and prototype parameter from the check. */ + tree con; + tree proto; + if (!deduce_constrained_parameter (check, con, proto)) + return std::make_pair (error_mark_node, NULL_TREE); - /* Start learning based on the kind of the top-level contraint. */ - if (TREE_CODE (constr) == CONJ_CONSTR) - return learn_logical_operation (parent, constr, conjunction_cxt); - else if (TREE_CODE (constr) == DISJ_CONSTR) - return learn_logical_operation (parent, constr, disjunction_cxt); - else if (TREE_CODE (constr) == CHECK_CONSTR) - /* This is the rare concept alias case. */ - return learn_implication (parent, constr, equivalence_cxt); + return std::make_pair (con, proto); } /*--------------------------------------------------------------------------- @@ -475,7 +451,7 @@ learn_implications (tree tmpl, tree args, tree constr) /* Returns the expression of a function concept. */ -tree +static tree get_returned_expression (tree fn) { /* Extract the body of the function minus the return expression. */ @@ -492,594 +468,468 @@ get_returned_expression (tree fn) /* Returns the initializer of a variable concept. */ -tree +static tree get_variable_initializer (tree var) { tree init = DECL_INITIAL (var); if (!init) return error_mark_node; + if (BRACE_ENCLOSED_INITIALIZER_P (init) + && CONSTRUCTOR_NELTS (init) == 1) + init = CONSTRUCTOR_ELT (init, 0)->value; return init; } /* Returns the definition of a variable or function concept. */ -tree +static tree get_concept_definition (tree decl) { + if (TREE_CODE (decl) == OVERLOAD) + decl = OVL_FIRST (decl); + + if (TREE_CODE (decl) == TEMPLATE_DECL) + decl = DECL_TEMPLATE_RESULT (decl); + + if (TREE_CODE (decl) == CONCEPT_DECL) + return DECL_INITIAL (decl); if (VAR_P (decl)) return get_variable_initializer (decl); - else if (TREE_CODE (decl) == FUNCTION_DECL) + if (TREE_CODE (decl) == FUNCTION_DECL) return get_returned_expression (decl); gcc_unreachable (); } -int expansion_level = 0; +/*--------------------------------------------------------------------------- + Normalization of expressions + +This set of functions will transform an expression into a constraint +in a sequence of steps. +---------------------------------------------------------------------------*/ -class expanding_concept_sentinel +void +debug_parameter_mapping (tree map) { -public: - expanding_concept_sentinel () - { - ++expansion_level; - } + for (tree p = map; p; p = TREE_CHAIN (p)) + { + tree parm = TREE_VALUE (p); + tree arg = TREE_PURPOSE (p); + if (TYPE_P (parm)) + verbatim ("MAP %qD TO %qT", TEMPLATE_TYPE_DECL (parm), arg); + else + verbatim ("MAP %qD TO %qE", TEMPLATE_PARM_DECL (parm), arg); + // debug_tree (parm); + // debug_tree (arg); + } +} - ~expanding_concept_sentinel() - { - --expansion_level; - } -}; +void +debug_argument_list (tree args) +{ + for (int i = 0; i < TREE_VEC_LENGTH (args); ++i) + { + tree arg = TREE_VEC_ELT (args, i); + if (TYPE_P (arg)) + verbatim ("ARG %qT", arg); + else + verbatim ("ARG %qE", arg); + } +} +/* Associate each parameter in PARMS with its corresponding template + argument in ARGS. */ -} /* namespace */ +static tree +map_arguments (tree parms, tree args) +{ + for (tree p = parms; p; p = TREE_CHAIN (p)) + { + int level; + int index; + template_parm_level_and_index (TREE_VALUE (p), &level, &index); + TREE_PURPOSE (p) = TMPL_ARG (args, level, index); + } + return parms; +} -/* Returns true when a concept is being expanded. */ +/* Build the parameter mapping for EXPR using ARGS. */ -bool -expanding_concept() +static tree +build_parameter_mapping (tree expr, tree args, tree decl) { - return expansion_level > 0; + int depth = 0; + if (decl) + { + gcc_assert (TREE_CODE (decl) == TEMPLATE_DECL); + tree parms = DECL_TEMPLATE_PARMS (decl); + depth = TREE_INT_CST_LOW (TREE_PURPOSE (parms)); + } + tree parms = find_template_parameters (expr, depth); + tree map = map_arguments (parms, args); + return map; } -/* Expand a concept declaration (not a template) and its arguments to - a constraint defined by the concept's initializer or definition. */ +/* True if the parameter mappings of two atomic constraints are equivalent. */ -tree -expand_concept (tree decl, tree args) +static bool +parameter_mapping_equivalent_p (tree t1, tree t2) { - expanding_concept_sentinel sentinel; + tree map1 = ATOMIC_CONSTR_MAP (t1); + tree map2 = ATOMIC_CONSTR_MAP (t2); + while (map1 && map2) + { + tree arg1 = TREE_PURPOSE (map1); + tree arg2 = TREE_PURPOSE (map2); + if (!template_args_equal (arg1, arg2)) + return false; + map1 = TREE_CHAIN (map1); + map2 = TREE_CHAIN (map2); + } + return true; +} - if (TREE_CODE (decl) == TEMPLATE_DECL) - decl = DECL_TEMPLATE_RESULT (decl); - tree tmpl = DECL_TI_TEMPLATE (decl); +/* Provides additional context for normalization. */ - /* Check for a previous specialization. */ - if (tree spec = get_concept_expansion (tmpl, args)) - return spec; +struct norm_info : subst_info +{ + norm_info(tsubst_flags_t complain) + : subst_info (tf_warning_or_error | complain, NULL_TREE), + context() + {} - /* Substitute the arguments to form a new definition expression. */ - tree def = get_concept_definition (decl); + /* Construct a top-level context for DECL. */ - ++processing_template_decl; - tree result = tsubst_expr (def, args, tf_none, NULL_TREE, true); - --processing_template_decl; - if (result == error_mark_node) - return error_mark_node; + norm_info (tree in_decl, tsubst_flags_t complain) + : subst_info (tf_warning_or_error | complain, in_decl), + context (make_context (in_decl)) + {} - /* And lastly, normalize it, check for implications, and save - the specialization for later. */ - tree norm = normalize_expression (result); - learn_implications (tmpl, args, norm); - return save_concept_expansion (tmpl, args, norm); -} + bool generate_diagnostics() const + { + return complain & tf_norm; + } + tree make_context(tree in_decl) + { + if (generate_diagnostics ()) + return build_tree_list (NULL_TREE, in_decl); + return NULL_TREE; + } -/*--------------------------------------------------------------------------- - Stepwise normalization of expressions + void update_context(tree expr, tree args) + { + if (generate_diagnostics ()) + { + tree map = build_parameter_mapping (expr, args, in_decl); + context = tree_cons (map, expr, context); + } + in_decl = get_concept_check_template (expr); + } -This set of functions will transform an expression into a constraint -in a sequence of steps. Normalization does not not look into concept -definitions. ----------------------------------------------------------------------------*/ + /* Provides information about the source of a constraint. This is a + TREE_LIST whose VALUE is either a concept check or a constrained + declaration. The PURPOSE, for concept checks is a parameter mapping + for that check. */ -/* Transform a logical-or or logical-and expression into either - a conjunction or disjunction. */ + tree context; +}; -tree -normalize_logical_operation (tree t, tree_code c) -{ - tree t0 = normalize_expression (TREE_OPERAND (t, 0)); - tree t1 = normalize_expression (TREE_OPERAND (t, 1)); - return build_nt (c, t0, t1); -} +static tree normalize_expression (tree, tree, norm_info); -/* A simple requirement T introduces an expression constraint - for its expression. */ +/* Transform a logical-or or logical-and expression into either + a conjunction or disjunction. */ -inline tree -normalize_simple_requirement (tree t) +static tree +normalize_logical_operation (tree t, tree args, tree_code c, norm_info info) { - return build_nt (EXPR_CONSTR, TREE_OPERAND (t, 0)); -} + tree t0 = normalize_expression (TREE_OPERAND (t, 0), args, info); + tree t1 = normalize_expression (TREE_OPERAND (t, 1), args, info); -/* A type requirement T introduce a type constraint for its type. */ + /* Build a new info object for the constraint. */ + tree ci = info.generate_diagnostics() + ? build_tree_list (t, info.context) + : NULL_TREE; -inline tree -normalize_type_requirement (tree t) -{ - return build_nt (TYPE_CONSTR, TREE_OPERAND (t, 0)); + return build2 (c, ci, t0, t1); } -/* A compound requirement T introduces a conjunction of constraints - depending on its form. The conjunction always includes an - expression constraint for the expression of the requirement. - If a trailing return type was specified, the conjunction includes - either an implicit conversion constraint or an argument deduction - constraint. If the noexcept specifier is present, the conjunction - includes an exception constraint. */ - -tree -normalize_compound_requirement (tree t) +static tree +normalize_concept_check (tree check, tree args, norm_info info) { - tree expr = TREE_OPERAND (t, 0); - tree constr = build_nt (EXPR_CONSTR, TREE_OPERAND (t, 0)); - - /* If a type is given, append an implicit conversion or - argument deduction constraint. */ - if (tree type = TREE_OPERAND (t, 1)) - { - tree type_constr; - /* TODO: We should be extracting a list of auto nodes - from type_uses_auto, not a single node */ - if (tree placeholder = type_uses_auto (type)) - type_constr = build_nt (DEDUCT_CONSTR, expr, type, placeholder); - else - type_constr = build_nt (ICONV_CONSTR, expr, type); - constr = conjoin_constraints (constr, type_constr); - } + tree id = unpack_concept_check (check); + tree tmpl = TREE_OPERAND (id, 0); + tree targs = TREE_OPERAND (id, 1); - /* If noexcept is present, append an exception constraint. */ - if (COMPOUND_REQ_NOEXCEPT_P (t)) + /* A function concept is wrapped in an overload. */ + if (TREE_CODE (tmpl) == OVERLOAD) { - tree except = build_nt (EXCEPT_CONSTR, expr); - constr = conjoin_constraints (constr, except); + /* TODO: Can we diagnose this error during parsing? */ + if (TREE_CODE (check) == TEMPLATE_ID_EXPR) + error_at (EXPR_LOC_OR_LOC (check, input_location), + "function concept must be called"); + tmpl = OVL_FIRST (tmpl); } - return constr; -} + /* Substitute through the arguments of the concept check. */ + targs = tsubst_template_args (targs, args, info.complain, info.in_decl); + if (targs == error_mark_node) + return error_mark_node; -/* A nested requirement T introduces a conjunction of constraints - corresponding to its constraint-expression. + /* Build the substitution for the concept definition. */ + tree parms = TREE_VALUE (DECL_TEMPLATE_PARMS (tmpl)); + /* Turn on template processing; coercing non-type template arguments + will automatically assume they're non-dependent. */ + ++processing_template_decl; + tree subst = coerce_template_parms (parms, targs, tmpl); + --processing_template_decl; + if (subst == error_mark_node) + return error_mark_node; - If the result of transforming T is error_mark_node, the resulting - constraint is a predicate constraint whose operand is also - error_mark_node. This preserves the constraint structure, but - will guarantee that the constraint is never satisfied. */ + /* The concept may have been ill-formed. */ + tree def = get_concept_definition (DECL_TEMPLATE_RESULT (tmpl)); + if (def == error_mark_node) + return error_mark_node; -inline tree -normalize_nested_requirement (tree t) -{ - return normalize_expression (TREE_OPERAND (t, 0)); + info.update_context (check, args); + return normalize_expression (def, subst, info); } -/* Transform a requirement T into one or more constraints. */ +/* The normal form of an atom depends on the expression. The normal + form of a function call to a function concept is a check constraint + for that concept. The normal form of a reference to a variable + concept is a check constraint for that concept. Otherwise, the + constraint is a predicate constraint. */ -tree -normalize_requirement (tree t) +static tree +normalize_atom (tree t, tree args, norm_info info) { - switch (TREE_CODE (t)) - { - case SIMPLE_REQ: - return normalize_simple_requirement (t); + /* Concept checks are not atomic. */ + if (concept_check_p (t)) + return normalize_concept_check (t, args, info); - case TYPE_REQ: - return normalize_type_requirement (t); + /* Build the parameter mapping for the atom. */ + tree map = build_parameter_mapping (t, args, info.in_decl); - case COMPOUND_REQ: - return normalize_compound_requirement (t); + /* Build a new info object for the atom. */ + tree ci = build_tree_list (t, info.context); - case NESTED_REQ: - return normalize_nested_requirement (t); + return build1 (ATOMIC_CONSTR, ci, map); +} + +/* Returns the normal form of an expression. */ +static tree +normalize_expression (tree t, tree args, norm_info info) +{ + if (!t) + return NULL_TREE; + + if (t == error_mark_node) + return error_mark_node; + + switch (TREE_CODE (t)) + { + case TRUTH_ANDIF_EXPR: + return normalize_logical_operation (t, args, CONJ_CONSTR, info); + case TRUTH_ORIF_EXPR: + return normalize_logical_operation (t, args, DISJ_CONSTR, info); default: - gcc_unreachable (); + return normalize_atom (t, args, info); } - return error_mark_node; } -/* Transform a sequence of requirements into a conjunction of - constraints. */ +/* Cache of the normalized form of constraints. Marked as deletable because it + can all be recalculated. */ +static GTY((deletable)) hash_map *normalized_map; -tree -normalize_requirements (tree t) +static tree +get_normalized_constraints (tree t, tree args, norm_info info) { - tree result = NULL_TREE; - for (; t; t = TREE_CHAIN (t)) - { - tree constr = normalize_requirement (TREE_VALUE (t)); - result = conjoin_constraints (result, constr); - } - return result; -} - -/* The normal form of a requires-expression is a parameterized - constraint having the same parameters and a conjunction of - constraints representing the normal form of requirements. */ - -tree -normalize_requires_expression (tree t) -{ - tree operand = normalize_requirements (TREE_OPERAND (t, 1)); - if (tree parms = TREE_OPERAND (t, 0)) - return build_nt (PARM_CONSTR, parms, operand); - else - return operand; + auto_timevar time (TV_CONSTRAINT_NORM); + return normalize_expression (t, args, info); } -/* For a template-id referring to a variable concept, returns - a check constraint. Otherwise, returns a predicate constraint. */ +/* Returns the normalized constraints from a constraint-info object + or NULL_TREE if the constraints are null. ARGS provide the initial + arguments for normalization and IN_DECL provides the declaration + to which the constraints belong. */ -tree -normalize_template_id_expression (tree t) +static tree +get_normalized_constraints_from_info (tree ci, tree args, tree in_decl, + bool diag = false) { - if (tree info = resolve_variable_concept_check (t)) - { - if (info == error_mark_node) - { - /* We get this when the template arguments don't match - the variable concept. */ - error ("invalid reference to concept %qE", t); - return error_mark_node; - } - - tree decl = TREE_VALUE (info); - tree args = TREE_PURPOSE (info); - return build_nt (CHECK_CONSTR, decl, args); - } - - /* Check that we didn't refer to a function concept like a variable. */ - tree fn = OVL_FIRST (TREE_OPERAND (t, 0)); - if (TREE_CODE (fn) == TEMPLATE_DECL - && DECL_DECLARED_CONCEPT_P (DECL_TEMPLATE_RESULT (fn))) - { - error_at (location_of (t), - "invalid reference to function concept %qD", fn); - return error_mark_node; - } - - return build_nt (PRED_CONSTR, t); -} - -/* For a call expression to a function concept, returns a check - constraint. Otherwise, returns a predicate constraint. */ + if (ci == NULL_TREE) + return NULL_TREE; -tree -normalize_call_expression (tree t) -{ - /* Try to resolve this function call as a concept. If not, then - it can be returned as a predicate constraint. */ - tree check = resolve_constraint_check (t); - if (!check) - return build_nt (PRED_CONSTR, t); - if (check == error_mark_node) - { - /* TODO: Improve diagnostics. We could report why the reference - is invalid. */ - error ("invalid reference to concept %qE", t); - return error_mark_node; - } + /* Substitution errors during normalization are fatal. */ + ++processing_template_decl; + norm_info info (in_decl, diag ? tf_norm : tf_none); + tree t = get_normalized_constraints (CI_ASSOCIATED_CONSTRAINTS (ci), + args, info); + --processing_template_decl; - tree fn = TREE_VALUE (check); - tree args = TREE_PURPOSE (check); - return build_nt (CHECK_CONSTR, fn, args); + return t; } -/* If T is a call to an overloaded && or || operator, diagnose that - as a non-SFINAEable error. Returns true if an error is emitted. - - TODO: It would be better to diagnose this at the point of definition, - if possible. Perhaps we should immediately do a first-pass normalization - of a concept definition to catch obvious non-dependent errors like - this. */ +/* Returns the normalized constraints for the declaration D. */ -bool -check_for_logical_overloads (tree t) +static tree +get_normalized_constraints_from_decl (tree d, bool diag = false) { - if (TREE_CODE (t) != CALL_EXPR) - return false; + tree tmpl; + tree decl; - tree fn = CALL_EXPR_FN (t); + /* For inherited constructors, consider the original declaration; + it has the correct template information attached. */ + d = strip_inheriting_ctors (d); - /* For member calls, try extracting the function from the - component ref. */ - if (TREE_CODE (fn) == COMPONENT_REF) + if (TREE_CODE (d) == TEMPLATE_DECL) { - fn = TREE_OPERAND (fn, 1); - if (TREE_CODE (fn) == BASELINK) - fn = BASELINK_FUNCTIONS (fn); + tmpl = d; + decl = DECL_TEMPLATE_RESULT (tmpl); } - - if (TREE_CODE (fn) != FUNCTION_DECL) - return false; - - if (DECL_OVERLOADED_OPERATOR_P (fn)) + else { - location_t loc = cp_expr_loc_or_input_loc (t); - error_at (loc, "constraint %qE, uses overloaded operator", t); - return true; + if (tree ti = DECL_TEMPLATE_INFO (d)) + tmpl = TI_TEMPLATE (ti); + else + tmpl = NULL_TREE; + decl = d; } - return false; -} + /* Get the most general template for the declaration, and compute + arguments from that. This ensures that the arguments used for + normalization are always template parameters and not arguments + used for outer specializations. For example: -/* The normal form of an atom depends on the expression. The normal - form of a function call to a function concept is a check constraint - for that concept. The normal form of a reference to a variable - concept is a check constraint for that concept. Otherwise, the - constraint is a predicate constraint. */ + template + struct S { + template requires C void f(U); + }; -tree -normalize_atom (tree t) -{ - /* We can get constraints pushed down through pack expansions, so - just return them. */ - if (constraint_p (t)) - return t; + S::f(0); - tree type = TREE_TYPE (t); - if (!type || type_unknown_p (t) || TREE_CODE (type) == TEMPLATE_TYPE_PARM) - ; - else if (!dependent_type_p (type)) - { - if (check_for_logical_overloads (t)) - return error_mark_node; + When we normalize the requirements for S::f, we want the + arguments to be {T, U}, not {int, U}. One reason for this is that + accepting the latter causes the template parameter level of U + to be reduced in a way that makes it overly difficult substitute + concrete arguments (i.e., eventually {int, int} during satisfaction. */ + if (tmpl) + { + if (DECL_LANG_SPECIFIC(tmpl) && !DECL_TEMPLATE_SPECIALIZATION (tmpl)) + tmpl = most_general_template (tmpl); + } - type = cv_unqualified (type); - if (!same_type_p (type, boolean_type_node)) - { - error ("predicate constraint %q+E does not have type %", t); - return error_mark_node; - } - } + /* If we're not diagnosing errors, use cached constraints, if any. */ + if (!diag) + if (tree *p = hash_map_safe_get (normalized_map, tmpl)) + return *p; - if (TREE_CODE (t) == TEMPLATE_ID_EXPR) - return normalize_template_id_expression (t); - if (TREE_CODE (t) == CALL_EXPR) - return normalize_call_expression (t); - return build_nt (PRED_CONSTR, t); -} + tree args = generic_targs_for (tmpl); + tree ci = get_constraints (decl); + tree norm = get_normalized_constraints_from_info (ci, args, tmpl, diag); -/* Push down the pack expansion EXP into the leaves of the constraint PAT. */ + if (!diag) + hash_map_safe_put (normalized_map, tmpl, norm); -tree -push_down_pack_expansion (tree exp, tree pat) -{ - switch (TREE_CODE (pat)) - { - case CONJ_CONSTR: - case DISJ_CONSTR: - { - pat = copy_node (pat); - TREE_OPERAND (pat, 0) - = push_down_pack_expansion (exp, TREE_OPERAND (pat, 0)); - TREE_OPERAND (pat, 1) - = push_down_pack_expansion (exp, TREE_OPERAND (pat, 1)); - return pat; - } - default: - { - exp = copy_node (exp); - SET_PACK_EXPANSION_PATTERN (exp, pat); - return exp; - } - } + return norm; } -/* Transform a pack expansion into a constraint. First we transform the - pattern of the pack expansion, then we push the pack expansion down into the - leaves of the constraint so that partial ordering will work. */ +/* Returns the normal form of TMPL's definition. */ -tree -normalize_pack_expansion (tree t) -{ - tree pat = normalize_expression (PACK_EXPANSION_PATTERN (t)); - return push_down_pack_expansion (t, pat); +static tree +normalize_concept_definition (tree tmpl) +{ + if (tree *p = hash_map_safe_get (normalized_map, tmpl)) + return *p; + gcc_assert (concept_definition_p (tmpl)); + if (OVL_P (tmpl)) + tmpl = OVL_FIRST (tmpl); + gcc_assert (TREE_CODE (tmpl) == TEMPLATE_DECL); + tree args = generic_targs_for (tmpl); + tree def = get_concept_definition (DECL_TEMPLATE_RESULT (tmpl)); + ++processing_template_decl; + norm_info info (tmpl, tf_none); + tree norm = get_normalized_constraints (def, args, info); + --processing_template_decl; + hash_map_safe_put (normalized_map, tmpl, norm); + return norm; } -/* Transform an expression into a constraint. */ - -tree -normalize_any_expression (tree t) -{ - switch (TREE_CODE (t)) - { - case TRUTH_ANDIF_EXPR: - return normalize_logical_operation (t, CONJ_CONSTR); - - case TRUTH_ORIF_EXPR: - return normalize_logical_operation (t, DISJ_CONSTR); - - case REQUIRES_EXPR: - return normalize_requires_expression (t); - - case BIND_EXPR: - return normalize_expression (BIND_EXPR_BODY (t)); - - case EXPR_PACK_EXPANSION: - return normalize_pack_expansion (t); - - default: - /* All other constraints are atomic. */ - return normalize_atom (t); - } -} +/* Returns the normal form of TMPL's requirements. */ -/* Transform a statement into an expression. */ -tree -normalize_any_statement (tree t) +static tree +normalize_template_requirements (tree tmpl, bool diag = false) { - switch (TREE_CODE (t)) - { - case RETURN_EXPR: - return normalize_expression (TREE_OPERAND (t, 0)); - default: - gcc_unreachable (); - } - return error_mark_node; + return get_normalized_constraints_from_decl (tmpl, diag); } -/* Reduction rules for the declaration T. */ +/* Returns the normal form of TMPL's requirements. */ -tree -normalize_any_declaration (tree t) +static tree +normalize_nontemplate_requirements (tree decl, bool diag = false) { - switch (TREE_CODE (t)) - { - case VAR_DECL: - return normalize_atom (t); - default: - gcc_unreachable (); - } - return error_mark_node; + return get_normalized_constraints_from_decl (decl, diag); } -/* Returns the normal form of a constraint expression. */ +/* Normalize an EXPR as a constraint. */ -tree -normalize_expression (tree t) +static tree +normalize_constraint_expression (tree expr, bool diag = false) { - if (!t) - return NULL_TREE; - - if (t == error_mark_node) - return error_mark_node; + if (!expr || expr == error_mark_node) + return expr; - switch (TREE_CODE_CLASS (TREE_CODE (t))) + /* For concept checks, use the supplied template arguments as those used + for normalization. Otherwise, there are no template arguments. */ + tree args; + if (concept_check_p (expr)) { - case tcc_unary: - case tcc_binary: - case tcc_expression: - case tcc_vl_exp: - return normalize_any_expression (t); - - case tcc_statement: - return normalize_any_statement (t); - - case tcc_declaration: - return normalize_any_declaration (t); - - case tcc_exceptional: - case tcc_constant: - case tcc_reference: - case tcc_comparison: - /* These are all atomic predicate constraints. */ - return normalize_atom (t); - - default: - /* Unhandled node kind. */ - gcc_unreachable (); + tree id = unpack_concept_check (expr); + args = TREE_OPERAND (id, 1); } - return error_mark_node; -} - - -/*--------------------------------------------------------------------------- - Constraint normalization ----------------------------------------------------------------------------*/ - -tree normalize_constraint (tree); - -/* The normal form of the disjunction T0 /\ T1 is the conjunction - of the normal form of T0 and the normal form of T1. */ - -inline tree -normalize_conjunction (tree t) -{ - tree t0 = normalize_constraint (TREE_OPERAND (t, 0)); - tree t1 = normalize_constraint (TREE_OPERAND (t, 1)); - return build_nt (CONJ_CONSTR, t0, t1); -} - -/* The normal form of the disjunction T0 \/ T1 is the disjunction - of the normal form of T0 and the normal form of T1. */ - -inline tree -normalize_disjunction (tree t) -{ - tree t0 = normalize_constraint (TREE_OPERAND (t, 0)); - tree t1 = normalize_constraint (TREE_OPERAND (t, 1)); - return build_nt (DISJ_CONSTR, t0, t1); -} - -/* A predicate constraint is normalized in two stages. First all - references specializations of concepts are replaced by their - substituted definitions. Then, the resulting expression is - transformed into a constraint by transforming && expressions - into conjunctions and || into disjunctions. */ + else + args = NULL_TREE; -tree -normalize_predicate_constraint (tree t) -{ ++processing_template_decl; - tree expr = PRED_CONSTR_EXPR (t); - tree constr = normalize_expression (expr); + norm_info info (diag ? tf_norm : tf_none); + tree norm = get_normalized_constraints (expr, args, info); --processing_template_decl; - return constr; + return norm; } -/* The normal form of a parameterized constraint is the normal - form of its operand. */ +/* 17.4.1.2p2. Two constraints are identical if they are formed + from the same expression and the targets of the parameter mapping + are equivalent. */ -tree -normalize_parameterized_constraint (tree t) +bool +atomic_constraints_identical_p (tree t1, tree t2) { - tree parms = PARM_CONSTR_PARMS (t); - tree operand = normalize_constraint (PARM_CONSTR_OPERAND (t)); - return build_nt (PARM_CONSTR, parms, operand); -} + if (ATOMIC_CONSTR_EXPR (t1) != ATOMIC_CONSTR_EXPR (t2)) + return false; -/* Normalize the constraint T by reducing it so that it is - comprised of only conjunctions and disjunctions of atomic - constraints. */ + if (!parameter_mapping_equivalent_p (t1, t2)) + return false; -tree -normalize_constraint (tree t) -{ - if (!t) - return NULL_TREE; + return true; +} - if (t == error_mark_node) - return t; +hashval_t +hash_atomic_constraint (tree t) +{ + /* Hash the identity of the expression. */ + hashval_t val = htab_hash_pointer (ATOMIC_CONSTR_EXPR (t)); - switch (TREE_CODE (t)) + /* Hash the targets of the parameter map. */ + tree p = ATOMIC_CONSTR_MAP (t); + while (p) { - case CONJ_CONSTR: - return normalize_conjunction (t); - - case DISJ_CONSTR: - return normalize_disjunction (t); - - case PRED_CONSTR: - return normalize_predicate_constraint (t); - - case PARM_CONSTR: - return normalize_parameterized_constraint (t); - - case EXPR_CONSTR: - case TYPE_CONSTR: - case ICONV_CONSTR: - case DEDUCT_CONSTR: - case EXCEPT_CONSTR: - /* These constraints are defined to be atomic. */ - return t; - - default: - /* CONSTR was not a constraint. */ - gcc_unreachable(); + val = iterative_hash_template_arg (TREE_PURPOSE (p), val); + p = TREE_CHAIN (p); } - return error_mark_node; -} - + return val; +} // -------------------------------------------------------------------------- // // Constraint Semantic Processing @@ -1093,7 +943,7 @@ current_template_constraints (void) { if (!current_template_parms) return NULL_TREE; - tree tmpl_constr = TEMPLATE_PARM_CONSTRAINTS (current_template_parms); + tree tmpl_constr = TEMPLATE_PARMS_CONSTRAINTS (current_template_parms); return build_constraints (tmpl_constr, NULL_TREE); } @@ -1104,7 +954,7 @@ current_template_constraints (void) tree associate_classtype_constraints (tree type) { - if (!type || type == error_mark_node || TREE_CODE (type) != RECORD_TYPE) + if (!type || type == error_mark_node || !CLASS_TYPE_P (type)) return type; /* An explicit class template specialization has no template parameters. */ @@ -1124,9 +974,11 @@ associate_classtype_constraints (tree type) { if (!equivalent_constraints (ci, orig_ci)) { - // FIXME: Improve diagnostics. - error ("%qT does not match any declaration", type); - return error_mark_node; + error ("%qT does not match original declaration", type); + tree tmpl = CLASSTYPE_TI_TEMPLATE (type); + location_t loc = DECL_SOURCE_LOCATION (tmpl); + inform (loc, "original template declaration here"); + /* Fall through, so that we define the type anyway. */ } return type; } @@ -1135,17 +987,14 @@ associate_classtype_constraints (tree type) return type; } -namespace { +/* Create an empty constraint info block. */ -// Create an empty constraint info block. -inline tree_constraint_info* +static inline tree_constraint_info* build_constraint_info () { return (tree_constraint_info *)make_node (CONSTRAINT_INFO); } -} // namespace - /* Build a constraint-info object that contains the associated constraints of a declaration. This also includes the declaration's template requirements (TREQS) and any trailing requirements for a function @@ -1155,27 +1004,46 @@ build_constraint_info () this returns NULL_TREE, indicating an unconstrained declaration. */ tree -build_constraints (tree tmpl_reqs, tree decl_reqs) +build_constraints (tree tr, tree dr) { - gcc_assert (tmpl_reqs ? constraint_p (tmpl_reqs) : true); - gcc_assert (decl_reqs ? constraint_p (decl_reqs) : true); - - if (!tmpl_reqs && !decl_reqs) + if (!tr && !dr) return NULL_TREE; tree_constraint_info* ci = build_constraint_info (); - ci->template_reqs = tmpl_reqs; - ci->declarator_reqs = decl_reqs; - ci->associated_constr = conjoin_constraints (tmpl_reqs, decl_reqs); + ci->template_reqs = tr; + ci->declarator_reqs = dr; + ci->associated_constr = combine_constraint_expressions (tr, dr); return (tree)ci; } -namespace { +/* Returns the template-head requires clause for the template + declaration T or NULL_TREE if none. */ + +tree +get_template_head_requirements (tree t) +{ + tree ci = get_constraints (t); + if (!ci) + return NULL_TREE; + return CI_TEMPLATE_REQS (ci); +} + +/* Returns the trailing requires clause of the declarator of + a template declaration T or NULL_TREE if none. */ + +tree +get_trailing_function_requirements (tree t) +{ + tree ci = get_constraints (t); + if (!ci) + return NULL_TREE; + return CI_DECLARATOR_REQS (ci); +} /* Construct a sequence of template arguments by prepending ARG to REST. Either ARG or REST may be null. */ -tree +static tree build_concept_check_arguments (tree arg, tree rest) { gcc_assert (rest ? TREE_CODE (rest) == TREE_VEC : true); @@ -1199,27 +1067,155 @@ build_concept_check_arguments (tree arg, tree rest) return args; } -} // namespace +/* Builds an id-expression of the form `C()` where C is a function + concept. */ + +static tree +build_function_check (tree tmpl, tree args, tsubst_flags_t /*complain*/) +{ + if (TREE_CODE (tmpl) == TEMPLATE_DECL) + { + /* If we just got a template, wrap it in an overload so it looks like any + other template-id. */ + tmpl = ovl_make (tmpl); + TREE_TYPE (tmpl) = boolean_type_node; + } + + /* Perform function concept resolution now so we always have a single + function of the overload set (even if we started with only one; the + resolution function converts template arguments). Note that we still + wrap this in an overload set so we don't upset other parts of the + compiler that expect template-ids referring to function concepts + to have an overload set. */ + tree info = resolve_function_concept_overload (tmpl, args); + if (info == error_mark_node) + return error_mark_node; + if (!info) + { + error ("no matching concepts for %qE", tmpl); + return error_mark_node; + } + args = TREE_PURPOSE (info); + tmpl = DECL_TI_TEMPLATE (TREE_VALUE (info)); + + /* Rebuild the singleton overload set; mark the type bool. */ + tmpl = ovl_make (tmpl, NULL_TREE); + TREE_TYPE (tmpl) = boolean_type_node; + + /* Build the id-expression around the overload set. */ + tree id = build2 (TEMPLATE_ID_EXPR, boolean_type_node, tmpl, args); + + /* Finally, build the call expression around the overload. */ + ++processing_template_decl; + vec *fargs = make_tree_vector (); + tree call = build_min_nt_call_vec (id, fargs); + release_tree_vector (fargs); + --processing_template_decl; + + return call; +} + +/* Builds an id-expression of the form `C` where C is a variable + concept. */ + +static tree +build_variable_check (tree tmpl, tree args, tsubst_flags_t complain) +{ + gcc_assert (variable_concept_p (tmpl)); + gcc_assert (TREE_CODE (tmpl) == TEMPLATE_DECL); + tree parms = INNERMOST_TEMPLATE_PARMS (DECL_TEMPLATE_PARMS (tmpl)); + args = coerce_template_parms (parms, args, tmpl, complain); + if (args == error_mark_node) + return error_mark_node; + return build2 (TEMPLATE_ID_EXPR, boolean_type_node, tmpl, args); +} + +/* Builds an id-expression of the form `C` where C is a standard + concept. */ + +static tree +build_standard_check (tree tmpl, tree args, tsubst_flags_t complain) +{ + gcc_assert (standard_concept_p (tmpl)); + gcc_assert (TREE_CODE (tmpl) == TEMPLATE_DECL); + tree parms = INNERMOST_TEMPLATE_PARMS (DECL_TEMPLATE_PARMS (tmpl)); + args = coerce_template_parms (parms, args, tmpl, complain); + if (args == error_mark_node) + return error_mark_node; + return build2 (TEMPLATE_ID_EXPR, boolean_type_node, tmpl, args); +} + +/* Construct an expression that checks TARGET using ARGS. */ -/* Construct an expression that checks the concept given by - TARGET. The TARGET must be: +tree +build_concept_check (tree target, tree args, tsubst_flags_t complain) +{ + return build_concept_check (target, NULL_TREE, args, complain); +} - - an OVERLOAD referring to one or more function concepts - - a BASELINK referring to an overload set of the above, or - - a TEMPLTATE_DECL referring to a variable concept. +/* Construct an expression that checks the concept given by DECL. If + concept_definition_p (DECL) is false, this returns null. */ - ARG and REST are the explicit template arguments for the - eventual concept check. */ tree -build_concept_check (tree target, tree arg, tree rest) +build_concept_check (tree decl, tree arg, tree rest, tsubst_flags_t complain) { + if (arg == NULL_TREE && rest == NULL_TREE) + { + tree id = build_nt (TEMPLATE_ID_EXPR, decl, rest); + error ("invalid use concept %qE", id); + return error_mark_node; + } + tree args = build_concept_check_arguments (arg, rest); - if (variable_template_p (target)) - return build_variable_check (lookup_template_variable (target, args)); - else - return build_call_check (lookup_template_function (target, args)); + + if (standard_concept_p (decl)) + return build_standard_check (decl, args, complain); + if (variable_concept_p (decl)) + return build_variable_check (decl, args, complain); + if (function_concept_p (decl)) + return build_function_check (decl, args, complain); + + return error_mark_node; +} + +/* Build a template-id that can participate in a concept check. */ + +static tree +build_concept_id (tree decl, tree args) +{ + tree check = build_concept_check (decl, args, tf_warning_or_error); + if (check == error_mark_node) + return error_mark_node; + return unpack_concept_check (check); +} + +/* Build a template-id that can participate in a concept check, preserving + the source location of the original template-id. */ + +tree +build_concept_id (tree expr) +{ + gcc_assert (TREE_CODE (expr) == TEMPLATE_ID_EXPR); + tree id = build_concept_id (TREE_OPERAND (expr, 0), TREE_OPERAND (expr, 1)); + protected_set_expr_location (id, cp_expr_location (expr)); + return id; } +/* Build as template-id with a placeholder that can be used as a + type constraint. + + Note that this will diagnose errors if the initial concept check + cannot be built. */ + +tree +build_type_constraint (tree decl, tree args, tsubst_flags_t complain) +{ + tree wildcard = build_nt (WILDCARD_DECL); + tree check = build_concept_check (decl, wildcard, args, complain); + if (check == error_mark_node) + return error_mark_node; + return unpack_concept_check (check); +} /* Returns a TYPE_DECL that contains sufficient information to build a template parameter of the same kind as PROTO and @@ -1240,17 +1236,13 @@ build_constrained_parameter (tree cnc, tree proto, tree args) return decl; } -/* Create a constraint expression for the given DECL that - evaluates the requirements specified by CONSTR, a TYPE_DECL - that contains all the information necessary to build the - requirements (see finish_concept_name for the layout of - that TYPE_DECL). - - Note that the constraints are neither reduced nor decomposed. - That is done only after the requires clause has been parsed - (or not). +/* Create a constraint expression for the given DECL that evaluates the + requirements specified by CONSTR, a TYPE_DECL that contains all the + information necessary to build the requirements (see finish_concept_name + for the layout of that TYPE_DECL). - This will always return a CHECK_CONSTR. */ + Note that the constraints are neither reduced nor decomposed. That is + done only after the requires clause has been parsed (or not). */ tree finish_shorthand_constraint (tree decl, tree constr) { @@ -1265,41 +1257,46 @@ finish_shorthand_constraint (tree decl, tree constr) tree con = CONSTRAINED_PARM_CONCEPT (constr); tree args = CONSTRAINED_PARM_EXTRA_ARGS (constr); - /* If the parameter declaration is variadic, but the concept - is not then we need to apply the concept to every element - in the pack. */ - bool is_proto_pack = template_parameter_pack_p (proto); - bool is_decl_pack = template_parameter_pack_p (decl); - bool apply_to_all_p = is_decl_pack && !is_proto_pack; + /* The TS lets use shorthand to constrain a pack of arguments, but the + standard does not. + + For the TS, consider: + + template struct s; + + If C is variadic (and because Ts is a pack), we associate the + constraint C. In all other cases, we associate + the constraint (C && ...). + + The standard behavior cannot be overridden by -fconcepts-ts. */ + bool variadic_concept_p = template_parameter_pack_p (proto); + bool declared_pack_p = template_parameter_pack_p (decl); + bool apply_to_each_p = (cxx_dialect >= cxx2a) ? true : !variadic_concept_p; /* Get the argument and overload used for the requirement and adjust it if we're going to expand later. */ tree arg = template_parm_to_arg (build_tree_list (NULL_TREE, decl)); - if (apply_to_all_p) + if (apply_to_each_p && declared_pack_p) arg = PACK_EXPANSION_PATTERN (TREE_VEC_ELT (ARGUMENT_PACK_ARGS (arg), 0)); - /* Build the concept check. If it the constraint needs to be - applied to all elements of the parameter pack, then make - the constraint an expansion. */ + /* Build the concept constraint-expression. */ tree tmpl = DECL_TI_TEMPLATE (con); - tree check = VAR_P (con) ? tmpl : ovl_make (tmpl); - check = build_concept_check (check, arg, args); + tree check = tmpl; + if (TREE_CODE (con) == FUNCTION_DECL) + check = ovl_make (tmpl); + check = build_concept_check (check, arg, args, tf_warning_or_error); - /* Make the check a pack expansion if needed. + /* Make the check a fold-expression if needed. */ + if (apply_to_each_p && declared_pack_p) + check = finish_left_unary_fold_expr (check, TRUTH_ANDIF_EXPR); - FIXME: We should be making a fold expression. */ - if (apply_to_all_p) - { - check = make_pack_expansion (check); - TREE_TYPE (check) = boolean_type_node; - } - - return normalize_expression (check); + return check; } /* Returns a conjunction of shorthand requirements for the template parameter list PARMS. Note that the requirements are stored in the TYPE of each tree node. */ + tree get_shorthand_constraints (tree parms) { @@ -1309,94 +1306,219 @@ get_shorthand_constraints (tree parms) { tree parm = TREE_VEC_ELT (parms, i); tree constr = TEMPLATE_PARM_CONSTRAINTS (parm); - result = conjoin_constraints (result, constr); + result = combine_constraint_expressions (result, constr); } return result; } -// Returns and chains a new parameter for PARAMETER_LIST which will conform -// to the prototype given by SRC_PARM. The new parameter will have its -// identifier and location set according to IDENT and PARM_LOC respectively. +/* Get the deduced wildcard from a DEDUCED placeholder. If the deduced + wildcard is a pack, return the first argument of that pack. */ + static tree -process_introduction_parm (tree parameter_list, tree src_parm) +get_deduced_wildcard (tree wildcard) { - // If we have a pack, we should have a single pack argument which is the - // placeholder we want to look at. - bool is_parameter_pack = ARGUMENT_PACK_P (src_parm); - if (is_parameter_pack) - src_parm = TREE_VEC_ELT (ARGUMENT_PACK_ARGS (src_parm), 0); + if (ARGUMENT_PACK_P (wildcard)) + wildcard = TREE_VEC_ELT (ARGUMENT_PACK_ARGS (wildcard), 0); + gcc_assert (TREE_CODE (wildcard) == WILDCARD_DECL); + return wildcard; +} - // At this point we should have a wildcard, but we want to - // grab the associated decl from it. Also grab the stored - // identifier and location that should be chained to it in - // a PARM_DECL. - gcc_assert (TREE_CODE (src_parm) == WILDCARD_DECL); +/* Returns the prototype parameter for the nth deduced wildcard. */ - tree ident = DECL_NAME (src_parm); - location_t parm_loc = DECL_SOURCE_LOCATION (src_parm); +static tree +get_introduction_prototype (tree wildcards, int index) +{ + return TREE_TYPE (get_deduced_wildcard (TREE_VEC_ELT (wildcards, index))); +} - // If we expect a pack and the deduced template is not a pack, or if the - // template is using a pack and we didn't declare a pack, throw an error. - if (is_parameter_pack != WILDCARD_PACK_P (src_parm)) - { - error_at (parm_loc, "cannot match pack for introduced parameter"); - tree err_parm = build_tree_list (error_mark_node, error_mark_node); - return chainon (parameter_list, err_parm); - } +/* Introduce a type template parameter. */ - src_parm = TREE_TYPE (src_parm); +static tree +introduce_type_template_parameter (tree wildcard, bool& non_type_p) +{ + non_type_p = false; + return finish_template_type_parm (class_type_node, DECL_NAME (wildcard)); +} + +/* Introduce a template template parameter. */ + +static tree +introduce_template_template_parameter (tree wildcard, bool& non_type_p) +{ + non_type_p = false; + begin_template_parm_list (); + current_template_parms = DECL_TEMPLATE_PARMS (TREE_TYPE (wildcard)); + end_template_parm_list (); + return finish_template_template_parm (class_type_node, DECL_NAME (wildcard)); +} + +/* Introduce a template non-type parameter. */ + +static tree +introduce_nontype_template_parameter (tree wildcard, bool& non_type_p) +{ + non_type_p = true; + tree parm = copy_decl (TREE_TYPE (wildcard)); + DECL_NAME (parm) = DECL_NAME (wildcard); + return parm; +} + +/* Introduce a single template parameter. */ + +static tree +build_introduced_template_parameter (tree wildcard, bool& non_type_p) +{ + tree proto = TREE_TYPE (wildcard); tree parm; - bool is_non_type; - if (TREE_CODE (src_parm) == TYPE_DECL) + if (TREE_CODE (proto) == TYPE_DECL) + parm = introduce_type_template_parameter (wildcard, non_type_p); + else if (TREE_CODE (proto) == TEMPLATE_DECL) + parm = introduce_template_template_parameter (wildcard, non_type_p); + else + parm = introduce_nontype_template_parameter (wildcard, non_type_p); + + /* Wrap in a TREE_LIST for process_template_parm. Note that introduced + parameters do not retain the defaults from the source parameter. */ + return build_tree_list (NULL_TREE, parm); +} + +/* Introduce a single template parameter. */ + +static tree +introduce_template_parameter (tree parms, tree wildcard) +{ + gcc_assert (!ARGUMENT_PACK_P (wildcard)); + tree proto = TREE_TYPE (wildcard); + location_t loc = DECL_SOURCE_LOCATION (wildcard); + + /* Diagnose the case where we have C{...Args}. */ + if (WILDCARD_PACK_P (wildcard)) { - is_non_type = false; - parm = finish_template_type_parm (class_type_node, ident); + tree id = DECL_NAME (wildcard); + error_at (loc, "%qE cannot be introduced with an ellipsis %<...%>", id); + inform (DECL_SOURCE_LOCATION (proto), "prototype declared here"); } - else if (TREE_CODE (src_parm) == TEMPLATE_DECL) + + bool non_type_p; + tree parm = build_introduced_template_parameter (wildcard, non_type_p); + return process_template_parm (parms, loc, parm, non_type_p, false); +} + +/* Introduce a template parameter pack. */ + +static tree +introduce_template_parameter_pack (tree parms, tree wildcard) +{ + bool non_type_p; + tree parm = build_introduced_template_parameter (wildcard, non_type_p); + location_t loc = DECL_SOURCE_LOCATION (wildcard); + return process_template_parm (parms, loc, parm, non_type_p, true); +} + +/* Introduce the nth template parameter. */ + +static tree +introduce_template_parameter (tree parms, tree wildcards, int& index) +{ + tree deduced = TREE_VEC_ELT (wildcards, index++); + return introduce_template_parameter (parms, deduced); +} + +/* Introduce either a template parameter pack or a list of template + parameters. */ + +static tree +introduce_template_parameters (tree parms, tree wildcards, int& index) +{ + /* If the prototype was a parameter, we better have deduced an + argument pack, and that argument must be the last deduced value + in the wildcard vector. */ + tree deduced = TREE_VEC_ELT (wildcards, index++); + gcc_assert (ARGUMENT_PACK_P (deduced)); + gcc_assert (index == TREE_VEC_LENGTH (wildcards)); + + /* Introduce each element in the pack. */ + tree args = ARGUMENT_PACK_ARGS (deduced); + for (int i = 0; i < TREE_VEC_LENGTH (args); ++i) { - is_non_type = false; - begin_template_parm_list (); - current_template_parms = DECL_TEMPLATE_PARMS (src_parm); - end_template_parm_list (); - parm = finish_template_template_parm (class_type_node, ident); + tree arg = TREE_VEC_ELT (args, i); + if (WILDCARD_PACK_P (arg)) + parms = introduce_template_parameter_pack (parms, arg); + else + parms = introduce_template_parameter (parms, arg); } + + return parms; +} + +/* Builds the template parameter list PARMS by chaining introduced + parameters from the WILDCARD vector. INDEX is the position of + the current parameter. */ + +static tree +process_introduction_parms (tree parms, tree wildcards, int& index) +{ + tree proto = get_introduction_prototype (wildcards, index); + if (template_parameter_pack_p (proto)) + return introduce_template_parameters (parms, wildcards, index); else - { - is_non_type = true; + return introduce_template_parameter (parms, wildcards, index); +} - // Since we don't have a declarator, so we can copy the source - // parameter and change the name and eventually the location. - parm = copy_decl (src_parm); - DECL_NAME (parm) = ident; - } +/* Ensure that all template parameters have been introduced for the concept + named in CHECK. If not, emit a diagnostic. - // Wrap in a TREE_LIST for process_template_parm. Introductions do not - // retain the defaults from the source template. - parm = build_tree_list (NULL_TREE, parm); + Note that implicitly introducing a parameter with a default argument + creates a case where a parameter is declared, but unnamed, making + it unusable in the definition. */ - return process_template_parm (parameter_list, parm_loc, parm, - is_non_type, is_parameter_pack); +static bool +check_introduction_list (tree intros, tree check) +{ + check = unpack_concept_check (check); + tree tmpl = TREE_OPERAND (check, 0); + if (OVL_P (tmpl)) + tmpl = OVL_FIRST (tmpl); + + tree parms = DECL_INNERMOST_TEMPLATE_PARMS (tmpl); + if (TREE_VEC_LENGTH (intros) < TREE_VEC_LENGTH (parms)) + { + error_at (input_location, "all template parameters of %qD must " + "be introduced", tmpl); + return false; + } + + return true; } -/* Associates a constraint check to the current template based - on the introduction parameters. INTRO_LIST must be a TREE_VEC - of WILDCARD_DECLs containing a chained PARM_DECL which - contains the identifier as well as the source location. - TMPL_DECL is the decl for the concept being used. If we - take a concept, C, this will form a check in the form of - C filling in any extra arguments needed by the - defaults deduced. +/* Associates a constraint check to the current template based on the + introduction parameters. INTRO_LIST must be a TREE_VEC of WILDCARD_DECLs + containing a chained PARM_DECL which contains the identifier as well as + the source location. TMPL_DECL is the decl for the concept being used. + If we take a concept, C, this will form a check in the form of + C filling in any extra arguments needed by the defaults + deduced. + + Returns NULL_TREE if no concept could be matched and error_mark_node if + an error occurred when matching. */ - Returns NULL_TREE if no concept could be matched and - error_mark_node if an error occurred when matching. */ tree -finish_template_introduction (tree tmpl_decl, tree intro_list) +finish_template_introduction (tree tmpl_decl, + tree intro_list, + location_t intro_loc) { - /* Deduce the concept check. */ - tree expr = build_concept_check (tmpl_decl, NULL_TREE, intro_list); + /* Build a concept check to deduce the actual parameters. */ + tree expr = build_concept_check (tmpl_decl, intro_list, tf_none); if (expr == error_mark_node) - return NULL_TREE; + { + error_at (intro_loc, "cannot deduce template parameters from " + "introduction list"); + return error_mark_node; + } + + if (!check_introduction_list (intro_list, expr)) + return error_mark_node; tree parms = deduce_concept_introduction (expr); if (!parms) @@ -1406,9 +1528,15 @@ finish_template_introduction (tree tmpl_decl, tree intro_list) tree parm_list = NULL_TREE; begin_template_parm_list (); int nargs = MIN (TREE_VEC_LENGTH (parms), TREE_VEC_LENGTH (intro_list)); - for (int n = 0; n < nargs; ++n) - parm_list = process_introduction_parm (parm_list, TREE_VEC_ELT (parms, n)); + for (int n = 0; n < nargs; ) + parm_list = process_introduction_parms (parm_list, parms, n); parm_list = end_template_parm_list (parm_list); + + /* Update the number of arguments to reflect the number of deduced + template parameter introductions. */ + nargs = TREE_VEC_LENGTH (parm_list); + + /* Determine if any errors occurred during matching. */ for (int i = 0; i < TREE_VEC_LENGTH (parm_list); ++i) if (TREE_VALUE (TREE_VEC_ELT (parm_list, i)) == error_mark_node) { @@ -1417,7 +1545,7 @@ finish_template_introduction (tree tmpl_decl, tree intro_list) } /* Build a concept check for our constraint. */ - tree check_args = make_tree_vec (TREE_VEC_LENGTH (parms)); + tree check_args = make_tree_vec (nargs); int n = 0; for (; n < TREE_VEC_LENGTH (parm_list); ++n) { @@ -1431,22 +1559,33 @@ finish_template_introduction (tree tmpl_decl, tree intro_list) for (; n < TREE_VEC_LENGTH (parms); ++n) TREE_VEC_ELT (check_args, n) = TREE_VEC_ELT (parms, n); - /* Associate the constraint. */ - tree check = build_concept_check (tmpl_decl, NULL_TREE, check_args); - tree constr = normalize_expression (check); - TEMPLATE_PARMS_CONSTRAINTS (current_template_parms) = constr; + /* Associate the constraint. */ + tree check = build_concept_check (tmpl_decl, + check_args, + tf_warning_or_error); + TEMPLATE_PARMS_CONSTRAINTS (current_template_parms) = check; return parm_list; } -/* Given the predicate constraint T from a constrained-type-specifier, extract +/* Given the concept check T from a constrained-type-specifier, extract its TMPL and ARGS. FIXME why do we need two different forms of constrained-type-specifier? */ void placeholder_extract_concept_and_args (tree t, tree &tmpl, tree &args) { + if (concept_check_p (t)) + { + t = unpack_concept_check (t); + tmpl = TREE_OPERAND (t, 0); + if (TREE_CODE (tmpl) == OVERLOAD) + tmpl = OVL_FIRST (tmpl); + args = TREE_OPERAND (t, 1); + return; + } + if (TREE_CODE (t) == TYPE_DECL) { /* A constrained parameter. Build a constraint check @@ -1457,20 +1596,10 @@ placeholder_extract_concept_and_args (tree t, tree &tmpl, tree &args) placeholder_extract_concept_and_args (check, tmpl, args); return; } - - if (TREE_CODE (t) == CHECK_CONSTR) - { - tree decl = CHECK_CONSTR_CONCEPT (t); - tmpl = DECL_TI_TEMPLATE (decl); - args = CHECK_CONSTR_ARGS (t); - return; - } - - gcc_unreachable (); } /* Returns true iff the placeholders C1 and C2 are equivalent. C1 - and C2 can be either CHECK_CONSTR or TEMPLATE_TYPE_PARM. */ + and C2 can be either TEMPLATE_TYPE_PARM or template-ids. */ bool equivalent_placeholder_constraints (tree c1, tree c2) @@ -1515,7 +1644,7 @@ equivalent_placeholder_constraints (tree c1, tree c2) return true; } -/* Return a hash value for the placeholder PRED_CONSTR C. */ +/* Return a hash value for the placeholder ATOMIC_CONSTR C. */ hashval_t hash_placeholder_constraint (tree c) @@ -1532,178 +1661,215 @@ hash_placeholder_constraint (tree c) return val; } -/*--------------------------------------------------------------------------- - Constraint substitution ----------------------------------------------------------------------------*/ +/* Substitute through the simple requirement. */ -/* The following functions implement substitution rules for constraints. - Substitution without checking constraints happens only in the - instantiation of class templates. For example: +static tree +tsubst_valid_expression_requirement (tree t, tree args, subst_info info) +{ + return tsubst_expr (t, args, info.complain, info.in_decl, false); +} - template struct S { - void f(T) requires C2; - void g(T) requires T::value; - }; - S s; // error instantiating S::g(T) +/* Substitute through the simple requirement. */ - When we instantiate S, we substitute into its member declarations, - including their constraints. However, those constraints are not - checked. Substituting int into C2 yields C2, and substituting - into T::value yields a substitution failure, making the program - ill-formed. +static tree +tsubst_simple_requirement (tree t, tree args, subst_info info) +{ + tree t0 = TREE_OPERAND (t, 0); + tree expr = tsubst_valid_expression_requirement (t0, args, info); + if (expr == error_mark_node) + return error_mark_node; + return finish_simple_requirement (EXPR_LOCATION (t), expr); +} - Note that we only ever substitute into the associated constraints - of a declaration. That is, substitution is defined only for predicate - constraints and conjunctions. */ +/* Substitute through the type requirement. */ -/* Substitute into the predicate constraints. Returns error_mark_node - if the substitution into the expression fails. */ -tree -tsubst_predicate_constraint (tree t, tree args, - tsubst_flags_t complain, tree in_decl) +static tree +tsubst_type_requirement (tree t, tree args, subst_info info) { - tree expr = PRED_CONSTR_EXPR (t); - ++processing_template_decl; - tree result = tsubst_expr (expr, args, complain, in_decl, false); - --processing_template_decl; - return build_nt (PRED_CONSTR, result); + tree t0 = TREE_OPERAND (t, 0); + tree type = tsubst (t0, args, info.complain, info.in_decl); + if (type == error_mark_node) + return error_mark_node; + return finish_type_requirement (EXPR_LOCATION (t), type); } -/* Substitute into a check constraint. */ +/* True if TYPE can be deduced from EXPR. -tree -tsubst_check_constraint (tree t, tree args, - tsubst_flags_t complain, tree in_decl) + FIXME: C++20 compound requirement constraints should be normalized and then + satisfied rather than substituted. */ + +static bool +type_deducible_p (tree expr, tree type, tree placeholder, tree args, + subst_info info) { - tree decl = CHECK_CONSTR_CONCEPT (t); - tree tmpl = DECL_TI_TEMPLATE (decl); - tree targs = CHECK_CONSTR_ARGS (t); + /* Make sure deduction is performed against ( EXPR ), so that + references are preserved in the result. */ + expr = force_paren_expr_uneval (expr); - /* Substitute through by building an template-id expression - and then substituting into that. */ - tree expr = build_nt (TEMPLATE_ID_EXPR, tmpl, targs); - ++processing_template_decl; - tree result = tsubst_expr (expr, args, complain, in_decl, false); - --processing_template_decl; + /* Replace the constraints with the instantiated constraints. This + substitutes args into any template parameters in the trailing + result type. */ + tree saved_constr = PLACEHOLDER_TYPE_CONSTRAINTS (placeholder); + PLACEHOLDER_TYPE_CONSTRAINTS (placeholder) + = tsubst_constraint (saved_constr, + args, + info.complain | tf_partial, + info.in_decl); - if (result == error_mark_node) - return error_mark_node; + /* Temporarily unlink the canonical type. */ + tree saved_type = TYPE_CANONICAL (placeholder); + TYPE_CANONICAL (placeholder) = NULL_TREE; - /* Extract the results and rebuild the check constraint. */ - decl = DECL_TEMPLATE_RESULT (TREE_OPERAND (result, 0)); - args = TREE_OPERAND (result, 1); + tree deduced_type + = do_auto_deduction (type, + expr, + placeholder, + info.complain, + adc_requirement); + + PLACEHOLDER_TYPE_CONSTRAINTS (placeholder) = saved_constr; + TYPE_CANONICAL (placeholder) = saved_type; + + if (deduced_type == error_mark_node) + return false; - return build_nt (CHECK_CONSTR, decl, args); + return true; } -/* Substitute into the conjunction of constraints. Returns - error_mark_node if substitution into either operand fails. */ +/* True if EXPR can not be converted to TYPE. */ -tree -tsubst_logical_operator (tree t, tree args, - tsubst_flags_t complain, tree in_decl) +static bool +expression_convertible_p (tree expr, tree type, subst_info info) { - tree t0 = TREE_OPERAND (t, 0); - tree r0 = tsubst_constraint (t0, args, complain, in_decl); - if (r0 == error_mark_node) - return error_mark_node; - tree t1 = TREE_OPERAND (t, 1); - tree r1 = tsubst_constraint (t1, args, complain, in_decl); - if (r1 == error_mark_node) - return error_mark_node; - return build_nt (TREE_CODE (t), r0, r1); + tree conv = + perform_direct_initialization_if_possible (type, expr, false, + info.complain); + if (conv == error_mark_node) + return false; + if (conv == NULL_TREE) + { + if (info.complain & tf_error) + { + location_t loc = EXPR_LOC_OR_LOC (expr, input_location); + error_at (loc, "cannot convert %qE to %qT", expr, type); + } + return false; + } + return true; } -namespace { -/* Substitute ARGS into the expression constraint T. */ +/* Substitute through the compound requirement. */ -tree -tsubst_expr_constr (tree t, tree args, tsubst_flags_t complain, tree in_decl) +static tree +tsubst_compound_requirement (tree t, tree args, subst_info info) { - cp_unevaluated guard; - tree expr = EXPR_CONSTR_EXPR (t); - tree ret = tsubst_expr (expr, args, complain, in_decl, false); - if (ret == error_mark_node) + tree t0 = TREE_OPERAND (t, 0); + tree t1 = TREE_OPERAND (t, 1); + tree expr = tsubst_valid_expression_requirement (t0, args, info); + if (expr == error_mark_node) return error_mark_node; - return build_nt (EXPR_CONSTR, ret); -} -/* Substitute ARGS into the type constraint T. */ + /* Check the noexcept condition. */ + bool noexcept_p = COMPOUND_REQ_NOEXCEPT_P (t); + if (noexcept_p && !expr_noexcept_p (expr, tf_none)) + return error_mark_node; -tree -tsubst_type_constr (tree t, tree args, tsubst_flags_t complain, tree in_decl) -{ - tree type = TYPE_CONSTR_TYPE (t); - tree ret = tsubst (type, args, complain, in_decl); - if (ret == error_mark_node) + /* Substitute through the type expression, if any. */ + tree type = tsubst (t1, args, info.complain, info.in_decl); + if (type == error_mark_node) return error_mark_node; - return build_nt (TYPE_CONSTR, ret); -} -/* Substitute ARGS into the implicit conversion constraint T. */ + /* Check expression against the result type. */ + if (type) + { + if (tree placeholder = type_uses_auto (type)) + { + if (!type_deducible_p (expr, type, placeholder, args, info)) + return error_mark_node; + } + else if (!expression_convertible_p (expr, type, info)) + return error_mark_node; + } -tree -tsubst_implicit_conversion_constr (tree t, tree args, tsubst_flags_t complain, - tree in_decl) -{ - cp_unevaluated guard; - tree expr = ICONV_CONSTR_EXPR (t); - tree type = ICONV_CONSTR_TYPE (t); - tree new_expr = tsubst_expr (expr, args, complain, in_decl, false); - if (new_expr == error_mark_node) - return error_mark_node; - tree new_type = tsubst (type, args, complain, in_decl); - if (new_type == error_mark_node) - return error_mark_node; - return build_nt (ICONV_CONSTR, new_expr, new_type); + return finish_compound_requirement (EXPR_LOCATION (t), + expr, type, noexcept_p); } -/* Substitute ARGS into the argument deduction constraint T. */ - -tree -tsubst_argument_deduction_constr (tree t, tree args, tsubst_flags_t complain, - tree in_decl) -{ - cp_unevaluated guard; - tree expr = DEDUCT_CONSTR_EXPR (t); - tree pattern = DEDUCT_CONSTR_PATTERN (t); - tree autos = DEDUCT_CONSTR_PLACEHOLDER(t); - tree new_expr = tsubst_expr (expr, args, complain, in_decl, false); - if (new_expr == error_mark_node) - return error_mark_node; - /* It seems like substituting through the pattern will not affect the - placeholders. We should (?) be able to reuse the existing list - without any problems. If not, then we probably want to create a - new list of placeholders and then instantiate the pattern using - those. */ - tree new_pattern = tsubst (pattern, args, complain, in_decl); - if (new_pattern == error_mark_node) +static tree +tsubst_nested_requirement (tree t, tree args, subst_info info) +{ + tree t0 = TREE_OPERAND (t, 0); + tree expr = tsubst_expr (t0, args, info.complain, info.in_decl, false); + if (expr == error_mark_node) return error_mark_node; - return build_nt (DEDUCT_CONSTR, new_expr, new_pattern, autos); + + /* Ensure that concrete results are satisfied. */ + if (!uses_template_parms (args)) + { + /* FIXME satisfy_constraint_expression (t0, args, info) */ + + /* [17.4.1.2] ... lvalue-to-value conversion is performed as necessary, + and EXPR shall be a constant expression of type bool. */ + tree result = force_rvalue (expr, tf_error); + if (result == error_mark_node) + return error_mark_node; + + /* FIXME: The expression must have boolean type. */ + if (cv_unqualified (TREE_TYPE (result)) != boolean_type_node) + return error_mark_node; + + /* Compute the value of the expression. */ + result = satisfaction_value (cxx_constant_value (result)); + if (result == error_mark_node || result == boolean_false_node) + return error_mark_node; + } + + return finish_nested_requirement (EXPR_LOCATION (t), expr); } -/* Substitute ARGS into the exception constraint T. */ +/* Substitute ARGS into the requirement T. */ -tree -tsubst_exception_constr (tree t, tree args, tsubst_flags_t complain, - tree in_decl) +static tree +tsubst_requirement (tree t, tree args, subst_info info) { - cp_unevaluated guard; - tree expr = EXCEPT_CONSTR_EXPR (t); - tree ret = tsubst_expr (expr, args, complain, in_decl, false); - if (ret == error_mark_node) - return error_mark_node; - return build_nt (EXCEPT_CONSTR, ret); + iloc_sentinel loc_s (cp_expr_location (t)); + switch (TREE_CODE (t)) + { + case SIMPLE_REQ: + return tsubst_simple_requirement (t, args, info); + case TYPE_REQ: + return tsubst_type_requirement (t, args, info); + case COMPOUND_REQ: + return tsubst_compound_requirement (t, args, info); + case NESTED_REQ: + return tsubst_nested_requirement (t, args, info); + default: + break; + } + gcc_unreachable (); } -/* A subroutine of tsubst_constraint_variables. Register local - specializations for each of parameter in PARMS and its - corresponding substituted constraint variable in VARS. - Returns VARS. */ +/* Substitute ARGS into the list of requirements T. Note that + substitution failures here result in ill-formed programs. */ -tree +static tree +tsubst_requirement_body (tree t, tree args, subst_info info) +{ + tree result = NULL_TREE; + while (t) + { + tree req = tsubst_requirement (TREE_VALUE (t), args, info); + if (req == error_mark_node) + return error_mark_node; + result = tree_cons (NULL_TREE, req, result); + t = TREE_CHAIN (t); + } + return nreverse (result); +} + +static tree declare_constraint_vars (tree parms, tree vars) { tree s = vars; @@ -1723,6 +1889,24 @@ declare_constraint_vars (tree parms, tree vars) return vars; } +/* Substitute through as if checking function parameter types. This + will diagnose common parameter type errors. Returns error_mark_node + if an error occurred. */ + +static tree +check_constaint_variables (tree t, tree args, subst_info info) +{ + tree types = NULL_TREE; + tree p = t; + while (p && !VOID_TYPE_P (p)) + { + types = tree_cons (NULL_TREE, TREE_TYPE (p), types); + p = TREE_CHAIN (p); + } + types = chainon (nreverse (types), void_list_node); + return tsubst_function_parms (types, args, info.complain, info.in_decl); +} + /* A subroutine of tsubst_parameterized_constraint. Substitute ARGS into the parameter list T, producing a sequence of constraint variables, declared in the current scope. @@ -1731,171 +1915,81 @@ declare_constraint_vars (tree parms, tree vars) prior to calling this function since this substitution will declare the substituted parameters. */ -tree -tsubst_constraint_variables (tree t, tree args, - tsubst_flags_t complain, tree in_decl) +static tree +tsubst_constraint_variables (tree t, tree args, subst_info info) { + /* Perform a trial substitution to check for type errors. */ + tree parms = check_constaint_variables (t, args, info); + if (parms == error_mark_node) + return error_mark_node; + /* Clear cp_unevaluated_operand across tsubst so that we get a proper chain of PARM_DECLs. */ int saved_unevaluated_operand = cp_unevaluated_operand; cp_unevaluated_operand = 0; - tree vars = tsubst (t, args, complain, in_decl); + tree vars = tsubst (t, args, info.complain, info.in_decl); cp_unevaluated_operand = saved_unevaluated_operand; if (vars == error_mark_node) return error_mark_node; return declare_constraint_vars (t, vars); } -/* Substitute ARGS into the parameterized constraint T. */ +/* Substitute ARGS into the requires-expression T. [8.4.7]p6. The + substitution of template arguments into a requires-expression + may result in the formation of invalid types or expressions + in its requirements ... In such cases, the expression evaluates + to false; it does not cause the program to be ill-formed. -tree -tsubst_parameterized_constraint (tree t, tree args, - tsubst_flags_t complain, tree in_decl) -{ - local_specialization_stack stack; - tree vars = tsubst_constraint_variables (PARM_CONSTR_PARMS (t), - args, complain, in_decl); - if (vars == error_mark_node) - return error_mark_node; - tree expr = tsubst_constraint (PARM_CONSTR_OPERAND (t), args, - complain, in_decl); - if (expr == error_mark_node) - return error_mark_node; - return build_nt (PARM_CONSTR, vars, expr); -} - -/* Substitute ARGS into the simple requirement T. Note that - substitution may result in an ill-formed expression without - causing the program to be ill-formed. In such cases, the - requirement wraps an error_mark_node. */ + However, there are cases where substitution must produce a + new requires-expression, that is not a template constraint. + For example: -inline tree -tsubst_simple_requirement (tree t, tree args, - tsubst_flags_t complain, tree in_decl) -{ - ++processing_template_decl; - tree expr = tsubst_expr (TREE_OPERAND (t, 0), args, complain, in_decl, false); - --processing_template_decl; - return finish_simple_requirement (expr); -} + template + class X { + template + static constexpr bool var = requires (U u) { T::fn(u); }; + }; -/* Substitute ARGS into the type requirement T. Note that - substitution may result in an ill-formed type without - causing the program to be ill-formed. In such cases, the - requirement wraps an error_mark_node. */ - -inline tree -tsubst_type_requirement (tree t, tree args, - tsubst_flags_t complain, tree in_decl) -{ - ++processing_template_decl; - tree type = tsubst (TREE_OPERAND (t, 0), args, complain, in_decl); - --processing_template_decl; - return finish_type_requirement (type); -} - -/* Substitute args into the compound requirement T. If substituting - into either the expression or the type fails, the corresponding - operands in the resulting node will be error_mark_node. This - preserves a requirement for the purpose of partial ordering, but - it will never be satisfied. */ + In the instantiation of X (assuming Y defines fn), then the + instantiated requires-expression would include Y::fn(u). If any + substitution in the requires-expression fails, we can immediately + fold the expression to false, as would be the case e.g., when + instantiation X. */ tree -tsubst_compound_requirement (tree t, tree args, - tsubst_flags_t complain, tree in_decl) +tsubst_requires_expr (tree t, tree args, + tsubst_flags_t complain, tree in_decl) { - ++processing_template_decl; - tree expr = tsubst_expr (TREE_OPERAND (t, 0), args, complain, in_decl, false); - tree type = tsubst (TREE_OPERAND (t, 1), args, complain, in_decl); - --processing_template_decl; - bool noexcept_p = COMPOUND_REQ_NOEXCEPT_P (t); - return finish_compound_requirement (expr, type, noexcept_p); -} + local_specialization_stack stack (lss_copy); -/* Substitute ARGS into the nested requirement T. */ + subst_info info (complain, in_decl); -tree -tsubst_nested_requirement (tree t, tree args, - tsubst_flags_t complain, tree in_decl) -{ - ++processing_template_decl; - tree expr = tsubst_expr (TREE_OPERAND (t, 0), args, complain, in_decl, false); - --processing_template_decl; - return finish_nested_requirement (expr); -} - -/* Substitute ARGS into the requirement T. */ - -inline tree -tsubst_requirement (tree t, tree args, tsubst_flags_t complain, tree in_decl) -{ - switch (TREE_CODE (t)) - { - case SIMPLE_REQ: - return tsubst_simple_requirement (t, args, complain, in_decl); - case TYPE_REQ: - return tsubst_type_requirement (t, args, complain, in_decl); - case COMPOUND_REQ: - return tsubst_compound_requirement (t, args, complain, in_decl); - case NESTED_REQ: - return tsubst_nested_requirement (t, args, complain, in_decl); - default: - gcc_unreachable (); - } - return error_mark_node; -} - -/* Substitute ARGS into the list of requirements T. Note that - substitution failures here result in ill-formed programs. */ - -tree -tsubst_requirement_body (tree t, tree args, - tsubst_flags_t complain, tree in_decl) -{ - tree r = NULL_TREE; - while (t) - { - tree e = tsubst_requirement (TREE_VALUE (t), args, complain, in_decl); - if (e == error_mark_node) - return error_mark_node; - r = tree_cons (NULL_TREE, e, r); - t = TREE_CHAIN (t); - } - /* Ensure that the order of constraints is the same as the original. */ - return nreverse (r); -} - -} /* namespace */ - -/* Substitute ARGS into the requires expression T. Note that this - results in the re-declaration of local parameters when - substituting through the parameter list. If either substitution - fails, the program is ill-formed. */ - -tree -tsubst_requires_expr (tree t, tree args, - tsubst_flags_t complain, tree in_decl) -{ - local_specialization_stack stack; + /* A requires-expression is an unevaluated context. */ + cp_unevaluated u; tree parms = TREE_OPERAND (t, 0); if (parms) { - parms = tsubst_constraint_variables (parms, args, complain, in_decl); + parms = tsubst_constraint_variables (parms, args, info); if (parms == error_mark_node) - return error_mark_node; + return boolean_false_node; } tree reqs = TREE_OPERAND (t, 1); - reqs = tsubst_requirement_body (reqs, args, complain, in_decl); + reqs = tsubst_requirement_body (reqs, args, info); if (reqs == error_mark_node) - return error_mark_node; + return boolean_false_node; + + /* In certain cases, produce a new requires-expression. + Otherwise the value of the expression is true. */ + if (processing_template_decl && uses_template_parms (args)) + return finish_requires_expr (cp_expr_location (t), parms, reqs); - return finish_requires_expr (parms, reqs); + return boolean_true_node; } /* Substitute ARGS into the constraint information CI, producing a new - constraint record. */ + constraint record. */ tree tsubst_constraint_info (tree t, tree args, @@ -1904,378 +1998,418 @@ tsubst_constraint_info (tree t, tree args, if (!t || t == error_mark_node || !check_constraint_info (t)) return NULL_TREE; - tree tmpl_constr = NULL_TREE; - if (tree r = CI_TEMPLATE_REQS (t)) - tmpl_constr = tsubst_constraint (r, args, complain, in_decl); + tree tr = tsubst_constraint (CI_TEMPLATE_REQS (t), args, complain, in_decl); + tree dr = tsubst_constraint (CI_DECLARATOR_REQS (t), args, complain, in_decl); + return build_constraints (tr, dr); +} - tree decl_constr = NULL_TREE; - if (tree r = CI_DECLARATOR_REQS (t)) - decl_constr = tsubst_constraint (r, args, complain, in_decl); +/* Substitute through a parameter mapping, in order to get the actual + arguments used to instantiate an atomic constraint. This may fail + if the substitution into arguments produces something ill-formed. */ - return build_constraints (tmpl_constr, decl_constr); -} +static tree +tsubst_parameter_mapping (tree map, tree args, subst_info info) +{ + if (!map) + return NULL_TREE; + + tsubst_flags_t complain = info.complain; + tree in_decl = info.in_decl; -/* Substitute ARGS into the constraint T. */ + tree result = NULL_TREE; + for (tree p = map; p; p = TREE_CHAIN (p)) + { + if (p == error_mark_node) + return error_mark_node; + tree parm = TREE_VALUE (p); + tree arg = TREE_PURPOSE (p); + tree new_arg = NULL_TREE; + if (TYPE_P (arg)) + { + /* If a template parameter is declared with a placeholder, we can + get those in the argument list if decltype is applied to the + placeholder. For example: + + template + requires C + void f() { } + + The normalized argument for C will be an auto type, so we'll + need to deduce the actual argument from the corresponding + initializer (whatever argument is provided for T), and use + that result in the instantiated parameter mapping. */ + if (tree auto_node = type_uses_auto (arg)) + { + int level; + int index; + template_parm_level_and_index (parm, &level, &index); + tree init = TMPL_ARG (args, level, index); + new_arg = do_auto_deduction (arg, init, auto_node, + complain, adc_variable_type, + make_tree_vec (0)); + } + } + else if (ARGUMENT_PACK_P (arg)) + new_arg = tsubst_argument_pack (arg, args, complain, in_decl); + if (!new_arg) + new_arg = tsubst_template_arg (arg, args, complain, in_decl); + if (new_arg == error_mark_node) + return error_mark_node; + + result = tree_cons (new_arg, parm, result); + } + return nreverse (result); +} tree -tsubst_constraint (tree t, tree args, tsubst_flags_t complain, tree in_decl) +tsubst_parameter_mapping (tree map, tree args, tsubst_flags_t complain, tree in_decl) { - if (t == NULL_TREE || t == error_mark_node) - return t; - switch (TREE_CODE (t)) - { - case PRED_CONSTR: - return tsubst_predicate_constraint (t, args, complain, in_decl); - case CHECK_CONSTR: - return tsubst_check_constraint (t, args, complain, in_decl); - case CONJ_CONSTR: - case DISJ_CONSTR: - return tsubst_logical_operator (t, args, complain, in_decl); - case PARM_CONSTR: - return tsubst_parameterized_constraint (t, args, complain, in_decl); - case EXPR_CONSTR: - return tsubst_expr_constr (t, args, complain, in_decl); - case TYPE_CONSTR: - return tsubst_type_constr (t, args, complain, in_decl); - case ICONV_CONSTR: - return tsubst_implicit_conversion_constr (t, args, complain, in_decl); - case DEDUCT_CONSTR: - return tsubst_argument_deduction_constr (t, args, complain, in_decl); - case EXCEPT_CONSTR: - return tsubst_exception_constr (t, args, complain, in_decl); - default: - gcc_unreachable (); - } - return error_mark_node; + return tsubst_parameter_mapping (map, args, subst_info (complain, in_decl)); } /*--------------------------------------------------------------------------- Constraint satisfaction ---------------------------------------------------------------------------*/ -/* The following functions determine if a constraint, when - substituting template arguments, is satisfied. For convenience, - satisfaction reduces a constraint to either true or false (and - nothing else). */ - -namespace { - -tree satisfy_constraint_1 (tree, tree, tsubst_flags_t, tree); +/* Hash functions for satisfaction entries. */ -/* Check the constraint pack expansion. */ - -tree -satisfy_pack_expansion (tree t, tree args, - tsubst_flags_t complain, tree in_decl) +struct GTY((for_user)) sat_entry { - /* Get the vector of satisfaction results. - gen_elem_of_pack_expansion_instantiation will check that each element of - the expansion is satisfied. */ - tree exprs = tsubst_pack_expansion (t, args, complain, in_decl); + tree constr; + tree args; + tree result; +}; - if (exprs == error_mark_node) - return boolean_false_node; +struct sat_hasher : ggc_ptr_hash +{ + static hashval_t hash (sat_entry *e) + { + hashval_t value = hash_atomic_constraint (e->constr); + return iterative_hash_template_arg (e->args, value); + } - /* TODO: It might be better to normalize each expanded term - and evaluate them separately. That would provide better - opportunities for diagnostics. */ - for (int i = 0; i < TREE_VEC_LENGTH (exprs); ++i) - if (TREE_VEC_ELT (exprs, i) != boolean_true_node) - return boolean_false_node; - return boolean_true_node; -} + static bool equal (sat_entry *e1, sat_entry *e2) + { + if (!atomic_constraints_identical_p (e1->constr, e2->constr)) + return false; + return template_args_equal (e1->args, e2->args); + } +}; -/* A predicate constraint is satisfied if its expression evaluates - to true. If substitution into that node fails, the constraint - is not satisfied ([temp.constr.pred]). +/* Cache the result of satisfy_atom. */ +static GTY((deletable)) hash_table *sat_cache; - Note that a predicate constraint is a constraint expression - of type bool. If neither of those are true, the program is - ill-formed; they are not SFINAE'able errors. */ +/* Cache the result of constraints_satisfied_p. */ +static GTY((deletable)) hash_map *decl_satisfied_cache; -tree -satisfy_predicate_constraint (tree t, tree args, - tsubst_flags_t complain, tree in_decl) +static tree +get_satisfaction (tree constr, tree args) { - tree expr = TREE_OPERAND (t, 0); - - /* We should never have a naked pack expansion in a predicate constraint. */ - gcc_assert (TREE_CODE (expr) != EXPR_PACK_EXPANSION); - - /* If substitution into the expression fails, the constraint - is not satisfied. */ - expr = tsubst_expr (expr, args, complain, in_decl, false); - if (expr == error_mark_node) - return boolean_false_node; + if (!sat_cache) + return NULL_TREE; + sat_entry elt = { constr, args, NULL_TREE }; + sat_entry* found = sat_cache->find (&elt); + if (found) + return found->result; + else + return NULL_TREE; +} - /* A predicate constraint shall have type bool. In some - cases, substitution gives us const-qualified bool, which - is also acceptable. */ - tree type = cv_unqualified (TREE_TYPE (expr)); - if (!same_type_p (type, boolean_type_node)) - { - error_at (cp_expr_loc_or_input_loc (expr), - "constraint %qE does not have type %qT", - expr, boolean_type_node); - return boolean_false_node; - } +static void +save_satisfaction (tree constr, tree args, tree result) +{ + if (!sat_cache) + sat_cache = hash_table::create_ggc (31); + sat_entry elt = {constr, args, result}; + sat_entry** slot = sat_cache->find_slot (&elt, INSERT); + sat_entry* entry = ggc_alloc (); + *entry = elt; + *slot = entry; +} - return cxx_constant_value (expr); +void +clear_satisfaction_cache () +{ + if (sat_cache) + sat_cache->empty (); + if (decl_satisfied_cache) + decl_satisfied_cache->empty (); } -/* A concept check constraint like C is satisfied if substituting ARGS - into CARGS succeeds and C is satisfied for the resulting arguments. */ +/* A tool to help manage satisfaction caching in satisfy_constraint_r. + Note the cache is only used when not diagnosing errors. */ -tree -satisfy_check_constraint (tree t, tree args, - tsubst_flags_t complain, tree in_decl) +struct satisfaction_cache { - tree decl = CHECK_CONSTR_CONCEPT (t); - tree tmpl = DECL_TI_TEMPLATE (decl); - tree cargs = CHECK_CONSTR_ARGS (t); + satisfaction_cache (tree constr, tree args, tsubst_flags_t complain) + : constr(constr), args(args), complain(complain) + { } - /* Instantiate the concept check arguments. */ - tree targs = tsubst (cargs, args, tf_none, NULL_TREE); - if (targs == error_mark_node) - return boolean_false_node; + tree get () + { + if (complain == tf_none) + return get_satisfaction (constr, args); + return NULL_TREE; + } - /* Search for a previous value. */ - if (tree prev = lookup_concept_satisfaction (tmpl, targs)) - return prev; + tree save (tree result) + { + if (complain == tf_none) + save_satisfaction (constr, args, result); + return result; + } - /* Expand the concept; failure here implies non-satisfaction. */ - tree def = expand_concept (decl, targs); - if (def == error_mark_node) - return memoize_concept_satisfaction (tmpl, args, boolean_false_node); + tree constr; + tree args; + tsubst_flags_t complain; +}; - /* Recursively satisfy the constraint. */ - tree result = satisfy_constraint_1 (def, targs, complain, in_decl); - return memoize_concept_satisfaction (tmpl, targs, result); -} +static int satisfying_constraint = 0; -/* Check an expression constraint. The constraint is satisfied if - substitution succeeds ([temp.constr.expr]). +/* Returns true if we are currently satisfying a constraint. - Note that the expression is unevaluated. */ + This is used to guard against recursive calls to evaluate_concept_check + during template argument substitution. -tree -satisfy_expression_constraint (tree t, tree args, - tsubst_flags_t complain, tree in_decl) -{ - cp_unevaluated guard; - deferring_access_check_sentinel deferring; + TODO: Do we need this now that we fully normalize prior to evaluation? + I think not. */ - tree expr = EXPR_CONSTR_EXPR (t); - tree check = tsubst_expr (expr, args, complain, in_decl, false); - if (check == error_mark_node) - return boolean_false_node; - if (!perform_deferred_access_checks (tf_none)) - return boolean_false_node; - return boolean_true_node; +bool +satisfying_constraint_p () +{ + return satisfying_constraint; } -/* Check a type constraint. The constraint is satisfied if - substitution succeeds. */ +/* Substitute ARGS into constraint-expression T during instantiation of + a member of a class template. */ -inline tree -satisfy_type_constraint (tree t, tree args, - tsubst_flags_t complain, tree in_decl) +tree +tsubst_constraint (tree t, tree args, tsubst_flags_t complain, tree in_decl) { - deferring_access_check_sentinel deferring; - tree type = TYPE_CONSTR_TYPE (t); - gcc_assert (TYPE_P (type) || type == error_mark_node); - tree check = tsubst (type, args, complain, in_decl); - if (error_operand_p (check)) - return boolean_false_node; - if (!perform_deferred_access_checks (complain)) - return boolean_false_node; - return boolean_true_node; + /* We also don't want to evaluate concept-checks when substituting the + constraint-expressions of a declaration. */ + processing_constraint_expression_sentinel s; + tree expr = tsubst_expr (t, args, complain, in_decl, false); + return expr; } -/* Check an implicit conversion constraint. */ +static tree satisfy_constraint_r (tree, tree, subst_info info); -tree -satisfy_implicit_conversion_constraint (tree t, tree args, - tsubst_flags_t complain, tree in_decl) -{ - /* Don't tsubst as if we're processing a template. If we try - to we can end up generating template-like expressions - (e.g., modop-exprs) that aren't properly typed. */ - tree expr = - tsubst_expr (ICONV_CONSTR_EXPR (t), args, complain, in_decl, false); - if (expr == error_mark_node) - return boolean_false_node; +/* Compute the satisfaction of a conjunction. */ - /* Get the transformed target type. */ - tree type = tsubst (ICONV_CONSTR_TYPE (t), args, complain, in_decl); - if (type == error_mark_node) - return boolean_false_node; - - /* Attempt the conversion as a direct initialization - of the form TYPE = EXPR. */ - tree conv = - perform_direct_initialization_if_possible (type, expr, false, complain); - if (conv == NULL_TREE || conv == error_mark_node) - return boolean_false_node; - else - return boolean_true_node; +static tree +satisfy_conjunction (tree t, tree args, subst_info info) +{ + tree lhs = satisfy_constraint_r (TREE_OPERAND (t, 0), args, info); + if (lhs == error_mark_node || lhs == boolean_false_node) + return lhs; + return satisfy_constraint_r (TREE_OPERAND (t, 1), args, info); } -/* Check an argument deduction constraint. */ +/* Compute the satisfaction of a disjunction. */ -tree -satisfy_argument_deduction_constraint (tree t, tree args, - tsubst_flags_t complain, tree in_decl) +static tree +satisfy_disjunction (tree t, tree args, subst_info info) { - /* Substitute through the expression. */ - tree expr = DEDUCT_CONSTR_EXPR (t); - tree init = tsubst_expr (expr, args, complain, in_decl, false); - if (expr == error_mark_node) - return boolean_false_node; + /* Evaluate the operands quietly. */ + subst_info quiet (tf_none, NULL_TREE); - /* Perform auto or decltype(auto) deduction to get the result. */ - tree pattern = DEDUCT_CONSTR_PATTERN (t); - tree placeholder = DEDUCT_CONSTR_PLACEHOLDER (t); - tree constr = PLACEHOLDER_TYPE_CONSTRAINTS (placeholder); - tree type_canonical = TYPE_CANONICAL (placeholder); - PLACEHOLDER_TYPE_CONSTRAINTS (placeholder) - = tsubst_constraint (constr, args, complain|tf_partial, in_decl); - TYPE_CANONICAL (placeholder) = NULL_TREE; - tree type = do_auto_deduction (pattern, init, placeholder, - complain, adc_requirement); - PLACEHOLDER_TYPE_CONSTRAINTS (placeholder) = constr; - TYPE_CANONICAL (placeholder) = type_canonical; - if (type == error_mark_node) - return boolean_false_node; + /* Register the constraint for diagnostics, if needed. */ + diagnosing_failed_constraint failure (t, args, info.noisy ()); - return boolean_true_node; + tree lhs = satisfy_constraint_r (TREE_OPERAND (t, 0), args, quiet); + if (lhs == boolean_true_node) + return boolean_true_node; + tree rhs = satisfy_constraint_r (TREE_OPERAND (t, 1), args, quiet); + if (rhs != boolean_true_node && info.noisy ()) + { + location_t loc = cp_expr_location (CONSTR_EXPR (t)); + inform (loc, "neither operand of the disjunction is satisfied"); + /* TODO: Replay the LHS and RHS to find failures in both branches. */ + // satisfy_constraint_r (TREE_OPERAND (t, 0), args, info); + // satisfy_constraint_r (TREE_OPERAND (t, 1), args, info); + } + return rhs; } -/* Check an exception constraint. An exception constraint for an - expression e is satisfied when noexcept(e) is true. */ +/* Ensures that T is a truth value and not (accidentally, as sometimes + happens) an integer value. */ tree -satisfy_exception_constraint (tree t, tree args, - tsubst_flags_t complain, tree in_decl) +satisfaction_value (tree t) { - tree expr = EXCEPT_CONSTR_EXPR (t); - tree check = tsubst_expr (expr, args, complain, in_decl, false); - if (check == error_mark_node) - return boolean_false_node; - - if (expr_noexcept_p (check, complain)) + if (t == error_mark_node) + return t; + if (t == boolean_true_node || t == integer_one_node) return boolean_true_node; - else + if (t == boolean_false_node || t == integer_zero_node) return boolean_false_node; + + /* Anything else should be invalid. */ + gcc_assert (false); } -/* Check a parameterized constraint. */ +/* Build a new template argument list with template arguments corresponding + to the parameters used in an atomic constraint. */ tree -satisfy_parameterized_constraint (tree t, tree args, - tsubst_flags_t complain, tree in_decl) +get_mapped_args (tree map) { - local_specialization_stack stack; - tree parms = PARM_CONSTR_PARMS (t); - tree vars = tsubst_constraint_variables (parms, args, complain, in_decl); - if (vars == error_mark_node) - return boolean_false_node; - tree constr = PARM_CONSTR_OPERAND (t); - return satisfy_constraint_1 (constr, args, complain, in_decl); -} - -/* Check that the conjunction of constraints is satisfied. Note - that if left operand is not satisfied, the right operand - is not checked. + /* If there's no map, then there are no arguments. */ + if (!map) + return NULL_TREE; - FIXME: Check that this wouldn't result in a user-defined - operator. Note that this error is partially diagnosed in - satisfy_predicate_constraint. It would be nice to diagnose - the overload, but I don't think it's strictly necessary. */ + /* Find the mapped parameter with the highest level. */ + int count = 0; + for (tree p = map; p; p = TREE_CHAIN (p)) + { + int level; + int index; + template_parm_level_and_index (TREE_VALUE (p), &level, &index); + if (level > count) + count = level; + } -tree -satisfy_conjunction (tree t, tree args, tsubst_flags_t complain, tree in_decl) -{ - tree t0 = satisfy_constraint_1 (TREE_OPERAND (t, 0), args, complain, in_decl); - if (t0 == boolean_false_node) - return boolean_false_node; - return satisfy_constraint_1 (TREE_OPERAND (t, 1), args, complain, in_decl); -} + /* Place each argument at its corresponding position in the argument + list. Note that the list will be sparse (not all arguments supplied), + but instantiation is guaranteed to only use the parameters in the + mapping, so null arguments would never be used. */ + auto_vec< auto_vec > lists (count); + lists.quick_grow_cleared (count); + for (tree p = map; p; p = TREE_CHAIN (p)) + { + int level; + int index; + template_parm_level_and_index (TREE_VALUE (p), &level, &index); + + /* Insert the argument into its corresponding position. */ + auto_vec &list = lists[level - 1]; + if (index >= (int)list.length ()) + list.safe_grow_cleared (index + 1); + list[index] = TREE_PURPOSE (p); + } -/* Check that the disjunction of constraints is satisfied. Note - that if the left operand is satisfied, the right operand is not - checked. */ + /* Build the actual argument list. */ + tree args = make_tree_vec (lists.length ()); + for (unsigned i = 0; i != lists.length (); ++i) + { + auto_vec &list = lists[i]; + tree level = make_tree_vec (list.length ()); + for (unsigned j = 0; j < list.length(); ++j) + TREE_VEC_ELT (level, j) = list[j]; + SET_TMPL_ARGS_LEVEL (args, i + 1, level); + } + SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (args, 0); -tree -satisfy_disjunction (tree t, tree args, tsubst_flags_t complain, tree in_decl) -{ - tree t0 = satisfy_constraint_1 (TREE_OPERAND (t, 0), args, complain, in_decl); - if (t0 == boolean_true_node) - return boolean_true_node; - return satisfy_constraint_1 (TREE_OPERAND (t, 1), args, complain, in_decl); + return args; } -/* Dispatch to an appropriate satisfaction routine depending on the - tree code of T. */ +static void diagnose_atomic_constraint (tree, tree, subst_info); -tree -satisfy_constraint_1 (tree t, tree args, tsubst_flags_t complain, tree in_decl) -{ - gcc_assert (!processing_template_decl); +/* Compute the satisfaction of an atomic constraint. */ - if (!t) - return boolean_false_node; +static tree +satisfy_atom (tree t, tree args, subst_info info) +{ + satisfaction_cache cache (t, args, info.complain); + if (tree r = cache.get ()) + return r; - if (t == error_mark_node) - return boolean_false_node; + /* Perform substitution quietly. */ + subst_info quiet (tf_none, NULL_TREE); - switch (TREE_CODE (t)) - { - case PRED_CONSTR: - return satisfy_predicate_constraint (t, args, complain, in_decl); + /* In case there is a diagnostic, we want to establish the context + prior to printing errors. If no errors occur, this context is + removed before returning. */ + diagnosing_failed_constraint failure (t, args, info.noisy ()); - case CHECK_CONSTR: - return satisfy_check_constraint (t, args, complain, in_decl); + /* Instantiate the parameter mapping, so that we map directly to + the arguments provided to the instantiation. */ + tree map = tsubst_parameter_mapping (ATOMIC_CONSTR_MAP (t), args, quiet); + if (map == error_mark_node) + { + /* If instantiation of the parameter mapping fails, the program + is ill-formed. */ + if (info.noisy()) + tsubst_parameter_mapping (ATOMIC_CONSTR_MAP (t), args, info); + return cache.save (boolean_false_node); + } - case EXPR_CONSTR: - return satisfy_expression_constraint (t, args, complain, in_decl); + /* Rebuild the argument vector from the parameter mapping. */ + args = get_mapped_args (map); - case TYPE_CONSTR: - return satisfy_type_constraint (t, args, complain, in_decl); + /* Apply the parameter mapping (i.e., just substitute). */ + tree expr = ATOMIC_CONSTR_EXPR (t); + tree result = tsubst_expr (expr, args, quiet.complain, quiet.in_decl, false); + if (result == error_mark_node) + { + /* If substitution results in an invalid type or expression, the constraint + is not satisfied. Replay the substitution. */ + if (info.noisy ()) + tsubst_expr (expr, args, info.complain, info.in_decl, false); + return cache.save (boolean_false_node); + } - case ICONV_CONSTR: - return satisfy_implicit_conversion_constraint (t, args, complain, in_decl); + location_t loc = cp_expr_location (expr); - case DEDUCT_CONSTR: - return satisfy_argument_deduction_constraint (t, args, complain, in_decl); + /* [17.4.1.2] ... lvalue-to-value conversion is performed as necessary, + and EXPR shall be a constant expression of type bool. */ + result = force_rvalue (result, tf_error); + if (result == error_mark_node) + { + if (info.noisy ()) + inform (loc, "cannot convert constraint to rvalue"); + return cache.save (error_mark_node); + } + if (!same_type_p (TREE_TYPE (result), boolean_type_node)) + { + if (info.noisy ()) + inform (loc, "constraint does not have type %"); + return cache.save (error_mark_node); + } - case EXCEPT_CONSTR: - return satisfy_exception_constraint (t, args, complain, in_decl); + /* Compute the value of the constraint. */ + result = satisfaction_value (cxx_constant_value (result)); + if (result == boolean_false_node && info.noisy ()) + diagnose_atomic_constraint (t, args, info); - case PARM_CONSTR: - return satisfy_parameterized_constraint (t, args, complain, in_decl); + return cache.save (result); +} - case CONJ_CONSTR: - return satisfy_conjunction (t, args, complain, in_decl); +/* Determine if the normalized constraint T is satisfied. + Returns boolean_true_node if the expression/constraint is + satisfied, boolean_false_node if not, and error_mark_node + if the there was an error evaluating the constraint. - case DISJ_CONSTR: - return satisfy_disjunction (t, args, complain, in_decl); + The parameter mapping of atomic constraints is simply the + set of template arguments that will be substituted into + the expression, regardless of template parameters appearing + withing. Whether a template argument is used in the atomic + constraint only matters for subsumption. */ - case EXPR_PACK_EXPANSION: - return satisfy_pack_expansion (t, args, complain, in_decl); +static tree +satisfy_constraint_r (tree t, tree args, subst_info info) +{ + if (t == error_mark_node) + return error_mark_node; - default: - gcc_unreachable (); - } - return boolean_false_node; + switch (TREE_CODE (t)) + { + case CONJ_CONSTR: + return satisfy_conjunction (t, args, info); + case DISJ_CONSTR: + return satisfy_disjunction (t, args, info); + case ATOMIC_CONSTR: + return satisfy_atom (t, args, info); + default: + gcc_unreachable (); + } } -/* Check that the constraint is satisfied, according to the rules - for that constraint. Note that each satisfy_* function returns - true or false, depending on whether it is satisfied or not. */ +/* Check that the normalized constraint T is satisfied for ARGS. */ -tree -satisfy_constraint (tree t, tree args) +static tree +satisfy_constraint (tree t, tree args, subst_info info) { auto_timevar time (TV_CONSTRAINT_SAT); @@ -2283,146 +2417,199 @@ satisfy_constraint (tree t, tree args) to non-dependent terms, so we want to ensure full checking here. */ processing_template_decl_sentinel proc (true); - /* Avoid early exit in tsubst and tsubst_copy from null args; since earlier - substitution was done with processing_template_decl forced on, there will - be expressions that still need semantic processing, possibly buried in - decltype or a template argument. */ + /* We need to check access during satisfaction. */ + deferring_access_check_sentinel acs (dk_no_deferred); + + /* Avoid early exit in tsubst and tsubst_copy from null args. */ if (args == NULL_TREE) args = make_tree_vec (1); - return satisfy_constraint_1 (t, args, tf_none, NULL_TREE); + return satisfy_constraint_r (t, args, info); } -/* Check the associated constraints in CI against the given - ARGS, returning true when the constraints are satisfied - and false otherwise. */ +/* Check the normalized constraints T against ARGS, returning a satisfaction + value (either true, false, or error). */ -tree -satisfy_associated_constraints (tree ci, tree args) +static tree +satisfy_associated_constraints (tree t, tree args, subst_info info) { /* If there are no constraints then this is trivially satisfied. */ - if (!ci) + if (!t) return boolean_true_node; /* If any arguments depend on template parameters, we can't - check constraints. */ + check constraints. Pretend they're satisfied for now. */ if (args && uses_template_parms (args)) return boolean_true_node; - /* Check if we've seen a previous result. */ - if (tree prev = lookup_constraint_satisfaction (ci, args)) - return prev; - - /* Actually test for satisfaction. */ - tree result = satisfy_constraint (CI_ASSOCIATED_CONSTRAINTS (ci), args); - return memoize_constraint_satisfaction (ci, args, result); + return satisfy_constraint (t, args, info); } -} /* namespace */ +/* Evaluate EXPR as a constraint expression using ARGS, returning a + satisfaction value. */ -/* Evaluate the given constraint, returning boolean_true_node - if the constraint is satisfied and boolean_false_node - otherwise. */ - -tree -evaluate_constraints (tree constr, tree args) +static tree +satisfy_constraint_expression (tree expr, tree args, subst_info info) { - gcc_assert (constraint_p (constr)); - return satisfy_constraint (constr, args); + /* Normalize the expression before satisfaction testing. */ + tree norm; + if (args == NULL_TREE && concept_check_p (expr)) + { + tree id = unpack_concept_check (expr); + args = TREE_OPERAND (id, 1); + tree tmpl = get_concept_check_template (id); + norm = normalize_concept_definition (tmpl); + } + else + norm = normalize_constraint_expression (expr); + return satisfy_constraint (norm, args, info); } -/* Evaluate the function concept FN by substituting its own args - into its definition and evaluating that as the result. Returns - boolean_true_node if the constraints are satisfied and - boolean_false_node otherwise. */ +/* Used to evaluate concept checks and requires-expressions during + constant expression evaluation. */ tree -evaluate_function_concept (tree fn, tree args) +satisfy_constraint_expression (tree expr) { - tree constr = build_nt (CHECK_CONSTR, fn, args); - return satisfy_constraint (constr, args); + subst_info info (tf_none, NULL_TREE); + return satisfy_constraint_expression (expr, NULL_TREE, info); } -/* Evaluate the variable concept VAR by substituting its own args into - its initializer and checking the resulting constraint. Returns - boolean_true_node if the constraints are satisfied and - boolean_false_node otherwise. */ +/* True if T is satisfied for ARGS. */ -tree -evaluate_variable_concept (tree var, tree args) +static bool +constraint_expression_satisfied_p (tree t, tree args, subst_info info) { - tree constr = build_nt (CHECK_CONSTR, var, args); - return satisfy_constraint (constr, args); + tree r = satisfy_constraint_expression (t, args, info); + return r == boolean_true_node; } -/* Evaluate the given expression as if it were a predicate - constraint. Returns boolean_true_node if the constraint - is satisfied and boolean_false_node otherwise. */ - -tree -evaluate_constraint_expression (tree expr, tree args) +static bool +constraints_satisfied_p (tree t, subst_info info) { - tree constr = normalize_expression (expr); - return satisfy_constraint (constr, args); -} + if (!DECL_P (t)) + return constraint_expression_satisfied_p (t, NULL_TREE, info); -/* Returns true if the DECL's constraints are satisfied. - This is used in cases where a declaration is formed but - before it is used (e.g., overload resolution). */ + /* For inherited constructors, consider the original declaration; + it has the correct template information attached. */ + if (flag_new_inheriting_ctors) + t = strip_inheriting_ctors (t); + + /* Update the declaration for diagnostics. */ + info.in_decl = t; + + if (info.quiet ()) + if (bool *p = hash_map_safe_get (decl_satisfied_cache, t)) + return *p; -bool -constraints_satisfied_p (tree decl) -{ /* Get the constraints to check for satisfaction. This depends on whether we're looking at a template specialization or not. */ - tree ci; + tree norm = NULL_TREE; tree args = NULL_TREE; - if (tree ti = DECL_TEMPLATE_INFO (decl)) + tree ti = DECL_TEMPLATE_INFO (t); + if (ti) { tree tmpl = TI_TEMPLATE (ti); - ci = get_constraints (tmpl); - int depth = TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (tmpl)); - args = get_innermost_template_args (TI_ARGS (ti), depth); + norm = normalize_template_requirements (tmpl, info.noisy ()); + + /* The initial parameter mapping is the complete set of + template arguments substituted into the declaration. */ + args = TI_ARGS (ti); } else { - ci = get_constraints (decl); + /* These should be empty until we allow constraints on non-templates. */ + norm = normalize_nontemplate_requirements (t, info.noisy ()); + } + + bool r = true; + if (norm) + { + push_access_scope (t); + tree eval = satisfy_associated_constraints (norm, args, info); + pop_access_scope (t); + r = (eval == boolean_true_node); } - tree eval = satisfy_associated_constraints (ci, args); - return eval == boolean_true_node; + if (info.quiet ()) + hash_map_safe_put (decl_satisfied_cache, t, r); + + return r; } -/* Returns true if the constraints are satisfied by ARGS. - Here, T can be either a constraint or a constrained - declaration. */ +/* Returns true if the T's constraints are satisfied, of if T is an expression, + if T is satisfied. This is used in cases where the arguments can be + determined from the declaration or expression. + + Note that T is typically a template specialization. */ bool -constraints_satisfied_p (tree t, tree args) +constraints_satisfied_p (tree t) { - tree eval; - if (constraint_p (t)) - eval = evaluate_constraints (t, args); - else - eval = satisfy_associated_constraints (get_constraints (t), args); - return eval == boolean_true_node; + subst_info info (tf_none, NULL_TREE); + return constraints_satisfied_p (t, info); } -namespace +/* Returns true if the expression or constrained declaration T is + satisfied by ARGS. In this case, we don't have a specialization + where we can cache the results (e.g., alias templates). */ + +static bool +constraints_satisfied_p (tree t, tree args, subst_info info) { + if (!DECL_P (t)) + return constraint_expression_satisfied_p (t, args, info); + + /* Update the declaration for diagnostics. */ + info.in_decl = t; + + gcc_assert (TREE_CODE (t) == TEMPLATE_DECL); + if (tree norm = normalize_template_requirements (t, info.noisy ())) + { + tree pattern = DECL_TEMPLATE_RESULT (t); + push_access_scope (pattern); + tree eval = satisfy_associated_constraints (norm, args, info); + pop_access_scope (pattern); + return eval == boolean_true_node; + } -/* Normalize EXPR and determine if the resulting constraint is - satisfied by ARGS. Returns true if and only if the constraint - is satisfied. This is used extensively by diagnostics to - determine causes for failure. */ + return true; +} -inline bool -constraint_expression_satisfied_p (tree expr, tree args) +bool +constraints_satisfied_p (tree t, tree args) { - return evaluate_constraint_expression (expr, args) == boolean_true_node; + subst_info info (tf_none, NULL); + return constraints_satisfied_p (t, args, info); } -} /* namespace */ +/* Evaluate a concept check of the form C, returning either TRUE + or FALSE. If ARGS contains any template parameters, this returns the + check. If satisfaction yields a hard error, diagnose the error. */ + +tree +evaluate_concept_check (tree check, tsubst_flags_t complain) +{ + /* FIXME we ought to be able to pass complain into subst_info rather + than repeat satisfaction, but currently that will complain about + non-satisfaction as well as errors. */ + if (check == error_mark_node) + return error_mark_node; + + gcc_assert (concept_check_p (check)); + + subst_info info (tf_none, NULL_TREE); + tree result = satisfy_constraint_expression (check, NULL_TREE, info); + if (result == error_mark_node && (complain & tf_error)) + { + location_t loc = cp_expr_loc_or_input_loc (check); + error_at (loc, "concept satisfaction failed"); + info.complain = complain; + satisfy_constraint_expression (check, NULL_TREE, info); + } + + return result; +} /*--------------------------------------------------------------------------- Semantic analysis of requires-expressions @@ -2430,8 +2617,9 @@ constraint_expression_satisfied_p (tree expr, tree args) /* Finish a requires expression for the given PARMS (possibly null) and the non-empty sequence of requirements. */ + tree -finish_requires_expr (tree parms, tree reqs) +finish_requires_expr (location_t loc, tree parms, tree reqs) { /* Modify the declared parameters by removing their context so they don't refer to the enclosing scope and explicitly @@ -2446,41 +2634,53 @@ finish_requires_expr (tree parms, tree reqs) tree r = build_min (REQUIRES_EXPR, boolean_type_node, parms, reqs); TREE_SIDE_EFFECTS (r) = false; TREE_CONSTANT (r) = true; + SET_EXPR_LOCATION (r, loc); return r; } -/* Construct a requirement for the validity of EXPR. */ +/* Construct a requirement for the validity of EXPR. */ + tree -finish_simple_requirement (tree expr) +finish_simple_requirement (location_t loc, tree expr) { - return build_nt (SIMPLE_REQ, expr); + tree r = build_nt (SIMPLE_REQ, expr); + SET_EXPR_LOCATION (r, loc); + return r; } -/* Construct a requirement for the validity of TYPE. */ +/* Construct a requirement for the validity of TYPE. */ + tree -finish_type_requirement (tree type) +finish_type_requirement (location_t loc, tree type) { - return build_nt (TYPE_REQ, type); + tree r = build_nt (TYPE_REQ, type); + SET_EXPR_LOCATION (r, loc); + return r; } /* Construct a requirement for the validity of EXPR, along with its properties. if TYPE is non-null, then it specifies either an implicit conversion or argument deduction constraint, depending on whether any placeholders occur in the type name. - NOEXCEPT_P is true iff the noexcept keyword was specified. */ + NOEXCEPT_P is true iff the noexcept keyword was specified. */ + tree -finish_compound_requirement (tree expr, tree type, bool noexcept_p) +finish_compound_requirement (location_t loc, tree expr, tree type, bool noexcept_p) { tree req = build_nt (COMPOUND_REQ, expr, type); + SET_EXPR_LOCATION (req, loc); COMPOUND_REQ_NOEXCEPT_P (req) = noexcept_p; return req; } -/* Finish a nested requirement. */ +/* Finish a nested requirement. */ + tree -finish_nested_requirement (tree expr) +finish_nested_requirement (location_t loc, tree expr) { - return build_nt (NESTED_REQ, expr); + tree r = build_nt (NESTED_REQ, expr); + SET_EXPR_LOCATION (r, loc); + return r; } /* Check that FN satisfies the structural requirements of a @@ -2500,7 +2700,7 @@ check_function_concept (tree fn) if (TREE_CODE (body) == CLEANUP_POINT_EXPR) body = TREE_OPERAND (body, 0); - /* Check that the definition is written correctly. */ + /* Check that the definition is written correctly. */ if (TREE_CODE (body) != RETURN_EXPR) { location_t loc = DECL_SOURCE_LOCATION (fn); @@ -2580,108 +2780,93 @@ subsumes_constraints (tree a, tree b) return subsumes (a, b); } -/* Returns true when the the constraints in A subsume those in B, but - the constraints in B do not subsume the constraints in A. */ +/* Returns true when the the constraints in CI (with arguments + ARGS) strictly subsume the associated constraints of TMPL. */ + +bool +strictly_subsumes (tree ci, tree args, tree tmpl) +{ + tree n1 = get_normalized_constraints_from_info (ci, args, NULL_TREE); + tree n2 = get_normalized_constraints_from_decl (tmpl); + + return subsumes (n1, n2) && !subsumes (n2, n1); +} + +/* REturns true when the constraints in CI (with arguments ARGS) subsume + the associated constraints of TMPL. */ bool -strictly_subsumes (tree a, tree b) +weakly_subsumes (tree ci, tree args, tree tmpl) { - return subsumes (a, b) && !subsumes (b, a); + tree n1 = get_normalized_constraints_from_info (ci, args, NULL_TREE); + tree n2 = get_normalized_constraints_from_decl (tmpl); + + return subsumes (n1, n2); } /* Determines which of the declarations, A or B, is more constrained. That is, which declaration's constraints subsume but are not subsumed by the other's? - Returns 1 if A is more constrained than B, -1 if B is more constrained - than A, and 0 otherwise. */ + Returns 1 if D1 is more constrained than D2, -1 if D2 is more constrained + than D1, and 0 otherwise. */ int more_constrained (tree d1, tree d2) { - tree c1 = get_constraints (d1); - tree c2 = get_constraints (d2); + tree n1 = get_normalized_constraints_from_decl (d1); + tree n2 = get_normalized_constraints_from_decl (d2); + int winner = 0; - if (subsumes_constraints (c1, c2)) + if (subsumes (n1, n2)) ++winner; - if (subsumes_constraints (c2, c1)) + if (subsumes (n2, n1)) --winner; return winner; } -/* Returns true if D1 is at least as constrained as D2. That is, the - associated constraints of D1 subsume those of D2, or both declarations - are unconstrained. */ - -bool -at_least_as_constrained (tree d1, tree d2) -{ - tree c1 = get_constraints (d1); - tree c2 = get_constraints (d2); - return subsumes_constraints (c1, c2); -} - - /*--------------------------------------------------------------------------- Constraint diagnostics - -FIXME: Normalize expressions into constraints before evaluating them. -This should be the general pattern for all such diagnostics. ---------------------------------------------------------------------------*/ -/* The number of detailed constraint failures. */ - -int constraint_errors = 0; - -/* Do not generate errors after diagnosing this number of constraint - failures. - - FIXME: This is a really arbitrary number. Provide better control of - constraint diagnostics with a command line option. */ - -int constraint_thresh = 20; - - -/* Returns true if we should elide the diagnostic for a constraint failure. - This is the case when the number of errors has exceeded the pre-configured - threshold. */ - -inline bool -elide_constraint_failure_p () -{ - bool ret = constraint_thresh <= constraint_errors; - ++constraint_errors; - return ret; -} - -/* Returns the number of undiagnosed errors. */ - -inline int -undiagnosed_constraint_failures () -{ - return constraint_errors - constraint_thresh; +/* Returns the best location to diagnose a constraint error. */ + +static location_t +get_constraint_error_location (tree t) +{ + /* If we have a specific location give it. */ + tree expr = CONSTR_EXPR (t); + if (location_t loc = cp_expr_location (expr)) + return loc; + + /* If the constraint is normalized from a requires-clause, give + the location as that of the constrained declaration. */ + tree cxt = CONSTR_CONTEXT (t); + tree src = TREE_VALUE (cxt); + if (!src) + /* TODO: This only happens for constrained non-template declarations. */ + return input_location; + if (DECL_P (src)) + return DECL_SOURCE_LOCATION (src); + + /* Otherwise, give the location as the defining concept. */ + gcc_assert (concept_check_p (src)); + tree id = unpack_concept_check (src); + tree tmpl = TREE_OPERAND (id, 0); + if (OVL_P (tmpl)) + tmpl = OVL_FIRST (tmpl); + return DECL_SOURCE_LOCATION (tmpl); } -/* The diagnosis of constraints performs a combination of normalization - and satisfaction testing. We recursively walk through the conjunction or - disjunction of associated constraints, testing each sub-constraint in - turn. */ - -namespace { - -void diagnose_constraint (location_t, tree, tree, tree); - -/* Emit a specific diagnostics for a failed trait. */ +/* Emit a diagnostic for a failed trait. */ void -diagnose_trait_expression (location_t loc, tree, tree cur, tree args) +diagnose_trait_expr (tree expr, tree args) { - if (constraint_expression_satisfied_p (cur, args)) - return; - if (elide_constraint_failure_p()) - return; + location_t loc = cp_expr_location (expr); - tree expr = PRED_CONSTR_EXPR (cur); + /* Build a "fake" version of the instantiated trait, so we can + get the instantiated types from result. */ ++processing_template_decl; expr = tsubst_expr (expr, args, tf_none, NULL_TREE, false); --processing_template_decl; @@ -2758,390 +2943,224 @@ diagnose_trait_expression (location_t loc, tree, tree cur, tree args) } } -/* Diagnose the expression of a predicate constraint. */ - -void -diagnose_other_expression (location_t loc, tree, tree cur, tree args) +static tree +diagnose_valid_expression (tree expr, tree args, tree in_decl) { - if (constraint_expression_satisfied_p (cur, args)) - return; - if (elide_constraint_failure_p()) - return; - inform (loc, "%qE evaluated to false", cur); -} + tree result = tsubst_expr (expr, args, tf_none, in_decl, false); + if (result != error_mark_node) + return result; -/* Do our best to infer meaning from predicates. */ + location_t loc = cp_expr_loc_or_input_loc (expr); + inform (loc, "the required expression %qE is invalid", expr); -inline void -diagnose_predicate_constraint (location_t loc, tree orig, tree cur, tree args) -{ - if (TREE_CODE (PRED_CONSTR_EXPR (cur)) == TRAIT_EXPR) - diagnose_trait_expression (loc, orig, cur, args); - else - diagnose_other_expression (loc, orig, cur, args); -} + /* TODO: Replay the substitution to diagnose the error? */ + // tsubst_expr (expr, args, tf_error, in_decl, false); -/* Diagnose a failed pack expansion, possibly containing constraints. */ + return error_mark_node; +} -void -diagnose_pack_expansion (location_t loc, tree, tree cur, tree args) +static tree +diagnose_valid_type (tree type, tree args, tree in_decl) { - if (constraint_expression_satisfied_p (cur, args)) - return; - if (elide_constraint_failure_p()) - return; - - /* Make sure that we don't have naked packs that we don't expect. */ - if (!same_type_p (TREE_TYPE (cur), boolean_type_node)) - { - inform (loc, "invalid pack expansion in constraint %qE", cur); - return; - } + tree result = tsubst (type, args, tf_none, in_decl); + if (result != error_mark_node) + return result; - inform (loc, "in the expansion of %qE", cur); + location_t loc = cp_expr_loc_or_input_loc (type); + inform (loc, "the required type %qT is invalid", type); - /* Get the vector of expanded arguments. Note that n must not - be 0 since this constraint is not satisfied. */ - ++processing_template_decl; - tree exprs = tsubst_pack_expansion (cur, args, tf_none, NULL_TREE); - --processing_template_decl; - if (exprs == error_mark_node) - { - /* TODO: This error message could be better. */ - inform (loc, " substitution failure occurred during expansion"); - return; - } + /* TODO: Replay the substitution to diagnose the error? */ + // tsubst (type, args, tf_error, in_decl); - /* Check each expanded constraint separately. */ - int n = TREE_VEC_LENGTH (exprs); - for (int i = 0; i < n; ++i) - { - tree expr = TREE_VEC_ELT (exprs, i); - if (!constraint_expression_satisfied_p (expr, args)) - inform (loc, " %qE was not satisfied", expr); - } + return error_mark_node; } -/* Diagnose a potentially unsatisfied concept check constraint DECL. - Parameters are as for diagnose_constraint. */ - -void -diagnose_check_constraint (location_t loc, tree orig, tree cur, tree args) +static void +diagnose_simple_requirement (tree req, tree args, tree in_decl) { - if (constraints_satisfied_p (cur, args)) - return; - - tree decl = CHECK_CONSTR_CONCEPT (cur); - tree cargs = CHECK_CONSTR_ARGS (cur); - tree tmpl = DECL_TI_TEMPLATE (decl); - tree check = build_nt (CHECK_CONSTR, decl, cargs); - - /* Instantiate the concept check arguments. */ - tree targs = tsubst (cargs, args, tf_none, NULL_TREE); - if (targs == error_mark_node) - { - if (elide_constraint_failure_p ()) - return; - inform (loc, "invalid use of the concept %qE", check); - tsubst (cargs, args, tf_warning_or_error, NULL_TREE); - return; - } - - tree sub = build_tree_list (tmpl, targs); - /* Update to the expanded definitions. */ - cur = expand_concept (decl, targs); - if (cur == error_mark_node) - { - if (elide_constraint_failure_p ()) - return; - inform (loc, "in the expansion of concept %<%E %S%>", check, sub); - cur = get_concept_definition (decl); - tsubst_expr (cur, targs, tf_warning_or_error, NULL_TREE, false); - return; - } - - orig = get_concept_definition (CHECK_CONSTR_CONCEPT (orig)); - orig = normalize_expression (orig); - - location_t dloc = DECL_SOURCE_LOCATION (decl); - inform (dloc, "within %qS", sub); - diagnose_constraint (dloc, orig, cur, targs); + diagnose_valid_expression (TREE_OPERAND (req, 0), args, in_decl); } -/* Diagnose a potentially unsatisfied conjunction or disjunction. Parameters - are as for diagnose_constraint. */ - -void -diagnose_logical_constraint (location_t loc, tree orig, tree cur, tree args) +static void +diagnose_compound_requirement (tree req, tree args, tree in_decl) { - tree t0 = TREE_OPERAND (cur, 0); - tree t1 = TREE_OPERAND (cur, 1); - if (!constraints_satisfied_p (t0, args)) - diagnose_constraint (loc, TREE_OPERAND (orig, 0), t0, args); - else if (TREE_CODE (orig) == TRUTH_ORIF_EXPR) + tree expr = TREE_OPERAND (req, 0); + expr = diagnose_valid_expression (expr, args, in_decl); + if (expr == error_mark_node) return; - if (!constraints_satisfied_p (t1, args)) - diagnose_constraint (loc, TREE_OPERAND (orig, 1), t1, args); -} -/* Diagnose a potential expression constraint failure. */ + location_t loc = cp_expr_loc_or_input_loc (expr); -void -diagnose_expression_constraint (location_t loc, tree orig, tree cur, tree args) -{ - if (constraints_satisfied_p (cur, args)) - return; - if (elide_constraint_failure_p()) + /* Check the noexcept condition. */ + if (COMPOUND_REQ_NOEXCEPT_P (req) && !expr_noexcept_p (expr, tf_none)) + inform (loc, "%qE is not %", expr); + + tree type = TREE_OPERAND (req, 1); + type = diagnose_valid_type (type, args, in_decl); + if (type == error_mark_node) return; - tree expr = EXPR_CONSTR_EXPR (orig); - inform (loc, "the required expression %qE would be ill-formed", expr); + if (type) + { + subst_info quiet (tf_none, in_decl); + subst_info noisy (tf_error, in_decl); - // TODO: We should have a flag that controls this substitution. - // I'm finding it very useful for resolving concept check errors. + /* Check the expression against the result type. */ + if (tree placeholder = type_uses_auto (type)) + { + if (!type_deducible_p (expr, type, placeholder, args, quiet)) + { + tree orig_expr = TREE_OPERAND (req, 0); + inform (loc, "type deduction from %qE failed", orig_expr); + + /* Further explain the reason for the error. */ + type_deducible_p (expr, type, placeholder, args, noisy); + } + } + else if (!expression_convertible_p (expr, type, quiet)) + { + tree orig_expr = TREE_OPERAND (req, 0); + inform (loc, "cannot convert %qE to %qT", orig_expr, type); - // inform (input_location, "==== BEGIN DUMP ===="); - // tsubst_expr (EXPR_CONSTR_EXPR (orig), args, tf_warning_or_error, NULL_TREE, false); - // inform (input_location, "==== END DUMP ===="); + /* Further explain the reason for the error. */ + expression_convertible_p (expr, type, noisy); + } + } } -/* Diagnose a potentially failed type constraint. */ - -void -diagnose_type_constraint (location_t loc, tree orig, tree cur, tree args) +static void +diagnose_type_requirement (tree req, tree args, tree in_decl) { - if (constraints_satisfied_p (cur, args)) - return; - if (elide_constraint_failure_p()) - return; - - tree type = TYPE_CONSTR_TYPE (orig); - inform (loc, "the required type %qT would be ill-formed", type); + tree type = TREE_OPERAND (req, 0); + diagnose_valid_type (type, args, in_decl); } -/* Diagnose a potentially unsatisfied conversion constraint. */ - -void -diagnose_implicit_conversion_constraint (location_t loc, tree orig, tree cur, - tree args) +static void +diagnose_nested_requirement (tree req, tree args) { - if (constraints_satisfied_p (cur, args)) - return; - - /* The expression and type will previously have been substituted into, - and therefore may already be an error. Also, we will have already - diagnosed substitution failures into an expression since this must be - part of a compound requirement. */ - tree expr = ICONV_CONSTR_EXPR (cur); - if (error_operand_p (expr)) + tree expr = TREE_OPERAND (req, 0); + if (constraints_satisfied_p (expr, args)) return; + location_t loc = cp_expr_location (expr); + inform (loc, "nested requirement %qE is not satisfied", expr); - /* Don't elide a previously diagnosed failure. */ - if (elide_constraint_failure_p()) - return; - - tree type = ICONV_CONSTR_TYPE (cur); - if (error_operand_p (type)) - { - inform (loc, "substitution into type %qT failed", - ICONV_CONSTR_TYPE (orig)); - return; - } - - inform(loc, "%qE is not implicitly convertible to %qT", expr, type); + /* TODO: Replay the substitution to diagnose the error? */ + // subst_info noisy (tf_warning_or_error, NULL_TREE); + // constraints_satisfied_p (expr, args, noisy); } -/* Diagnose an argument deduction constraint. */ - -void -diagnose_argument_deduction_constraint (location_t loc, tree orig, tree cur, - tree args) +static void +diagnose_requirement (tree req, tree args, tree in_decl) { - if (constraints_satisfied_p (cur, args)) - return; - - /* The expression and type will previously have been substituted into, - and therefore may already be an error. Also, we will have already - diagnosed substution failures into an expression since this must be - part of a compound requirement. */ - tree expr = DEDUCT_CONSTR_EXPR (cur); - if (error_operand_p (expr)) - return; - - /* Don't elide a previously diagnosed failure. */ - if (elide_constraint_failure_p ()) - return; - - tree pattern = DEDUCT_CONSTR_PATTERN (cur); - if (error_operand_p (pattern)) + iloc_sentinel loc_s (cp_expr_location (req)); + switch (TREE_CODE (req)) { - inform (loc, "substitution into type %qT failed", - DEDUCT_CONSTR_PATTERN (orig)); - return; + case SIMPLE_REQ: + return diagnose_simple_requirement (req, args, in_decl); + case COMPOUND_REQ: + return diagnose_compound_requirement (req, args, in_decl); + case TYPE_REQ: + return diagnose_type_requirement (req, args, in_decl); + case NESTED_REQ: + return diagnose_nested_requirement (req, args); + default: + gcc_unreachable (); } - - inform (loc, "unable to deduce placeholder type %qT from %qE", - pattern, expr); } -/* Diagnose an exception constraint. */ - -void -diagnose_exception_constraint (location_t loc, tree orig, tree cur, tree args) +static void +diagnose_requires_expr (tree expr, tree args, tree in_decl) { - if (constraints_satisfied_p (cur, args)) - return; - if (elide_constraint_failure_p ()) - return; + local_specialization_stack stack (lss_copy); + tree parms = TREE_OPERAND (expr, 0); + tree body = TREE_OPERAND (expr, 1); - /* Rebuild a noexcept expression. */ - tree expr = EXCEPT_CONSTR_EXPR (cur); - if (error_operand_p (expr)) + cp_unevaluated u; + subst_info info (tf_warning_or_error, NULL_TREE); + tree vars = tsubst_constraint_variables (parms, args, info); + if (vars == error_mark_node) return; - inform (loc, "%qE evaluated to false", EXCEPT_CONSTR_EXPR (orig)); + tree p = body; + while (p) + { + tree req = TREE_VALUE (p); + diagnose_requirement (req, args, in_decl); + p = TREE_CHAIN (p); + } } -/* Diagnose a potentially unsatisfied parameterized constraint. */ +/* Diagnose a substitution failure in the atomic constraint T. Note that + ARGS have been previously instantiated through the parameter map. */ -void -diagnose_parameterized_constraint (location_t loc, tree orig, tree cur, - tree args) +static void +diagnose_atomic_constraint (tree t, tree args, subst_info info) { - if (constraints_satisfied_p (cur, args)) - return; - - local_specialization_stack stack; - tree parms = PARM_CONSTR_PARMS (cur); - tree vars = tsubst_constraint_variables (parms, args, tf_warning_or_error, - NULL_TREE); - if (vars == error_mark_node) + /* If the constraint is already ill-formed, we've previously diagnosed + the reason. We should still say why the constraints aren't satisfied. */ + if (t == error_mark_node) { - if (elide_constraint_failure_p ()) - return; - - /* TODO: Check which variable failed and use orig to diagnose - that substitution error. */ - inform (loc, "failed to instantiate constraint variables"); + location_t loc; + if (info.in_decl) + loc = DECL_SOURCE_LOCATION (info.in_decl); + else + loc = input_location; + inform (loc, "invalid constraints"); return; } - /* TODO: It would be better write these in a list. */ - while (vars) - { - inform (loc, " with %q#D", vars); - vars = TREE_CHAIN (vars); - } - orig = PARM_CONSTR_OPERAND (orig); - cur = PARM_CONSTR_OPERAND (cur); - return diagnose_constraint (loc, orig, cur, args); -} - -/* Diagnose the constraint CUR for the given ARGS. This is only ever invoked - on the associated constraints, so we can only have conjunctions of - predicate constraints. The ORIGinal (dependent) constructs follow - the current constraints to enable better diagnostics. Note that ORIG - and CUR must be the same kinds of node, except when CUR is an error. */ + location_t loc = get_constraint_error_location (t); + iloc_sentinel loc_s (loc); -void -diagnose_constraint (location_t loc, tree orig, tree cur, tree args) -{ - switch (TREE_CODE (cur)) + /* Generate better diagnostics for certain kinds of expressions. */ + tree expr = ATOMIC_CONSTR_EXPR (t); + STRIP_ANY_LOCATION_WRAPPER (expr); + switch (TREE_CODE (expr)) { - case EXPR_CONSTR: - diagnose_expression_constraint (loc, orig, cur, args); - break; - - case TYPE_CONSTR: - diagnose_type_constraint (loc, orig, cur, args); - break; - - case ICONV_CONSTR: - diagnose_implicit_conversion_constraint (loc, orig, cur, args); - break; - - case DEDUCT_CONSTR: - diagnose_argument_deduction_constraint (loc, orig, cur, args); - break; - - case EXCEPT_CONSTR: - diagnose_exception_constraint (loc, orig, cur, args); - break; - - case CONJ_CONSTR: - case DISJ_CONSTR: - diagnose_logical_constraint (loc, orig, cur, args); - break; - - case PRED_CONSTR: - diagnose_predicate_constraint (loc, orig, cur, args); - break; - - case PARM_CONSTR: - diagnose_parameterized_constraint (loc, orig, cur, args); - break; - - case CHECK_CONSTR: - diagnose_check_constraint (loc, orig, cur, args); + case TRAIT_EXPR: + diagnose_trait_expr (expr, args); break; - - case EXPR_PACK_EXPANSION: - diagnose_pack_expansion (loc, orig, cur, args); + case REQUIRES_EXPR: + diagnose_requires_expr (expr, args, info.in_decl); break; - - case ERROR_MARK: - /* TODO: Can we improve the diagnostic with the original? */ - inform (input_location, "ill-formed constraint"); + case INTEGER_CST: + /* This must be either 0 or false. */ + inform (loc, "%qE is never satisfied", expr); break; - default: - gcc_unreachable (); - break; + inform (loc, "the expression %qE evaluated to %", expr); } } -/* Diagnose the reason(s) why ARGS do not satisfy the constraints - of declaration DECL. */ - -void -diagnose_declaration_constraints (location_t loc, tree decl, tree args) +diagnosing_failed_constraint:: +diagnosing_failed_constraint (tree t, tree args, bool diag) + : diagnosing_error (diag) { - inform (loc, " constraints not satisfied"); - - /* Constraints are attached to the template. */ - if (tree ti = DECL_TEMPLATE_INFO (decl)) - { - decl = TI_TEMPLATE (ti); - if (!args) - args = TI_ARGS (ti); - } - - /* Recursively diagnose the associated constraints. */ - tree ci = get_constraints (decl); - tree t = CI_ASSOCIATED_CONSTRAINTS (ci); - diagnose_constraint (loc, t, t, args); + if (diagnosing_error) + current_failed_constraint = tree_cons (args, t, current_failed_constraint); } -} // namespace +diagnosing_failed_constraint:: +~diagnosing_failed_constraint () +{ + if (diagnosing_error && current_failed_constraint) + current_failed_constraint = TREE_CHAIN (current_failed_constraint); +} -/* Emit diagnostics detailing the failure ARGS to satisfy the - constraints of T. Here, T can be either a constraint - or a declaration. */ +/* Emit diagnostics detailing the failure ARGS to satisfy the constraints + of T. Here, T can be either a constraint or a declaration. */ void diagnose_constraints (location_t loc, tree t, tree args) { - constraint_errors = 0; + inform (loc, "constraints not satisfied"); - if (constraint_p (t)) - diagnose_constraint (loc, t, t, args); - else if (DECL_P (t)) - diagnose_declaration_constraints (loc, t, args); + /* Replay satisfaction, but diagnose errors. */ + subst_info info (tf_warning_or_error, NULL_TREE); + if (!args) + constraints_satisfied_p (t, info); else - gcc_unreachable (); - - /* Note the number of elided failures. */ - int n = undiagnosed_constraint_failures (); - if (n > 0) - inform (loc, "... and %d more constraint errors not shown", n); + constraints_satisfied_p (t, args, info); } + +#include "gt-cp-constraint.h" diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c index 0a72231..f38b4e8 100644 --- a/gcc/cp/cp-objcp-common.c +++ b/gcc/cp/cp-objcp-common.c @@ -381,6 +381,7 @@ cp_common_init_ts (void) /* New decls. */ MARK_TS_DECL_COMMON (TEMPLATE_DECL); MARK_TS_DECL_COMMON (WILDCARD_DECL); + MARK_TS_DECL_COMMON (CONCEPT_DECL); MARK_TS_DECL_NON_COMMON (USING_DECL); @@ -458,17 +459,11 @@ cp_common_init_ts (void) MARK_TS_EXP (CHECK_CONSTR); MARK_TS_EXP (COMPOUND_REQ); MARK_TS_EXP (CONJ_CONSTR); - MARK_TS_EXP (DEDUCT_CONSTR); MARK_TS_EXP (DISJ_CONSTR); - MARK_TS_EXP (EXCEPT_CONSTR); - MARK_TS_EXP (EXPR_CONSTR); - MARK_TS_EXP (ICONV_CONSTR); + MARK_TS_EXP (ATOMIC_CONSTR); MARK_TS_EXP (NESTED_REQ); - MARK_TS_EXP (PARM_CONSTR); - MARK_TS_EXP (PRED_CONSTR); MARK_TS_EXP (REQUIRES_EXPR); MARK_TS_EXP (SIMPLE_REQ); - MARK_TS_EXP (TYPE_CONSTR); MARK_TS_EXP (TYPE_REQ); c_common_init_ts (); diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def index 4db1d31..845a7e2 100644 --- a/gcc/cp/cp-tree.def +++ b/gcc/cp/cp-tree.def @@ -507,6 +507,11 @@ DEFTREECODE (OMP_DEPOBJ, "omp_depobj", tcc_statement, 2) /* Extensions for Concepts. */ +/* Concept definition. This is not entirely different than a VAR_DECL + except that a) it must be a template, and b) doesn't have the wide + range of value and linkage options available to variables. */ +DEFTREECODE (CONCEPT_DECL, "concept_decl", tcc_declaration, 0) + /* Used to represent information associated with constrained declarations. */ DEFTREECODE (CONSTRAINT_INFO, "constraint_info", tcc_exceptional, 0) @@ -541,10 +546,24 @@ DEFTREECODE (NESTED_REQ, "nested_req", tcc_expression, 1) The operands of a constraint can be either types or expressions. Unlike expressions, constraints do not have a type. */ -/* A predicate constraint evaluates an expression E. +/* An atomic constraint evaluates an expression E. The operand of the + constraint is its parameter mapping. The actual expression is stored + in the context. + + ATOMIC_CONSTR_INFO provides source info to support diagnostics. + ATOMIC_CONSTR_EXPR has the expression to be evaluated. + ATOMIC_CONSTR_PARMS is the parameter mapping for the atomic constraint + and is stored in the type field. */ +DEFTREECODE (ATOMIC_CONSTR, "atomic_constr", tcc_expression, 1) + +/* The conjunction and disjunction of two constraints, respectively. + Operands are accessed using TREE_OPERAND. The third operand provides + source info for diagnostics. - PRED_CONSTR_EXPR has the expression to be evaluated. */ -DEFTREECODE (PRED_CONSTR, "pred_constr", tcc_expression, 1) + CONJ_CONSTR_INFO and DISJ_CONSTR_INFO provide access to the source + information of constraints, which is stored in the TREE_TYPE. */ +DEFTREECODE (CONJ_CONSTR, "conj_constr", tcc_expression, 2) +DEFTREECODE (DISJ_CONSTR, "disj_constr", tcc_expression, 2) /* A check constraint represents the checking of a concept C. It has two operands: the template defining the concept @@ -554,53 +573,6 @@ DEFTREECODE (PRED_CONSTR, "pred_constr", tcc_expression, 1) CHECK_CONSTR_ARGUMENTS are the template arguments */ DEFTREECODE (CHECK_CONSTR, "check_constr", tcc_expression, 2) -/* An expression constraint determines the validity of a expression E. - - EXPR_CONST_EXPR has the expression being validated. */ -DEFTREECODE (EXPR_CONSTR, "expr_constr", tcc_expression, 1) - -/* A type constraint determines the validity of a type T. Note that - - TYPE_CONST_TYPE has the type being validated */ -DEFTREECODE (TYPE_CONSTR, "type_constr", tcc_expression, 1) - -/* An implicit conversion constraint determines if an expression - E is implicitly convertible to a type T. Note that T may - be dependent but does not contain any placeholders. - - ICONV_CONSTR_EXPR has the expression E. - ICONV_CONSTR_TYPE has the type T. - */ -DEFTREECODE (ICONV_CONSTR, "iconv_constr", tcc_expression, 2) - -/* An argument deduction constraint determines if the type of an - expression E can be deduced from a type pattern T. Note that - T must contain at least one place holder. - - DEDUCT_CONSTR_EXPR has the expression E - DEDUCT_CONSTR_PATTERN has the type pattern T. - DEDUCT_CONSTR_PLACEHOLDERS has the list of placeholder nodes in T. */ -DEFTREECODE (DEDUCT_CONSTR, "deduct_constr", tcc_expression, 3) - -/* An exception constraint determines if, for an expression E, - noexcept(E) is true. - - EXCEPT_CONSTR_EXPR has the expression E. */ -DEFTREECODE (EXCEPT_CONSTR, "except_constr", tcc_expression, 1) - -/* A parameterized constraint declares constraint variables, which - are used in expression, type, and exception constraints. - - PARM_CONSTR_PARMS has a TREE_LIST of parameter declarations. - PARM_CONSTR_OPERAND has the nested constraint. */ -DEFTREECODE (PARM_CONSTR, "parm_constr", tcc_expression, 2) - -/* The conjunction and disjunction of two constraints, respectively. - Operands are accessed using TREE_OPERAND. */ -DEFTREECODE (CONJ_CONSTR, "conj_constr", tcc_expression, 2) -DEFTREECODE (DISJ_CONSTR, "disj_constr", tcc_expression, 2) - - /* Local variables: mode:c diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index b82b580..9ff617b 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1522,9 +1522,37 @@ check_constraint_info (tree t) #define PLACEHOLDER_TYPE_CONSTRAINTS(NODE) \ DECL_SIZE_UNIT (TYPE_NAME (NODE)) -/* The expression evaluated by the predicate constraint. */ -#define PRED_CONSTR_EXPR(NODE) \ - TREE_OPERAND (TREE_CHECK (NODE, PRED_CONSTR), 0) +/* Valid for any normalized constraint. */ +#define CONSTR_CHECK(NODE) \ + TREE_CHECK3 (NODE, ATOMIC_CONSTR, CONJ_CONSTR, DISJ_CONSTR) + +/* The CONSTR_INFO stores normalization data for a constraint. It refers to + the original expression and the expression or declaration + from which the constraint was normalized. + + This is TREE_LIST whose TREE_PURPOSE is the original expression and whose + TREE_VALUE is a list of contexts. */ +#define CONSTR_INFO(NODE) \ + TREE_TYPE (CONSTR_CHECK (NODE)) + +/* The expression evaluated by the constraint. */ +#define CONSTR_EXPR(NODE) \ + TREE_PURPOSE (CONSTR_INFO (NODE)) + +/* The expression or declaration from which this constraint was normalized. + This is a TREE_LIST whose TREE_VALUE is either a template-id expression + denoting a concept check or the declaration introducing the constraint. + These are chained to other context objects. */ +#define CONSTR_CONTEXT(NODE) \ + TREE_VALUE (CONSTR_INFO (NODE)) + +/* The parameter mapping for an atomic constraint. */ +#define ATOMIC_CONSTR_MAP(NODE) \ + TREE_OPERAND (TREE_CHECK (NODE, ATOMIC_CONSTR), 0) + +/* The expression of an atomic constraint. */ +#define ATOMIC_CONSTR_EXPR(NODE) \ + CONSTR_EXPR (ATOMIC_CONSTR_CHECK (NODE)) /* The concept of a concept check. */ #define CHECK_CONSTR_CONCEPT(NODE) \ @@ -1534,46 +1562,6 @@ check_constraint_info (tree t) #define CHECK_CONSTR_ARGS(NODE) \ TREE_OPERAND (TREE_CHECK (NODE, CHECK_CONSTR), 1) -/* The expression validated by the predicate constraint. */ -#define EXPR_CONSTR_EXPR(NODE) \ - TREE_OPERAND (TREE_CHECK (NODE, EXPR_CONSTR), 0) - -/* The type validated by the predicate constraint. */ -#define TYPE_CONSTR_TYPE(NODE) \ - TREE_OPERAND (TREE_CHECK (NODE, TYPE_CONSTR), 0) - -/* In an implicit conversion constraint, the source expression. */ -#define ICONV_CONSTR_EXPR(NODE) \ - TREE_OPERAND (TREE_CHECK (NODE, ICONV_CONSTR), 0) - -/* In an implicit conversion constraint, the target type. */ -#define ICONV_CONSTR_TYPE(NODE) \ - TREE_OPERAND (TREE_CHECK (NODE, ICONV_CONSTR), 1) - -/* In an argument deduction constraint, the source expression. */ -#define DEDUCT_CONSTR_EXPR(NODE) \ - TREE_OPERAND (TREE_CHECK (NODE, DEDUCT_CONSTR), 0) - -/* In an argument deduction constraint, the target type pattern. */ -#define DEDUCT_CONSTR_PATTERN(NODE) \ - TREE_OPERAND (TREE_CHECK (NODE, DEDUCT_CONSTR), 1) - -/* In an argument deduction constraint, the list of placeholder nodes. */ -#define DEDUCT_CONSTR_PLACEHOLDER(NODE) \ - TREE_OPERAND (TREE_CHECK (NODE, DEDUCT_CONSTR), 2) - -/* The expression of an exception constraint. */ -#define EXCEPT_CONSTR_EXPR(NODE) \ - TREE_OPERAND (TREE_CHECK (NODE, EXCEPT_CONSTR), 0) - -/* In a parameterized constraint, the local parameters. */ -#define PARM_CONSTR_PARMS(NODE) \ - TREE_OPERAND (TREE_CHECK (NODE, PARM_CONSTR), 0) - -/* In a parameterized constraint, the operand. */ -#define PARM_CONSTR_OPERAND(NODE) \ - TREE_OPERAND (TREE_CHECK (NODE, PARM_CONSTR), 1) - /* Whether a PARM_DECL represents a local parameter in a requires-expression. */ #define CONSTRAINT_VAR_P(NODE) \ @@ -1663,6 +1651,7 @@ struct GTY(()) saved_scope { int x_processing_template_decl; int x_processing_specialization; + int x_processing_constraint; int suppress_location_wrappers; BOOL_BITFIELD x_processing_explicit_instantiation : 1; BOOL_BITFIELD need_pop_function_context : 1; @@ -2627,7 +2616,8 @@ struct GTY(()) lang_decl_base { || TREE_CODE (NODE) == CONST_DECL \ || TREE_CODE (NODE) == TYPE_DECL \ || TREE_CODE (NODE) == TEMPLATE_DECL \ - || TREE_CODE (NODE) == USING_DECL) + || TREE_CODE (NODE) == USING_DECL \ + || TREE_CODE (NODE) == CONCEPT_DECL) /* DECL_LANG_SPECIFIC for the above codes. */ @@ -3358,6 +3348,33 @@ struct GTY(()) lang_decl { #define TEMPLATE_DECL_COMPLEX_ALIAS_P(NODE) \ DECL_LANG_FLAG_2 (TEMPLATE_DECL_CHECK (NODE)) +/* Returns t iff the node can have a TEMPLATE_INFO field. */ + +inline tree +template_info_decl_check (const_tree t, const char* f, int l, const char* fn) +{ + switch (TREE_CODE (t)) + { + case VAR_DECL: + case FUNCTION_DECL: + case FIELD_DECL: + case TYPE_DECL: + case CONCEPT_DECL: + case TEMPLATE_DECL: + return const_cast(t); + default: + break; + } + tree_check_failed (t, f, l, fn, + VAR_DECL, FUNCTION_DECL, FIELD_DECL, TYPE_DECL, + CONCEPT_DECL, TEMPLATE_DECL, 0); + gcc_unreachable (); +} + + +#define TEMPLATE_INFO_DECL_CHECK(NODE) \ + template_info_decl_check ((NODE), __FILE__, __LINE__, __FUNCTION__) + /* Nonzero for a type which is an alias for another type; i.e, a type which declaration was written 'using name-of-type = another-type'. */ @@ -3367,8 +3384,8 @@ struct GTY(()) lang_decl { && TREE_CODE (TYPE_NAME (NODE)) == TYPE_DECL \ && TYPE_DECL_ALIAS_P (TYPE_NAME (NODE))) -/* If non-NULL for a VAR_DECL, FUNCTION_DECL, TYPE_DECL or - TEMPLATE_DECL, the entity is either a template specialization (if +/* If non-NULL for a VAR_DECL, FUNCTION_DECL, TYPE_DECL, TEMPLATE_DECL, + or CONCEPT_DECL, the entity is either a template specialization (if DECL_USE_TEMPLATE is nonzero) or the abstract instance of the template itself. @@ -3387,7 +3404,7 @@ struct GTY(()) lang_decl { global function f. In this case, DECL_TEMPLATE_INFO for S::f will be non-NULL, but DECL_USE_TEMPLATE will be zero. */ #define DECL_TEMPLATE_INFO(NODE) \ - (DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_FIELD_OR_FUNCTION_DECL_CHECK (NODE)) \ + (DECL_LANG_SPECIFIC (TEMPLATE_INFO_DECL_CHECK (NODE)) \ ->u.min.template_info) /* For a lambda capture proxy, its captured variable. */ @@ -5222,6 +5239,8 @@ enum tsubst_flags { declaration. */ tf_no_cleanup = 1 << 10, /* Do not build a cleanup (build_target_expr and friends) */ + tf_norm = 1 << 11, /* Build diagnostic information during + constraint normalization. */ /* Convenient substitution flags combinations. */ tf_warning_or_error = tf_warning | tf_error }; @@ -6121,43 +6140,6 @@ class_of_this_parm (const_tree fntype) return TREE_TYPE (type_of_this_parm (fntype)); } -/* True iff T is a variable template declaration. */ -inline bool -variable_template_p (tree t) -{ - if (TREE_CODE (t) != TEMPLATE_DECL) - return false; - if (!PRIMARY_TEMPLATE_P (t)) - return false; - if (tree r = DECL_TEMPLATE_RESULT (t)) - return VAR_P (r); - return false; -} - -/* True iff T is a variable concept definition. That is, T is - a variable template declared with the concept specifier. */ -inline bool -variable_concept_p (tree t) -{ - if (TREE_CODE (t) != TEMPLATE_DECL) - return false; - if (tree r = DECL_TEMPLATE_RESULT (t)) - return VAR_P (r) && DECL_DECLARED_CONCEPT_P (r); - return false; -} - -/* True iff T is a concept definition. That is, T is a variable or function - template declared with the concept specifier. */ -inline bool -concept_template_p (tree t) -{ - if (TREE_CODE (t) != TEMPLATE_DECL) - return false; - if (tree r = DECL_TEMPLATE_RESULT (t)) - return VAR_OR_FUNCTION_DECL_P (r) && DECL_DECLARED_CONCEPT_P (r); - return false; -} - /* A parameter list indicating for a function with no parameters, e.g "int f(void)". */ extern cp_parameter_declarator *no_parameters; @@ -6614,6 +6596,9 @@ extern void finish_eh_spec_block (tree, tree); extern tree build_eh_type_type (tree); extern tree cp_protect_cleanup_actions (void); extern tree create_try_catch_expr (tree, tree); +extern tree template_parms_to_args (tree); +extern tree template_parms_level_to_args (tree); +extern tree generic_targs_for (tree); /* in expr.c */ extern tree cplus_expand_constant (tree); @@ -6747,6 +6732,8 @@ extern void maybe_show_extern_c_location (void); extern bool literal_integer_zerop (const_tree); /* in pt.c */ +extern void push_access_scope (tree); +extern void pop_access_scope (tree); extern bool check_template_shadow (tree); extern bool check_auto_in_tmpl_args (tree, tree); extern tree get_innermost_template_args (tree, int); @@ -6766,6 +6753,8 @@ extern int num_template_headers_for_class (tree); extern void check_template_variable (tree); extern tree make_auto (void); extern tree make_decltype_auto (void); +extern tree make_constrained_auto (tree, tree); +extern tree make_constrained_decltype_auto (tree, tree); extern tree make_template_placeholder (tree); extern bool template_placeholder_p (tree); extern tree do_auto_deduction (tree, tree, tree, @@ -6792,6 +6781,7 @@ extern bool check_default_tmpl_args (tree, tree, bool, bool, int); extern tree push_template_decl (tree); extern tree push_template_decl_real (tree, bool); extern tree add_inherited_template_parms (tree, tree); +extern void template_parm_level_and_index (tree, int*, int*); extern bool redeclare_class_template (tree, tree, tree); extern tree lookup_template_class (tree, tree, tree, tree, int, tsubst_flags_t); @@ -6816,6 +6806,7 @@ extern bool always_instantiate_p (tree); extern bool maybe_instantiate_noexcept (tree, tsubst_flags_t = tf_warning_or_error); extern tree instantiate_decl (tree, bool, bool); extern int comp_template_parms (const_tree, const_tree); +extern bool template_heads_equivalent_p (const_tree, const_tree); extern bool builtin_pack_fn_p (tree); extern tree uses_parameter_packs (tree); extern bool template_parameter_pack_p (const_tree); @@ -6844,7 +6835,11 @@ extern tree tsubst_copy_and_build (tree, tree, tsubst_flags_t, tree, bool, bool); extern tree tsubst_expr (tree, tree, tsubst_flags_t, tree, bool); -extern tree tsubst_pack_expansion (tree, tree, tsubst_flags_t, tree); +extern tree tsubst_pack_expansion (tree, tree, tsubst_flags_t, tree); +extern tree tsubst_argument_pack (tree, tree, tsubst_flags_t, tree); +extern tree tsubst_template_args (tree, tree, tsubst_flags_t, tree); +extern tree tsubst_template_arg (tree, tree, tsubst_flags_t, tree); +extern tree tsubst_function_parms (tree, tree, tsubst_flags_t, tree); extern tree most_general_template (tree); extern tree get_mostly_instantiated_function_type (tree); extern bool problematic_instantiation_changed (void); @@ -6913,6 +6908,7 @@ extern bool deduction_guide_p (const_tree); extern bool copy_guide_p (const_tree); extern bool template_guide_p (const_tree); extern void store_explicit_specifier (tree, tree); +extern tree add_outermost_template_args (tree, tree); /* in rtti.c */ /* A vector of all tinfo decls that haven't been emitted yet. */ @@ -7077,7 +7073,9 @@ extern tree finish_asm_stmt (location_t, int, tree, tree, extern tree finish_label_stmt (tree); extern void finish_label_decl (tree); extern cp_expr finish_parenthesized_expr (cp_expr); -extern tree force_paren_expr (tree); +extern tree force_paren_expr (tree, bool = false); +inline tree force_paren_expr_uneval (tree t) +{ return force_paren_expr (t, true); } extern tree maybe_undo_parenthesized_ref (tree); extern tree maybe_strip_ref_conversion (tree); extern tree finish_non_static_data_member (tree, tree, tree); @@ -7661,69 +7659,97 @@ typedef void cp_binding_oracle_function (enum cp_oracle_request, tree identifier extern cp_binding_oracle_function *cp_binding_oracle; +/* Set during diagnostics to record the failed constraint. This is a + TREE_LIST whose VALUE is the constraint and whose PURPOSE are the + instantiation arguments Defined in pt.c. */ + +extern tree current_failed_constraint; + +/* An RAII class to manage the failed constraint. */ + +struct diagnosing_failed_constraint +{ + diagnosing_failed_constraint (tree, tree, bool); + ~diagnosing_failed_constraint (); + + bool diagnosing_error; +}; + /* in constraint.cc */ -extern void init_constraint_processing (); -extern bool constraint_p (tree); -extern tree conjoin_constraints (tree, tree); -extern tree conjoin_constraints (tree); + +extern void init_constraint_processing (); +extern cp_expr finish_constraint_or_expr (location_t, cp_expr, cp_expr); +extern cp_expr finish_constraint_and_expr (location_t, cp_expr, cp_expr); +extern cp_expr finish_constraint_primary_expr (cp_expr); +extern tree finish_concept_definition (cp_expr, tree); +extern tree combine_constraint_expressions (tree, tree); extern tree get_constraints (tree); extern void set_constraints (tree, tree); extern void remove_constraints (tree); extern tree current_template_constraints (void); extern tree associate_classtype_constraints (tree); extern tree build_constraints (tree, tree); +extern tree get_template_head_requirements (tree); +extern tree get_trailing_function_requirements (tree); extern tree get_shorthand_constraints (tree); -extern tree build_concept_check (tree, tree, tree = NULL_TREE); + +extern tree build_concept_id (tree); +extern tree build_type_constraint (tree, tree, tsubst_flags_t); +extern tree build_concept_check (tree, tree, tsubst_flags_t); +extern tree build_concept_check (tree, tree, tree, tsubst_flags_t); + +extern tree_pair finish_type_constraints (tree, tree, tsubst_flags_t); extern tree build_constrained_parameter (tree, tree, tree = NULL_TREE); -extern tree make_constrained_auto (tree, tree); extern void placeholder_extract_concept_and_args (tree, tree&, tree&); extern bool equivalent_placeholder_constraints (tree, tree); extern hashval_t hash_placeholder_constraint (tree); extern bool deduce_constrained_parameter (tree, tree&, tree&); extern tree resolve_constraint_check (tree); extern tree check_function_concept (tree); -extern tree finish_template_introduction (tree, tree); +extern tree finish_template_introduction (tree, tree, location_t loc); extern bool valid_requirements_p (tree); extern tree finish_concept_name (tree); extern tree finish_shorthand_constraint (tree, tree); -extern tree finish_requires_expr (tree, tree); -extern tree finish_simple_requirement (tree); -extern tree finish_type_requirement (tree); -extern tree finish_compound_requirement (tree, tree, bool); -extern tree finish_nested_requirement (tree); +extern tree finish_requires_expr (location_t, tree, tree); +extern tree finish_simple_requirement (location_t, tree); +extern tree finish_type_requirement (location_t, tree); +extern tree finish_compound_requirement (location_t, tree, tree, bool); +extern tree finish_nested_requirement (location_t, tree); extern void check_constrained_friend (tree, tree); extern tree tsubst_requires_expr (tree, tree, tsubst_flags_t, tree); extern tree tsubst_constraint (tree, tree, tsubst_flags_t, tree); extern tree tsubst_constraint_info (tree, tree, tsubst_flags_t, tree); -extern bool function_concept_check_p (tree); -extern tree normalize_expression (tree); -extern tree expand_concept (tree, tree); -extern bool expanding_concept (); -extern tree evaluate_constraints (tree, tree); -extern tree evaluate_function_concept (tree, tree); -extern tree evaluate_variable_concept (tree, tree); -extern tree evaluate_constraint_expression (tree, tree); +extern tree tsubst_parameter_mapping (tree, tree, tsubst_flags_t, tree); +extern tree get_mapped_args (tree); + +struct processing_constraint_expression_sentinel +{ + processing_constraint_expression_sentinel (); + ~processing_constraint_expression_sentinel (); +}; + +extern bool processing_constraint_expression_p (); + +extern tree unpack_concept_check (tree); +extern tree evaluate_concept_check (tree, tsubst_flags_t); +extern tree satisfy_constraint_expression (tree); extern bool constraints_satisfied_p (tree); extern bool constraints_satisfied_p (tree, tree); -extern tree lookup_constraint_satisfaction (tree, tree); -extern tree memoize_constraint_satisfaction (tree, tree, tree); -extern tree lookup_concept_satisfaction (tree, tree); -extern tree memoize_concept_satisfaction (tree, tree, tree); -extern tree get_concept_expansion (tree, tree); -extern tree save_concept_expansion (tree, tree, tree); +extern void clear_satisfaction_cache (); extern bool* lookup_subsumption_result (tree, tree); extern bool save_subsumption_result (tree, tree, bool); - +extern tree find_template_parameters (tree, int); extern bool equivalent_constraints (tree, tree); extern bool equivalently_constrained (tree, tree); extern bool subsumes_constraints (tree, tree); -extern bool strictly_subsumes (tree, tree); +extern bool strictly_subsumes (tree, tree, tree); +extern bool weakly_subsumes (tree, tree, tree); extern int more_constrained (tree, tree); - +extern bool atomic_constraints_identical_p (tree, tree); +extern hashval_t hash_atomic_constraint (tree); extern void diagnose_constraints (location_t, tree, tree); /* in logic.cc */ -extern tree decompose_conclusions (tree); extern bool subsumes (tree, tree); /* In class.c */ @@ -7773,7 +7799,7 @@ extern bool var_in_maybe_constexpr_fn (tree); extern void explain_invalid_constexpr_fn (tree); extern vec cx_error_context (void); extern tree fold_sizeof_expr (tree); -extern void clear_cv_and_fold_caches (void); +extern void clear_cv_and_fold_caches (bool = true); extern tree unshare_constructor (tree CXX_MEM_STAT_INFO); /* In cp-ubsan.c */ @@ -7820,6 +7846,104 @@ null_node_p (const_tree expr) return expr == null_node; } +/* True iff T is a variable template declaration. */ +inline bool +variable_template_p (tree t) +{ + if (TREE_CODE (t) != TEMPLATE_DECL) + return false; + if (!PRIMARY_TEMPLATE_P (t)) + return false; + if (tree r = DECL_TEMPLATE_RESULT (t)) + return VAR_P (r); + return false; +} + +/* True iff T is a standard concept definition. This will return + true for both the template and underlying declaration. */ + +inline bool +standard_concept_p (tree t) +{ + if (TREE_CODE (t) == TEMPLATE_DECL) + t = DECL_TEMPLATE_RESULT (t); + return TREE_CODE (t) == CONCEPT_DECL; +} + +/* True iff T is a variable concept definition. This will return + true for both the template and the underlying declaration. */ + +inline bool +variable_concept_p (tree t) +{ + if (TREE_CODE (t) == TEMPLATE_DECL) + t = DECL_TEMPLATE_RESULT (t); + return VAR_P (t) && DECL_DECLARED_CONCEPT_P (t); +} + +/* True iff T is a function concept definition or an overload set + containing multiple function concepts. This will return true for + both the template and the underlying declaration. */ + +inline bool +function_concept_p (tree t) +{ + if (TREE_CODE (t) == OVERLOAD) + t = OVL_FIRST (t); + if (TREE_CODE (t) == TEMPLATE_DECL) + t = DECL_TEMPLATE_RESULT (t); + return TREE_CODE (t) == FUNCTION_DECL && DECL_DECLARED_CONCEPT_P (t); +} + +/* True iff T is a standard, variable, or function concept. */ + +inline bool +concept_definition_p (tree t) +{ + if (t == error_mark_node) + return false; + + /* Adjust for function concept overloads. */ + if (TREE_CODE (t) == OVERLOAD) + t = OVL_FIRST (t); + + /* See through templates. */ + if (TREE_CODE (t) == TEMPLATE_DECL) + t = DECL_TEMPLATE_RESULT (t); + + /* The obvious and easy case. */ + if (TREE_CODE (t) == CONCEPT_DECL) + return true; + + /* Definitely not a concept. */ + if (!VAR_OR_FUNCTION_DECL_P (t)) + return false; + if (!DECL_LANG_SPECIFIC (t)) + return false; + + return DECL_DECLARED_CONCEPT_P (t); +} + +/* Same as above, but for const trees. */ + +inline bool +concept_definition_p (const_tree t) +{ + return concept_definition_p (const_cast (t)); +} + +/* True if t is an expression that checks a concept. */ + +inline bool +concept_check_p (const_tree t) +{ + if (TREE_CODE (t) == CALL_EXPR) + t = CALL_EXPR_FN (t); + if (t && TREE_CODE (t) == TEMPLATE_ID_EXPR) + return concept_definition_p (TREE_OPERAND (t, 0)); + return false; +} + #if CHECKING_P namespace selftest { extern void run_cp_tests (void); diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c index 038f300..2a129a3 100644 --- a/gcc/cp/cxx-pretty-print.c +++ b/gcc/cp/cxx-pretty-print.c @@ -38,6 +38,7 @@ static void pp_cxx_typeid_expression (cxx_pretty_printer *, tree); static void pp_cxx_unary_left_fold_expression (cxx_pretty_printer *, tree); static void pp_cxx_unary_right_fold_expression (cxx_pretty_printer *, tree); static void pp_cxx_binary_fold_expression (cxx_pretty_printer *, tree); +static void pp_cxx_concept_definition (cxx_pretty_printer *, tree); static inline void @@ -237,7 +238,14 @@ pp_cxx_template_keyword_if_needed (cxx_pretty_printer *pp, tree scope, tree t) static void pp_cxx_nested_name_specifier (cxx_pretty_printer *pp, tree t) { - if (!SCOPE_FILE_SCOPE_P (t) && t != pp->enclosing_scope) + /* FIXME: When diagnosing references to concepts (especially as types?) + we end up adding too many '::' to the name. This is partially due + to the fact that pp->enclosing_namespace is null. */ + if (t == global_namespace) + { + pp_cxx_colon_colon (pp); + } + else if (!SCOPE_FILE_SCOPE_P (t) && t != pp->enclosing_scope) { tree scope = get_containing_scope (t); pp_cxx_nested_name_specifier (pp, scope); @@ -1214,7 +1222,7 @@ cxx_pretty_printer::expression (tree t) } } break; - + case LAMBDA_EXPR: pp_cxx_ws_string (this, ""); break; @@ -1223,14 +1231,8 @@ cxx_pretty_printer::expression (tree t) pp_cxx_trait_expression (this, t); break; - case PRED_CONSTR: + case ATOMIC_CONSTR: case CHECK_CONSTR: - case EXPR_CONSTR: - case TYPE_CONSTR: - case ICONV_CONSTR: - case DEDUCT_CONSTR: - case EXCEPT_CONSTR: - case PARM_CONSTR: case CONJ_CONSTR: case DISJ_CONSTR: pp_cxx_constraint (this, t); @@ -1349,6 +1351,8 @@ cxx_pretty_printer::simple_type_specifier (tree t) case TEMPLATE_PARM_INDEX: case BOUND_TEMPLATE_TEMPLATE_PARM: pp_cxx_unqualified_id (this, t); + if (tree c = PLACEHOLDER_TYPE_CONSTRAINTS (t)) + pp_cxx_constrained_type_spec (this, c); break; case TYPENAME_TYPE: @@ -1876,7 +1880,7 @@ pp_cxx_template_argument_list (cxx_pretty_printer *pp, tree t) { if (argpack) arg = TREE_VEC_ELT (argpack, idx); - + if (need_comma) pp_cxx_separate_with (pp, ','); else @@ -2302,24 +2306,28 @@ pp_cxx_canonical_template_parameter (cxx_pretty_printer *pp, tree parm) void pp_cxx_constrained_type_spec (cxx_pretty_printer *pp, tree c) { - tree t, a; + pp_cxx_whitespace (pp); + pp_cxx_left_bracket (pp); + pp->translate_string ("requires"); + pp_cxx_whitespace (pp); if (c == error_mark_node) { - pp_cxx_ws_string(pp, ""); + pp_cxx_ws_string(pp, ""); return; } + tree t, a; placeholder_extract_concept_and_args (c, t, a); pp->id_expression (t); - if (TREE_VEC_LENGTH (a) > 1) - { - pp_cxx_begin_template_argument_list (pp); - tree args = make_tree_vec (TREE_VEC_LENGTH (a) - 1); - for (int i = TREE_VEC_LENGTH (a) - 1; i > 0; --i) - TREE_VEC_ELT (args, i-1) = TREE_VEC_ELT (a, i); - pp_cxx_template_argument_list (pp, args); - ggc_free (args); - pp_cxx_end_template_argument_list (pp); - } + pp_cxx_begin_template_argument_list (pp); + pp_cxx_ws_string (pp, ""); + pp_cxx_separate_with (pp, ','); + tree args = make_tree_vec (TREE_VEC_LENGTH (a) - 1); + for (int i = 0; i < TREE_VEC_LENGTH (a) - 1; ++i) + TREE_VEC_ELT (args, i) = TREE_VEC_ELT (a, i + 1); + pp_cxx_template_argument_list (pp, args); + ggc_free (args); + pp_cxx_end_template_argument_list (pp); + pp_cxx_right_bracket (pp); } /* @@ -2358,6 +2366,8 @@ pp_cxx_template_declaration (cxx_pretty_printer *pp, tree t) if (TREE_CODE (t) == FUNCTION_DECL && DECL_SAVED_TREE (t)) pp_cxx_function_definition (pp, t); + else if (TREE_CODE (t) == CONCEPT_DECL) + pp_cxx_concept_definition (pp, t); else pp_cxx_simple_declaration (pp, t); } @@ -2374,6 +2384,17 @@ pp_cxx_explicit_instantiation (cxx_pretty_printer *pp, tree t) pp_unsupported_tree (pp, t); } +static void +pp_cxx_concept_definition (cxx_pretty_printer *pp, tree t) +{ + pp_cxx_unqualified_id (pp, DECL_NAME (t)); + pp_cxx_whitespace (pp); + pp_cxx_ws_string (pp, "="); + pp_cxx_whitespace (pp); + pp->expression (DECL_INITIAL (t)); + pp_cxx_semicolon (pp); +} + /* declaration: block-declaration @@ -2841,6 +2862,7 @@ pp_cxx_compound_requirement (cxx_pretty_printer *pp, tree t) if (tree type = TREE_OPERAND (t, 1)) { + pp_cxx_whitespace (pp); pp_cxx_ws_string (pp, "->"); pp->type_id (type); } @@ -2858,12 +2880,6 @@ pp_cxx_nested_requirement (cxx_pretty_printer *pp, tree t) } void -pp_cxx_predicate_constraint (cxx_pretty_printer *pp, tree t) -{ - pp->expression (TREE_OPERAND (t, 0)); -} - -void pp_cxx_check_constraint (cxx_pretty_printer *pp, tree t) { tree decl = CHECK_CONSTR_CONCEPT (t); @@ -2871,7 +2887,9 @@ pp_cxx_check_constraint (cxx_pretty_printer *pp, tree t) tree args = CHECK_CONSTR_ARGS (t); tree id = build_nt (TEMPLATE_ID_EXPR, tmpl, args); - if (VAR_P (decl)) + if (TREE_CODE (decl) == CONCEPT_DECL) + pp->expression (id); + else if (VAR_P (decl)) pp->expression (id); else if (TREE_CODE (decl) == FUNCTION_DECL) { @@ -2884,77 +2902,60 @@ pp_cxx_check_constraint (cxx_pretty_printer *pp, tree t) gcc_unreachable (); } -void -pp_cxx_expression_constraint (cxx_pretty_printer *pp, tree t) -{ - pp_string (pp, "expression (TREE_OPERAND (t, 0)); - pp_cxx_right_paren (pp); - pp_string (pp, ">"); -} +/* Output the "[with ...]" clause for a parameter mapping of an atomic + constraint. */ -void -pp_cxx_type_constraint (cxx_pretty_printer *pp, tree t) +static void +pp_cxx_parameter_mapping (cxx_pretty_printer *pp, tree map) { - pp_string (pp, "type_id (TREE_OPERAND (t, 0)); - pp_string (pp, ">"); -} + for (tree p = map; p; p = TREE_CHAIN (p)) + { + tree parm = TREE_VALUE (p); + tree arg = TREE_PURPOSE (p); -void -pp_cxx_implicit_conversion_constraint (cxx_pretty_printer *pp, tree t) -{ - pp_string (pp, "expression (ICONV_CONSTR_EXPR (t)); - pp_cxx_right_paren (pp); - pp_cxx_ws_string (pp, "to"); - pp->type_id (ICONV_CONSTR_TYPE (t)); - pp_string (pp, ">"); -} + if (TYPE_P (parm)) + pp->type_id (parm); + else + pp_cxx_tree_identifier (pp, DECL_NAME (TEMPLATE_PARM_DECL (parm))); -void -pp_cxx_argument_deduction_constraint (cxx_pretty_printer *pp, tree t) -{ - pp_string (pp, "expression (DEDUCT_CONSTR_EXPR (t)); - pp_cxx_right_paren (pp); - pp_cxx_ws_string (pp, "as"); - pp->expression (DEDUCT_CONSTR_PATTERN (t)); - pp_string (pp, ">"); -} + pp_cxx_whitespace (pp); + pp_equal (pp); + pp_cxx_whitespace (pp); -void -pp_cxx_exception_constraint (cxx_pretty_printer *pp, tree t) -{ - pp_cxx_ws_string (pp, "noexcept"); - pp_cxx_whitespace (pp); - pp_cxx_left_paren (pp); - pp->expression (TREE_OPERAND (t, 0)); - pp_cxx_right_paren (pp); + if (TYPE_P (arg) || DECL_TEMPLATE_TEMPLATE_PARM_P (arg)) + pp->type_id (arg); + else + pp->expression (arg); + + if (TREE_CHAIN (p) != NULL_TREE) + pp_cxx_separate_with (pp, ';'); + } } void -pp_cxx_parameterized_constraint (cxx_pretty_printer *pp, tree t) +pp_cxx_atomic_constraint (cxx_pretty_printer *pp, tree t) { - pp_left_paren (pp); - pp_string (pp, "expression (ATOMIC_CONSTR_EXPR (t)); + + /* Emit the parameter mapping. */ + tree map = ATOMIC_CONSTR_MAP (t); + if (map && map != error_mark_node) { - pp_cxx_parameter_declaration_clause (pp, parms); pp_cxx_whitespace (pp); - } - pp_cxx_constraint (pp, PARM_CONSTR_OPERAND (t)); - pp_string (pp, ">"); + pp_cxx_left_bracket (pp); + pp->translate_string ("with"); + pp_cxx_whitespace (pp); + pp_cxx_parameter_mapping (pp, map); + pp_cxx_right_bracket (pp); + } } void pp_cxx_conjunction (cxx_pretty_printer *pp, tree t) { pp_cxx_constraint (pp, TREE_OPERAND (t, 0)); - pp_string (pp, " and "); + pp_string (pp, " /\\ "); pp_cxx_constraint (pp, TREE_OPERAND (t, 1)); } @@ -2962,7 +2963,7 @@ void pp_cxx_disjunction (cxx_pretty_printer *pp, tree t) { pp_cxx_constraint (pp, TREE_OPERAND (t, 0)); - pp_string (pp, " or "); + pp_string (pp, " \\/ "); pp_cxx_constraint (pp, TREE_OPERAND (t, 1)); } @@ -2974,38 +2975,14 @@ pp_cxx_constraint (cxx_pretty_printer *pp, tree t) switch (TREE_CODE (t)) { - case PRED_CONSTR: - pp_cxx_predicate_constraint (pp, t); + case ATOMIC_CONSTR: + pp_cxx_atomic_constraint (pp, t); break; case CHECK_CONSTR: pp_cxx_check_constraint (pp, t); break; - case EXPR_CONSTR: - pp_cxx_expression_constraint (pp, t); - break; - - case TYPE_CONSTR: - pp_cxx_type_constraint (pp, t); - break; - - case ICONV_CONSTR: - pp_cxx_implicit_conversion_constraint (pp, t); - break; - - case DEDUCT_CONSTR: - pp_cxx_argument_deduction_constraint (pp, t); - break; - - case EXCEPT_CONSTR: - pp_cxx_exception_constraint (pp, t); - break; - - case PARM_CONSTR: - pp_cxx_parameterized_constraint (pp, t); - break; - case CONJ_CONSTR: pp_cxx_conjunction (pp, t); break; diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 72c02af..6f4c589 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -920,6 +920,31 @@ determine_local_discriminator (tree decl) } + +/* Returns true if functions FN1 and FN2 have equivalent trailing + requires clauses. */ + +static bool +function_requirements_equivalent_p (tree newfn, tree oldfn) +{ + /* In the concepts TS, the combined constraints are compared. */ + if (cxx_dialect < cxx2a) + { + tree ci1 = get_constraints (oldfn); + tree ci2 = get_constraints (newfn); + tree req1 = ci1 ? CI_ASSOCIATED_CONSTRAINTS (ci1) : NULL_TREE; + tree req2 = ci2 ? CI_ASSOCIATED_CONSTRAINTS (ci2) : NULL_TREE; + return cp_tree_equal (req1, req2); + } + + /* Compare only trailing requirements. */ + tree reqs1 = get_trailing_function_requirements (newfn); + tree reqs2 = get_trailing_function_requirements (oldfn); + if ((reqs1 != NULL_TREE) != (reqs2 != NULL_TREE)) + return false; + return cp_tree_equal (reqs1, reqs2); +} + /* Subroutine of duplicate_decls: return truthvalue of whether or not types of these decls match. @@ -999,6 +1024,12 @@ decls_match (tree newdecl, tree olddecl, bool record_versions /* = true */) else types_match = 0; + /* Two function declarations match if either has a requires-clause + then both have a requires-clause and their constraints-expressions + are equivalent. */ + if (types_match && flag_concepts) + types_match = function_requirements_equivalent_p (newdecl, olddecl); + /* The decls dont match if they correspond to two different versions of the same function. Disallow extern "C" functions to be versions for now. */ @@ -1013,23 +1044,21 @@ decls_match (tree newdecl, tree olddecl, bool record_versions /* = true */) } else if (TREE_CODE (newdecl) == TEMPLATE_DECL) { + if (!template_heads_equivalent_p (newdecl, olddecl)) + return 0; + tree oldres = DECL_TEMPLATE_RESULT (olddecl); tree newres = DECL_TEMPLATE_RESULT (newdecl); if (TREE_CODE (newres) != TREE_CODE (oldres)) return 0; - if (!comp_template_parms (DECL_TEMPLATE_PARMS (newdecl), - DECL_TEMPLATE_PARMS (olddecl))) - return 0; - - if (TREE_CODE (DECL_TEMPLATE_RESULT (newdecl)) == TYPE_DECL) - types_match = (same_type_p (TREE_TYPE (oldres), TREE_TYPE (newres)) - && equivalently_constrained (olddecl, newdecl)); + /* Two template types match if they are the same. Otherwise, compare + the underlying declarations. */ + if (TREE_CODE (newres) == TYPE_DECL) + types_match = same_type_p (TREE_TYPE (newres), TREE_TYPE (oldres)); else - // We don't need to check equivalently_constrained for variable and - // function templates because we check it on the results. - types_match = decls_match (oldres, newres); + types_match = decls_match (newres, oldres); } else { @@ -1057,11 +1086,6 @@ decls_match (tree newdecl, tree olddecl, bool record_versions /* = true */) COMPARE_REDECLARATION); } - // Normal functions can be constrained, as can variable partial - // specializations. - if (types_match && VAR_OR_FUNCTION_DECL_P (newdecl)) - types_match = equivalently_constrained (newdecl, olddecl); - return types_match; } @@ -1336,6 +1360,46 @@ merge_attribute_bits (tree newdecl, tree olddecl) && lookup_attribute ("gnu_inline", \ DECL_ATTRIBUTES (fn))) +/* A subroutine of duplicate_decls. Emits a diagnostic when newdecl + ambiguates olddecl. Returns true if an error occurs. */ + +static bool +duplicate_function_template_decls (tree newdecl, tree olddecl) +{ + + tree newres = DECL_TEMPLATE_RESULT (newdecl); + tree oldres = DECL_TEMPLATE_RESULT (olddecl); + /* Function template declarations can be differentiated by parameter + and return type. */ + if (compparms (TYPE_ARG_TYPES (TREE_TYPE (oldres)), + TYPE_ARG_TYPES (TREE_TYPE (newres))) + && same_type_p (TREE_TYPE (TREE_TYPE (newdecl)), + TREE_TYPE (TREE_TYPE (olddecl)))) + { + /* ... and also by their template-heads and requires-clauses. */ + if (template_heads_equivalent_p (newdecl, olddecl) + && function_requirements_equivalent_p (newres, oldres)) + { + error ("ambiguating new declaration %q+#D", newdecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "old declaration %q#D", olddecl); + return true; + } + + /* FIXME: The types are the same but the are differences + in either the template heads or function requirements. + We should be able to diagnose a set of common errors + stemming from these declarations. For example: + + template requires C void f(...); + template void f(...) requires C; + + These are functionally equivalent but not equivalent. */ + } + + return false; +} + /* If NEWDECL is a redeclaration of OLDDECL, merge the declarations. If the redeclaration is invalid, a diagnostic is issued, and the error_mark_node is returned. Otherwise, OLDDECL is returned. @@ -1644,11 +1708,14 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) if (TREE_CODE (newdecl) == TEMPLATE_DECL) { + tree oldres = DECL_TEMPLATE_RESULT (olddecl); + tree newres = DECL_TEMPLATE_RESULT (newdecl); + /* The name of a class template may not be declared to refer to any other template, class, function, object, namespace, value, or type in the same scope. */ - if (TREE_CODE (DECL_TEMPLATE_RESULT (olddecl)) == TYPE_DECL - || TREE_CODE (DECL_TEMPLATE_RESULT (newdecl)) == TYPE_DECL) + if (TREE_CODE (oldres) == TYPE_DECL + || TREE_CODE (newres) == TYPE_DECL) { error_at (newdecl_loc, "conflicting declaration of template %q#D", newdecl); @@ -1656,24 +1723,13 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) "previous declaration %q#D", olddecl); return error_mark_node; } - else if (TREE_CODE (DECL_TEMPLATE_RESULT (olddecl)) == FUNCTION_DECL - && TREE_CODE (DECL_TEMPLATE_RESULT (newdecl)) == FUNCTION_DECL - && compparms (TYPE_ARG_TYPES (TREE_TYPE (DECL_TEMPLATE_RESULT (olddecl))), - TYPE_ARG_TYPES (TREE_TYPE (DECL_TEMPLATE_RESULT (newdecl)))) - && comp_template_parms (DECL_TEMPLATE_PARMS (newdecl), - DECL_TEMPLATE_PARMS (olddecl)) - /* Template functions can be disambiguated by - return type. */ - && same_type_p (TREE_TYPE (TREE_TYPE (newdecl)), - TREE_TYPE (TREE_TYPE (olddecl))) - /* Template functions can also be disambiguated by - constraints. */ - && equivalently_constrained (olddecl, newdecl)) + + else if (TREE_CODE (oldres) == FUNCTION_DECL + && TREE_CODE (newres) == FUNCTION_DECL) { - error_at (newdecl_loc, "ambiguating new declaration %q#D", - newdecl); - inform (olddecl_loc, - "old declaration %q#D", olddecl); + if (duplicate_function_template_decls (newdecl, olddecl)) + return error_mark_node; + return NULL_TREE; } else if (check_concept_refinement (olddecl, newdecl)) return error_mark_node; @@ -2916,6 +2972,9 @@ redeclaration_error_message (tree newdecl, tree olddecl) return NULL; } + if (TREE_CODE (DECL_TEMPLATE_RESULT (newdecl)) == CONCEPT_DECL) + return G_("redefinition of %q#D"); + if (TREE_CODE (DECL_TEMPLATE_RESULT (newdecl)) != FUNCTION_DECL || (DECL_TEMPLATE_RESULT (newdecl) == DECL_TEMPLATE_RESULT (olddecl))) @@ -8985,12 +9044,12 @@ grokfndecl (tree ctype, tree tmpl_reqs = NULL_TREE; if (processing_template_decl > template_class_depth (ctype)) tmpl_reqs = TEMPLATE_PARMS_CONSTRAINTS (current_template_parms); - - /* Adjust the required expression into a constraint. */ - if (decl_reqs) - decl_reqs = normalize_expression (decl_reqs); - tree ci = build_constraints (tmpl_reqs, decl_reqs); + if (concept_p && ci) + { + error_at (location, "a function concept cannot be constrained"); + ci = NULL_TREE; + } set_constraints (decl, ci); } @@ -9630,12 +9689,18 @@ grokvardecl (tree type, if (!same_type_ignoring_top_level_qualifiers_p (type, boolean_type_node)) error_at (declspecs->locations[ds_type_spec], "concept must have type %"); + if (TEMPLATE_PARMS_CONSTRAINTS (current_template_parms)) + { + error_at (location, "a variable concept cannot be constrained"); + TEMPLATE_PARMS_CONSTRAINTS (current_template_parms) = NULL_TREE; + } } else if (flag_concepts && processing_template_decl > template_class_depth (scope)) { tree reqs = TEMPLATE_PARMS_CONSTRAINTS (current_template_parms); tree ci = build_constraints (reqs, NULL_TREE); + set_constraints (decl, ci); } @@ -12543,12 +12608,18 @@ grokdeclarator (const cp_declarator *declarator, if (ctype || in_namespace) error ("cannot use %<::%> in parameter declaration"); - if (type_uses_auto (type) - && !(cxx_dialect >= cxx17 && template_parm_flag)) + tree auto_node = type_uses_auto (type); + if (auto_node && !(cxx_dialect >= cxx17 && template_parm_flag)) { if (cxx_dialect >= cxx14) - error_at (typespec_loc, - "% parameter not permitted in this context"); + { + if (decl_context == PARM && AUTO_IS_DECLTYPE (auto_node)) + error_at (typespec_loc, + "cannot declare a parameter with %"); + else + error_at (typespec_loc, + "% parameter not permitted in this context"); + } else error_at (typespec_loc, "parameter declared %"); type = error_mark_node; @@ -16362,8 +16433,17 @@ finish_function (bool inline_p) if (!processing_template_decl && FNDECL_USED_AUTO (fndecl) && TREE_TYPE (fntype) == DECL_SAVED_AUTO_RETURN_TYPE (fndecl)) { - if (is_auto (DECL_SAVED_AUTO_RETURN_TYPE (fndecl))) + if (is_auto (DECL_SAVED_AUTO_RETURN_TYPE (fndecl)) + && !current_function_returns_value + && !current_function_returns_null) { + /* We haven't applied return type deduction because we haven't + seen any return statements. Do that now. */ + tree node = type_uses_auto (DECL_SAVED_AUTO_RETURN_TYPE (fndecl)); + do_auto_deduction (DECL_SAVED_AUTO_RETURN_TYPE (fndecl), + void_node, node, tf_warning_or_error, + adc_return_type); + apply_deduced_return_type (fndecl, void_type_node); fntype = TREE_TYPE (fndecl); } @@ -16953,7 +17033,9 @@ require_deduced_type (tree decl, tsubst_flags_t complain) { if (undeduced_auto_decl (decl)) { - if (complain & tf_error) + if (TREE_NO_WARNING (decl) && seen_error ()) + /* We probably already complained about deduction failure. */; + else if (complain & tf_error) error ("use of %qD before deduction of %", decl); return false; } diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 5620134..1fd87d2 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -98,6 +98,7 @@ static void print_instantiation_full_context (diagnostic_context *); static void print_instantiation_partial_context (diagnostic_context *, struct tinst_level *, location_t); +static void maybe_print_constraint_context (diagnostic_context *); static void cp_diagnostic_starter (diagnostic_context *, diagnostic_info *); static void cp_print_error_function (diagnostic_context *, diagnostic_info *); @@ -545,9 +546,7 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags) case TEMPLATE_TYPE_PARM: pp_cxx_cv_qualifier_seq (pp, t); - if (tree c = PLACEHOLDER_TYPE_CONSTRAINTS (t)) - pp_cxx_constrained_type_spec (pp, c); - else if (template_placeholder_p (t)) + if (template_placeholder_p (t)) { t = TREE_TYPE (CLASS_PLACEHOLDER_TEMPLATE (t)); pp_cxx_tree_identifier (pp, TYPE_IDENTIFIER (t)); @@ -558,6 +557,9 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags) else pp_cxx_canonical_template_parameter (pp, TEMPLATE_TYPE_PARM_INDEX (t)); + /* If this is a constrained placeholder, add the requirements. */ + if (tree c = PLACEHOLDER_TYPE_CONSTRAINTS (t)) + pp_cxx_constrained_type_spec (pp, c); break; /* This is not always necessary for pointers and such, but doing this @@ -1284,6 +1286,15 @@ dump_decl (cxx_pretty_printer *pp, tree t, int flags) dump_template_decl (pp, t, flags); break; + case CONCEPT_DECL: + pp_cxx_ws_string (pp, "concept"); + dump_decl_name (pp, DECL_NAME (t), flags); + break; + + case WILDCARD_DECL: + pp_string (pp, ""); + break; + case TEMPLATE_ID_EXPR: { tree name = TREE_OPERAND (t, 0); @@ -1448,7 +1459,9 @@ dump_template_decl (cxx_pretty_printer *pp, tree t, int flags) else if (DECL_TEMPLATE_RESULT (t) && (VAR_P (DECL_TEMPLATE_RESULT (t)) /* Alias template. */ - || DECL_TYPE_TEMPLATE_P (t))) + || DECL_TYPE_TEMPLATE_P (t) + /* Concept definition. &*/ + || TREE_CODE (DECL_TEMPLATE_RESULT (t)) == CONCEPT_DECL)) dump_decl (pp, DECL_TEMPLATE_RESULT (t), flags | TFF_TEMPLATE_NAME); else { @@ -2082,6 +2095,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) case TEMPLATE_DECL: case NAMESPACE_DECL: case LABEL_DECL: + case WILDCARD_DECL: case OVERLOAD: case TYPE_DECL: case IDENTIFIER_NODE: @@ -2848,18 +2862,14 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) pp_cxx_nested_requirement (cxx_pp, t); break; - case PRED_CONSTR: + case ATOMIC_CONSTR: case CHECK_CONSTR: - case EXPR_CONSTR: - case TYPE_CONSTR: - case ICONV_CONSTR: - case DEDUCT_CONSTR: - case EXCEPT_CONSTR: - case PARM_CONSTR: case CONJ_CONSTR: case DISJ_CONSTR: - pp_cxx_constraint (cxx_pp, t); - break; + { + pp_cxx_constraint (cxx_pp, t); + break; + } case PLACEHOLDER_EXPR: pp_string (pp, M_("*this")); @@ -3326,6 +3336,7 @@ cp_diagnostic_starter (diagnostic_context *context, cp_print_error_function (context, diagnostic); maybe_print_instantiation_context (context); maybe_print_constexpr_context (context); + maybe_print_constraint_context (context); pp_set_prefix (context->printer, diagnostic_build_prefix (context, diagnostic)); } @@ -3650,6 +3661,171 @@ maybe_print_constexpr_context (diagnostic_context *context) } +static void +print_location (diagnostic_context *context, location_t loc) +{ + expanded_location xloc = expand_location (loc); + if (context->show_column) + pp_verbatim (context->printer, _("%r%s:%d:%d:%R "), + "locus", xloc.file, xloc.line, xloc.column); + else + pp_verbatim (context->printer, _("%r%s:%d:%R "), + "locus", xloc.file, xloc.line); +} + +/* Instantiate the concept check for the purpose of diagnosing an error. */ + +static tree +rebuild_concept_check (tree expr, tree map, tree args) +{ + /* Instantiate the parameter mapping for the template-id. */ + map = tsubst_parameter_mapping (map, args, tf_none, NULL_TREE); + if (map == error_mark_node) + return error_mark_node; + args = get_mapped_args (map); + + /* Rebuild the template id using substituted arguments. Substituting + directly through the expression will trigger recursive satisfaction, + so don't do that. */ + tree id = unpack_concept_check (expr); + args = tsubst_template_args (TREE_OPERAND (id, 1), args, tf_none, NULL_TREE); + if (args == error_mark_node) + return error_mark_node; + return build_nt (TEMPLATE_ID_EXPR, TREE_OPERAND (id, 0), args); +} + +static void +print_constrained_decl_info (diagnostic_context *context, tree decl) +{ + print_location (context, DECL_SOURCE_LOCATION (decl)); + pp_verbatim (context->printer, "required by the constraints of %q#D\n", decl); +} + +static void +print_concept_check_info (diagnostic_context *context, tree expr, tree map, tree args) +{ + gcc_assert (concept_check_p (expr)); + + tree id = unpack_concept_check (expr); + tree tmpl = TREE_OPERAND (id, 0); + if (OVL_P (tmpl)) + tmpl = OVL_FIRST (tmpl); + tree check = rebuild_concept_check (expr, map, args); + if (check == error_mark_node) + check = expr; + + print_location (context, DECL_SOURCE_LOCATION (tmpl)); + pp_verbatim (context->printer, "required for the satisfaction of %qE\n", check); +} + +/* Diagnose the entry point into the satisfaction error. Returns the next + context, if any. */ + +static tree +print_constraint_context_head (diagnostic_context *context, tree cxt, tree args) +{ + tree src = TREE_VALUE (cxt); + if (!src) + { + print_location (context, input_location); + pp_verbatim (context->printer, "required for constraint satisfaction\n"); + return NULL_TREE; + } + if (DECL_P (src)) + { + print_constrained_decl_info (context, src); + return NULL_TREE; + } + else + { + print_concept_check_info (context, src, TREE_PURPOSE (cxt), args); + return TREE_CHAIN (cxt); + } +} + +static void +print_requires_expression_info (diagnostic_context *context, tree constr, tree args) +{ + + tree expr = ATOMIC_CONSTR_EXPR (constr); + tree map = ATOMIC_CONSTR_MAP (constr); + map = tsubst_parameter_mapping (map, args, tf_none, NULL_TREE); + if (map == error_mark_node) + return; + args = get_mapped_args (map); + + print_location (context, cp_expr_loc_or_input_loc (expr)); + pp_verbatim (context->printer, "in requirements "); + + tree parms = TREE_OPERAND (expr, 0); + if (parms) + pp_verbatim (context->printer, "with "); + while (parms) + { + tree next = TREE_CHAIN (parms); + + TREE_CHAIN (parms) = NULL_TREE; + cp_unevaluated u; + tree p = tsubst (parms, args, tf_none, NULL_TREE); + pp_verbatim (context->printer, "%q#D", p); + TREE_CHAIN (parms) = next; + + if (next) + pp_separate_with_comma ((cxx_pretty_printer *)context->printer); + + parms = next; + } + + pp_verbatim (context->printer, "\n"); +} + +void +maybe_print_single_constraint_context (diagnostic_context *context, tree failed) +{ + if (!failed) + return; + + tree constr = TREE_VALUE (failed); + if (!constr || constr == error_mark_node) + return; + tree cxt = CONSTR_CONTEXT (constr); + if (!cxt) + return; + tree args = TREE_PURPOSE (failed); + + /* Print the stack of requirements. */ + cxt = print_constraint_context_head (context, cxt, args); + while (cxt && !DECL_P (TREE_VALUE (cxt))) + { + tree expr = TREE_VALUE (cxt); + tree map = TREE_PURPOSE (cxt); + print_concept_check_info (context, expr, map, args); + cxt = TREE_CHAIN (cxt); + } + + /* For certain constraints, we can provide additional context. */ + if (TREE_CODE (constr) == ATOMIC_CONSTR + && TREE_CODE (ATOMIC_CONSTR_EXPR (constr)) == REQUIRES_EXPR) + print_requires_expression_info (context, constr, args); +} + +void +maybe_print_constraint_context (diagnostic_context *context) +{ + if (!current_failed_constraint) + return; + + tree cur = current_failed_constraint; + + /* Recursively print nested contexts. */ + current_failed_constraint = TREE_CHAIN (current_failed_constraint); + if (current_failed_constraint) + maybe_print_constraint_context (context); + + /* Print this context. */ + maybe_print_single_constraint_context (context, cur); +} + /* Return true iff TYPE_A and TYPE_B are template types that are meaningful to compare. */ diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index c4fed16..b503e97 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -1040,9 +1040,9 @@ maybe_add_lambda_conv_op (tree type) bool const generic_lambda_p = generic_lambda_fn_p (callop); - if (!generic_lambda_p && DECL_INITIAL (callop) == NULL_TREE) + if (!generic_lambda_p && undeduced_auto_decl (callop)) { - /* If the op() wasn't instantiated due to errors, give up. */ + /* If the op() wasn't deduced due to errors, give up. */ gcc_assert (errorcount || sorrycount); return; } diff --git a/gcc/cp/logic.cc b/gcc/cp/logic.cc index 13cc321..2d4abaf 100644 --- a/gcc/cp/logic.cc +++ b/gcc/cp/logic.cc @@ -47,729 +47,736 @@ along with GCC; see the file COPYING3. If not see #include "toplev.h" #include "type-utils.h" -namespace { +/* Hash functions for atomic constrains. */ -// Helper algorithms - -template -inline I -next (I iter) +struct constraint_hash : default_hash_traits { - return ++iter; -} + static hashval_t hash (tree t) + { + return hash_atomic_constraint (t); + } -template -inline bool -any_p (I first, I last, P pred) -{ - while (first != last) - { - if (pred(*first)) - return true; - ++first; - } - return false; -} + static bool equal (tree t1, tree t2) + { + return atomic_constraints_identical_p (t1, t2); + } +}; -bool prove_implication (tree, tree); +/* A conjunctive or disjunctive clause. -/*--------------------------------------------------------------------------- - Proof state ----------------------------------------------------------------------------*/ + Each clause maintains an iterator that refers to the current + term, which is used in the linear decomposition of a formula + into CNF or DNF. */ -struct term_entry +struct clause { - tree t; -}; + typedef std::list::iterator iterator; + typedef std::list::const_iterator const_iterator; -/* Hashing function and equality for constraint entries. */ + /* Initialize a clause with an initial term. */ -struct term_hasher : ggc_ptr_hash -{ - static hashval_t hash (term_entry *e) + clause (tree t) { - return iterative_hash_template_arg (e->t, 0); + m_terms.push_back (t); + if (TREE_CODE (t) == ATOMIC_CONSTR) + m_set.add (t); + + m_current = m_terms.begin (); } - static bool equal (term_entry *e1, term_entry *e2) + /* Create a copy of the current term. The current + iterator is set to point to the same position in the + copied list of terms. */ + + clause (clause const& c) + : m_terms (c.m_terms), m_set (c.m_set), m_current (m_terms.begin ()) { - return cp_tree_equal (e1->t, e2->t); + std::advance (m_current, std::distance (c.begin (), c.current ())); } -}; -/* A term list is a list of atomic constraints. It is used - to maintain the lists of assumptions and conclusions in a - proof goal. + /* Returns true when all terms are atoms. */ - Each term list maintains an iterator that refers to the current - term. This can be used by various tactics to support iteration - and stateful manipulation of the list. */ -class term_list -{ -public: - typedef std::list::iterator iterator; + bool done () const + { + return m_current == end (); + } - term_list (); - term_list (tree); + /* Advance to the next term. */ - bool includes (tree); - iterator insert (iterator, tree); - iterator push_back (tree); - iterator erase (iterator); - iterator replace (iterator, tree); - iterator replace (iterator, tree, tree); + void advance () + { + gcc_assert (!done ()); + ++m_current; + } - iterator begin() { return seq.begin(); } - iterator end() { return seq.end(); } + /* Replaces the current term at position ITER with T. If + T is an atomic constraint that already appears in the + clause, remove but do not replace ITER. Returns a pair + containing an iterator to the replace object or past + the erased object and a boolean value which is true if + an object was erased. */ - std::list seq; - hash_table tab; -}; + std::pair replace (iterator iter, tree t) + { + gcc_assert (TREE_CODE (*iter) != ATOMIC_CONSTR); + if (TREE_CODE (t) == ATOMIC_CONSTR) + { + if (m_set.add (t)) + return std::make_pair (m_terms.erase (iter), true); + } + *iter = t; + return std::make_pair (iter, false); + } -inline -term_list::term_list () - : seq(), tab (11) -{ -} + /* Inserts T before ITER in the list of terms. If T has + already is an atomic constraint that already appears in + the clause, no action is taken, and the current iterator + is returned. Returns a pair of an iterator to the inserted + object or ITER if no insertion occurred and a boolean + value which is true if an object was inserted. */ -/* Initialize a term list with an initial term. */ + std::pair insert (iterator iter, tree t) + { + if (TREE_CODE (t) == ATOMIC_CONSTR) + { + if (m_set.add (t)) + return std::make_pair (iter, false); + } + return std::make_pair (m_terms.insert (iter, t), true); + } -inline -term_list::term_list (tree t) - : seq (), tab (11) -{ - push_back (t); -} + /* Replaces the current term with T. In the case where the + current term is erased (because T is redundant), update + the position of the current term to the next term. */ -/* Returns true if T is the in the tree. */ + void replace (tree t) + { + m_current = replace (m_current, t).first; + } -inline bool -term_list::includes (tree t) -{ - term_entry ent = {t}; - return tab.find (&ent); -} + /* Replace the current term with T1 and T2, in that order. */ -/* Append a term to the list. */ -inline term_list::iterator -term_list::push_back (tree t) -{ - return insert (end(), t); -} + void replace (tree t1, tree t2) + { + /* Replace the current term with t1. Ensure that iter points + to the term before which t2 will be inserted. Update the + current term as needed. */ + std::pair rep = replace (m_current, t1); + if (rep.second) + m_current = rep.first; + else + ++rep.first; -/* Insert a new (unseen) term T into the list before the proposition - indicated by ITER. Returns the iterator to the newly inserted - element. */ + /* Insert the t2. Make this the current term if we erased + the prior term. */ + std::pair ins = insert (rep.first, t2); + if (rep.second && ins.second) + m_current = ins.first; + } -term_list::iterator -term_list::insert (iterator iter, tree t) -{ - gcc_assert (!includes (t)); - iter = seq.insert (iter, t); - term_entry ent = {t}; - term_entry** slot = tab.find_slot (&ent, INSERT); - term_entry* ptr = ggc_alloc (); - *ptr = ent; - *slot = ptr; - return iter; -} + /* Returns true if the clause contains the term T. */ -/* Remove an existing term from the list. Returns an iterator referring - to the element after the removed term. This may be end(). */ + bool contains (tree t) + { + gcc_assert (TREE_CODE (t) == ATOMIC_CONSTR); + return m_set.contains (t); + } -term_list::iterator -term_list::erase (iterator iter) -{ - gcc_assert (includes (*iter)); - term_entry ent = {*iter}; - tab.remove_elt (&ent); - iter = seq.erase (iter); - return iter; -} -/* Replace the given term with that specified. If the term has - been previously seen, do not insert the term. Returns the - first iterator past the current term. */ + /* Returns an iterator to the first clause in the formula. */ -term_list::iterator -term_list::replace (iterator iter, tree t) -{ - iter = erase (iter); - if (!includes (t)) - insert (iter, t); - return iter; -} + iterator begin () + { + return m_terms.begin (); + } + /* Returns an iterator to the first clause in the formula. */ -/* Replace the term at the given position by the supplied T1 - followed by t2. This is used in certain logical operators to - load a list of assumptions or conclusions. */ + const_iterator begin () const + { + return m_terms.begin (); + } -term_list::iterator -term_list::replace (iterator iter, tree t1, tree t2) -{ - iter = erase (iter); - if (!includes (t1)) - insert (iter, t1); - if (!includes (t2)) - insert (iter, t2); - return iter; -} + /* Returns an iterator past the last clause in the formula. */ + + iterator end () + { + return m_terms.end (); + } -/* A goal (or subgoal) models a sequent of the form - 'A |- C' where A and C are lists of assumptions and - conclusions written as propositions in the constraint - language (i.e., lists of trees). */ + /* Returns an iterator past the last clause in the formula. */ -class proof_goal -{ -public: - term_list assumptions; - term_list conclusions; + const_iterator end () const + { + return m_terms.end (); + } + + /* Returns the current iterator. */ + + const_iterator current () const + { + return m_current; + } + + std::list m_terms; /* The list of terms. */ + hash_set m_set; /* The set of atomic constraints. */ + iterator m_current; /* The current term. */ }; + /* A proof state owns a list of goals and tracks the current sub-goal. The class also provides facilities for managing subgoals and constructing term lists. */ -class proof_state : public std::list +struct formula { -public: - proof_state (); + typedef std::list::iterator iterator; + typedef std::list::const_iterator const_iterator; - iterator branch (iterator i); - iterator discharge (iterator i); -}; + /* Construct a formula with an initial formula in a + single clause. */ -/* Initialize the state with a single empty goal, and set that goal - as the current subgoal. */ - -inline -proof_state::proof_state () - : std::list (1) -{ } + formula (tree t) + { + /* This should call emplace_back(). There's a an extra copy being + invoked by using push_back(). */ + m_clauses.push_back (t); + m_current = m_clauses.begin (); + } + /* Returns true when all clauses are atomic. */ + bool done () const + { + return m_current == end (); + } -/* Branch the current goal by creating a new subgoal, returning a - reference to the new object. This does not update the current goal. */ + /* Advance to the next term. */ + void advance () + { + gcc_assert (!done ()); + ++m_current; + } -inline proof_state::iterator -proof_state::branch (iterator i) -{ - gcc_assert (i != end()); - proof_goal& g = *i; - return insert (++i, g); -} + /* Insert a copy of clause into the formula. This corresponds + to a distribution of one logical operation over the other. */ -/* Discharge the current goal, setting it equal to the - next non-satisfied goal. */ + clause& branch () + { + gcc_assert (!done ()); + m_clauses.push_back (*m_current); + return m_clauses.back (); + } -inline proof_state::iterator -proof_state::discharge (iterator i) -{ - gcc_assert (i != end()); - return erase (i); -} + /* Returns the position of the current clause. */ + iterator current () + { + return m_current; + } -/*--------------------------------------------------------------------------- - Debugging ----------------------------------------------------------------------------*/ + /* Returns an iterator to the first clause in the formula. */ -// void -// debug (term_list& ts) -// { -// for (term_list::iterator i = ts.begin(); i != ts.end(); ++i) -// verbatim (" # %E", *i); -// } -// -// void -// debug (proof_goal& g) -// { -// debug (g.assumptions); -// verbatim (" |-"); -// debug (g.conclusions); -// } + iterator begin () + { + return m_clauses.begin (); + } -/*--------------------------------------------------------------------------- - Atomicity of constraints ----------------------------------------------------------------------------*/ + /* Returns an iterator to the first clause in the formula. */ -/* Returns true if T is not an atomic constraint. */ + const_iterator begin () const + { + return m_clauses.begin (); + } -bool -non_atomic_constraint_p (tree t) -{ - switch (TREE_CODE (t)) - { - case PRED_CONSTR: - case EXPR_CONSTR: - case TYPE_CONSTR: - case ICONV_CONSTR: - case DEDUCT_CONSTR: - case EXCEPT_CONSTR: - /* A pack expansion isn't atomic, but it can't decompose to prove an - atom, so it shouldn't cause analyze_atom to return undecided. */ - case EXPR_PACK_EXPANSION: - return false; - case CHECK_CONSTR: - case PARM_CONSTR: - case CONJ_CONSTR: - case DISJ_CONSTR: - return true; - default: - gcc_unreachable (); - } -} + /* Returns an iterator past the last clause in the formula. */ -/* Returns true if any constraints in T are not atomic. */ + iterator end () + { + return m_clauses.end (); + } -bool -any_non_atomic_constraints_p (term_list& t) -{ - return any_p (t.begin(), t.end(), non_atomic_constraint_p); -} + /* Returns an iterator past the last clause in the formula. */ -/*--------------------------------------------------------------------------- - Proof validations ----------------------------------------------------------------------------*/ + const_iterator end () const + { + return m_clauses.end (); + } -enum proof_result -{ - invalid, - valid, - undecided + std::list m_clauses; /* The list of clauses. */ + iterator m_current; /* The current clause. */ }; -proof_result check_term (term_list&, tree); - - -proof_result -analyze_atom (term_list& ts, tree t) +void +debug (clause& c) { - /* FIXME: Hook into special cases, if any. */ - /* - term_list::iterator iter = ts.begin(); - term_list::iterator end = ts.end(); - while (iter != end) - { - ++iter; - } - */ - - if (non_atomic_constraint_p (t)) - return undecided; - if (any_non_atomic_constraints_p (ts)) - return undecided; - return invalid; + for (clause::iterator i = c.begin(); i != c.end(); ++i) + verbatim (" # %E", *i); } -/* Search for a pack expansion in the list of assumptions that would - make this expansion valid. */ - -proof_result -analyze_pack (term_list& ts, tree t) +void +debug (formula& f) { - tree c1 = normalize_expression (PACK_EXPANSION_PATTERN (t)); - term_list::iterator iter = ts.begin(); - term_list::iterator end = ts.end(); - while (iter != end) + for (formula::iterator i = f.begin(); i != f.end(); ++i) { - if (TREE_CODE (*iter) == TREE_CODE (t)) - { - tree c2 = normalize_expression (PACK_EXPANSION_PATTERN (*iter)); - if (prove_implication (c2, c1)) - return valid; - else - return invalid; - } - ++iter; + verbatim ("((("); + debug (*i); + verbatim (")))"); } - return invalid; } -/* Search for concept checks in TS that we know subsume T. */ +/* The logical rules used to analyze a logical formula. The + "left" and "right" refer to the position of formula in a + sequent (as in sequent calculus). */ -proof_result -search_known_subsumptions (term_list& ts, tree t) +enum rules { - for (term_list::iterator i = ts.begin(); i != ts.end(); ++i) - if (TREE_CODE (*i) == CHECK_CONSTR) - { - if (bool* b = lookup_subsumption_result (*i, t)) - return *b ? valid : invalid; - } - return undecided; -} + left, right +}; -/* Determine if the terms in TS provide sufficient support for proving - the proposition T. If any term in TS is a concept check that is known - to subsume T, then the proof is valid. Otherwise, we have to expand T - and continue searching for support. */ +/* Distribution counting. */ -proof_result -analyze_check (term_list& ts, tree t) +static inline bool +disjunction_p (tree t) { - proof_result r = search_known_subsumptions (ts, t); - if (r != undecided) - return r; - - tree tmpl = CHECK_CONSTR_CONCEPT (t); - tree args = CHECK_CONSTR_ARGS (t); - tree c = expand_concept (tmpl, args); - return check_term (ts, c); + return TREE_CODE (t) == DISJ_CONSTR; } -/* Recursively check constraints of the parameterized constraint. */ - -proof_result -analyze_parameterized (term_list& ts, tree t) +static inline bool +conjunction_p (tree t) { - return check_term (ts, PARM_CONSTR_OPERAND (t)); + return TREE_CODE (t) == CONJ_CONSTR; } -proof_result -analyze_conjunction (term_list& ts, tree t) +static inline bool +atomic_p (tree t) { - proof_result r = check_term (ts, TREE_OPERAND (t, 0)); - if (r == invalid || r == undecided) - return r; - return check_term (ts, TREE_OPERAND (t, 1)); + return TREE_CODE (t) == ATOMIC_CONSTR; } -proof_result -analyze_disjunction (term_list& ts, tree t) -{ - proof_result r = check_term (ts, TREE_OPERAND (t, 0)); - if (r == valid) - return r; - return check_term (ts, TREE_OPERAND (t, 1)); -} +/* Recursively count the number of clauses produced when converting T + to DNF. Returns a pair containing the number of clauses and a bool + value signifying that the the tree would be rewritten as a result of + distributing. In general, a conjunction for which this flag is set + is considered a disjunction for the purpose of counting. */ -proof_result -analyze_term (term_list& ts, tree t) +static std::pair +dnf_size_r (tree t) { - switch (TREE_CODE (t)) - { - case CHECK_CONSTR: - return analyze_check (ts, t); + if (atomic_p (t)) + /* Atomic constraints produce no clauses. */ + return std::make_pair (0, false); - case PARM_CONSTR: - return analyze_parameterized (ts, t); + /* For compound constraints, recursively count clauses and unpack + the results. */ + tree lhs = TREE_OPERAND (t, 0); + tree rhs = TREE_OPERAND (t, 1); + std::pair p1 = dnf_size_r (lhs); + std::pair p2 = dnf_size_r (rhs); + int n1 = p1.first, n2 = p2.first; + bool d1 = p1.second, d2 = p2.second; - case CONJ_CONSTR: - return analyze_conjunction (ts, t); - case DISJ_CONSTR: - return analyze_disjunction (ts, t); - - case PRED_CONSTR: - case EXPR_CONSTR: - case TYPE_CONSTR: - case ICONV_CONSTR: - case DEDUCT_CONSTR: - case EXCEPT_CONSTR: - return analyze_atom (ts, t); - - case EXPR_PACK_EXPANSION: - return analyze_pack (ts, t); - - case ERROR_MARK: - /* Encountering an error anywhere in a constraint invalidates - the proof, since the constraint is ill-formed. */ - return invalid; - default: - gcc_unreachable (); + if (disjunction_p (t)) + { + /* Matches constraints of the form P \/ Q. Disjunctions contribute + linearly to the number of constraints. When both P and Q are + disjunctions, clauses are added. When only one of P and Q + is a disjunction, an additional clause is produced. When neither + P nor Q are disjunctions, two clauses are produced. */ + if (disjunction_p (lhs)) + { + if (disjunction_p (rhs) || (conjunction_p (rhs) && d2)) + /* Both P and Q are disjunctions. */ + return std::make_pair (n1 + n2, d1 | d2); + else + /* Only LHS is a disjunction. */ + return std::make_pair (1 + n1 + n2, d1 | d2); + gcc_unreachable (); + } + if (conjunction_p (lhs)) + { + if ((disjunction_p (rhs) && d1) || (conjunction_p (rhs) && d1 && d2)) + /* Both P and Q are disjunctions. */ + return std::make_pair (n1 + n2, d1 | d2); + if (disjunction_p (rhs) + || (conjunction_p (rhs) && d1 != d2) + || (atomic_p (rhs) && d1)) + /* Either LHS or RHS is a disjunction. */ + return std::make_pair (1 + n1 + n2, d1 | d2); + else + /* Neither LHS nor RHS is a disjunction. */ + return std::make_pair (2, false); + } + if (atomic_p (lhs)) + { + if (disjunction_p (rhs) || (conjunction_p (rhs) && d2)) + /* Only RHS is a disjunction. */ + return std::make_pair (1 + n1 + n2, d1 | d2); + else + /* Neither LHS nor RHS is a disjunction. */ + return std::make_pair (2, false); + } + } + else /* conjunction_p (t) */ + { + /* Matches constraints of the form P /\ Q, possibly resulting + in the distribution of one side over the other. When both + P and Q are disjunctions, the number of clauses are multiplied. + When only one of P and Q is a disjunction, the the number of + clauses are added. Otherwise, neither side is a disjunction and + no clauses are created. */ + if (disjunction_p (lhs)) + { + if (disjunction_p (rhs) || (conjunction_p (rhs) && d2)) + /* Both P and Q are disjunctions. */ + return std::make_pair (n1 * n2, true); + else + /* Only LHS is a disjunction. */ + return std::make_pair (n1 + n2, true); + gcc_unreachable (); + } + if (conjunction_p (lhs)) + { + if ((disjunction_p (rhs) && d1) || (conjunction_p (rhs) && d1 && d2)) + /* Both P and Q are disjunctions. */ + return std::make_pair (n1 * n2, true); + if (disjunction_p (rhs) + || (conjunction_p (rhs) && d1 != d2) + || (atomic_p (rhs) && d1)) + /* Either LHS or RHS is a disjunction. */ + return std::make_pair (n1 + n2, true); + else + /* Neither LHS nor RHS is a disjunction. */ + return std::make_pair (0, false); + } + if (atomic_p (lhs)) + { + if (disjunction_p (rhs) || (conjunction_p (rhs) && d2)) + /* Only RHS is a disjunction. */ + return std::make_pair (n1 + n2, true); + else + /* Neither LHS nor RHS is a disjunction. */ + return std::make_pair (0, false); + } } + gcc_unreachable (); } -/* Check if a single term can be proven from a set of assumptions. - If the proof is not valid, then it is incomplete when either - the given term is non-atomic or any term in the list of assumptions - is not-atomic. */ +/* Recursively count the number of clauses produced when converting T + to CNF. Returns a pair containing the number of clauses and a bool + value signifying that the the tree would be rewritten as a result of + distributing. In general, a disjunction for which this flag is set + is considered a conjunction for the purpose of counting. */ -proof_result -check_term (term_list& ts, tree t) +static std::pair +cnf_size_r (tree t) { - /* Try the easy way; search for an equivalent term. */ - if (ts.includes (t)) - return valid; + if (atomic_p (t)) + /* Atomic constraints produce no clauses. */ + return std::make_pair (0, false); - /* The hard way; actually consider what the term means. */ - return analyze_term (ts, t); -} + /* For compound constraints, recursively count clauses and unpack + the results. */ + tree lhs = TREE_OPERAND (t, 0); + tree rhs = TREE_OPERAND (t, 1); + std::pair p1 = cnf_size_r (lhs); + std::pair p2 = cnf_size_r (rhs); + int n1 = p1.first, n2 = p2.first; + bool d1 = p1.second, d2 = p2.second; -/* Check to see if any term is proven by the assumptions in the - proof goal. The proof is valid if the proof of any term is valid. - If validity cannot be determined, but any particular - check was undecided, then this goal is undecided. */ - -proof_result -check_goal (proof_goal& g) -{ - term_list::iterator iter = g.conclusions.begin (); - term_list::iterator end = g.conclusions.end (); - bool incomplete = false; - while (iter != end) + if (disjunction_p (t)) { - proof_result r = check_term (g.assumptions, *iter); - if (r == valid) - return r; - if (r == undecided) - incomplete = true; - ++iter; + /* Matches constraints of the form P \/ Q, possibly resulting + in the distribution of one side over the other. When both + P and Q are conjunctions, the number of clauses are multiplied. + When only one of P and Q is a conjunction, the the number of + clauses are added. Otherwise, neither side is a conjunction and + no clauses are created. */ + if (disjunction_p (lhs)) + { + if ((disjunction_p (rhs) && d1 && d2) || (conjunction_p (rhs) && d1)) + /* Both P and Q are conjunctions. */ + return std::make_pair (n1 * n2, true); + if ((disjunction_p (rhs) && d1 != d2) + || conjunction_p (rhs) + || (atomic_p (rhs) && d1)) + /* Either LHS or RHS is a conjunction. */ + return std::make_pair (n1 + n2, true); + else + /* Neither LHS nor RHS is a conjunction. */ + return std::make_pair (0, false); + gcc_unreachable (); + } + if (conjunction_p (lhs)) + { + if ((disjunction_p (rhs) && d2) || conjunction_p (rhs)) + /* Both LHS and RHS are conjunctions. */ + return std::make_pair (n1 * n2, true); + else + /* Only LHS is a conjunction. */ + return std::make_pair (n1 + n2, true); + } + if (atomic_p (lhs)) + { + if ((disjunction_p (rhs) && d2) || conjunction_p (rhs)) + /* Only RHS is a disjunction. */ + return std::make_pair (n1 + n2, true); + else + /* Neither LHS nor RHS is a disjunction. */ + return std::make_pair (0, false); + } } - - /* Was the proof complete? */ - if (incomplete) - return undecided; - else - return invalid; -} - -/* Check if the the proof is valid. This is the case when all - goals can be discharged. If any goal is invalid, then the - entire proof is invalid. Otherwise, the proof is undecided. */ - -proof_result -check_proof (proof_state& p) -{ - proof_state::iterator iter = p.begin(); - proof_state::iterator end = p.end(); - while (iter != end) + else /* conjunction_p (t) */ { - proof_result r = check_goal (*iter); - if (r == invalid) - return r; - if (r == valid) - iter = p.discharge (iter); - else - ++iter; + /* Matches constraints of the form P /\ Q. Conjunctions contribute + linearly to the number of constraints. When both P and Q are + conjunctions, clauses are added. When only one of P and Q + is a conjunction, an additional clause is produced. When neither + P nor Q are conjunctions, two clauses are produced. */ + if (disjunction_p (lhs)) + { + if ((disjunction_p (rhs) && d1 && d2) || (conjunction_p (rhs) && d1)) + /* Both P and Q are conjunctions. */ + return std::make_pair (n1 + n2, d1 | d2); + if ((disjunction_p (rhs) && d1 != d2) + || conjunction_p (rhs) + || (atomic_p (rhs) && d1)) + /* Either LHS or RHS is a conjunction. */ + return std::make_pair (1 + n1 + n2, d1 | d2); + else + /* Neither LHS nor RHS is a conjunction. */ + return std::make_pair (2, false); + gcc_unreachable (); + } + if (conjunction_p (lhs)) + { + if ((disjunction_p (rhs) && d2) || conjunction_p (rhs)) + /* Both LHS and RHS are conjunctions. */ + return std::make_pair (n1 + n2, d1 | d2); + else + /* Only LHS is a conjunction. */ + return std::make_pair (1 + n1 + n2, d1 | d2); + } + if (atomic_p (lhs)) + { + if ((disjunction_p (rhs) && d2) || conjunction_p (rhs)) + /* Only RHS is a disjunction. */ + return std::make_pair (1 + n1 + n2, d1 | d2); + else + /* Neither LHS nor RHS is a disjunction. */ + return std::make_pair (2, false); + } } - - /* If all goals are discharged, then the proof is valid. */ - if (p.empty()) - return valid; - else - return undecided; + gcc_unreachable (); } -/*--------------------------------------------------------------------------- - Left logical rules ----------------------------------------------------------------------------*/ +/* Count the number conjunctive clauses that would be created + when rewriting T to DNF. */ -term_list::iterator -load_check_assumption (term_list& ts, term_list::iterator i) +static int +dnf_size (tree t) { - tree decl = CHECK_CONSTR_CONCEPT (*i); - tree tmpl = DECL_TI_TEMPLATE (decl); - tree args = CHECK_CONSTR_ARGS (*i); - return ts.replace(i, expand_concept (tmpl, args)); + std::pair result = dnf_size_r (t); + return result.first == 0 ? 1 : result.first; } -term_list::iterator -load_parameterized_assumption (term_list& ts, term_list::iterator i) -{ - return ts.replace(i, PARM_CONSTR_OPERAND(*i)); -} -term_list::iterator -load_conjunction_assumption (term_list& ts, term_list::iterator i) +/* Count the number disjunctive clauses that would be created + when rewriting T to CNF. */ + +static int +cnf_size (tree t) { - tree t1 = TREE_OPERAND (*i, 0); - tree t2 = TREE_OPERAND (*i, 1); - return ts.replace(i, t1, t2); + std::pair result = cnf_size_r (t); + return result.first == 0 ? 1 : result.first; } -/* Examine the terms in the list, and apply left-logical rules to move - terms into the set of assumptions. */ + +/* A left-conjunction is replaced by its operands. */ void -load_assumptions (proof_goal& g) +replace_term (clause& c, tree t) { - term_list::iterator iter = g.assumptions.begin(); - term_list::iterator end = g.assumptions.end(); - while (iter != end) - { - switch (TREE_CODE (*iter)) - { - case CHECK_CONSTR: - iter = load_check_assumption (g.assumptions, iter); - break; - case PARM_CONSTR: - iter = load_parameterized_assumption (g.assumptions, iter); - break; - case CONJ_CONSTR: - iter = load_conjunction_assumption (g.assumptions, iter); - break; - default: - ++iter; - break; - } - } + tree t1 = TREE_OPERAND (t, 0); + tree t2 = TREE_OPERAND (t, 1); + return c.replace (t1, t2); } -/* In each subgoal, load constraints into the assumption set. */ +/* Create a new clause in the formula by copying the current + clause. In the current clause, the term at CI is replaced + by the first operand, and in the new clause, it is replaced + by the second. */ void -load_assumptions(proof_state& p) +branch_clause (formula& f, clause& c1, tree t) { - proof_state::iterator iter = p.begin(); - while (iter != p.end()) - { - load_assumptions (*iter); - ++iter; - } + tree t1 = TREE_OPERAND (t, 0); + tree t2 = TREE_OPERAND (t, 1); + clause& c2 = f.branch (); + c1.replace (t1); + c2.replace (t2); } -void -explode_disjunction (proof_state& p, proof_state::iterator gi, term_list::iterator ti1) -{ - tree t1 = TREE_OPERAND (*ti1, 0); - tree t2 = TREE_OPERAND (*ti1, 1); +/* Decompose t1 /\ t2 according to the rules R. */ - /* Erase the current term from the goal. */ - proof_goal& g1 = *gi; - proof_goal& g2 = *p.branch (gi); +inline void +decompose_conjuntion (formula& f, clause& c, tree t, rules r) +{ + if (r == left) + replace_term (c, t); + else + branch_clause (f, c, t); +} - /* Get an iterator to the equivalent position in th enew goal. */ - int n = std::distance (g1.assumptions.begin (), ti1); - term_list::iterator ti2 = g2.assumptions.begin (); - std::advance (ti2, n); +/* Decompose t1 \/ t2 according to the rules R. */ - /* Replace the disjunction in both branches. */ - g1.assumptions.replace (ti1, t1); - g2.assumptions.replace (ti2, t2); +inline void +decompose_disjunction (formula& f, clause& c, tree t, rules r) +{ + if (r == right) + replace_term (c, t); + else + branch_clause (f, c, t); } +/* An atomic constraint is already decomposed. */ +inline void +decompose_atom (clause& c) +{ + c.advance (); +} -/* Search the assumptions of the goal for the first disjunction. */ +/* Decompose a term of clause C (in formula F) according to the + logical rules R. */ -bool -explode_goal (proof_state& p, proof_state::iterator gi) +void +decompose_term (formula& f, clause& c, tree t, rules r) { - term_list& ts = gi->assumptions; - term_list::iterator ti = ts.begin(); - term_list::iterator end = ts.end(); - while (ti != end) + switch (TREE_CODE (t)) { - if (TREE_CODE (*ti) == DISJ_CONSTR) - { - explode_disjunction (p, gi, ti); - return true; - } - else ++ti; + case CONJ_CONSTR: + return decompose_conjuntion (f, c, t, r); + case DISJ_CONSTR: + return decompose_disjunction (f, c, t, r); + default: + return decompose_atom (c); } - return false; } -/* Search for the first goal with a disjunction, and then branch - creating a clone of that subgoal. */ +/* Decompose C (in F) using the logical rules R until it + is comprised of only atomic constraints. */ void -explode_assumptions (proof_state& p) +decompose_clause (formula& f, clause& c, rules r) { - proof_state::iterator iter = p.begin(); - proof_state::iterator end = p.end(); - while (iter != end) - { - if (explode_goal (p, iter)) - return; - ++iter; - } + while (!c.done ()) + decompose_term (f, c, *c.current (), r); + f.advance (); } +/* Decompose the logical formula F according to the logical + rules determined by R. The result is a formula containing + clauses that contain only atomic terms. */ -/*--------------------------------------------------------------------------- - Right logical rules ----------------------------------------------------------------------------*/ - -term_list::iterator -load_disjunction_conclusion (term_list& g, term_list::iterator i) +void +decompose_formula (formula& f, rules r) { - tree t1 = TREE_OPERAND (*i, 0); - tree t2 = TREE_OPERAND (*i, 1); - return g.replace(i, t1, t2); + while (!f.done ()) + decompose_clause (f, *f.current (), r); } -/* Apply logical rules to the right hand side. This will load the - conclusion set with all tpp-level disjunctions. */ +/* Fully decomposing T into a list of sequents, each comprised of + a list of atomic constraints, as if T were an antecedent. */ -void -load_conclusions (proof_goal& g) +static formula +decompose_antecedents (tree t) { - term_list::iterator iter = g.conclusions.begin(); - term_list::iterator end = g.conclusions.end(); - while (iter != end) - { - if (TREE_CODE (*iter) == DISJ_CONSTR) - iter = load_disjunction_conclusion (g.conclusions, iter); - else - ++iter; - } + formula f (t); + decompose_formula (f, left); + return f; } -void -load_conclusions (proof_state& p) +/* Fully decomposing T into a list of sequents, each comprised of + a list of atomic constraints, as if T were a consequent. */ + +static formula +decompose_consequents (tree t) { - proof_state::iterator iter = p.begin(); - while (iter != p.end()) - { - load_conclusions (*iter); - ++iter; - } + formula f (t); + decompose_formula (f, right); + return f; } +static bool derive_proof (clause&, tree, rules); -/*--------------------------------------------------------------------------- - High-level proof tactics ----------------------------------------------------------------------------*/ +/* Derive a proof of both operands of T. */ -/* Given two constraints A and C, try to derive a proof that - A implies C. */ +static bool +derive_proof_for_both_operands (clause& c, tree t, rules r) +{ + if (!derive_proof (c, TREE_OPERAND (t, 0), r)) + return false; + return derive_proof (c, TREE_OPERAND (t, 1), r); +} -bool -prove_implication (tree a, tree c) +/* Derive a proof of either operand of T. */ + +static bool +derive_proof_for_either_operand (clause& c, tree t, rules r) { - /* Quick accept. */ - if (cp_tree_equal (a, c)) + if (derive_proof (c, TREE_OPERAND (t, 0), r)) return true; + return derive_proof (c, TREE_OPERAND (t, 1), r); +} - /* Build the initial proof state. */ - proof_state proof; - proof_goal& goal = proof.front(); - goal.assumptions.push_back(a); - goal.conclusions.push_back(c); - - /* Perform an initial right-expansion in the off-chance that the right - hand side contains disjunctions. */ - load_conclusions (proof); +/* Derive a proof of the atomic constraint T in clause C. */ - int step_max = 1 << 10; - int step_count = 0; /* FIXME: We shouldn't have this. */ - std::size_t branch_limit = 1024; /* FIXME: This needs to be configurable. */ - while (step_count < step_max && proof.size() < branch_limit) - { - /* Determine if we can prove that the assumptions entail the - conclusions. If so, we're done. */ - load_assumptions (proof); +static bool +derive_atomic_proof (clause& c, tree t) +{ + return c.contains (t); +} - /* Can we solve the proof based on this? */ - proof_result r = check_proof (proof); - if (r != undecided) - return r == valid; +/* Derive a proof of T from the terms in C. */ - /* If not, then we need to dig into disjunctions. */ - explode_assumptions (proof); +static bool +derive_proof (clause& c, tree t, rules r) +{ + switch (TREE_CODE (t)) + { + case CONJ_CONSTR: + if (r == left) + return derive_proof_for_both_operands (c, t, r); + else + return derive_proof_for_either_operand (c, t, r); + case DISJ_CONSTR: + if (r == left) + return derive_proof_for_either_operand (c, t, r); + else + return derive_proof_for_both_operands (c, t, r); + default: + return derive_atomic_proof (c, t); + } +} - ++step_count; - } +/* Derive a proof of T from disjunctive clauses in F. */ - if (step_count == step_max) - error ("subsumption failed to resolve"); +static bool +derive_proofs (formula& f, tree t, rules r) +{ + for (formula::iterator i = f.begin(); i != f.end(); ++i) + if (!derive_proof (*i, t, r)) + return false; + return true; +} - if (proof.size() == branch_limit) - error ("exceeded maximum number of branches"); +/* The largest number of clauses in CNF or DNF we accept as input + for subsumption. This an upper bound of 2^16 expressions. */ +static int max_problem_size = 16; +static inline bool +diagnose_constraint_size (tree t) +{ + error_at (input_location, "%qE exceeds the maximum constraint complexity", t); return false; } @@ -777,31 +784,51 @@ prove_implication (tree a, tree c) This is done by deriving a proof of the conclusions on the RIGHT from the assumptions on the LEFT assumptions. */ -bool -subsumes_constraints_nonnull (tree left, tree right) +static bool +subsumes_constraints_nonnull (tree lhs, tree rhs) { - gcc_assert (check_constraint_info (left)); - gcc_assert (check_constraint_info (right)); - auto_timevar time (TV_CONSTRAINT_SUB); - tree a = CI_ASSOCIATED_CONSTRAINTS (left); - tree c = CI_ASSOCIATED_CONSTRAINTS (right); - return prove_implication (a, c); -} -} /* namespace */ + int n1 = dnf_size (lhs); + int n2 = cnf_size (rhs); + + /* Make sure we haven't exceeded the largest acceptable problem. */ + if (std::min (n1, n2) >= max_problem_size) + { + if (n1 < n2) + diagnose_constraint_size (lhs); + else + diagnose_constraint_size (rhs); + return false; + } + + /* Decompose the smaller of the two formulas, and recursively + check the implication using the larger. Note that for + constraints that are largely comprised of conjunctions the + it will usually be the case that n1 <= n2. */ + if (n1 <= n2) + { + formula dnf = decompose_antecedents (lhs); + return derive_proofs (dnf, rhs, left); + } + else + { + formula cnf = decompose_consequents (rhs); + return derive_proofs (cnf, lhs, right); + } +} /* Returns true if the LEFT constraints subsume the RIGHT constraints. */ bool -subsumes (tree left, tree right) +subsumes (tree lhs, tree rhs) { - if (left == right) + if (lhs == rhs) return true; - if (!left) + if (!lhs || lhs == error_mark_node) return false; - if (!right) + if (!rhs || rhs == error_mark_node) return true; - return subsumes_constraints_nonnull (left, right); + return subsumes_constraints_nonnull (lhs, rhs); } diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index ff6d5ee..57ab129 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2268,7 +2268,13 @@ diagnose_name_conflict (tree decl, tree bval) && (TREE_CODE (decl) != TYPE_DECL || DECL_ARTIFICIAL (decl) == DECL_ARTIFICIAL (bval)) && CP_DECL_CONTEXT (decl) == CP_DECL_CONTEXT (bval)) - error ("redeclaration of %q#D", decl); + { + if (concept_definition_p (decl)) + error ("redeclaration of %q#D with different template parameters", + decl); + else + error ("redeclaration of %q#D", decl); + } else error ("%q#D conflicts with a previous declaration", decl); @@ -2334,6 +2340,9 @@ matching_fn_p (tree one, tree two) return false; } + if (!equivalently_constrained (one, two)) + return false; + return true; } diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index c61e0b2..b6e738c 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -169,6 +169,7 @@ enum required_token { RT_TRY, /* try */ RT_CATCH, /* catch */ RT_THROW, /* throw */ + RT_AUTO, /* auto */ RT_LABEL, /* __label__ */ RT_AT_TRY, /* @try */ RT_AT_SYNCHRONIZED, /* @synchronized */ @@ -2196,6 +2197,8 @@ static tree cp_parser_type_specifier int *, bool *); static tree cp_parser_simple_type_specifier (cp_parser *, cp_decl_specifier_seq *, cp_parser_flags); +static tree cp_parser_placeholder_type_specifier + (cp_parser *, location_t, tree, bool); static tree cp_parser_type_name (cp_parser *, bool); static tree cp_parser_nonclass_name @@ -2369,6 +2372,8 @@ static tree cp_parser_type_parameter (cp_parser *, bool *); static tree cp_parser_template_id (cp_parser *, bool, bool, enum tag_types, bool); +static tree cp_parser_template_id_expr + (cp_parser *, bool, bool, bool); static tree cp_parser_template_name (cp_parser *, bool, bool, bool, enum tag_types, bool *); static tree cp_parser_template_argument_list @@ -2444,7 +2449,9 @@ static void cp_parser_label_declaration /* Concept Extensions */ -static tree cp_parser_requires_clause +static tree cp_parser_concept_definition + (cp_parser *); +static tree cp_parser_constraint_expression (cp_parser *); static tree cp_parser_requires_clause_opt (cp_parser *); @@ -2454,7 +2461,7 @@ static tree cp_parser_requirement_parameter_list (cp_parser *); static tree cp_parser_requirement_body (cp_parser *); -static tree cp_parser_requirement_list +static tree cp_parser_requirement_seq (cp_parser *); static tree cp_parser_requirement (cp_parser *); @@ -2687,11 +2694,6 @@ static bool cp_parser_init_statement_p static bool cp_parser_skip_to_closing_square_bracket (cp_parser *); -/* Concept-related syntactic transformations */ - -static tree cp_parser_maybe_concept_name (cp_parser *, tree); -static tree cp_parser_maybe_partial_concept_id (cp_parser *, tree, tree); - // -------------------------------------------------------------------------- // // Unevaluated Operand Guard // @@ -4874,6 +4876,8 @@ class token_pair m_open_loc); } + location_t open_location () const { return m_open_loc; } + private: location_t m_open_loc; }; @@ -4948,7 +4952,7 @@ cp_parser_statement_expr (cp_parser *parser) This returns the tree code corresponding to the matched operator as an int. When the current token matches a compound assignment - opertor, the resulting tree code is the negative value of the + operator, the resulting tree code is the negative value of the non-assignment operator. */ static int @@ -5904,11 +5908,10 @@ cp_parser_id_expression (cp_parser *parser, cp_parser_parse_tentatively (parser); /* Try a template-id. */ - id = cp_parser_template_id (parser, - /*template_keyword_p=*/false, - /*check_dependency_p=*/true, - none_type, - declarator_p); + id = cp_parser_template_id_expr (parser, + /*template_keyword_p=*/false, + /*check_dependency_p=*/true, + declarator_p); /* If that worked, we're done. */ if (cp_parser_parse_definitely (parser)) return id; @@ -5983,10 +5986,9 @@ cp_parser_unqualified_id (cp_parser* parser, template-id. */ cp_parser_parse_tentatively (parser); /* Try a template-id. */ - id = cp_parser_template_id (parser, template_keyword_p, - check_dependency_p, - none_type, - declarator_p); + id = cp_parser_template_id_expr (parser, template_keyword_p, + check_dependency_p, + declarator_p); /* If it worked, we're done. */ if (cp_parser_parse_definitely (parser)) return id; @@ -5995,10 +5997,9 @@ cp_parser_unqualified_id (cp_parser* parser, } case CPP_TEMPLATE_ID: - return cp_parser_template_id (parser, template_keyword_p, - check_dependency_p, - none_type, - declarator_p); + return cp_parser_template_id_expr (parser, template_keyword_p, + check_dependency_p, + declarator_p); case CPP_COMPL: { @@ -6239,10 +6240,9 @@ cp_parser_unqualified_id (cp_parser* parser, /* This could be a template-id, so we try that first. */ cp_parser_parse_tentatively (parser); /* Try a template-id. */ - id = cp_parser_template_id (parser, template_keyword_p, - /*check_dependency_p=*/true, - none_type, - declarator_p); + id = cp_parser_template_id_expr (parser, template_keyword_p, + /*check_dependency_p=*/true, + declarator_p); /* If that worked, we're done. */ if (cp_parser_parse_definitely (parser)) return id; @@ -9638,6 +9638,8 @@ cp_parser_binary_expression (cp_parser* parser, bool cast_p, current.lhs = error_mark_node; else { + current.lhs.maybe_add_location_wrapper (); + rhs.maybe_add_location_wrapper (); current.lhs = build_min (current.tree_type, TREE_CODE_CLASS (current.tree_type) @@ -14059,10 +14061,26 @@ cp_parser_decl_specifier_seq (cp_parser* parser, case RID_CONCEPT: ds = ds_concept; cp_lexer_consume_token (parser->lexer); + + /* Warn for concept as a decl-specifier. We'll rewrite these as + concept declarations later. */ + if (!flag_concepts_ts) + { + cp_token *next = cp_lexer_peek_token (parser->lexer); + if (next->keyword == RID_BOOL) + pedwarn (next->location, 0, "the % keyword is not " + "allowed in a C++20 concept definition"); + else + pedwarn (token->location, 0, "C++20 concept definition syntax " + "is % = %> "); + } + /* In C++20 a concept definition is just 'concept name = expr;' - Support that syntax by pretending we've seen 'bool'. */ + Support that syntax as a TS extension by pretending we've seen + the 'bool' specifier. */ if (cp_lexer_next_token_is (parser->lexer, CPP_NAME) - && cp_lexer_nth_token_is (parser->lexer, 2, CPP_EQ)) + && cp_lexer_nth_token_is (parser->lexer, 2, CPP_EQ) + && !decl_specs->any_type_specifiers_p) { cp_parser_set_decl_spec_type (decl_specs, boolean_type_node, token, /*type_definition*/false); @@ -15800,15 +15818,15 @@ get_unqualified_id (cp_declarator *declarator) return NULL_TREE; } -/* Returns true if DECL represents a constrained-parameter. */ +/* Returns true if TYPE would declare a constrained constrained-parameter. */ static inline bool -is_constrained_parameter (tree decl) +is_constrained_parameter (tree type) { - return (decl - && TREE_CODE (decl) == TYPE_DECL - && CONSTRAINED_PARM_CONCEPT (decl) - && DECL_P (CONSTRAINED_PARM_CONCEPT (decl))); + return (type + && TREE_CODE (type) == TYPE_DECL + && CONSTRAINED_PARM_CONCEPT (type) + && DECL_P (CONSTRAINED_PARM_CONCEPT (type))); } /* Returns true if PARM declares a constrained-parameter. */ @@ -15894,8 +15912,8 @@ cp_parser_constrained_template_template_parm (cp_parser *parser, declarator. */ static tree -constrained_non_type_template_parm (bool *is_non_type, - cp_parameter_declarator *parm) +cp_parser_constrained_non_type_template_parm (bool *is_non_type, + cp_parameter_declarator *parm) { *is_non_type = true; cp_declarator *decl = parm->declarator; @@ -15912,20 +15930,13 @@ constrained_non_type_template_parm (bool *is_non_type, static tree finish_constrained_parameter (cp_parser *parser, cp_parameter_declarator *parmdecl, - bool *is_non_type, - bool *is_parameter_pack) + bool *is_non_type) { tree decl = parmdecl->decl_specifiers.type; tree id = get_unqualified_id (parmdecl->declarator); tree def = parmdecl->default_argument; tree proto = DECL_INITIAL (decl); - /* A template parameter constrained by a variadic concept shall also - be declared as a template parameter pack. */ - bool is_variadic = template_parameter_pack_p (proto); - if (is_variadic && !*is_parameter_pack) - cp_parser_error (parser, "variadic constraint introduced without %<...%>"); - /* Build the parameter. Return an error if the declarator was invalid. */ tree parm; if (TREE_CODE (proto) == TYPE_DECL) @@ -15934,7 +15945,7 @@ finish_constrained_parameter (cp_parser *parser, parm = cp_parser_constrained_template_template_parm (parser, proto, id, parmdecl); else - parm = constrained_non_type_template_parm (is_non_type, parmdecl); + parm = cp_parser_constrained_non_type_template_parm (is_non_type, parmdecl); if (parm == error_mark_node) return error_mark_node; @@ -15949,14 +15960,13 @@ finish_constrained_parameter (cp_parser *parser, /* Returns true if the parsed type actually represents the declaration of a type template-parameter. */ -static inline bool +static bool declares_constrained_type_template_parameter (tree type) { return (is_constrained_parameter (type) && TREE_CODE (TREE_TYPE (type)) == TEMPLATE_TYPE_PARM); } - /* Returns true if the parsed type actually represents the declaration of a template template-parameter. */ @@ -16132,12 +16142,11 @@ cp_parser_template_parameter (cp_parser* parser, bool *is_non_type, cp_lexer_consume_token (parser->lexer); } - // The parameter may have been constrained. + /* The parameter may have been constrained type parameter. */ if (is_constrained_parameter (parameter_declarator)) return finish_constrained_parameter (parser, parameter_declarator, - is_non_type, - is_parameter_pack); + is_non_type); // Now we're sure that the parameter is a non-type parameter. *is_non_type = true; @@ -16263,8 +16272,8 @@ cp_parser_type_parameter (cp_parser* parser, bool *is_parameter_pack) if (flag_concepts) { tree reqs = get_shorthand_constraints (current_template_parms); - if (tree r = cp_parser_requires_clause_opt (parser)) - reqs = conjoin_constraints (reqs, normalize_expression (r)); + if (tree dreqs = cp_parser_requires_clause_opt (parser)) + reqs = combine_constraint_expressions (reqs, dreqs); TEMPLATE_PARMS_CONSTRAINTS (current_template_parms) = reqs; } @@ -16370,6 +16379,7 @@ cp_parser_template_id (cp_parser *parser, /* If the next token corresponds to a template-id, there is no need to reparse it. */ cp_token *token = cp_lexer_peek_token (parser->lexer); + if (token->type == CPP_TEMPLATE_ID) { cp_lexer_consume_token (parser->lexer); @@ -16512,7 +16522,7 @@ cp_parser_template_id (cp_parser *parser, = make_location (token->location, token->location, parser->lexer); /* Check for concepts autos where they don't belong. We could - identify types in some cases of idnetifier TEMPL, looking ahead + identify types in some cases of identifier TEMPL, looking ahead for a CPP_SCOPE, but that would buy us nothing: we accept auto in types. We reject them in functions, but if what we have is an identifier, even with none_type we can't conclude it's NOT a @@ -16538,11 +16548,13 @@ cp_parser_template_id (cp_parser *parser, template_id = finish_template_type (templ, arguments, entering_scope); } - /* A template-like identifier may be a partial concept id. */ - else if (flag_concepts - && (template_id = (cp_parser_maybe_partial_concept_id - (parser, templ, arguments)))) - return template_id; + else if (concept_definition_p (templ)) + { + /* The caller will decide whether this is a concept check or type + constraint. */ + template_id = build2_loc (combined_loc, TEMPLATE_ID_EXPR, + boolean_type_node, templ, arguments); + } else if (variable_template_p (templ)) { template_id = lookup_template_variable (templ, arguments); @@ -16599,6 +16611,23 @@ cp_parser_template_id (cp_parser *parser, return template_id; } +/* Like cp_parser_template_id, called in non-type context. */ + +static tree +cp_parser_template_id_expr (cp_parser *parser, + bool template_keyword_p, + bool check_dependency_p, + bool is_declaration) +{ + tree x = cp_parser_template_id (parser, template_keyword_p, check_dependency_p, + none_type, is_declaration); + if (TREE_CODE (x) == TEMPLATE_ID_EXPR + && concept_check_p (x)) + /* We didn't check the arguments in cp_parser_template_id; do that now. */ + return build_concept_id (x); + return x; +} + /* Parse a template-name. template-name: @@ -17019,11 +17048,7 @@ cp_parser_template_argument (cp_parser* parser) /*check_dependency=*/true, /*ambiguous_decls=*/NULL, argument_start_token->location); - /* Handle a constrained-type-specifier for a non-type template - parameter. */ - if (tree decl = cp_parser_maybe_concept_name (parser, argument)) - argument = decl; - else if (TREE_CODE (argument) != TEMPLATE_DECL + if (TREE_CODE (argument) != TEMPLATE_DECL && TREE_CODE (argument) != UNBOUND_CLASS_TEMPLATE) cp_parser_error (parser, "expected template-name"); } @@ -17772,7 +17797,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, else if (!flag_concepts) pedwarn (token->location, 0, "use of % in parameter declaration " - "only available with %<-fconcepts%>"); + "only available with %<-fconcepts-ts%>"); } else type = make_auto (); @@ -17888,6 +17913,10 @@ cp_parser_simple_type_specifier (cp_parser* parser, if (flags & CP_PARSER_FLAGS_OPTIONAL) cp_parser_parse_tentatively (parser); + /* Remember current tentative parsing state -- if we know we need + a type, we can give better diagnostics here. */ + bool tent = cp_parser_parsing_tentatively (parser); + token = cp_lexer_peek_token (parser->lexer); /* Look for the optional `::' operator. */ @@ -17942,13 +17971,44 @@ cp_parser_simple_type_specifier (cp_parser* parser, type = NULL_TREE; } + if (!type && flag_concepts && decl_specs) + { + /* Try for a type-constraint with template arguments. We check + decl_specs here to avoid trying this for a functional cast. */ + + cp_parser_parse_tentatively (parser); + + type = cp_parser_template_id (parser, + /*template_keyword_p=*/false, + /*check_dependency_p=*/true, + none_type, + /*is_declaration=*/false); + if (type && concept_check_p (type)) + { + location_t loc = EXPR_LOCATION (type); + type = cp_parser_placeholder_type_specifier (parser, loc, + type, tent); + if (tent && type == error_mark_node) + /* Perhaps it's a concept-check expression. */ + cp_parser_simulate_error (parser); + } + else + cp_parser_simulate_error (parser); + + if (!cp_parser_parse_definitely (parser)) + type = NULL_TREE; + } + if (!type && cxx_dialect >= cxx17) { - /* Try class template argument deduction. */ + /* Try class template argument deduction or type-constraint without + template arguments. */ tree name = cp_parser_identifier (parser); if (name && TREE_CODE (name) == IDENTIFIER_NODE && parser->scope != error_mark_node) { + location_t loc + = cp_lexer_previous_token (parser->lexer)->location; tree tmpl = cp_parser_lookup_name (parser, name, none_type, /*is_template=*/false, @@ -17960,6 +18020,9 @@ cp_parser_simple_type_specifier (cp_parser* parser, && (DECL_CLASS_TEMPLATE_P (tmpl) || DECL_TEMPLATE_TEMPLATE_PARM_P (tmpl))) type = make_template_placeholder (tmpl); + else if (flag_concepts && tmpl && concept_definition_p (tmpl)) + type = cp_parser_placeholder_type_specifier (parser, loc, + tmpl, tent); else { type = error_mark_node; @@ -18031,6 +18094,140 @@ cp_parser_simple_type_specifier (cp_parser* parser, return type; } +/* Parse the remainder of a placholder-type-specifier. + + placeholder-type-specifier: + type-constraint_opt auto + type-constraint_opt decltype(auto) + + The raw form of the constraint is parsed in cp_parser_simple_type_specifier + and passed as TMPL. This function converts TMPL to an actual type-constraint, + parses the placeholder type, and performs some contextual syntactic analysis. + + LOC provides the location of the template name. + + TENTATIVE is true if the type-specifier parsing is tentative; in that case, + don't give an error if TMPL isn't a valid type-constraint, as the template-id + might actually be a concept-check, + + Note that the Concepts TS allows the auto or decltype(auto) to be + omitted in a constrained-type-specifier. */ + +tree +cp_parser_placeholder_type_specifier (cp_parser *parser, location_t loc, + tree tmpl, bool tentative) +{ + if (tmpl == error_mark_node) + return error_mark_node; + + tree orig_tmpl = tmpl; + + /* Get the arguments as written for subsequent analysis. */ + tree args = NULL_TREE; + if (TREE_CODE (tmpl) == TEMPLATE_ID_EXPR) + { + args = TREE_OPERAND (tmpl, 1); + tmpl = TREE_OPERAND (tmpl, 0); + } + if (args == NULL_TREE) + /* A concept-name with no arguments can't be an expression. */ + tentative = false; + + tsubst_flags_t complain = tentative ? tf_none : tf_warning_or_error; + + /* Get the concept and prototype parameter for the constraint. */ + tree_pair info = finish_type_constraints (tmpl, args, complain); + tree con = info.first; + tree proto = info.second; + if (con == error_mark_node) + return error_mark_node; + + /* As per the standard, require auto or decltype(auto), except in some + cases (template parameter lists, -fconcepts-ts enabled). */ + cp_token *placeholder = NULL, *open_paren = NULL, *close_paren = NULL; + if (cxx_dialect >= cxx2a) + { + if (cp_lexer_next_token_is_keyword (parser->lexer, RID_AUTO)) + placeholder = cp_lexer_consume_token (parser->lexer); + else if (cp_lexer_next_token_is_keyword (parser->lexer, RID_DECLTYPE)) + { + placeholder = cp_lexer_consume_token (parser->lexer); + open_paren = cp_parser_require (parser, CPP_OPEN_PAREN, + RT_OPEN_PAREN); + cp_parser_require_keyword (parser, RID_AUTO, RT_AUTO); + close_paren = cp_parser_require (parser, CPP_CLOSE_PAREN, + RT_CLOSE_PAREN, + open_paren->location); + } + } + + /* A type constraint constrains a contextually determined type or type + parameter pack. However, the the Concepts TS does allow concepts + to introduce non-type and template template parameters. */ + if (TREE_CODE (proto) != TYPE_DECL) + { + if (!flag_concepts_ts + || !processing_template_parmlist) + { + error_at (loc, "%qE does not constrain a type", DECL_NAME (con)); + inform (DECL_SOURCE_LOCATION (con), "concept defined here"); + return error_mark_node; + } + } + + /* In a template parameter list, a type-parameter can be introduced + by type-constraints alone. */ + if (processing_template_parmlist && !placeholder) + return build_constrained_parameter (con, proto, args); + + /* Diagnose issues placeholder issues. */ + if (!flag_concepts_ts + && !parser->in_result_type_constraint_p + && !placeholder) + { + tree id = build_nt (TEMPLATE_ID_EXPR, tmpl, args); + tree expr = DECL_P (orig_tmpl) ? DECL_NAME (con) : id; + error_at (input_location, + "expected % or % after %qE", expr); + /* Fall through. This is an error of omission. */ + } + else if (parser->in_result_type_constraint_p && placeholder) + { + /* A trailing return type only allows type-constraints. */ + error_at (input_location, + "unexpected placeholder in constrained result type"); + } + + /* In a parameter-declaration-clause, a placeholder-type-specifier + results in an invented template parameter. */ + if (parser->auto_is_implicit_function_template_parm_p) + { + if (placeholder && token_is_decltype (placeholder)) + { + location_t loc = make_location (placeholder->location, + placeholder->location, + close_paren->location); + error_at (loc, "cannot declare a parameter with %"); + return error_mark_node; + } + tree parm = build_constrained_parameter (con, proto, args); + return synthesize_implicit_template_parm (parser, parm); + } + + /* Determine if the type should be deduced using template argument + deduction or decltype deduction. Note that the latter is always + used for type-constraints in trailing return types. */ + bool decltype_p = placeholder + ? placeholder->keyword == RID_DECLTYPE + : parser->in_result_type_constraint_p; + + /* Otherwise, this is the type of a variable or return type. */ + if (decltype_p) + return make_constrained_decltype_auto (con, args); + else + return make_constrained_auto (con, args); +} + /* Parse a type-name. type-name: @@ -18103,8 +18300,6 @@ cp_parser_type_name (cp_parser* parser, bool typename_keyword_p) && TREE_CODE (type_decl) == TYPE_DECL && TYPE_DECL_ALIAS_P (type_decl)) gcc_assert (DECL_TEMPLATE_INSTANTIATION (type_decl)); - else if (is_constrained_parameter (type_decl)) - /* Don't do anything. */ ; else cp_parser_simulate_error (parser); @@ -18116,105 +18311,6 @@ cp_parser_type_name (cp_parser* parser, bool typename_keyword_p) return type_decl; } -/* Check if DECL and ARGS can form a constrained-type-specifier. - If ARGS is non-null, we try to form a concept check of the - form DECL where ? is a wildcard that matches any - kind of template argument. If ARGS is NULL, then we try to - form a concept check of the form DECL. */ - -static tree -cp_parser_maybe_constrained_type_specifier (cp_parser *parser, - tree decl, tree args) -{ - gcc_assert (args ? TREE_CODE (args) == TREE_VEC : true); - - /* If we a constrained-type-specifier cannot be deduced. */ - if (parser->prevent_constrained_type_specifiers) - return NULL_TREE; - - /* A constrained type specifier can only be found in an - overload set or as a reference to a template declaration. - - FIXME: This might be masking a bug. It's possible that - that the deduction below is causing template specializations - to be formed with the wildcard as an argument. */ - if (TREE_CODE (decl) != OVERLOAD && TREE_CODE (decl) != TEMPLATE_DECL) - return NULL_TREE; - - /* Try to build a call expression that evaluates the - concept. This can fail if the overload set refers - only to non-templates. */ - tree placeholder = build_nt (WILDCARD_DECL); - tree check = build_concept_check (decl, placeholder, args); - if (check == error_mark_node) - return NULL_TREE; - - /* Deduce the checked constraint and the prototype parameter. - - FIXME: In certain cases, failure to deduce should be a - diagnosable error. */ - tree conc; - tree proto; - if (!deduce_constrained_parameter (check, conc, proto)) - return NULL_TREE; - - /* In template parameter scope, this results in a constrained - parameter. Return a descriptor of that parm. */ - if (processing_template_parmlist) - return build_constrained_parameter (conc, proto, args); - - /* In a parameter-declaration-clause, constrained-type - specifiers result in invented template parameters. */ - if (parser->auto_is_implicit_function_template_parm_p) - { - tree x = build_constrained_parameter (conc, proto, args); - return synthesize_implicit_template_parm (parser, x); - } - else - { - /* Otherwise, we're in a context where the constrained - type name is deduced and the constraint applies - after deduction. */ - return make_constrained_auto (conc, args); - } - - return NULL_TREE; -} - -/* If DECL refers to a concept, return a TYPE_DECL representing - the result of using the constrained type specifier in the - current context. DECL refers to a concept if - - - it is an overload set containing a function concept taking a single - type argument, or - - - it is a variable concept taking a single type argument. */ - -static tree -cp_parser_maybe_concept_name (cp_parser* parser, tree decl) -{ - if (flag_concepts - && (TREE_CODE (decl) == OVERLOAD - || BASELINK_P (decl) - || variable_concept_p (decl))) - return cp_parser_maybe_constrained_type_specifier (parser, decl, NULL_TREE); - else - return NULL_TREE; -} - -/* Check if DECL and ARGS form a partial-concept-id. If so, - assign ID to the resulting constrained placeholder. - - Returns true if the partial-concept-id designates a placeholder - and false otherwise. Note that *id is set to NULL_TREE in - this case. */ - -static tree -cp_parser_maybe_partial_concept_id (cp_parser *parser, tree decl, tree args) -{ - return cp_parser_maybe_constrained_type_specifier (parser, decl, args); -} - /* Parse a non-class type-name, that is, either an enum-name, a typedef-name, or a concept-name. @@ -18245,10 +18341,6 @@ cp_parser_nonclass_name (cp_parser* parser) type_decl = strip_using_decl (type_decl); - /* If we found an overload set, then it may refer to a concept-name. */ - if (tree decl = cp_parser_maybe_concept_name (parser, type_decl)) - type_decl = decl; - if (TREE_CODE (type_decl) != TYPE_DECL && (objc_is_id (identifier) || objc_is_class_name (identifier))) { @@ -26886,30 +26978,279 @@ cp_parser_label_declaration (cp_parser* parser) } // -------------------------------------------------------------------------- // +// Concept definitions + +static tree +cp_parser_concept_definition (cp_parser *parser) +{ + gcc_assert (cp_lexer_next_token_is_keyword (parser->lexer, RID_CONCEPT)); + cp_lexer_consume_token (parser->lexer); + + cp_expr id = cp_parser_identifier (parser); + if (id == error_mark_node) + { + cp_parser_skip_to_end_of_statement (parser); + cp_parser_consume_semicolon_at_end_of_statement (parser); + return NULL_TREE; + } + + if (!cp_parser_require (parser, CPP_EQ, RT_EQ)) + { + cp_parser_skip_to_end_of_statement (parser); + cp_parser_consume_semicolon_at_end_of_statement (parser); + return error_mark_node; + } + + processing_constraint_expression_sentinel parsing_constraint; + tree init = cp_parser_constraint_expression (parser); + if (init == error_mark_node) + cp_parser_skip_to_end_of_statement (parser); + + /* Consume the trailing ';'. Diagnose the problem if it isn't there, + but continue as if it were. */ + cp_parser_consume_semicolon_at_end_of_statement (parser); + + return finish_concept_definition (id, init); +} + +// -------------------------------------------------------------------------- // // Requires Clause -// Parse a requires clause. -// -// requires-clause: -// 'requires' logical-or-expression -// -// The required logical-or-expression must be a constant expression. Note -// that we don't check that the expression is constepxr here. We defer until -// we analyze constraints and then, we only check atomic constraints. +/* Diagnose an expression that should appear in ()'s within a requires-clause + and suggest where to place those parentheses. */ + +static void +cp_parser_diagnose_ungrouped_constraint_plain (location_t loc) +{ + error_at (loc, "expression after % must be enclosed " + "in parentheses"); +} + +static void +cp_parser_diagnose_ungrouped_constraint_rich (location_t loc) +{ + gcc_rich_location richloc (loc); + richloc.add_fixit_insert_before ("("); + richloc.add_fixit_insert_after (")"); + error_at (&richloc, "expression after % must be enclosed " + "in parentheses"); +} + +/* Parse a primary expression within a constraint. */ + +static cp_expr +cp_parser_constraint_primary_expression (cp_parser *parser) +{ + cp_parser_parse_tentatively (parser); + cp_id_kind idk; + location_t loc = input_location; + cp_expr expr = cp_parser_primary_expression (parser, + /*address_p=*/false, + /*cast_p=*/false, + /*template_arg_p=*/false, + &idk); + expr.maybe_add_location_wrapper (); + if (expr != error_mark_node) + expr = finish_constraint_primary_expr (expr); + if (cp_parser_parse_definitely (parser)) + return expr; + + /* Retry the parse at a lower precedence. If that succeeds, diagnose the + error, but return the expression as if it were valid. */ + cp_parser_parse_tentatively (parser); + expr = cp_parser_simple_cast_expression (parser); + if (cp_parser_parse_definitely (parser)) + { + cp_parser_diagnose_ungrouped_constraint_rich (expr.get_location()); + return expr; + } + + /* Otherwise, something has gone wrong, but we can't generate a more + meaningful diagnostic or recover. */ + cp_parser_diagnose_ungrouped_constraint_plain (loc); + return error_mark_node; +} + +/* Examine the token following EXPR. If it is an operator in a non-logical + binary expression, diagnose that as an error. Returns ERROR_MARK_NODE. */ + +static cp_expr +cp_parser_check_non_logical_constraint (cp_parser *parser, cp_expr lhs) +{ + cp_token *token = cp_lexer_peek_token (parser->lexer); + switch (token->type) + { + default: + return lhs; + + /* Arithmetic operators. */ + case CPP_PLUS: + case CPP_MINUS: + case CPP_MULT: + case CPP_DIV: + case CPP_MOD: + /* Bitwise operators. */ + case CPP_AND: + case CPP_OR: + case CPP_XOR: + case CPP_RSHIFT: + case CPP_LSHIFT: + /* Relational operators. */ + /* FIXME: Handle '<=>'. */ + case CPP_EQ_EQ: + case CPP_NOT_EQ: + case CPP_LESS: + case CPP_GREATER: + case CPP_LESS_EQ: + case CPP_GREATER_EQ: + /* Conditional operator */ + case CPP_QUERY: + /* Pointer-to-member. */ + case CPP_DOT_STAR: + case CPP_DEREF_STAR: + /* Assignment operators. */ + case CPP_PLUS_EQ: + case CPP_MINUS_EQ: + case CPP_MULT_EQ: + case CPP_DIV_EQ: + case CPP_MOD_EQ: + case CPP_AND_EQ: + case CPP_OR_EQ: + case CPP_XOR_EQ: + case CPP_RSHIFT_EQ: + case CPP_LSHIFT_EQ: + break; + + case CPP_EQ: { + /* An equal sign may be part of the the definition of a function, + and not an assignment operator, when parsing the expression + for a trailing requires-clause. For example: + + template + struct S { + S() requires C = default; + } + + This is not an error. */ + if (cp_lexer_nth_token_is_keyword (parser->lexer, 2, RID_DELETE) + || cp_lexer_nth_token_is_keyword (parser->lexer, 2, RID_DEFAULT)) + return lhs; + + break; + } + } + + /* Try to parse the RHS as either the remainder of a conditional-expression + or a logical-or-expression so we can form a good diagnostic. */ + cp_parser_parse_tentatively (parser); + cp_expr rhs; + if (token->type == CPP_QUERY) + rhs = cp_parser_question_colon_clause (parser, lhs); + else + { + cp_lexer_consume_token (parser->lexer); + rhs = cp_parser_binary_expression (parser, false, false, false, + PREC_NOT_OPERATOR, NULL); + } + + /* If we couldn't parse the RHS, then emit the best diagnostic we can. */ + if (!cp_parser_parse_definitely (parser)) + { + cp_parser_diagnose_ungrouped_constraint_plain (token->location); + return error_mark_node; + } + + /* Otherwise, emit a fixit for the complete binary expression. */ + location_t loc = make_location (token->location, + lhs.get_start(), + rhs.get_finish()); + cp_parser_diagnose_ungrouped_constraint_rich (loc); + return error_mark_node; +} + +/* Parse a constraint-logical-and-expression. + + constraint-logical-and-expression: + primary-expression + constraint-logical-and-expression '&&' primary-expression */ + +static cp_expr +cp_parser_constraint_logical_and_expression (cp_parser *parser) +{ + cp_expr lhs = cp_parser_constraint_primary_expression (parser); + while (cp_lexer_next_token_is (parser->lexer, CPP_AND_AND)) + { + cp_token *op = cp_lexer_consume_token (parser->lexer); + tree rhs = cp_parser_constraint_primary_expression (parser); + lhs = finish_constraint_and_expr (op->location, lhs, rhs); + } + return cp_parser_check_non_logical_constraint (parser, lhs); +} + +/* Parse a constraint-logical-or-expression. + + constraint-logical-or-expression: + constraint-logical-and-expression + constraint-logical-or-expression '||' constraint-logical-and-expression */ + +static cp_expr +cp_parser_constraint_logical_or_expression (cp_parser *parser) +{ + cp_expr lhs = cp_parser_constraint_logical_and_expression (parser); + while (cp_lexer_next_token_is (parser->lexer, CPP_OR_OR)) + { + cp_token *op = cp_lexer_consume_token (parser->lexer); + cp_expr rhs = cp_parser_constraint_logical_and_expression (parser); + lhs = finish_constraint_or_expr (op->location, lhs, rhs); + } + return cp_parser_check_non_logical_constraint (parser, lhs); +} + +/* Parse the expression after a requires-clause. This has a different grammar + than that in the concepts TS. */ + static tree -cp_parser_requires_clause (cp_parser *parser) +cp_parser_requires_clause_expression (cp_parser *parser) { - // Parse the requires clause so that it is not automatically folded. + processing_constraint_expression_sentinel parsing_constraint; ++processing_template_decl; - tree expr = cp_parser_binary_expression (parser, false, false, - PREC_NOT_OPERATOR, NULL); + cp_expr expr = cp_parser_constraint_logical_or_expression (parser); if (check_for_bare_parameter_packs (expr)) expr = error_mark_node; --processing_template_decl; return expr; } -// Optionally parse a requires clause: +/* Parse a expression after a requires clause. + + constraint-expression: + logical-or-expression + + The required logical-or-expression must be a constant expression. Note + that we don't check that the expression is constepxr here. We defer until + we analyze constraints and then, we only check atomic constraints. */ + +static tree +cp_parser_constraint_expression (cp_parser *parser) +{ + processing_constraint_expression_sentinel parsing_constraint; + ++processing_template_decl; + cp_expr expr = cp_parser_binary_expression (parser, false, true, + PREC_NOT_OPERATOR, NULL); + if (check_for_bare_parameter_packs (expr)) + expr = error_mark_node; + --processing_template_decl; + expr.maybe_add_location_wrapper (); + return expr; +} + +/* Optionally parse a requires clause: + + requires-clause: + `requires` constraint-logical-or-expression. + [ConceptsTS] + `requires constraint-expression. */ + static tree cp_parser_requires_clause_opt (cp_parser *parser) { @@ -26920,17 +27261,21 @@ cp_parser_requires_clause_opt (cp_parser *parser) && tok->u.value == ridpointers[RID_REQUIRES]) { error_at (cp_lexer_peek_token (parser->lexer)->location, - "% only available with %<-fconcepts%>"); + "% only available with " + "%<-std=c++2a%> or %<-fconcepts%>"); /* Parse and discard the requires-clause. */ cp_lexer_consume_token (parser->lexer); - cp_parser_requires_clause (parser); + cp_parser_constraint_expression (parser); } return NULL_TREE; } cp_lexer_consume_token (parser->lexer); - return cp_parser_requires_clause (parser); -} + if (!flag_concepts_ts) + return cp_parser_requires_clause_expression (parser); + else + return cp_parser_constraint_expression (parser); +} /*--------------------------------------------------------------------------- Requires expressions @@ -26940,6 +27285,7 @@ cp_parser_requires_clause_opt (cp_parser *parser) requirement-expression: 'requires' requirement-parameter-list [opt] requirement-body */ + static tree cp_parser_requires_expression (cp_parser *parser) { @@ -26957,6 +27303,9 @@ cp_parser_requires_expression (cp_parser *parser) return error_mark_node; } + /* This is definitely a requires-expression. */ + cp_parser_commit_to_tentative_parse (parser); + tree parms, reqs; { /* Local parameters are delared as variables within the scope @@ -26997,13 +27346,15 @@ cp_parser_requires_expression (cp_parser *parser) /* This needs to happen after pop_bindings_and_leave_scope, as it reverses the parm chain. */ grokparms (parms, &parms); - return finish_requires_expr (parms, reqs); + loc = make_location (loc, loc, parser->lexer); + return finish_requires_expr (loc, parms, reqs); } /* Parse a parameterized requirement. requirement-parameter-list: '(' parameter-declaration-clause ')' */ + static tree cp_parser_requirement_parameter_list (cp_parser *parser) { @@ -27031,7 +27382,7 @@ cp_parser_requirement_body (cp_parser *parser) if (!braces.require_open (parser)) return error_mark_node; - tree reqs = cp_parser_requirement_list (parser); + tree reqs = cp_parser_requirement_seq (parser); if (!braces.require_close (parser)) return error_mark_node; @@ -27039,34 +27390,28 @@ cp_parser_requirement_body (cp_parser *parser) return reqs; } -/* Parse a list of requirements. +/* Parse a sequence of requirements. - requirement-list: + requirement-seq: requirement - requirement-list ';' requirement[opt] */ + requirement-seq requirement */ + static tree -cp_parser_requirement_list (cp_parser *parser) +cp_parser_requirement_seq (cp_parser *parser) { tree result = NULL_TREE; - while (true) + do { tree req = cp_parser_requirement (parser); - if (req == error_mark_node) - return error_mark_node; - - result = tree_cons (NULL_TREE, req, result); - - /* If we see a semi-colon, consume it. */ - if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON)) - cp_lexer_consume_token (parser->lexer); + if (req != error_mark_node) + result = tree_cons (NULL_TREE, req, result); + } while (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_BRACE)); - /* Stop processing at the end of the list. */ - if (cp_lexer_next_token_is (parser->lexer, CPP_CLOSE_BRACE)) - break; - } + /* If there are no valid requirements, this is not a valid expression. */ + if (!result) + return error_mark_node; - /* Reverse the order of requirements so they are analyzed in - declaration order. */ + /* Reverse the order of requirements so they are analyzed in order. */ return nreverse (result); } @@ -27077,6 +27422,7 @@ cp_parser_requirement_list (cp_parser *parser) compound-requirement type-requirement nested-requirement */ + static tree cp_parser_requirement (cp_parser *parser) { @@ -27094,17 +27440,26 @@ cp_parser_requirement (cp_parser *parser) simple-requirement: expression ';' */ + static tree cp_parser_simple_requirement (cp_parser *parser) { - tree expr = cp_parser_expression (parser, NULL, false, false); + location_t start = cp_lexer_peek_token (parser->lexer)->location; + cp_expr expr = cp_parser_expression (parser, NULL, false, false); + if (expr == error_mark_node) + cp_parser_skip_to_end_of_statement (parser); + + cp_parser_consume_semicolon_at_end_of_statement (parser); + if (!expr || expr == error_mark_node) return error_mark_node; - if (!cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON)) - return error_mark_node; + /* Sometimes we don't get locations, so use the cached token location + as a reasonable approximation. */ + if (expr.get_location() == UNKNOWN_LOCATION) + expr.set_location (start); - return finish_simple_requirement (expr); + return finish_simple_requirement (expr.get_location (), expr); } /* Parse a type requirement @@ -27115,16 +27470,18 @@ cp_parser_simple_requirement (cp_parser *parser) required-type-name: type-name 'template' [opt] simple-template-id */ + static tree cp_parser_type_requirement (cp_parser *parser) { - cp_lexer_consume_token (parser->lexer); + cp_token *start_tok = cp_lexer_consume_token (parser->lexer); + location_t loc = cp_lexer_peek_token (parser->lexer)->location; // Save the scope before parsing name specifiers. tree saved_scope = parser->scope; tree saved_object_scope = parser->object_scope; tree saved_qualifying_scope = parser->qualifying_scope; - cp_parser_global_scope_opt (parser, /*current_scope_valid_p=*/true); + cp_parser_global_scope_opt (parser, /*current_scope_valid_p=*/false); cp_parser_nested_name_specifier_opt (parser, /*typename_keyword_p=*/true, /*check_dependency_p=*/false, @@ -27156,18 +27513,20 @@ cp_parser_type_requirement (cp_parser *parser) if (type == error_mark_node) cp_parser_skip_to_end_of_statement (parser); - if (!cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON)) - return error_mark_node; + cp_parser_consume_semicolon_at_end_of_statement (parser); + if (type == error_mark_node) return error_mark_node; - return finish_type_requirement (type); + loc = make_location (loc, start_tok->location, parser->lexer); + return finish_type_requirement (loc, type); } /* Parse a compound requirement compound-requirement: '{' expression '}' 'noexcept' [opt] trailing-return-type [opt] ';' */ + static tree cp_parser_compound_requirement (cp_parser *parser) { @@ -27176,12 +27535,26 @@ cp_parser_compound_requirement (cp_parser *parser) if (!braces.require_open (parser)) return error_mark_node; + cp_token *expr_token = cp_lexer_peek_token (parser->lexer); + tree expr = cp_parser_expression (parser, NULL, false, false); - if (!expr || expr == error_mark_node) - return error_mark_node; + if (expr == error_mark_node) + cp_parser_skip_to_closing_brace (parser); if (!braces.require_close (parser)) - return error_mark_node; + { + cp_parser_skip_to_end_of_statement (parser); + cp_parser_consume_semicolon_at_end_of_statement (parser); + return error_mark_node; + } + + /* If the expression was invalid, skip the remainder of the requirement. */ + if (!expr || expr == error_mark_node) + { + cp_parser_skip_to_end_of_statement (parser); + cp_parser_consume_semicolon_at_end_of_statement (parser); + return error_mark_node; + } /* Parse the optional noexcept. */ bool noexcept_p = false; @@ -27196,29 +27569,69 @@ cp_parser_compound_requirement (cp_parser *parser) if (cp_lexer_next_token_is (parser->lexer, CPP_DEREF)) { cp_lexer_consume_token (parser->lexer); + cp_token *tok = cp_lexer_peek_token (parser->lexer); + bool saved_result_type_constraint_p = parser->in_result_type_constraint_p; parser->in_result_type_constraint_p = true; + /* C++2a allows either a type-id or a type-constraint. Parsing + a type-id will subsume the parsing for a type-constraint but + allow for more syntactic forms (e.g., const C*). */ type = cp_parser_trailing_type_id (parser); parser->in_result_type_constraint_p = saved_result_type_constraint_p; if (type == error_mark_node) return error_mark_node; + + location_t type_loc = make_location (tok->location, tok->location, + parser->lexer); + + /* Check that we haven't written something like 'const C*'. */ + if (type_uses_auto (type)) + { + if (!is_auto (type)) + { + error_at (type_loc, + "result type is not a plain type-constraint"); + cp_parser_consume_semicolon_at_end_of_statement (parser); + return error_mark_node; + } + } + else if (!flag_concepts_ts) + /* P1452R2 removed the trailing-return-type option. */ + error_at (type_loc, + "return-type-requirement is not a type-constraint"); } - return finish_compound_requirement (expr, type, noexcept_p); + location_t loc = make_location (expr_token->location, + braces.open_location (), + parser->lexer); + + cp_parser_consume_semicolon_at_end_of_statement (parser); + + if (expr == error_mark_node || type == error_mark_node) + return error_mark_node; + + return finish_compound_requirement (loc, expr, type, noexcept_p); } /* Parse a nested requirement. This is the same as a requires clause. nested-requirement: requires-clause */ + static tree cp_parser_nested_requirement (cp_parser *parser) { - cp_lexer_consume_token (parser->lexer); - tree req = cp_parser_requires_clause (parser); + gcc_assert (cp_lexer_next_token_is_keyword (parser->lexer, RID_REQUIRES)); + cp_token *tok = cp_lexer_consume_token (parser->lexer); + location_t loc = cp_lexer_peek_token (parser->lexer)->location; + tree req = cp_parser_constraint_expression (parser); + if (req == error_mark_node) + cp_parser_skip_to_end_of_statement (parser); + loc = make_location (loc, tok->location, parser->lexer); + cp_parser_consume_semicolon_at_end_of_statement (parser); if (req == error_mark_node) return error_mark_node; - return finish_nested_requirement (req); + return finish_nested_requirement (loc, req); } /* Support Functions */ @@ -28145,6 +28558,11 @@ cp_parser_template_declaration_after_parameters (cp_parser* parser, else if (cxx_dialect >= cxx11 && cp_lexer_next_token_is_keyword (parser->lexer, RID_USING)) decl = cp_parser_alias_declaration (parser); + else if (cxx_dialect >= cxx2a /* Implies flag_concept. */ + && cp_lexer_next_token_is_keyword (parser->lexer, RID_CONCEPT) + && !cp_lexer_nth_token_is_keyword (parser->lexer, 2, RID_BOOL)) + /* Allow 'concept bool' to be handled as per the TS. */ + decl = cp_parser_concept_definition (parser); else { /* There are no access checks when parsing a template, as we do not @@ -28264,6 +28682,8 @@ cp_parser_template_introduction (cp_parser* parser, bool member_p) tree saved_object_scope = parser->object_scope; tree saved_qualifying_scope = parser->qualifying_scope; + cp_token *start_token = cp_lexer_peek_token (parser->lexer); + /* Look for the optional `::' operator. */ cp_parser_global_scope_opt (parser, /*current_scope_valid_p=*/false); @@ -28285,12 +28705,14 @@ cp_parser_template_introduction (cp_parser* parser, bool member_p) parser->object_scope = saved_object_scope; parser->qualifying_scope = saved_qualifying_scope; - if (concept_name == error_mark_node) + if (concept_name == error_mark_node + || (seen_error () && !concept_definition_p (tmpl_decl))) cp_parser_simulate_error (parser); /* Look for opening brace for introduction. */ matching_braces braces; braces.require_open (parser); + location_t open_loc = input_location; if (!cp_parser_parse_definitely (parser)) return false; @@ -28321,15 +28743,26 @@ cp_parser_template_introduction (cp_parser* parser, bool member_p) } /* Build and associate the constraint. */ - tree parms = finish_template_introduction (tmpl_decl, introduction_list); + location_t introduction_loc = make_location (open_loc, + start_token->location, + parser->lexer); + tree parms = finish_template_introduction (tmpl_decl, + introduction_list, + introduction_loc); if (parms && parms != error_mark_node) { + if (!flag_concepts_ts) + pedwarn (introduction_loc, 0, "template-introductions" + " are not part of C++20 concepts [-fconcepts-ts]"); + cp_parser_template_declaration_after_parameters (parser, parms, member_p); return true; } - error_at (token->location, "no matching concept for template-introduction"); + if (parms == NULL_TREE) + error_at (token->location, "no matching concept for template-introduction"); + return true; } @@ -28397,8 +28830,8 @@ cp_parser_explicit_template_declaration (cp_parser* parser, bool member_p) if (flag_concepts) { tree reqs = get_shorthand_constraints (current_template_parms); - if (tree r = cp_parser_requires_clause_opt (parser)) - reqs = conjoin_constraints (reqs, normalize_expression (r)); + if (tree treqs = cp_parser_requires_clause_opt (parser)) + reqs = combine_constraint_expressions (reqs, treqs); TEMPLATE_PARMS_CONSTRAINTS (current_template_parms) = reqs; } @@ -29635,6 +30068,9 @@ cp_parser_required_error (cp_parser *parser, case RT_THROW: gmsgid = G_("expected %"); break; + case RT_AUTO: + gmsgid = G_("expected %"); + break; case RT_LABEL: gmsgid = G_("expected %<__label__%>"); break; @@ -41910,36 +42346,15 @@ make_generic_type_name () static tree synthesize_implicit_template_parm (cp_parser *parser, tree constr) { - gcc_assert (current_binding_level->kind == sk_function_parms); - - /* Before committing to modifying any scope, if we're in an - implicit template scope, and we're trying to synthesize a - constrained parameter, try to find a previous parameter with - the same name. This is the same-type rule for abbreviated - function templates. - - NOTE: We can generate implicit parameters when tentatively - parsing a nested name specifier, only to reject that parse - later. However, matching the same template-id as part of a - direct-declarator should generate an identical template - parameter, so this rule will merge them. */ - if (parser->implicit_template_scope && constr) - { - tree t = parser->implicit_template_parms; - while (t) - { - if (equivalent_placeholder_constraints (TREE_TYPE (t), constr)) - { - tree d = TREE_VALUE (t); - if (TREE_CODE (d) == PARM_DECL) - /* Return the TEMPLATE_PARM_INDEX. */ - d = DECL_INITIAL (d); - return d; - } - t = TREE_CHAIN (t); - } + /* A requires-clause is not a function and cannot have placeholders. */ + if (current_binding_level->kind == sk_block) + { + error ("placeholder type not allowed in this context"); + return error_mark_node; } + gcc_assert (current_binding_level->kind == sk_function_parms); + /* We are either continuing a function template that already contains implicit template parameters, creating a new fully-implicit function template, or extending an existing explicit function template with implicit template @@ -42050,18 +42465,9 @@ synthesize_implicit_template_parm (cp_parser *parser, tree constr) tree synth_tmpl_parm; bool non_type = false; - if (proto == NULL_TREE || TREE_CODE (proto) == TYPE_DECL) - synth_tmpl_parm - = finish_template_type_parm (class_type_node, synth_id); - else if (TREE_CODE (proto) == TEMPLATE_DECL) - synth_tmpl_parm - = finish_constrained_template_template_parm (proto, synth_id); - else - { - synth_tmpl_parm = copy_decl (proto); - DECL_NAME (synth_tmpl_parm) = synth_id; - non_type = true; - } + /* Synthesize the type template parameter. */ + gcc_assert(!proto || TREE_CODE (proto) == TYPE_DECL); + synth_tmpl_parm = finish_template_type_parm (class_type_node, synth_id); /* Attach the constraint to the parm before processing. */ tree node = build_tree_list (NULL_TREE, synth_tmpl_parm); @@ -42073,6 +42479,13 @@ synthesize_implicit_template_parm (cp_parser *parser, tree constr) /*non_type=*/non_type, /*param_pack=*/false); + /* Mark the synthetic declaration "virtual". This is used when + comparing template-heads to determine if whether an abbreviated + function template is equivalent to an explicit template. + + Note that DECL_ARTIFICIAL is used elsewhere for template parameters. */ + DECL_VIRTUAL_P (TREE_VALUE (new_parm)) = true; + // Chain the new parameter to the list of implicit parameters. if (parser->implicit_template_parms) parser->implicit_template_parms @@ -42111,7 +42524,7 @@ synthesize_implicit_template_parm (cp_parser *parser, tree constr) if (tree req = TEMPLATE_PARM_CONSTRAINTS (tree_last (new_parm))) { tree reqs = TEMPLATE_PARMS_CONSTRAINTS (current_template_parms); - reqs = conjoin_constraints (reqs, req); + reqs = combine_constraint_expressions (reqs, req); TEMPLATE_PARMS_CONSTRAINTS (current_template_parms) = reqs; } diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 6310e7b..8446443 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -135,8 +135,6 @@ enum template_base_result { tbr_success }; -static void push_access_scope (tree); -static void pop_access_scope (tree); static bool resolve_overloaded_unification (tree, tree, tree, tree, unification_kind_t, int, bool); @@ -153,7 +151,6 @@ static tree coerce_innermost_template_parms (tree, tree, tree, tsubst_flags_t, bool, bool); static void tsubst_enum (tree, tree, tree); static tree add_to_template_args (tree, tree); -static tree add_outermost_template_args (tree, tree); static bool check_instantiated_args (tree, tree, tsubst_flags_t); static int check_non_deducible_conversion (tree, tree, int, int, struct conversion **, bool); @@ -183,12 +180,9 @@ static int can_complete_type_without_circularity (tree); static tree get_bindings (tree, tree, tree, bool); static int template_decl_level (tree); static int check_cv_quals_for_unify (int, tree, tree); -static void template_parm_level_and_index (tree, int*, int*); static int unify_pack_expansion (tree, tree, tree, tree, unification_kind_t, bool, bool); static tree copy_template_args (tree); -static tree tsubst_template_arg (tree, tree, tsubst_flags_t, tree); -static tree tsubst_template_args (tree, tree, tsubst_flags_t, tree); static tree tsubst_template_parms (tree, tree, tsubst_flags_t); static tree most_specialized_partial_spec (tree, tsubst_flags_t); static tree tsubst_aggr_type (tree, tree, tsubst_flags_t, tree, int); @@ -232,7 +226,7 @@ static tree enclosing_instantiation_of (tree tctx); template, VAR_DECL for static member variable, or TYPE_DECL for alias template (needed by instantiate_decl). */ -static void +void push_access_scope (tree t) { gcc_assert (VAR_OR_FUNCTION_DECL_P (t) @@ -255,7 +249,7 @@ push_access_scope (tree t) /* Restore the scope set up by push_access_scope. T is the node we are processing. */ -static void +void pop_access_scope (tree t) { if (TREE_CODE (t) == FUNCTION_DECL) @@ -582,7 +576,7 @@ add_to_template_args (tree args, tree extra_args) template arguments used to attain the full instantiation from the partial instantiation. */ -static tree +tree add_outermost_template_args (tree args, tree extra_args) { tree new_args; @@ -3305,6 +3299,153 @@ comp_template_parms (const_tree parms1, const_tree parms2) return 1; } +/* Returns true if two template parameters are declared with + equivalent constraints. */ + +static bool +template_parameter_constraints_equivalent_p (const_tree parm1, const_tree parm2) +{ + tree req1 = TREE_TYPE (parm1); + tree req2 = TREE_TYPE (parm2); + if (!req1 != !req2) + return false; + if (req1) + return cp_tree_equal (req1, req2); + return true; +} + +/* Returns true when two template parameters are equivalent. */ + +static bool +template_parameters_equivalent_p (const_tree parm1, const_tree parm2) +{ + tree decl1 = TREE_VALUE (parm1); + tree decl2 = TREE_VALUE (parm2); + + /* If either of the template parameters are invalid, assume + they match for the sake of error recovery. */ + if (error_operand_p (decl1) || error_operand_p (decl2)) + return true; + + /* ... they declare parameters of the same kind. */ + if (TREE_CODE (decl1) != TREE_CODE (decl2)) + return false; + + /* ... one parameter was introduced by a parameter declaration, then + both are. This case arises as a result of eagerly rewriting declarations + during parsing. */ + if (DECL_VIRTUAL_P (decl1) != DECL_VIRTUAL_P (decl2)) + return false; + + /* ... if either declares a pack, they both do. */ + if (template_parameter_pack_p (decl1) != template_parameter_pack_p (decl2)) + return false; + + if (TREE_CODE (decl1) == PARM_DECL) + { + /* ... if they declare non-type parameters, the types are equivalent. */ + if (!same_type_p (TREE_TYPE (decl1), TREE_TYPE (decl2))) + return false; + } + else if (TREE_CODE (decl2) == TEMPLATE_DECL) + { + /* ... if they declare template template parameters, their template + parameter lists are equivalent. */ + if (!template_heads_equivalent_p (decl1, decl2)) + return false; + } + + /* ... if they are declared with a qualified-concept name, they both + are, and those names are equivalent. */ + return template_parameter_constraints_equivalent_p (parm1, parm2); +} + +/* Returns true if two template parameters lists are equivalent. + Two template parameter lists are equivalent if they have the + same length and their corresponding parameters are equivalent. + + PARMS1 and PARMS2 are TREE_LISTs containing TREE_VECs: the + data structure returned by DECL_TEMPLATE_PARMS. + + This is generally the same implementation as comp_template_parms + except that it also the concept names and arguments used to + introduce parameters. */ + +static bool +template_parameter_lists_equivalent_p (const_tree parms1, const_tree parms2) +{ + if (parms1 == parms2) + return true; + + const_tree p1 = parms1; + const_tree p2 = parms2; + while (p1 != NULL_TREE && p2 != NULL_TREE) + { + tree list1 = TREE_VALUE (p1); + tree list2 = TREE_VALUE (p2); + + if (TREE_VEC_LENGTH (list1) != TREE_VEC_LENGTH (list2)) + return 0; + + for (int i = 0; i < TREE_VEC_LENGTH (list2); ++i) + { + tree parm1 = TREE_VEC_ELT (list1, i); + tree parm2 = TREE_VEC_ELT (list2, i); + if (!template_parameters_equivalent_p (parm1, parm2)) + return false; + } + + p1 = TREE_CHAIN (p1); + p2 = TREE_CHAIN (p2); + } + + if ((p1 != NULL_TREE) != (p2 != NULL_TREE)) + return false; + + return true; +} + +/* Return true if the requires-clause of the template parameter lists are + equivalent and false otherwise. */ +static bool +template_requirements_equivalent_p (const_tree parms1, const_tree parms2) +{ + tree req1 = TEMPLATE_PARMS_CONSTRAINTS (parms1); + tree req2 = TEMPLATE_PARMS_CONSTRAINTS (parms2); + if ((req1 != NULL_TREE) != (req2 != NULL_TREE)) + return false; + if (!cp_tree_equal (req1, req2)) + return false; + return true; +} + +/* Returns true if two template heads are equivalent. 17.6.6.1p6: + Two template heads are equivalent if their template parameter + lists are equivalent and their requires clauses are equivalent. + + In pre-C++20, this is equivalent to calling comp_template_parms + for the template parameters of TMPL1 and TMPL2. */ + +bool +template_heads_equivalent_p (const_tree tmpl1, const_tree tmpl2) +{ + tree parms1 = DECL_TEMPLATE_PARMS (tmpl1); + tree parms2 = DECL_TEMPLATE_PARMS (tmpl2); + + /* Don't change the matching rules for pre-C++20. */ + if (cxx_dialect < cxx2a) + return comp_template_parms (parms1, parms2); + + /* ... have the same number of template parameters, and their + corresponding parameters are equivalent. */ + if (!template_parameter_lists_equivalent_p (parms1, parms2)) + return false; + + /* ... if either has a requires-clause, they both do and their + corresponding constraint-expressions are equivalent. */ + return template_requirements_equivalent_p (parms1, parms2); +} + /* Determine whether PARM is a parameter pack. */ bool @@ -4572,7 +4713,7 @@ template_parm_to_arg (tree t) /* Given a single level of template parameters (a TREE_VEC), return it as a set of template arguments. */ -static tree +tree template_parms_level_to_args (tree parms) { tree a = copy_node (parms); @@ -4590,7 +4731,7 @@ template_parms_level_to_args (tree parms) arguments. The template parameters are represented as a TREE_VEC, in the form documented in cp-tree.h for template arguments. */ -static tree +tree template_parms_to_args (tree parms) { tree header; @@ -4626,6 +4767,26 @@ current_template_args (void) return template_parms_to_args (current_template_parms); } +/* Return the fully generic arguments for of TMPL, i.e. what + current_template_args would be while parsing it. */ + +tree +generic_targs_for (tree tmpl) +{ + if (tmpl == NULL_TREE) + return NULL_TREE; + if (DECL_TEMPLATE_TEMPLATE_PARM_P (tmpl) + || DECL_TEMPLATE_SPECIALIZATION (tmpl)) + /* DECL_TEMPLATE_RESULT doesn't have the arguments we want. For a template + template parameter, it has no TEMPLATE_INFO; for a partial + specialization, it has the arguments for the primary template, and we + want the arguments for the partial specialization. */; + else if (tree result = DECL_TEMPLATE_RESULT (tmpl)) + if (tree ti = get_template_info (result)) + return TI_ARGS (ti); + return template_parms_to_args (DECL_TEMPLATE_PARMS (tmpl)); +} + /* Update the declared TYPE by doing any lookups which were thought to be dependent, but are not now that we know the SCOPE of the declarator. */ @@ -4855,7 +5016,7 @@ process_partial_specialization (tree decl) if (comp_template_args (inner_args, INNERMOST_TEMPLATE_ARGS (main_args)) && (!flag_concepts || !strictly_subsumes (current_template_constraints (), - get_constraints (maintmpl)))) + inner_args, maintmpl))) { if (!flag_concepts) error ("partial specialization %q+D does not specialize " @@ -5564,6 +5725,8 @@ push_template_decl_real (tree decl, bool is_friend) gcc_assert (!DECL_ARTIFICIAL (decl)); else if (VAR_P (decl)) /* C++14 variable template. */; + else if (TREE_CODE (decl) == CONCEPT_DECL) + /* C++2a concept definitions. */; else { error ("template declaration of %q#D", decl); @@ -5966,6 +6129,19 @@ redeclare_class_template (tree type, tree parms, tree cons) return false; } + /* The parameters can be declared to introduce different + constraints. */ + tree p1 = TREE_VEC_ELT (tmpl_parms, i); + tree p2 = TREE_VEC_ELT (parms, i); + if (!template_parameter_constraints_equivalent_p (p1, p2)) + { + error ("declaration of template parameter %q+#D with different " + "constraints", parm); + inform (DECL_SOURCE_LOCATION (tmpl_parm), + "original declaration appeared here"); + return false; + } + if (tmpl_default != NULL_TREE && parm_default != NULL_TREE) { /* We have in [temp.param]: @@ -5999,13 +6175,18 @@ redeclare_class_template (tree type, tree parms, tree cons) TEMPLATE_TYPE_PARM_FOR_CLASS (TREE_TYPE (parm)) = true; } - // Cannot redeclare a class template with a different set of constraints. - if (!equivalent_constraints (get_constraints (tmpl), cons)) + tree ci = get_constraints (tmpl); + tree req1 = ci ? CI_TEMPLATE_REQS (ci) : NULL_TREE; + tree req2 = cons ? CI_TEMPLATE_REQS (cons) : NULL_TREE; + + /* Two classes with different constraints declare different entities. */ + if (!cp_tree_equal (req1, req2)) { error_at (input_location, "redeclaration %q#D with different " "constraints", tmpl); inform (DECL_SOURCE_LOCATION (tmpl), "original declaration appeared here"); + return false; } return true; @@ -6214,8 +6395,7 @@ get_underlying_template (tree tmpl) != num_innermost_template_parms (underlying))) break; - tree alias_args = INNERMOST_TEMPLATE_ARGS - (template_parms_to_args (DECL_TEMPLATE_PARMS (tmpl))); + tree alias_args = INNERMOST_TEMPLATE_ARGS (generic_targs_for (tmpl)); if (!comp_template_args (TI_ARGS (tinfo), alias_args)) break; @@ -7322,14 +7502,7 @@ coerce_template_args_for_ttp (tree templ, tree arglist, tree outer = DECL_CONTEXT (templ); if (outer) - { - if (DECL_TEMPLATE_SPECIALIZATION (outer)) - /* We want arguments for the partial specialization, not arguments for - the primary template. */ - outer = template_parms_to_args (DECL_TEMPLATE_PARMS (outer)); - else - outer = TI_ARGS (get_template_info (DECL_TEMPLATE_RESULT (outer))); - } + outer = generic_targs_for (outer); else if (current_template_parms) { /* This is an argument of the current template, so we haven't set @@ -7787,8 +7960,6 @@ is_compatible_template_arg (tree parm, tree arg) if (parm_cons == NULL_TREE) return true; - tree arg_cons = get_constraints (arg); - /* If the template parameter is constrained, we need to rewrite its constraints in terms of the ARG's template parameters. This ensures that all of the template parameter types will have the same depth. @@ -7796,17 +7967,18 @@ is_compatible_template_arg (tree parm, tree arg) Note that this is only valid when coerce_template_template_parm is true for the innermost template parameters of PARM and ARG. In other words, because coercion is successful, this conversion will be valid. */ + tree new_args = NULL_TREE; if (parm_cons) { - tree args = template_parms_to_args (DECL_TEMPLATE_PARMS (arg)); - parm_cons = tsubst_constraint_info (parm_cons, - INNERMOST_TEMPLATE_ARGS (args), + tree aparms = DECL_INNERMOST_TEMPLATE_PARMS (arg); + new_args = template_parms_level_to_args (aparms); + parm_cons = tsubst_constraint_info (parm_cons, new_args, tf_none, NULL_TREE); if (parm_cons == error_mark_node) return false; } - return subsumes (parm_cons, arg_cons); + return weakly_subsumes (parm_cons, new_args, arg); } // Convert a placeholder argument into a binding to the original @@ -8426,7 +8598,7 @@ coerce_template_parms (tree parms, template (DR 1430). */ else if (in_decl && (DECL_ALIAS_TEMPLATE_P (in_decl) - || concept_template_p (in_decl)) + || concept_definition_p (in_decl)) && variadic_args_p && nargs - variadic_args_p < nparms - variadic_p) { @@ -8600,6 +8772,7 @@ coerce_template_parms (tree parms, if (arg == error_mark_node) lost++; + TREE_VEC_ELT (new_inner_args, arg_idx - pack_adjust) = arg; } @@ -8617,6 +8790,32 @@ coerce_template_parms (tree parms, /* We had some pack expansion arguments that will only work if the packs are empty, but wait until instantiation time to complain. See variadic-ttp3.C. */ + + /* Except that we can't provide empty packs to alias templates or + concepts when there are no corresponding parameters. Basically, + we can get here with this: + + template concept C = true; + + template + requires C + void f(); + + When parsing C, we try to form a concept check of + C. Without the extra check for substituting an empty + pack past the last parameter, we can accept the check as valid. + + FIXME: This may be valid for alias templates (but I doubt it). + + FIXME: The error could be better also. */ + if (in_decl && concept_definition_p (in_decl)) + { + if (complain & tf_error) + error_at (location_of (TREE_VEC_ELT (args, arg_idx)), + "too many arguments"); + return error_mark_node; + } + int len = nparms + (nargs - arg_idx); tree args = make_tree_vec (len); int i = 0; @@ -9452,7 +9651,7 @@ lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context, if (complain & tf_error) { auto_diagnostic_group d; - error ("template constraint failure"); + error ("template constraint failure for %qD", gen_tmpl); diagnose_constraints (input_location, gen_tmpl, arglist); } return error_mark_node; @@ -9785,13 +9984,12 @@ lookup_template_class (tree d1, tree arglist, tree in_decl, tree context, tree lookup_template_variable (tree templ, tree arglist) { + if (flag_concepts && variable_concept_p (templ)) + return build_concept_check (templ, arglist, tf_none); + /* The type of the expression is NULL_TREE since the template-id could refer to an explicit or partial specialization. */ - tree type = NULL_TREE; - if (flag_concepts && variable_concept_p (templ)) - /* Except that concepts are always bool. */ - type = boolean_type_node; - return build2 (TEMPLATE_ID_EXPR, type, templ, arglist); + return build2 (TEMPLATE_ID_EXPR, NULL_TREE, templ, arglist); } /* Instantiate a variable declaration from a TEMPLATE_ID_EXPR for use. */ @@ -9802,12 +10000,6 @@ finish_template_variable (tree var, tsubst_flags_t complain) tree templ = TREE_OPERAND (var, 0); tree arglist = TREE_OPERAND (var, 1); - /* We never want to return a VAR_DECL for a variable concept, since they - aren't instantiated. In a template, leave the TEMPLATE_ID_EXPR alone. */ - bool concept_p = flag_concepts && variable_concept_p (templ); - if (concept_p && processing_template_decl) - return var; - tree tmpl_args = DECL_TI_ARGS (DECL_TEMPLATE_RESULT (templ)); arglist = add_outermost_template_args (tmpl_args, arglist); @@ -9828,19 +10020,6 @@ finish_template_variable (tree var, tsubst_flags_t complain) return error_mark_node; } - /* If a template-id refers to a specialization of a variable - concept, then the expression is true if and only if the - concept's constraints are satisfied by the given template - arguments. - - NOTE: This is an extension of Concepts Lite TS that - allows constraints to be used in expressions. */ - if (concept_p) - { - tree decl = DECL_TEMPLATE_RESULT (templ); - return evaluate_variable_concept (decl, arglist); - } - return instantiate_template (templ, arglist, complain); } @@ -10041,6 +10220,26 @@ for_each_template_parm_r (tree *tp, int *walk_subtrees, void *d) return error_mark_node; break; + case SCOPE_REF: + if (pfd->include_nondeduced_p) + WALK_SUBTREE (TREE_OPERAND (t, 0)); + break; + + case REQUIRES_EXPR: + { + if (!fn) + return error_mark_node; + + /* Recursively walk the type of each constraint variable. */ + tree p = TREE_OPERAND (t, 0); + while (p) + { + WALK_SUBTREE (TREE_TYPE (p)); + p = TREE_CHAIN (p); + } + } + break; + default: break; } @@ -10104,6 +10303,119 @@ for_each_template_parm (tree t, tree_fn_t fn, void* data, return result; } +struct find_template_parameter_info +{ + explicit find_template_parameter_info (int d) + : max_depth (d) + {} + + hash_set visited; + hash_set parms; + int max_depth; +}; + +/* Appends the declaration of T to the list in DATA. */ + +static int +keep_template_parm (tree t, void* data) +{ + find_template_parameter_info *ftpi = (find_template_parameter_info*)data; + + /* Template parameters declared within the expression are not part of + the parameter mapping. For example, in this concept: + + template + concept C = requires { } -> same_as; + + the return specifier same_as declares a new decltype parameter + that must not be part of the parameter mapping. The same is true + for generic lambda parameters, lambda template parameters, etc. */ + int level; + int index; + template_parm_level_and_index (t, &level, &index); + if (level > ftpi->max_depth) + return 0; + + /* Arguments like const T yield parameters like const T. This means that + a template-id like X would yield two distinct parameters: + T and const T. Adjust types to their unqualified versions. */ + if (TYPE_P (t)) + t = TYPE_MAIN_VARIANT (t); + ftpi->parms.add (t); + + return 0; +} + +/* Ensure that we recursively examine certain terms that are not normally + visited in for_each_template_parm_r. */ + +static int +any_template_parm_r (tree t, void *data) +{ + find_template_parameter_info *ftpi = (find_template_parameter_info*)data; + +#define WALK_SUBTREE(NODE) \ + do \ + { \ + for_each_template_parm (NODE, keep_template_parm, data, \ + &ftpi->visited, true, \ + any_template_parm_r); \ + } \ + while (0) + + switch (TREE_CODE (t)) + { + case RECORD_TYPE: + case UNION_TYPE: + case ENUMERAL_TYPE: + /* Search for template parameters in type aliases. */ + if (alias_template_specialization_p (t)) + { + tree tinfo = TYPE_ALIAS_TEMPLATE_INFO (t); + WALK_SUBTREE (TI_ARGS (tinfo)); + } + break; + + case TEMPLATE_TYPE_PARM: + /* Type constraints of a placeholder type may contain parameters. */ + if (is_auto (t)) + if (tree constr = PLACEHOLDER_TYPE_CONSTRAINTS (t)) + WALK_SUBTREE (constr); + break; + + case TEMPLATE_ID_EXPR: + /* Search through references to variable templates. */ + WALK_SUBTREE (TREE_OPERAND (t, 0)); + WALK_SUBTREE (TREE_OPERAND (t, 1)); + break; + + case CONSTRUCTOR: + if (TREE_TYPE (t)) + WALK_SUBTREE (TREE_TYPE (t)); + break; + default: + break; + } + + /* Keep walking. */ + return 0; +} + +/* Returns a list of unique template parameters found within T. */ + +tree +find_template_parameters (tree t, int depth) +{ + find_template_parameter_info ftpi (depth); + for_each_template_parm (t, keep_template_parm, &ftpi, &ftpi.visited, + /*include_nondeduced*/true, any_template_parm_r); + tree list = NULL_TREE; + for (hash_set::iterator iter = ftpi.parms.begin(); + iter != ftpi.parms.end(); ++iter) + list = tree_cons (NULL_TREE, *iter, list); + return list; +} + /* Returns true if T depends on any template parameter. */ int @@ -10431,6 +10743,30 @@ tsubst_friend_function (tree decl, tree args) DECL_USE_TEMPLATE (DECL_TEMPLATE_RESULT (new_friend)) = 0; DECL_SAVED_TREE (DECL_TEMPLATE_RESULT (new_friend)) = DECL_SAVED_TREE (DECL_TEMPLATE_RESULT (decl)); + + /* Attach the template requirements to the new declaration + for declaration matching. We need to rebuild the requirements + so that parameter levels match. */ + if (tree ci = get_constraints (decl)) + { + tree parms = DECL_TEMPLATE_PARMS (new_friend); + tree args = generic_targs_for (new_friend); + tree treqs = tsubst_constraint (CI_TEMPLATE_REQS (ci), args, + tf_warning_or_error, NULL_TREE); + tree freqs = tsubst_constraint (CI_DECLARATOR_REQS (ci), args, + tf_warning_or_error, NULL_TREE); + + /* Update the constraints -- these won't really be valid for + checking, but that's not what we need them for. These ensure + that the declared function can find the friend during + declaration matching. */ + tree new_ci = get_constraints (new_friend); + CI_TEMPLATE_REQS (new_ci) = treqs; + CI_DECLARATOR_REQS (new_ci) = freqs; + + /* Also update the template parameter list. */ + TEMPLATE_PARMS_CONSTRAINTS (parms) = treqs; + } } /* The mangled name for the NEW_FRIEND is incorrect. The function @@ -11529,7 +11865,7 @@ instantiate_class_template (tree type) return ret; } -static tree +tree tsubst_template_arg (tree t, tree args, tsubst_flags_t complain, tree in_decl) { tree r; @@ -11547,6 +11883,7 @@ tsubst_template_arg (tree t, tree args, tsubst_flags_t complain, tree in_decl) if (!(complain & tf_warning)) --c_inhibit_evaluation_warnings; } + return r; } @@ -11770,14 +12107,6 @@ gen_elem_of_pack_expansion_instantiation (tree pattern, t = tsubst_decl (pattern, args, complain); else if (pattern == error_mark_node) t = error_mark_node; - else if (constraint_p (pattern)) - { - if (processing_template_decl) - t = tsubst_constraint (pattern, args, complain, in_decl); - else - t = (constraints_satisfied_p (pattern, args) - ? boolean_true_node : boolean_false_node); - } else if (!TYPE_P (pattern)) t = tsubst_expr (pattern, args, complain, in_decl, /*integral_constant_expression_p=*/false); @@ -12257,7 +12586,6 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain, { int idx; template_parm_level_and_index (parm_pack, &level, &idx); - if (level <= levels) arg_pack = TMPL_ARG (args, level, idx); } @@ -12311,6 +12639,10 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain, /* We can't substitute for this parameter pack. We use a flag as well as the missing_level counter because function parameter packs don't have a level. */ + if (!(processing_template_decl || is_auto (parm_pack))) + { + gcc_unreachable (); + } gcc_assert (processing_template_decl || is_auto (parm_pack)); unsubstituted_packs = true; } @@ -12519,9 +12851,33 @@ copy_template_args (tree t) return new_vec; } +/* Substitute ARGS into the *_ARGUMENT_PACK orig_arg. */ + +tree +tsubst_argument_pack (tree orig_arg, tree args, tsubst_flags_t complain, + tree in_decl) +{ + /* Substitute into each of the arguments. */ + tree new_arg = TYPE_P (orig_arg) + ? cxx_make_type (TREE_CODE (orig_arg)) + : make_node (TREE_CODE (orig_arg)); + + tree pack_args = tsubst_template_args (ARGUMENT_PACK_ARGS (orig_arg), + args, complain, in_decl); + if (pack_args == error_mark_node) + new_arg = error_mark_node; + else + SET_ARGUMENT_PACK_ARGS (new_arg, pack_args); + + if (TREE_CODE (new_arg) == NONTYPE_ARGUMENT_PACK) + TREE_CONSTANT (new_arg) = TREE_CONSTANT (orig_arg); + + return new_arg; +} + /* Substitute ARGS into the vector or list of template arguments T. */ -static tree +tree tsubst_template_args (tree t, tree args, tsubst_flags_t complain, tree in_decl) { tree orig_t = t; @@ -12556,22 +12912,7 @@ tsubst_template_args (tree t, tree args, tsubst_flags_t complain, tree in_decl) expanded_len_adjust += TREE_VEC_LENGTH (new_arg) - 1; } else if (ARGUMENT_PACK_P (orig_arg)) - { - /* Substitute into each of the arguments. */ - new_arg = TYPE_P (orig_arg) - ? cxx_make_type (TREE_CODE (orig_arg)) - : make_node (TREE_CODE (orig_arg)); - - tree pack_args = tsubst_template_args (ARGUMENT_PACK_ARGS (orig_arg), - args, complain, in_decl); - if (pack_args == error_mark_node) - new_arg = error_mark_node; - else - SET_ARGUMENT_PACK_ARGS (new_arg, pack_args); - - if (TREE_CODE (new_arg) == NONTYPE_ARGUMENT_PACK) - TREE_CONSTANT (new_arg) = TREE_CONSTANT (orig_arg); - } + new_arg = tsubst_argument_pack (orig_arg, args, complain, in_decl); else new_arg = tsubst_template_arg (orig_arg, args, complain, in_decl); @@ -12704,6 +13045,7 @@ tsubst_template_parm (tree t, tree args, tsubst_flags_t complain) default_value = TREE_PURPOSE (t); parm_decl = TREE_VALUE (t); + tree constraint = TEMPLATE_PARM_CONSTRAINTS (t); parm_decl = tsubst (parm_decl, args, complain, NULL_TREE); if (TREE_CODE (parm_decl) == PARM_DECL @@ -12711,8 +13053,11 @@ tsubst_template_parm (tree t, tree args, tsubst_flags_t complain) parm_decl = error_mark_node; default_value = tsubst_template_arg (default_value, args, complain, NULL_TREE); + constraint = tsubst_constraint (constraint, args, complain, NULL_TREE); - return build_tree_list (default_value, parm_decl); + tree r = build_tree_list (default_value, parm_decl); + TEMPLATE_PARM_CONSTRAINTS (r) = constraint; + return r; } /* Substitute the ARGS into the indicated aggregate (or enumeration) @@ -13138,14 +13483,11 @@ tsubst_function_decl (tree t, tree args, tsubst_flags_t complain, && !grok_op_properties (r, /*complain=*/false)) return error_mark_node; - /* When instantiating a constrained member, substitute - into the constraints to create a new constraint. */ + /* Associate the constraints directly with the instantiation. We + don't substitute through the constraints; that's only done when + they are checked. */ if (tree ci = get_constraints (t)) - if (member) - { - ci = tsubst_constraint_info (ci, argvec, complain, NULL_TREE); - set_constraints (r, ci); - } + set_constraints (r, ci); if (DECL_FRIEND_P (t) && DECL_FRIEND_CONTEXT (t)) SET_DECL_FRIEND_CONTEXT (r, @@ -14001,6 +14343,17 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain) return r; } +/* Substitute into the complete parameter type list PARMS. */ + +tree +tsubst_function_parms (tree parms, + tree args, + tsubst_flags_t complain, + tree in_decl) +{ + return tsubst_arg_types (parms, args, NULL_TREE, complain, in_decl); +} + /* Substitute into the ARG_TYPES of a function type. If END is a TREE_CHAIN, leave it and any following types un-substituted. */ @@ -14565,6 +14918,14 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) if (code == TEMPLATE_TYPE_PARM) { int quals; + + /* When building concept checks for the purpose of + deducing placeholders, we can end up with wildcards + where types are expected. Adjust this to the deduced + value. */ + if (TREE_CODE (arg) == WILDCARD_DECL) + arg = TREE_TYPE (TREE_TYPE (arg)); + gcc_assert (TYPE_P (arg)); quals = cp_type_quals (arg) | cp_type_quals (t); @@ -14696,10 +15057,10 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) if (TREE_CODE (t) == TEMPLATE_TYPE_PARM) { - /* Propagate constraints on placeholders. */ + /* Propagate constraints on placeholders since they are + only instantiated during satisfaction. */ if (tree constr = PLACEHOLDER_TYPE_CONSTRAINTS (t)) - PLACEHOLDER_TYPE_CONSTRAINTS (r) - = tsubst_constraint (constr, args, complain, in_decl); + PLACEHOLDER_TYPE_CONSTRAINTS (r) = constr; else if (tree pl = CLASS_PLACEHOLDER_TEMPLATE (t)) { pl = tsubst_copy (pl, args, complain, in_decl); @@ -18347,6 +18708,28 @@ tsubst_copy_and_build (tree t, RETURN (templ); } + if (concept_definition_p (templ)) + { + tree check = build_concept_check (templ, targs, complain); + if (check == error_mark_node) + RETURN (error_mark_node); + + tree id = unpack_concept_check (check); + + /* If we built a function concept check, return the underlying + template-id. So we can evaluate it as a function call. */ + if (function_concept_p (TREE_OPERAND (id, 0))) + RETURN (id); + + /* Evaluate the concept, if needed. */ + tree args = TREE_OPERAND (id, 1); + if (!uses_template_parms (args) + && !processing_constraint_expression_p ()) + RETURN (evaluate_concept_check (check, complain)); + + RETURN (check); + } + if (variable_template_p (templ)) RETURN (lookup_and_finish_template_variable (templ, targs, complain)); @@ -19111,6 +19494,25 @@ tsubst_copy_and_build (tree t, /*fn_p=*/NULL, complain)); } + else if (concept_check_p (function)) + { + /* FUNCTION is a template-id referring to a concept definition. */ + tree id = unpack_concept_check (function); + tree tmpl = TREE_OPERAND (id, 0); + tree args = TREE_OPERAND (id, 1); + + /* Calls to standard and variable concepts should have been + previously diagnosed. */ + gcc_assert (function_concept_p (tmpl)); + + /* Ensure the result is wrapped as a call expression. */ + ret = build_concept_check (tmpl, args, tf_warning_or_error); + + /* Possibly evaluate the check if it is non-dependent. */ + if (!uses_template_parms (args) + && !processing_constraint_expression_p ()) + ret = evaluate_concept_check (ret, complain); + } else ret = finish_call_expr (function, &call_args, /*disallow_virtual=*/qualified_p, @@ -23202,10 +23604,11 @@ more_specialized_fn (tree pat1, tree pat2, int len) constrained template. */ if (!lose1 && !lose2) { - tree c1 = get_constraints (DECL_TEMPLATE_RESULT (pat1)); - tree c2 = get_constraints (DECL_TEMPLATE_RESULT (pat2)); - lose1 = !subsumes_constraints (c1, c2); - lose2 = !subsumes_constraints (c2, c1); + int winner = more_constrained (decl1, decl2); + if (winner > 0) + lose2 = true; + else if (winner < 0) + lose1 = true; } /* All things being equal, if the next argument is a pack expansion @@ -23277,7 +23680,7 @@ more_specialized_partial_spec (tree tmpl, tree pat1, tree pat2) /* If both deductions succeed, the partial ordering selects the more constrained template. */ if (!winner && any_deductions) - return more_constrained (tmpl1, tmpl2); + winner = more_constrained (tmpl1, tmpl2); /* In the case of a tie where at least one of the templates has a parameter pack at the end, the template with the most @@ -25712,7 +26115,7 @@ value_dependent_expression_p (tree expression) } case TEMPLATE_ID_EXPR: - return variable_concept_p (TREE_OPERAND (expression, 0)); + return concept_definition_p (TREE_OPERAND (expression, 0)); case CONSTRUCTOR: { @@ -26112,14 +26515,14 @@ instantiation_dependent_r (tree *tp, int *walk_subtrees, return *tp; case CALL_EXPR: - /* Treat calls to function concepts as dependent. */ - if (function_concept_check_p (*tp)) + /* Treat concept checks as dependent. */ + if (concept_check_p (*tp)) return *tp; break; case TEMPLATE_ID_EXPR: - /* And variable concepts. */ - if (variable_concept_p (TREE_OPERAND (*tp, 0))) + /* Treat concept checks as dependent. */ + if (concept_check_p (*tp)) return *tp; break; @@ -26657,10 +27060,10 @@ build_non_dependent_expr (tree expr) /* Don't do this during nsdmi parsing as it can lead to unexpected recursive instantiations. */ && !parsing_nsdmi () - /* Don't do this during concept expansion either and for + /* Don't do this during concept processing either and for the same reason. */ - && !expanding_concept ()) - fold_non_dependent_expr (expr, tf_none); + && !processing_constraint_expression_p ()) + fold_non_dependent_expr (expr); STRIP_ANY_LOCATION_WRAPPER (expr); @@ -26755,8 +27158,7 @@ static tree make_auto_1 (tree name, bool set_canonical) { tree au = cxx_make_type (TEMPLATE_TYPE_PARM); - TYPE_NAME (au) = build_decl (input_location, - TYPE_DECL, name, au); + TYPE_NAME (au) = build_decl (input_location, TYPE_DECL, name, au); TYPE_STUB_DECL (au) = TYPE_NAME (au); TEMPLATE_TYPE_PARM_INDEX (au) = build_template_parm_index (0, processing_template_decl + 1, processing_template_decl + 1, @@ -26801,31 +27203,87 @@ template_placeholder_p (tree t) return is_auto (t) && CLASS_PLACEHOLDER_TEMPLATE (t); } -/* Make a "constrained auto" type-specifier. This is an - auto type with constraints that must be associated after - deduction. The constraint is formed from the given - CONC and its optional sequence of arguments, which are - non-null if written as partial-concept-id. */ +/* Make a "constrained auto" type-specifier. This is an auto or + decltype(auto) type with constraints that must be associated after + deduction. The constraint is formed from the given concept CON + and its optional sequence of template arguments ARGS. -tree -make_constrained_auto (tree con, tree args) -{ - tree type = make_auto_1 (auto_identifier, false); + TYPE must be the result of make_auto_type or make_decltype_auto_type. */ +static tree +make_constrained_placeholder_type (tree type, tree con, tree args) +{ /* Build the constraint. */ tree tmpl = DECL_TI_TEMPLATE (con); - tree expr = VAR_P (con) ? tmpl : ovl_make (tmpl); - expr = build_concept_check (expr, type, args); + tree expr = tmpl; + if (TREE_CODE (con) == FUNCTION_DECL) + expr = ovl_make (tmpl); + expr = build_concept_check (expr, type, args, tf_warning_or_error); - tree constr = normalize_expression (expr); - PLACEHOLDER_TYPE_CONSTRAINTS (type) = constr; + PLACEHOLDER_TYPE_CONSTRAINTS (type) = expr; /* Our canonical type depends on the constraint. */ TYPE_CANONICAL (type) = canonical_type_parameter (type); /* Attach the constraint to the type declaration. */ - tree decl = TYPE_NAME (type); - return decl; + return TYPE_NAME (type); +} + +/* Make a "constrained auto" type-specifier. */ + +tree +make_constrained_auto (tree con, tree args) +{ + tree type = make_auto_1 (auto_identifier, false); + return make_constrained_placeholder_type (type, con, args); +} + +/* Make a "constrained decltype(auto)" type-specifier. */ + +tree +make_constrained_decltype_auto (tree con, tree args) +{ + tree type = make_auto_1 (decltype_auto_identifier, false); + /* FIXME: I don't know why this isn't done in make_auto_1. */ + AUTO_IS_DECLTYPE (type) = true; + return make_constrained_placeholder_type (type, con, args); +} + +/* Build and return a concept definition. Like other templates, the + CONCEPT_DECL node is wrapped by a TEMPLATE_DECL. This returns the + the TEMPLATE_DECL. */ + +tree +finish_concept_definition (cp_expr id, tree init) +{ + gcc_assert (identifier_p (id)); + gcc_assert (processing_template_decl); + + location_t loc = id.get_location(); + + /* A concept-definition shall not have associated constraints. */ + if (TEMPLATE_PARMS_CONSTRAINTS (current_template_parms)) + { + error_at (loc, "a concept cannot be constrained"); + TEMPLATE_PARMS_CONSTRAINTS (current_template_parms) = NULL_TREE; + } + + /* A concept-definition shall appear in namespace scope. Templates + aren't allowed in block scope, so we only need to check for class + scope. */ + if (TYPE_P (current_scope()) || !DECL_NAMESPACE_SCOPE_P (current_scope ())) + { + error_at (loc, "concept %qE not in namespace scope", *id); + return error_mark_node; + } + + /* Initially build the concept declaration; it's type is bool. */ + tree decl = build_lang_decl_loc (loc, CONCEPT_DECL, *id, boolean_type_node); + DECL_CONTEXT (decl) = current_scope (); + DECL_INITIAL (decl) = init; + + /* Push the enclosing template. */ + return push_template_decl (decl); } /* Given type ARG, return std::initializer_list. */ @@ -27656,13 +28114,17 @@ do_auto_deduction (tree type, tree init, tree auto_node, /* Check any placeholder constraints against the deduced type. */ if (flag_concepts && !processing_template_decl) - if (tree constr = NON_ERROR (PLACEHOLDER_TYPE_CONSTRAINTS (auto_node))) + if (tree check = NON_ERROR (PLACEHOLDER_TYPE_CONSTRAINTS (auto_node))) { /* Use the deduced type to check the associated constraints. If we have a partial-concept-id, rebuild the argument list so that we check using the extra arguments. */ - gcc_assert (TREE_CODE (constr) == CHECK_CONSTR); - tree cargs = CHECK_CONSTR_ARGS (constr); + check = unpack_concept_check (check); + gcc_assert (TREE_CODE (check) == TEMPLATE_ID_EXPR); + tree cdecl = TREE_OPERAND (check, 0); + if (OVL_P (cdecl)) + cdecl = OVL_FIRST (cdecl); + tree cargs = TREE_OPERAND (check, 1); if (TREE_VEC_LENGTH (cargs) > 1) { cargs = copy_node (cargs); @@ -27670,7 +28132,11 @@ do_auto_deduction (tree type, tree init, tree auto_node, } else cargs = targs; - if (!constraints_satisfied_p (constr, cargs)) + + /* Rebuild the check using the deduced arguments. */ + check = build_concept_check (cdecl, cargs, tf_none); + + if (!constraints_satisfied_p (check, cargs)) { if (complain & tf_warning_or_error) { @@ -27695,7 +28161,7 @@ do_auto_deduction (tree type, tree init, tree auto_node, "placeholder constraints"); break; } - diagnose_constraints (input_location, constr, targs); + diagnose_constraints (input_location, check, targs); } return error_mark_node; } @@ -27936,6 +28402,23 @@ append_type_to_template_for_access_check (tree templ, scope, location); } +/* Recursively walk over && expressions searching for EXPR. Return a reference + to that expression. */ + +static tree *find_template_requirement (tree *t, tree key) +{ + if (*t == key) + return t; + if (TREE_CODE (*t) == TRUTH_ANDIF_EXPR) + { + if (tree *p = find_template_requirement (&TREE_OPERAND (*t, 0), key)) + return p; + if (tree *p = find_template_requirement (&TREE_OPERAND (*t, 1), key)) + return p; + } + return 0; +} + /* Convert the generic type parameters in PARM that match the types given in the range [START_IDX, END_IDX) from the current_template_parms into generic type packs. */ @@ -27957,9 +28440,8 @@ convert_generic_types_to_packs (tree parm, int start_idx, int end_idx) /* Create a distinct parameter pack type from the current parm and add it to the replacement args to tsubst below into the generic function parameter. */ - - tree o = TREE_TYPE (TREE_VALUE - (TREE_VEC_ELT (current, i))); + tree node = TREE_VEC_ELT (current, i); + tree o = TREE_TYPE (TREE_VALUE (node)); tree t = copy_type (o); TEMPLATE_TYPE_PARM_INDEX (t) = reduce_template_parm_level (TEMPLATE_TYPE_PARM_INDEX (o), @@ -27970,7 +28452,26 @@ convert_generic_types_to_packs (tree parm, int start_idx, int end_idx) TEMPLATE_TYPE_PARAMETER_PACK (t) = true; TYPE_CANONICAL (t) = canonical_type_parameter (t); TREE_VEC_ELT (replacement, i) = t; - TREE_VALUE (TREE_VEC_ELT (current, i)) = TREE_CHAIN (t); + + /* Replace the current template parameter with new pack. */ + TREE_VALUE (node) = TREE_CHAIN (t); + + /* Surgically adjust the associated constraint of adjusted parameter + and it's corresponding contribution to the current template + requirements. */ + if (tree constr = TEMPLATE_PARM_CONSTRAINTS (node)) + { + tree id = unpack_concept_check (constr); + TREE_VEC_ELT (TREE_OPERAND (id, 1), 0) = template_parm_to_arg (t); + tree fold = finish_left_unary_fold_expr (constr, TRUTH_ANDIF_EXPR); + TEMPLATE_PARM_CONSTRAINTS (node) = fold; + + /* If there was a constraint, we also need to replace that in + the template requirements, which we've already built. */ + tree *reqs = &TEMPLATE_PARMS_CONSTRAINTS (current_template_parms); + reqs = find_template_requirement (reqs, constr); + *reqs = fold; + } } for (int i = end_idx, e = TREE_VEC_LENGTH (current); i < e; ++i) @@ -27987,27 +28488,6 @@ convert_generic_types_to_packs (tree parm, int start_idx, int end_idx) return tsubst (parm, replacement, tf_none, NULL_TREE); } -/* Entries in the decl_constraint hash table. */ -struct GTY((for_user)) constr_entry -{ - tree decl; - tree ci; -}; - -/* Hashing function and equality for constraint entries. */ -struct constr_hasher : ggc_ptr_hash -{ - static hashval_t hash (constr_entry *e) - { - return (hashval_t)DECL_UID (e->decl); - } - - static bool equal (constr_entry *e1, constr_entry *e2) - { - return e1->decl == e2->decl; - } -}; - /* A mapping from declarations to constraint information. Note that both templates and their underlying declarations are mapped to the same constraint information. @@ -28015,7 +28495,7 @@ struct constr_hasher : ggc_ptr_hash FIXME: This is defined in pt.c because garbage collection code is not being generated for constraint.cc. */ -static GTY (()) hash_table *decl_constraints; +static GTY ((cache)) tree_cache_map *decl_constraints; /* Returns the template constraints of declaration T. If T is not constrained, return NULL_TREE. Note that T must be non-null. */ @@ -28025,14 +28505,15 @@ get_constraints (tree t) { if (!flag_concepts) return NULL_TREE; + if (!decl_constraints) + return NULL_TREE; gcc_assert (DECL_P (t)); if (TREE_CODE (t) == TEMPLATE_DECL) t = DECL_TEMPLATE_RESULT (t); - constr_entry elt = { t, NULL_TREE }; - constr_entry* found = decl_constraints->find (&elt); + tree* found = decl_constraints->get (t); if (found) - return found->ci; + return *found; else return NULL_TREE; } @@ -28050,12 +28531,8 @@ set_constraints (tree t, tree ci) gcc_assert (t && flag_concepts); if (TREE_CODE (t) == TEMPLATE_DECL) t = DECL_TEMPLATE_RESULT (t); - gcc_assert (!get_constraints (t)); - constr_entry elt = {t, ci}; - constr_entry** slot = decl_constraints->find_slot (&elt, INSERT); - constr_entry* entry = ggc_alloc (); - *entry = elt; - *slot = entry; + bool found = hash_map_safe_put (decl_constraints, t, ci); + gcc_assert (!found); } /* Remove the associated constraints of the declaration T. */ @@ -28067,149 +28544,8 @@ remove_constraints (tree t) if (TREE_CODE (t) == TEMPLATE_DECL) t = DECL_TEMPLATE_RESULT (t); - constr_entry elt = {t, NULL_TREE}; - constr_entry** slot = decl_constraints->find_slot (&elt, NO_INSERT); - if (slot) - decl_constraints->clear_slot (slot); -} - -/* Memoized satisfaction results for declarations. This - maps the pair (constraint_info, arguments) to the result computed - by constraints_satisfied_p. */ - -struct GTY((for_user)) constraint_sat_entry -{ - tree ci; - tree args; - tree result; -}; - -/* Hashing function and equality for constraint entries. */ - -struct constraint_sat_hasher : ggc_ptr_hash -{ - static hashval_t hash (constraint_sat_entry *e) - { - hashval_t val = iterative_hash_object(e->ci, 0); - return iterative_hash_template_arg (e->args, val); - } - - static bool equal (constraint_sat_entry *e1, constraint_sat_entry *e2) - { - return e1->ci == e2->ci && comp_template_args (e1->args, e2->args); - } -}; - -/* Memoized satisfaction results for concept checks. */ - -struct GTY((for_user)) concept_spec_entry -{ - tree tmpl; - tree args; - tree result; -}; - -/* Hashing function and equality for constraint entries. */ - -struct concept_spec_hasher : ggc_ptr_hash -{ - static hashval_t hash (concept_spec_entry *e) - { - return hash_tmpl_and_args (e->tmpl, e->args); - } - - static bool equal (concept_spec_entry *e1, concept_spec_entry *e2) - { - ++comparing_specializations; - bool eq = e1->tmpl == e2->tmpl && comp_template_args (e1->args, e2->args); - --comparing_specializations; - return eq; - } -}; - -static GTY (()) hash_table *constraint_memos; -static GTY (()) hash_table *concept_memos; - -/* Search for a memoized satisfaction result. Returns one of the - truth value nodes if previously memoized, or NULL_TREE otherwise. */ - -tree -lookup_constraint_satisfaction (tree ci, tree args) -{ - constraint_sat_entry elt = { ci, args, NULL_TREE }; - constraint_sat_entry* found = constraint_memos->find (&elt); - if (found) - return found->result; - else - return NULL_TREE; -} - -/* Memoize the result of a satisfication test. Returns the saved result. */ - -tree -memoize_constraint_satisfaction (tree ci, tree args, tree result) -{ - constraint_sat_entry elt = {ci, args, result}; - constraint_sat_entry** slot = constraint_memos->find_slot (&elt, INSERT); - constraint_sat_entry* entry = ggc_alloc (); - *entry = elt; - *slot = entry; - return result; -} - -/* Search for a memoized satisfaction result for a concept. */ - -tree -lookup_concept_satisfaction (tree tmpl, tree args) -{ - concept_spec_entry elt = { tmpl, args, NULL_TREE }; - concept_spec_entry* found = concept_memos->find (&elt); - if (found) - return found->result; - else - return NULL_TREE; -} - -/* Memoize the result of a concept check. Returns the saved result. */ - -tree -memoize_concept_satisfaction (tree tmpl, tree args, tree result) -{ - concept_spec_entry elt = {tmpl, args, result}; - concept_spec_entry** slot = concept_memos->find_slot (&elt, INSERT); - concept_spec_entry* entry = ggc_alloc (); - *entry = elt; - *slot = entry; - return result; -} - -static GTY (()) hash_table *concept_expansions; - -/* Returns a prior concept specialization. This returns the substituted - and normalized constraints defined by the concept. */ - -tree -get_concept_expansion (tree tmpl, tree args) -{ - concept_spec_entry elt = { tmpl, args, NULL_TREE }; - concept_spec_entry* found = concept_expansions->find (&elt); - if (found) - return found->result; - else - return NULL_TREE; -} - -/* Save a concept expansion for later. */ - -tree -save_concept_expansion (tree tmpl, tree args, tree def) -{ - concept_spec_entry elt = {tmpl, args, def}; - concept_spec_entry** slot = concept_expansions->find_slot (&elt, INSERT); - concept_spec_entry* entry = ggc_alloc (); - *entry = elt; - *slot = entry; - return def; + if (decl_constraints) + decl_constraints->remove (t); } static hashval_t @@ -28306,13 +28642,11 @@ init_constraint_processing (void) if (!flag_concepts) return; - decl_constraints = hash_table::create_ggc(37); - constraint_memos = hash_table::create_ggc(37); - concept_memos = hash_table::create_ggc(37); - concept_expansions = hash_table::create_ggc(37); subsumption_table = hash_table::create_ggc(37); } +GTY(()) tree current_failed_constraint; + /* __integer_pack(N) in a pack expansion expands to a sequence of numbers from 0..N-1. */ diff --git a/gcc/cp/search.c b/gcc/cp/search.c index b441af8..5bc8679 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -835,7 +835,10 @@ accessible_p (tree type, tree decl, bool consider_local_p) in default arguments for template parameters), and access checking should be performed in the outermost parameter list. */ if (processing_template_decl - && !expanding_concept () + /* FIXME CWG has been talking about doing access checking in the context + of the constraint-expression, rather than the constrained declaration, + in which case we would want to remove this test. */ + && !processing_constraint_expression_p () && (!processing_template_parmlist || processing_template_decl > 1)) return 1; diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 5a8c4d2..1839013 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1788,10 +1788,10 @@ finish_mem_initializers (tree mem_inits) /* Obfuscate EXPR if it looks like an id-expression or member access so that the call to finish_decltype in do_auto_deduction will give the - right result. */ + right result. If EVEN_UNEVAL, do this even in unevaluated context. */ tree -force_paren_expr (tree expr) +force_paren_expr (tree expr, bool even_uneval) { /* This is only needed for decltype(auto) in C++14. */ if (cxx_dialect < cxx14) @@ -1799,7 +1799,7 @@ force_paren_expr (tree expr) /* If we're in unevaluated context, we can't be deducing a return/initializer type, so we don't need to mess with this. */ - if (cp_unevaluated_operand) + if (cp_unevaluated_operand && !even_uneval) return expr; if (!DECL_P (tree_strip_any_location_wrapper (expr)) @@ -2589,6 +2589,27 @@ finish_call_expr (tree fn, vec **args, bool disallow_virtual, /*fn_p=*/NULL, complain); } + else if (concept_check_p (fn)) + { + /* FN is actually a template-id referring to a concept definition. */ + tree id = unpack_concept_check (fn); + tree tmpl = TREE_OPERAND (id, 0); + tree args = TREE_OPERAND (id, 1); + + if (!function_concept_p (tmpl)) + { + error_at (EXPR_LOC_OR_LOC (fn, input_location), + "cannot call a concept as a function"); + return error_mark_node; + } + + /* Ensure the result is wrapped as a call expression. */ + result = build_concept_check (tmpl, args, tf_warning_or_error); + + /* Evaluate the check if it is non-dependent. */ + if (!uses_template_parms (args)) + result = evaluate_concept_check (result, complain); + } else if (is_overloaded_fn (fn)) { /* If the function is an overloaded builtin, resolve it. */ @@ -3833,9 +3854,10 @@ finish_id_expression_1 (tree id_expression, if (! error_operand_p (decl) && !dependent_p && integral_constant_expression_p - && ! decl_constant_var_p (decl) + && !decl_constant_var_p (decl) && TREE_CODE (decl) != CONST_DECL - && ! builtin_valid_in_constant_expr_p (decl)) + && !builtin_valid_in_constant_expr_p (decl) + && !concept_check_p (decl)) { if (!allow_non_integral_constant_expression_p) { @@ -3851,12 +3873,23 @@ finish_id_expression_1 (tree id_expression, decl = wrap; else if (TREE_CODE (decl) == TEMPLATE_ID_EXPR && !dependent_p - && variable_template_p (TREE_OPERAND (decl, 0))) + && variable_template_p (TREE_OPERAND (decl, 0)) + && !concept_check_p (decl)) { decl = finish_template_variable (decl); mark_used (decl); decl = convert_from_reference (decl); } + else if (concept_check_p (decl)) + { + /* If this is a standard or variable concept check, potentially + evaluate it. Function concepts need to be called as functions, + so don't try evaluating them here. */ + tree tmpl = TREE_OPERAND (decl, 0); + tree args = TREE_OPERAND (decl, 1); + if (!function_concept_p (tmpl) && !uses_template_parms (args)) + decl = evaluate_concept_check (decl, tf_warning_or_error); + } else if (scope) { if (TREE_CODE (decl) == SCOPE_REF) @@ -3929,6 +3962,16 @@ finish_id_expression_1 (tree id_expression, decl = baselink_for_fns (decl); } + else if (concept_check_p (decl)) + { + /* If this is a standard or variable concept check, potentially + evaluate it. Function concepts need to be called as functions, + so don't try evaluating them here. */ + tree tmpl = TREE_OPERAND (decl, 0); + tree args = TREE_OPERAND (decl, 1); + if (!function_concept_p (tmpl) && !uses_template_parms (args)) + decl = evaluate_concept_check (decl, tf_warning_or_error); + } else { if (DECL_P (decl) && DECL_NONLOCAL (decl) diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 1d9e9b8..ba334e7 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -9644,7 +9644,8 @@ check_return_expr (tree retval, bool *no_warning) if (!retval) retval = void_node; auto_node = type_uses_auto (pattern); - type = do_auto_deduction (pattern, retval, auto_node); + type = do_auto_deduction (pattern, retval, auto_node, + tf_warning_or_error, adc_return_type); } if (type == error_mark_node) diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 54d6b84..2402c38 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -923,7 +923,7 @@ store_init_value (tree decl, tree init, vec** cleanups, int flags) return split_nonconstant_init (decl, value); /* DECL may change value; purge caches. */ - clear_cv_and_fold_caches (); + clear_cv_and_fold_caches (TREE_STATIC (decl)); /* If the value is a constant, just put it in DECL_INITIAL. If DECL is an automatic variable, the middle end will turn this into a @@ -2242,8 +2242,7 @@ build_functional_cast (tree exp, tree parms, tsubst_flags_t complain) if (!CLASS_PLACEHOLDER_TEMPLATE (anode)) { if (complain & tf_error) - error_at (DECL_SOURCE_LOCATION (TEMPLATE_TYPE_DECL (anode)), - "invalid use of %qT", anode); + error ("invalid use of %qT", anode); return error_mark_node; } else if (!parms) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 20e10c0..dc9a3e5 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2512,14 +2512,17 @@ exhaustion is signalled by throwing @code{std::bad_alloc}. See also @samp{new (nothrow)}. @item -fconcepts +@itemx -fconcepts-ts @opindex fconcepts -Enable support for the C++ Extensions for Concepts Technical -Specification, ISO 19217 (2015), which allows code like - -@smallexample -template concept bool Addable = requires (T t) @{ t + t; @}; -template T add (T a, T b) @{ return a + b; @} -@end smallexample +@opindex fconcepts-ts +Below @option{-std=c++2a}, @option{-fconcepts} enables support for the +C++ Extensions for Concepts Technical Specification, ISO 19217 (2015). + +With @option{-std=c++2a} and above, Concepts are part of the language +standard, so @option{-fconcepts} defaults to on. But the standard +specification of Concepts differs significantly from the TS, so some +constructs that were allowed in the TS but didn't make it into the +standard can still be enabled by @option{-fconcepts-ts}. @item -fconstexpr-depth=@var{n} @opindex fconstexpr-depth diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 26a3fcc..9318655 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Andrew Sutton + + * lib/target-supports.exp (check_effective_target_concepts): Check + for std=c++2a. + 2019-10-09 Paolo Carlini * c-c++-common/Waddress-1.c: Test locations too. diff --git a/gcc/testsuite/g++.dg/concepts/alias1.C b/gcc/testsuite/g++.dg/concepts/alias1.C deleted file mode 100644 index 279a478..0000000 --- a/gcc/testsuite/g++.dg/concepts/alias1.C +++ /dev/null @@ -1,16 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template - requires C() - using X = T*; - -struct S { }; - -int main() -{ - X x1; -} diff --git a/gcc/testsuite/g++.dg/concepts/alias2.C b/gcc/testsuite/g++.dg/concepts/alias2.C deleted file mode 100644 index 06ffb1a..0000000 --- a/gcc/testsuite/g++.dg/concepts/alias2.C +++ /dev/null @@ -1,14 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template using X = T*; - -struct S { }; - -int main() -{ - X x1; -} diff --git a/gcc/testsuite/g++.dg/concepts/alias3.C b/gcc/testsuite/g++.dg/concepts/alias3.C deleted file mode 100644 index 2901c04..0000000 --- a/gcc/testsuite/g++.dg/concepts/alias3.C +++ /dev/null @@ -1,14 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template - requires C() - using X = T*; - -int main() -{ - X x1; // { dg-error "constraint|invalid" } -} diff --git a/gcc/testsuite/g++.dg/concepts/alias4.C b/gcc/testsuite/g++.dg/concepts/alias4.C deleted file mode 100644 index 2c9f5de..0000000 --- a/gcc/testsuite/g++.dg/concepts/alias4.C +++ /dev/null @@ -1,20 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template - requires C() - using X = T*; - -// BUG: Alias templates are expanded at the point of use, regardless -// of whether or not they are dependent. This causes T* to be substituted -// without acutally checking the constraints. -template - using Y = X; - -int main() -{ - Y y1; // { dg-error "" "" { xfail *-*-* } } -} diff --git a/gcc/testsuite/g++.dg/concepts/auto1.C b/gcc/testsuite/g++.dg/concepts/auto1.C index 2682940..e053306 100644 --- a/gcc/testsuite/g++.dg/concepts/auto1.C +++ b/gcc/testsuite/g++.dg/concepts/auto1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template class A { }; diff --git a/gcc/testsuite/g++.dg/concepts/auto3.C b/gcc/testsuite/g++.dg/concepts/auto3.C index abfb201..27a6afa 100644 --- a/gcc/testsuite/g++.dg/concepts/auto3.C +++ b/gcc/testsuite/g++.dg/concepts/auto3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template class tuple {}; diff --git a/gcc/testsuite/g++.dg/concepts/auto4.C b/gcc/testsuite/g++.dg/concepts/auto4.C index 4eb2ae8..8bf3fa9 100644 --- a/gcc/testsuite/g++.dg/concepts/auto4.C +++ b/gcc/testsuite/g++.dg/concepts/auto4.C @@ -1,6 +1,6 @@ // PR c++/85006 -// { dg-do compile { target c++17 } } -// { dg-additional-options "-fconcepts" } +// { dg-do compile { target c++17_only } } +// { dg-options "-fconcepts" } template struct A {}; diff --git a/gcc/testsuite/g++.dg/concepts/class-deduction1.C b/gcc/testsuite/g++.dg/concepts/class-deduction1.C index 936dd68..3359700 100644 --- a/gcc/testsuite/g++.dg/concepts/class-deduction1.C +++ b/gcc/testsuite/g++.dg/concepts/class-deduction1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/class-deduction2.C b/gcc/testsuite/g++.dg/concepts/class-deduction2.C deleted file mode 100644 index e0718d1..0000000 --- a/gcc/testsuite/g++.dg/concepts/class-deduction2.C +++ /dev/null @@ -1,10 +0,0 @@ -// PR c++/85706 -// { dg-do compile { target c++17 } } -// { dg-additional-options "-fconcepts" } - -template struct S { - S(T); -}; - -template -auto f() -> decltype(S(42)); // error diff --git a/gcc/testsuite/g++.dg/concepts/class.C b/gcc/testsuite/g++.dg/concepts/class.C deleted file mode 100644 index dc5523e..0000000 --- a/gcc/testsuite/g++.dg/concepts/class.C +++ /dev/null @@ -1,53 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool Class() { return __is_class(T); } - -template - concept bool Union() { return __is_union(T); } - - -// Check ordering of specializations -template - concept bool One() { return sizeof(T) >= 4; } - -template - concept bool Two() { return One() && sizeof(T) >= 8; } - -// Check non-overlapping specializations -template - struct S1 { static const int value = 0; }; - -template - struct S1 { static const int value = 1; }; - -template - struct S1 { static const int value = 2; }; - -struct S { }; -union U { }; - -static_assert(S1::value == 0, ""); -static_assert(S1::value == 1, ""); -static_assert(S1::value == 2, ""); - - -// Check ordering of partial specializaitons -template - struct S2 { static const int value = 0; }; - -template - struct S2 { static const int value = 1; }; - -template - struct S2 { static const int value = 2; }; - -struct one_type { char x[4]; }; -struct two_type { char x[8]; }; - -static_assert(S2::value == 0, ""); -static_assert(S2::value == 1, ""); -static_assert(S2::value == 2, ""); - -int main() { } diff --git a/gcc/testsuite/g++.dg/concepts/class1.C b/gcc/testsuite/g++.dg/concepts/class1.C deleted file mode 100644 index a738e6e..0000000 --- a/gcc/testsuite/g++.dg/concepts/class1.C +++ /dev/null @@ -1,15 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template - requires C() - struct S { }; - -struct X { }; - -S sx; - -int main() { } diff --git a/gcc/testsuite/g++.dg/concepts/class2.C b/gcc/testsuite/g++.dg/concepts/class2.C deleted file mode 100644 index ec87181..0000000 --- a/gcc/testsuite/g++.dg/concepts/class2.C +++ /dev/null @@ -1,15 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template - requires C() - struct S { }; - -struct X { }; - -S sx; // { dg-error "constraint|invalid" } - -int main() { } diff --git a/gcc/testsuite/g++.dg/concepts/class3.C b/gcc/testsuite/g++.dg/concepts/class3.C deleted file mode 100644 index 256370d..0000000 --- a/gcc/testsuite/g++.dg/concepts/class3.C +++ /dev/null @@ -1,15 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -// Check class redeclaration with alternative spellings. -template requires C() struct S; -template struct S { }; - -struct X { }; - -// S sx; - -int main() { } diff --git a/gcc/testsuite/g++.dg/concepts/class4.C b/gcc/testsuite/g++.dg/concepts/class4.C deleted file mode 100644 index b583e55..0000000 --- a/gcc/testsuite/g++.dg/concepts/class4.C +++ /dev/null @@ -1,22 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool Class() { return __is_class(T); } - -template - concept bool Union() { return __is_union(T); } - -// Check non-overlapping specializations -template struct S1 { static const int value = 0; }; -template struct S1 { static const int value = 1; }; -template struct S1 { static const int value = 2; }; - -struct S { }; -union U { }; - -static_assert(S1::value == 0, ""); -static_assert(S1::value == 1, ""); -static_assert(S1::value == 2, ""); - -int main() { } diff --git a/gcc/testsuite/g++.dg/concepts/class5.C b/gcc/testsuite/g++.dg/concepts/class5.C index 7bf620e..ac9d7e8 100644 --- a/gcc/testsuite/g++.dg/concepts/class5.C +++ b/gcc/testsuite/g++.dg/concepts/class5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/class6.C b/gcc/testsuite/g++.dg/concepts/class6.C index bdd60918..f2345b1 100644 --- a/gcc/testsuite/g++.dg/concepts/class6.C +++ b/gcc/testsuite/g++.dg/concepts/class6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template @@ -15,5 +15,3 @@ struct one_type { char x[4]; }; // Constraints are checked even when decls are not instantiatied. S4* x4b; // { dg-error "constraint|invalid" } - -int main() { } diff --git a/gcc/testsuite/g++.dg/concepts/constrained-parm.C b/gcc/testsuite/g++.dg/concepts/constrained-parm.C deleted file mode 100644 index c2b6614a..0000000 --- a/gcc/testsuite/g++.dg/concepts/constrained-parm.C +++ /dev/null @@ -1,14 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template struct S1 { }; // { dg-error "cv-qualified" } -template struct S2 { }; // { dg-error "cv-qualified" } -template struct S3 { }; // { dg-error "invalid" } -template struct S3a { }; // { dg-error "invalid" } -template struct S3b { }; // { dg-error "invalid" } -template struct S4 { }; // { dg-error "invalid" } -template struct S4 { }; // { dg-error "invalid|expected" } -template struct S5 { }; // { dg-error "invalid" } diff --git a/gcc/testsuite/g++.dg/concepts/debug1.C b/gcc/testsuite/g++.dg/concepts/debug1.C index 87f2ac9..b9a5444 100644 --- a/gcc/testsuite/g++.dg/concepts/debug1.C +++ b/gcc/testsuite/g++.dg/concepts/debug1.C @@ -1,11 +1,11 @@ // PR c++/84551 -// { dg-do compile { target c++17 } } -// { dg-options "-g -O -fconcepts" } +// { dg-do compile { target c++17_only } } +// { dg-options "-fconcepts" } template concept bool C() { return true; } -template requires C() class> struct A {}; +template requires C() class TT> struct A {}; -template requires true struct B {}; +template requires C() struct B {}; A a; diff --git a/gcc/testsuite/g++.dg/concepts/decl-diagnose.C b/gcc/testsuite/g++.dg/concepts/decl-diagnose.C index 019a8ce..6a461a5 100644 --- a/gcc/testsuite/g++.dg/concepts/decl-diagnose.C +++ b/gcc/testsuite/g++.dg/concepts/decl-diagnose.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } typedef concept int CINT; // { dg-error "'concept' cannot appear in a typedef declaration" } @@ -12,10 +12,10 @@ concept bool f3(); // { dg-error "14:concept .f3. has no definition" } struct X { template - concept int f4() { return 0; } // { dg-error "return type|member function" } - concept bool f5() { return true; } // { dg-error "member function" } + concept int f4() { return 0; } // { dg-error "cannot be a member" } + concept f5 = true; // { dg-error "declared 'concept'" } template - static concept bool f6() { return true; } // { dg-error "a concept cannot be a member function" } + static concept f6 = true; // { dg-error "declared 'concept'" } static concept bool x; // { dg-error "declared 'concept'" } // { dg-error "uninitialized 'const" "" { target *-*-* } .-1 } concept int x2; // { dg-error "declared 'concept'" } diff --git a/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C b/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C index bebbda1..eba5771 100644 --- a/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C +++ b/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C @@ -1,5 +1,5 @@ // PR c++/67007 -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/diagnostic1.C b/gcc/testsuite/g++.dg/concepts/diagnostic1.C index 9bb1506..ced56d4 100644 --- a/gcc/testsuite/g++.dg/concepts/diagnostic1.C +++ b/gcc/testsuite/g++.dg/concepts/diagnostic1.C @@ -1,19 +1,19 @@ // PR c++/67159 -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template concept bool SameAs = __is_same_as(T, U); template -concept bool R1 = requires (T& t) { - { t.begin() } -> T - { t.end() } -> SameAs; +concept bool R1 = requires (T& t) { // { dg-message "in requirements" } + { t.begin() } -> T; // { dg-error "no match" } + { t.end() } -> SameAs; // { dg-error "does not satisfy" } }; template -concept bool R2 = requires (T& t) { - { t.end() } -> SameAs; +concept bool R2 = requires (T& t) { // { dg-message "in requirements" } + { t.end() } -> SameAs; // { dg-error "does not satisfy" } }; struct foo { diff --git a/gcc/testsuite/g++.dg/concepts/disjunction1.C b/gcc/testsuite/g++.dg/concepts/disjunction1.C deleted file mode 100644 index 930adf4..0000000 --- a/gcc/testsuite/g++.dg/concepts/disjunction1.C +++ /dev/null @@ -1,60 +0,0 @@ -// PR c++/66962 -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template struct remove_cv; -template struct is_reference; -template void declval(); -template struct is_constructible; -template struct is_nothrow_constructible; -template using remove_cv_t = typename remove_cv<_Tp>::type; -template struct Trans_NS_extension_apply_list; -template using _t = typename T::type; -template void ImplicitlyConvertibleTo(); -template void Assignable(); -template int ConstructibleObject = requires { T{}; }; -template -concept bool BindableReference = - is_reference::value &&is_constructible::value; -template concept bool Constructible() { - return ConstructibleObject || BindableReference; -} -template concept bool DefaultConstructible() { - return Constructible() && requires { new T[0]; }; -} -template concept bool MoveConstructible() { - return Constructible() && ImplicitlyConvertibleTo; -} -template concept bool Movable() { - return MoveConstructible() && Assignable; -} -template int Swappable_ = requires { 0; }; -template int Swappable(); -template concept bool Dereferencable = requires{{0}}; -template using RvalueReferenceType = decltype(0); -template int IsValueType; -template struct value_type; -template -requires IsValueType< - _t>>> using ValueType = - _t>>; -template concept bool Readable() { - return Movable() && DefaultConstructible() && - Dereferencable && requires{{0}}; -} -template concept bool MoveWritable() { - return Movable() && DefaultConstructible() && - Dereferencable; -} -template concept bool IndirectlyMovable() { - return Readable() && Movable>() && - Constructible>() && - MoveWritable>() && - MoveWritable>(); -} -IndirectlyMovable { In, Out } -int is_nothrow_indirectly_movable_v = - is_nothrow_constructible>::value; -template - requires IndirectlyMovable() && - IndirectlyMovable() void iter_swap2(); diff --git a/gcc/testsuite/g++.dg/concepts/dr1430.C b/gcc/testsuite/g++.dg/concepts/dr1430.C index f865d5e..6f5bab1 100644 --- a/gcc/testsuite/g++.dg/concepts/dr1430.C +++ b/gcc/testsuite/g++.dg/concepts/dr1430.C @@ -1,5 +1,5 @@ // PR c++/66092 -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } #include @@ -29,11 +29,14 @@ template concept bool Similar = true; template -requires Same() // { dg-error "invalid reference" } +requires Same() // { dg-error "" "" { xfail *-*-* } } void foo( Args... args ) {} +// FIXME: The new method of building concept checks is suppressing the +// diagnostic for the invalid substitution. This produces an invalid +// requires-clause, which still prevents the function from being resolved. template -requires Similar // { dg-error "invalid reference" } +requires Similar // { dg-error "pack expansion" } void bar( Args... args ) {} int main() diff --git a/gcc/testsuite/g++.dg/concepts/equiv.C b/gcc/testsuite/g++.dg/concepts/equiv.C index faec354..640c2b5 100644 --- a/gcc/testsuite/g++.dg/concepts/equiv.C +++ b/gcc/testsuite/g++.dg/concepts/equiv.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do link { target c++17_only } } // { dg-options "-fconcepts" } // Check equivalence of short- and longhand declarations. diff --git a/gcc/testsuite/g++.dg/concepts/equiv2.C b/gcc/testsuite/g++.dg/concepts/equiv2.C index 2094ca9..dff719b 100644 --- a/gcc/testsuite/g++.dg/concepts/equiv2.C +++ b/gcc/testsuite/g++.dg/concepts/equiv2.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++17 } } +// { dg-do link { target c++17_only } } // { dg-options "-fconcepts" } @@ -21,9 +21,9 @@ int main() { void f1(C, C) { } -template -void f2(T, T) { } +template +void f2(T1, T2) { } -template - requires C -void f3(T, T) { } +template + requires C && C +void f3(T, U) { } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst1.C b/gcc/testsuite/g++.dg/concepts/explicit-inst1.C deleted file mode 100644 index 99bd72e..0000000 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst1.C +++ /dev/null @@ -1,22 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template - concept bool D() { return C() && __is_empty(T); } - -struct X { }; -struct Y { int n; }; - -template void g(T) { } // #1 -template void g(T) { } // #2 -template void g(T) { } // #3 - -// FIXME: How do I test that these generate the right symbols? -template void g(int); // Instantiate #1 -template void g(X); // Instantitae #3 -template void g(Y); // Instantiate #2 - -int main() { } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst2.C b/gcc/testsuite/g++.dg/concepts/explicit-inst2.C deleted file mode 100644 index ea31387..0000000 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst2.C +++ /dev/null @@ -1,25 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template - concept bool D() { return C() && __is_empty(T); } - -struct X { }; -struct Y { int n; }; - -template struct S { void f1() { } }; // #1 -template struct S { void f2() { } }; // #2 -template struct S { void f3() { } }; // #3 - -template struct S; // Instantiate #1 -template struct S; // Instantiate #2 -template struct S; // Instantiate #2 - -int main() { - S i; i.f1(); - S x; x.f3(); - S y; y.f2(); -} diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst3.C b/gcc/testsuite/g++.dg/concepts/explicit-inst3.C deleted file mode 100644 index 18d3c49..0000000 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst3.C +++ /dev/null @@ -1,28 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template - concept bool D() { return C() && __is_empty(T); } - -struct X { }; -struct Y { int n; }; - -template - struct S { - void f() { } // #1 - void f() requires C() { } // #2 - - void g() requires C() { } // #1 - void g() requires D() { } // #2 - }; - -template void S::f(); // #1 -template void S::f(); // #2 - -template void S::g(); // #2 -template void S::g(); // #1 - -int main() { } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst4.C b/gcc/testsuite/g++.dg/concepts/explicit-inst4.C deleted file mode 100644 index 20f4377..0000000 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst4.C +++ /dev/null @@ -1,18 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template - concept bool D() { return C() && __is_empty(T); } - -template - struct S { - void g() requires C() { } // #1 - void g() requires D() { } // #2 - }; - -template void S::g(); // { dg-error "match" } - -int main() { } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec1.C b/gcc/testsuite/g++.dg/concepts/explicit-spec1.C deleted file mode 100644 index bff06f2..0000000 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec1.C +++ /dev/null @@ -1,32 +0,0 @@ -// { dg-do run { target c++17 } } -// { dg-options "-fconcepts" } - -#include - -template - concept bool C() { return __is_class(T); } - -template - concept bool D() { return C() && __is_empty(T); } - -struct X { } x; -struct Y { int n; } y; - -template void g(T) { } // #1 -template void g(T) { } // #2 -template void g(T) { } // #3 - -int called; - -template<> void g(int) { called = 1; } // Specialization of #1 -template<> void g(X) { called = 2; } // Specialization of #3 -template<> void g(Y) { called = 3; } // Specialization of #2 - -int main() { - g(0); - assert(called == 1); - g(x); - assert(called == 2); - g(y); - assert(called == 3); -} diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec2.C b/gcc/testsuite/g++.dg/concepts/explicit-spec2.C deleted file mode 100644 index ca8b8a0..0000000 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec2.C +++ /dev/null @@ -1,14 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -struct X { }; - -template struct S; -template<> struct S { void f() { } }; - -int main() { - S x; x.f(); -} diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec3.C b/gcc/testsuite/g++.dg/concepts/explicit-spec3.C deleted file mode 100644 index fd48da1..0000000 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec3.C +++ /dev/null @@ -1,14 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template struct S; - -struct X { }; - -// Not a valid explicit specialization, int does not satisfy C. -template<> struct S { }; // { dg-error "constraint" } - -int main() { } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec4.C b/gcc/testsuite/g++.dg/concepts/explicit-spec4.C deleted file mode 100644 index 75a2dec..0000000 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec4.C +++ /dev/null @@ -1,51 +0,0 @@ -// { dg-do run { target c++17 } } -// { dg-options "-fconcepts" } - -#include - -template - concept bool C() { return __is_class(T); } - -template - concept bool D() { return C() && __is_empty(T); } - -struct X { } x; -struct Y { int n; } y; - -int called = 0; - -template - struct S { - void f() { called = 0; } // #1 - void f() requires C() { called = 0; } // #2 - - void g() requires C() { } // #1 - void g() requires D() { } // #2 - }; - -template<> void S::f() { called = 1; } // Spec of #1 -template<> void S::f() { called = 2; } // Spec of #2 - -template<> void S::g() { called = 3; } // Spec of #2 -template<> void S::g() { called = 4; } // Spec of #1 - -int main() { - S sd; - S si; - S sx; - S sy; - - sd.f(); - assert(called == 0); - si.f(); - assert(called == 1); - sx.f(); - assert(called == 2); - sy.f(); - assert(called == 0); - - sx.g(); - assert(called == 3); - sy.g(); - assert(called == 4); -} diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec5.C b/gcc/testsuite/g++.dg/concepts/explicit-spec5.C deleted file mode 100644 index d83eec1..0000000 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec5.C +++ /dev/null @@ -1,22 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -#include - -template - concept bool C() { return __is_class(T); } - -template - concept bool D() { return C() && __is_empty(T); } - -struct X { } x; -struct Y { int n; } y; - -int called = 0; - -template - struct S { - void f() requires C(); - }; - -template<> void S::f() { called = 1; } // { dg-error "match" } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec6.C b/gcc/testsuite/g++.dg/concepts/explicit-spec6.C deleted file mode 100644 index b548707..0000000 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec6.C +++ /dev/null @@ -1,19 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template -struct A { - template void f1(T, T2); // member template - template void f2(T, T2); // member template -}; - -template<> -template void A::f1(int, X1); - -// Specialization with template-id -template<> -template<> void A::f2(int, char); - -// Specialization with deduction -template<> -template<> void A::f1(int, char); diff --git a/gcc/testsuite/g++.dg/concepts/expression.C b/gcc/testsuite/g++.dg/concepts/expression.C index 33dad0a..ba4c48d 100644 --- a/gcc/testsuite/g++.dg/concepts/expression.C +++ b/gcc/testsuite/g++.dg/concepts/expression.C @@ -1,6 +1,8 @@ -// { dg-do run { target c++17 } } +// { dg-do run { target c++17_only } } // { dg-options "-fconcepts" } +// TODO: ICE on gimplify 16? + #include #include @@ -8,13 +10,9 @@ template concept bool C1 = __is_class(T); template - concept bool C2() { return __is_class(T); } - -template - concept bool C3() { return requires (T a) { ++a; }; } + concept bool C3 = requires (T a) { ++a; }; int main() { if (C1) assert(false); - if (C2()) assert(false); - if (!C3()) assert(false); + if (!C3) assert(false); } diff --git a/gcc/testsuite/g++.dg/concepts/expression2.C b/gcc/testsuite/g++.dg/concepts/expression2.C index c5447df..1cff605 100644 --- a/gcc/testsuite/g++.dg/concepts/expression2.C +++ b/gcc/testsuite/g++.dg/concepts/expression2.C @@ -1,16 +1,16 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template concept bool C1() { - return requires (T t) { t.f(); }; + return requires (T t) { t.f(); }; // { dg-message "in requirements" } } template concept bool C2() { - return requires { typename T::type; }; + return requires { typename T::type; }; // { dg-message "in requirements" } } template @@ -22,7 +22,7 @@ template void f2(T x) { } // Note that these declarations are private and therefore -// cannot satisify the constraints. +// cannot satisfy the constraints. class S { using type = int; @@ -31,12 +31,12 @@ class S int main() { - f1(s); // { dg-error "cannot call" } + f1(s); // { dg-error "cannot call|private" } f2(s); // { dg-error "" } // When used in non-SFINAE contexts, make sure that we fail // the constraint check before emitting the access check - // failures. The context is being presented constistently + // failures. The context is being presented consistently // in both cases. static_assert(C1(), ""); // { dg-error "failed" } static_assert(C2(), ""); // { dg-error "" } diff --git a/gcc/testsuite/g++.dg/concepts/expression3.C b/gcc/testsuite/g++.dg/concepts/expression3.C index 26b829d..67646811 100644 --- a/gcc/testsuite/g++.dg/concepts/expression3.C +++ b/gcc/testsuite/g++.dg/concepts/expression3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/feature-macro.C b/gcc/testsuite/g++.dg/concepts/feature-macro.C deleted file mode 100644 index d3d9b54..0000000 --- a/gcc/testsuite/g++.dg/concepts/feature-macro.C +++ /dev/null @@ -1,6 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -#ifndef __cpp_concepts -#error __cpp_concepts not defined -#endif diff --git a/gcc/testsuite/g++.dg/concepts/fn-concept1.C b/gcc/testsuite/g++.dg/concepts/fn-concept1.C index a4ade7c..d1b4c0c 100644 --- a/gcc/testsuite/g++.dg/concepts/fn-concept1.C +++ b/gcc/testsuite/g++.dg/concepts/fn-concept1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/fn-concept2.C b/gcc/testsuite/g++.dg/concepts/fn-concept2.C index 0d70728..899988c 100644 --- a/gcc/testsuite/g++.dg/concepts/fn-concept2.C +++ b/gcc/testsuite/g++.dg/concepts/fn-concept2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/fn-generic-member-ool.C b/gcc/testsuite/g++.dg/concepts/fn-generic-member-ool.C index b664ccf..2453803 100644 --- a/gcc/testsuite/g++.dg/concepts/fn-generic-member-ool.C +++ b/gcc/testsuite/g++.dg/concepts/fn-generic-member-ool.C @@ -1,4 +1,3 @@ -// Out-of-line generic member function definitions. // { dg-do compile { target c++14 } } // { dg-additional-options "-fconcepts" } diff --git a/gcc/testsuite/g++.dg/concepts/fn1.C b/gcc/testsuite/g++.dg/concepts/fn1.C index 17f14b9..f23c057 100644 --- a/gcc/testsuite/g++.dg/concepts/fn1.C +++ b/gcc/testsuite/g++.dg/concepts/fn1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/fn10.C b/gcc/testsuite/g++.dg/concepts/fn10.C index 6993f34..8d0a2e1 100644 --- a/gcc/testsuite/g++.dg/concepts/fn10.C +++ b/gcc/testsuite/g++.dg/concepts/fn10.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } // Test that constraint satisfaction checks work even when @@ -40,7 +40,7 @@ template template concept bool Concept() { - return requires( T t ) { + return requires( T t ) { // { dg-message "in requirements" } requires Float(); }; } diff --git a/gcc/testsuite/g++.dg/concepts/fn2.C b/gcc/testsuite/g++.dg/concepts/fn2.C index 250e0a8..debb323 100644 --- a/gcc/testsuite/g++.dg/concepts/fn2.C +++ b/gcc/testsuite/g++.dg/concepts/fn2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/fn3.C b/gcc/testsuite/g++.dg/concepts/fn3.C index bc0e126..07b8e3a 100644 --- a/gcc/testsuite/g++.dg/concepts/fn3.C +++ b/gcc/testsuite/g++.dg/concepts/fn3.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/fn4.C b/gcc/testsuite/g++.dg/concepts/fn4.C index 830a174..bbaac46 100644 --- a/gcc/testsuite/g++.dg/concepts/fn4.C +++ b/gcc/testsuite/g++.dg/concepts/fn4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/fn5.C b/gcc/testsuite/g++.dg/concepts/fn5.C index 018b12f..7714788 100644 --- a/gcc/testsuite/g++.dg/concepts/fn5.C +++ b/gcc/testsuite/g++.dg/concepts/fn5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } // Check shorthand notation. diff --git a/gcc/testsuite/g++.dg/concepts/fn6.C b/gcc/testsuite/g++.dg/concepts/fn6.C index 97155f8..031e87f 100644 --- a/gcc/testsuite/g++.dg/concepts/fn6.C +++ b/gcc/testsuite/g++.dg/concepts/fn6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } // Redefinition errors. diff --git a/gcc/testsuite/g++.dg/concepts/fn7.C b/gcc/testsuite/g++.dg/concepts/fn7.C index 0052f1a..869cb9c 100644 --- a/gcc/testsuite/g++.dg/concepts/fn7.C +++ b/gcc/testsuite/g++.dg/concepts/fn7.C @@ -1,8 +1,6 @@ -// { dg-do link { target c++17 } } +// { dg-do link { target c++14 } } // { dg-options "-fconcepts" } -// FIXME: What is this actually testing? - void f() requires true { } int main() { } diff --git a/gcc/testsuite/g++.dg/concepts/fn8.C b/gcc/testsuite/g++.dg/concepts/fn8.C index a3daf4e..ffcce4f 100644 --- a/gcc/testsuite/g++.dg/concepts/fn8.C +++ b/gcc/testsuite/g++.dg/concepts/fn8.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/fn9.C b/gcc/testsuite/g++.dg/concepts/fn9.C index 84ed77c..2f5e88b 100644 --- a/gcc/testsuite/g++.dg/concepts/fn9.C +++ b/gcc/testsuite/g++.dg/concepts/fn9.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/friend1.C b/gcc/testsuite/g++.dg/concepts/friend1.C deleted file mode 100644 index 9050b55..0000000 --- a/gcc/testsuite/g++.dg/concepts/friend1.C +++ /dev/null @@ -1,35 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool Eq() { return requires(T t) { t == t; }; } - -struct Nt { - template friend void f(T) { } -} nt; - -template struct S; - -template - void proc(S*); - -template - struct S { - friend bool operator==(S, S) requires Eq() { return true; } - - friend void proc<>(S*); // { dg-error "does not match any template declaration" } - }; - -struct X { } x; - -int main() { - // f(0); // OK - f(nt); // { dg-error "cannot call" } - f(x); // { dg-error "3:'f' was not declared" } - - S si; - si == si; // OK - - S sx; - sx == sx; // { dg-error "no match" } -} diff --git a/gcc/testsuite/g++.dg/concepts/friend2.C b/gcc/testsuite/g++.dg/concepts/friend2.C deleted file mode 100644 index 8ef6002..0000000 --- a/gcc/testsuite/g++.dg/concepts/friend2.C +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool Eq() { return requires(T t) { t == t; }; } - -template struct Foo { }; - -template - struct S { // { dg-error "constraint failure" } - template friend class Bar; - - friend class Foo; - }; - -struct X { }; - -int main() { - S si; // OK - S sx; -} diff --git a/gcc/testsuite/g++.dg/concepts/generic-fn-err.C b/gcc/testsuite/g++.dg/concepts/generic-fn-err.C index 5a95565..816072d 100644 --- a/gcc/testsuite/g++.dg/concepts/generic-fn-err.C +++ b/gcc/testsuite/g++.dg/concepts/generic-fn-err.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template @@ -10,10 +10,10 @@ template template class X> concept bool Template() { return true; } -struct S { }; +void f1(Int) { } // { dg-error "does not constrain a type" } +void f2(Template) { } // { dg-error "does not constrain a type" } -void f1(Int) { } // { dg-error "" } -void f2(Template) { } // { dg-error "" } +struct S { }; struct S1 { void f1(auto x) { } diff --git a/gcc/testsuite/g++.dg/concepts/generic-fn.C b/gcc/testsuite/g++.dg/concepts/generic-fn.C index 3b10327..257608a 100644 --- a/gcc/testsuite/g++.dg/concepts/generic-fn.C +++ b/gcc/testsuite/g++.dg/concepts/generic-fn.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/iconv1.C b/gcc/testsuite/g++.dg/concepts/iconv1.C deleted file mode 100644 index e99254f..0000000 --- a/gcc/testsuite/g++.dg/concepts/iconv1.C +++ /dev/null @@ -1,21 +0,0 @@ -// PR c++/67240 -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -int foo(int x) -{ - return x; -} - -template -concept bool C1 = requires (T x) { - {foo(x)} -> int&; -}; - -template -concept bool C2 = requires (T x) { - {foo(x)} -> void; -}; - -static_assert( C1 ); // { dg-error "assert" } -static_assert( C2 ); // { dg-error "assert" } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C index 4b3f561..b137791 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C @@ -1,23 +1,33 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template - concept bool C() { return __is_class(T); } + concept bool C = __is_class(T); + +struct X { }; template - struct S1 { S1(double) requires C() { } }; + struct Base { + Base(double) requires C { } + }; -struct S2 : S1 { - using S1::S1; +struct Ok1 : Base { + using Base::Base; +}; + +struct Err1 : Base { + using Base::Base; }; template - struct S3 : S1 { - using S1::S1; + struct Generic : Base { + using Base::Base; }; -struct X { }; int main() { - S3 s(0.0); + Ok1 x1(0.0); + Err1 x2(0.0); // { dg-error "no matching" } + Generic x3(0.0); + Generic x4(0.0); // { dg-error "no matching" } } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C deleted file mode 100644 index cb81d13..0000000 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C +++ /dev/null @@ -1,19 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template - struct S1 { - S1(double) requires C() { } - }; - -template - struct S2 : S1 { // { dg-error "matching" } - using S1::S1; - }; - -int main() { - S2 s; // { dg-error "deleted function" } -} diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C index 6f04632..abfe96e 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template @@ -11,12 +11,13 @@ template }; template - struct S2 : S1 { - using S1::S1; + struct S2 : S1 { // { dg-error "no matching function" } + using S1::S1; // { dg-error "no matching function" } }; struct X { } x; int main() { - S2 s = x; + S2 s1(0); // { dg-error "use of deleted function" } + S2 s2; // { dg-error "use of deleted function" } } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C deleted file mode 100644 index 43df6e6..0000000 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C +++ /dev/null @@ -1,19 +0,0 @@ -// { dg-do compile { target c++17 } } -// { dg-options "-fconcepts" } - -template - concept bool C() { return __is_class(T); } - -template - struct S1 { - template S1(U x) { } - }; - -template - struct S2 : S1 { - using S1::S1; - }; - -int main() { - S2 s(0); // { dg-error "no matching function" } -} diff --git a/gcc/testsuite/g++.dg/concepts/intro1.C b/gcc/testsuite/g++.dg/concepts/intro1.C index 84fa6db..5f9bb7e 100644 --- a/gcc/testsuite/g++.dg/concepts/intro1.C +++ b/gcc/testsuite/g++.dg/concepts/intro1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/intro2.C b/gcc/testsuite/g++.dg/concepts/intro2.C index 9c7c173..206777d 100644 --- a/gcc/testsuite/g++.dg/concepts/intro2.C +++ b/gcc/testsuite/g++.dg/concepts/intro2.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/intro3.C b/gcc/testsuite/g++.dg/concepts/intro3.C index 5e93f31..f02f1be 100644 --- a/gcc/testsuite/g++.dg/concepts/intro3.C +++ b/gcc/testsuite/g++.dg/concepts/intro3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template diff --git a/gcc/testsuite/g++.dg/concepts/intro4.C b/gcc/testsuite/g++.dg/concepts/intro4.C index a7e5135..0b275e1 100644 --- a/gcc/testsuite/g++.dg/concepts/intro4.C +++ b/gcc/testsuite/g++.dg/concepts/intro4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template @@ -18,11 +18,11 @@ template template concept bool C5() { return __is_class(U); } -C1{...A, B} void f1() {}; // { dg-error "no matching|wrong number" } -C1{A} void f2() {} // { dg-error "cannot match pack|no matching concept" } -C2{A, B} void f3() {}; // { dg-error "cannot match pack|no matching concept" } -C3{...A} void f4() {}; // { dg-error "cannot match pack|no matching concept" } -C4{A} void f5() {}; // { dg-error "no matching concept" } +C1{...A, B} void f1() {}; // { dg-error "cannot deduce template parameters" } +C1{A} void f2() {} +C2{A, B} void f3() {}; +C3{...A} void f4() {}; // { dg-error "cannot be introduced" } +C4{A} void f5() {}; // { dg-error "cannot deduce template parameters" } C5{A, B} void f6() {}; int main() diff --git a/gcc/testsuite/g++.dg/concepts/intro5.C b/gcc/testsuite/g++.dg/concepts/intro5.C index e7cd7a4..bbfef7b 100644 --- a/gcc/testsuite/g++.dg/concepts/intro5.C +++ b/gcc/testsuite/g++.dg/concepts/intro5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template @@ -7,10 +7,5 @@ template return sizeof(U) == sizeof(int); } -C{A} void f1() {} +C{A} void f1() {} // { dg-error "all template parameters" } -int main() -{ - f1(); - return 0; -} diff --git a/gcc/testsuite/g++.dg/concepts/intro6.C b/gcc/testsuite/g++.dg/concepts/intro6.C index 57b325a..233c5bc 100644 --- a/gcc/testsuite/g++.dg/concepts/intro6.C +++ b/gcc/testsuite/g++.dg/concepts/intro6.C @@ -1,5 +1,5 @@ // PR c++/67003 -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } namespace X { diff --git a/gcc/testsuite/g++.dg/concepts/intro7.C b/gcc/testsuite/g++.dg/concepts/intro7.C index d5bdc7e..343fe7a 100644 --- a/gcc/testsuite/g++.dg/concepts/intro7.C +++ b/gcc/testsuite/g++.dg/concepts/intro7.C @@ -1,14 +1,14 @@ // PR c++/66985 -// { dg-do compile { target c++17 } } +// { dg-do compile { target c++17_only } } // { dg-options "-fconcepts" } template