commit 2295ad5898aabc652b247446be5769e4a43184f1 Author: Jakub Jelinek Date: Wed Apr 26 10:19:06 2023 +0200 Bump BASE-VER 2023-04-26 Jakub Jelinek * BASE-VER: Set to 13.1.1. diff --git a/gcc/BASE-VER b/gcc/BASE-VER index e6ba351366d..21b80e995f7 100644 --- a/gcc/BASE-VER +++ b/gcc/BASE-VER @@ -1 +1 @@ -13.1.0 +13.1.1 commit f8646b8dcb18721e776c39117f62aee7ee571f21 Author: Jakub Jelinek Date: Thu Apr 20 19:26:17 2023 +0200 c: Avoid -Wenum-int-mismatch warning for redeclaration of builtin acc_on_device [PR107041] The new -Wenum-int-mismatch warning triggers with -Wsystem-headers in , for obvious reasons the builtin acc_on_device uses int type argument rather than enum which isn't defined yet when the builtin is created, while the OpenACC spec requires it to have acc_device_t enum argument. The header makes sure it has int underlying type by using negative and __INT_MAX__ enumerators. I've tried to make the builtin typegeneric or just varargs, but that changes behavior e.g. when one calls it with some C++ class which has cast operator to acc_device_t, so the following patch instead disables the warning for this builtin. 2023-04-20 Jakub Jelinek PR c/107041 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch warning on acc_on_device declaration. * gcc.dg/goacc/pr107041.c: New test. (cherry picked from commit 3d7ab53d6c59499624aa41c8dea0664976820b3b) diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc index e537d33f398..1b53f2d0785 100644 --- a/gcc/c/c-decl.cc +++ b/gcc/c/c-decl.cc @@ -2219,7 +2219,14 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl, } /* Warn about enum/integer type mismatches. They are compatible types (C2X 6.7.2.2/5), but may pose portability problems. */ - else if (enum_and_int_p && TREE_CODE (newdecl) != TYPE_DECL) + else if (enum_and_int_p + && TREE_CODE (newdecl) != TYPE_DECL + /* Don't warn about about acc_on_device built-in redeclaration, + the built-in is declared with int rather than enum because + the enum isn't intrinsic. */ + && !(TREE_CODE (olddecl) == FUNCTION_DECL + && fndecl_built_in_p (olddecl, BUILT_IN_ACC_ON_DEVICE) + && !C_DECL_DECLARED_BUILTIN (olddecl))) warned = warning_at (DECL_SOURCE_LOCATION (newdecl), OPT_Wenum_int_mismatch, "conflicting types for %q+D due to enum/integer " diff --git a/gcc/testsuite/gcc.dg/goacc/pr107041.c b/gcc/testsuite/gcc.dg/goacc/pr107041.c new file mode 100644 index 00000000000..ed7fb5a5b5d --- /dev/null +++ b/gcc/testsuite/gcc.dg/goacc/pr107041.c @@ -0,0 +1,23 @@ +/* PR c/107041 */ +/* { dg-do compile } */ +/* { dg-additional-options "-Wenum-int-mismatch" } */ + +typedef enum acc_device_t { + acc_device_current = -1, + acc_device_none = 0, + acc_device_default = 1, + acc_device_host = 2, + acc_device_not_host = 4, + acc_device_nvidia = 5, + acc_device_radeon = 8, + _ACC_highest = __INT_MAX__ +} acc_device_t; + +int acc_on_device (acc_device_t); /* { dg-bogus "conflicting types for 'acc_on_device' due to enum/integer mismatch; have 'int\\\(acc_device_t\\\)'" } */ +int acc_on_device (acc_device_t); + +int +foo (void) +{ + return acc_on_device (acc_device_host); +} commit 4aeefba6cd657010a395dd187f9136cd152aac95 Author: Jakub Jelinek Date: Tue Apr 25 14:38:01 2023 +0200 testsuite: Fix up ext-floating15.C tests on powerpc64-linux [PR109278] I've noticed this test FAILs on powerpc64-linux, with FAIL: g++.dg/cpp23/ext-floating15.C -std=gnu++98 (test for excess errors) Excess errors: /home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:5: error: '_Float128' is not supported on this target /home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:5: error: '_Float128' is not supported on this target /home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:1: error: variable or field 'bar' declared void /home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:5: error: '_Float128' is not supported on this target /home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:6: error: expected primary-expression before '_Float128' and similarly other std versions. powerpc64-linux is float128 target, but needs to add some options for it. Fixed by adding them. 2023-04-25 Jakub Jelinek PR c++/109278 * g++.dg/cpp23/ext-floating15.C: Add dg-add-options float128. (cherry picked from commit 784e03f378bb2c330b96459928d0472d38748970) diff --git a/gcc/testsuite/g++.dg/cpp23/ext-floating15.C b/gcc/testsuite/g++.dg/cpp23/ext-floating15.C index 316dd5abacd..6d7dc6ad682 100644 --- a/gcc/testsuite/g++.dg/cpp23/ext-floating15.C +++ b/gcc/testsuite/g++.dg/cpp23/ext-floating15.C @@ -1,6 +1,7 @@ // PR c++/109278 // { dg-do compile { target float128 } } // { dg-options "-w" } +// { dg-add-options float128 } void foo (long double); // { dg-bogus "initializing argument 1 of" } commit 60e0164a371de9129ec0bfdc49a93381cf79c965 Author: Jakub Jelinek Date: Tue Apr 25 16:00:48 2023 +0200 testsuite: Fix up ext-floating2.C on powerpc64-linux Another testcase that is failing on powerpc64-linux. The test expects a diagnostics when float64 && float128 or in another spot when float32 && float128. Now, float128 effective target is satisfied on powerpc64-linux, despite __CPP_FLOAT128_T__ not being defined, because one needs to add some extra options for it. I think 32-bit arm has similar case for float16. 2023-04-25 Jakub Jelinek * g++.dg/cpp23/ext-floating2.C: Add dg-add-options for float16, float32, float64 and float128. (cherry picked from commit 78aaaf862e70cea45f3a2be7cb855cfe1a4ead21) diff --git a/gcc/testsuite/g++.dg/cpp23/ext-floating2.C b/gcc/testsuite/g++.dg/cpp23/ext-floating2.C index 41e9a54ada5..6ae5c6cd247 100644 --- a/gcc/testsuite/g++.dg/cpp23/ext-floating2.C +++ b/gcc/testsuite/g++.dg/cpp23/ext-floating2.C @@ -1,6 +1,10 @@ // P1467R9 - Extended floating-point types and standard names. // { dg-do compile { target c++23 } } // { dg-options "" } +// { dg-add-options float16 } +// { dg-add-options float32 } +// { dg-add-options float64 } +// { dg-add-options float128 } #include "ext-floating.h" commit d2e0b6a3c4965635d8ba8e217ef2272e7be66a5c Author: Eric Botcazou Date: Tue Apr 25 10:46:16 2023 +0200 Remove obsolete configure code in gnattools It was recently pointed out that we generate symbolic links to ghost files when building the GNAT tools, as the mlib-tgt-specific-*.adb files are gone. gnattools/ * configure.ac (TOOLS_TARGET_PAIRS): Remove obsolete settings. (EXTRA_GNATTOOLS): Likewise. * configure: Regenerate. diff --git a/gnattools/configure b/gnattools/configure index 423527da1b6..6cdfbe67af2 100755 --- a/gnattools/configure +++ b/gnattools/configure @@ -2052,74 +2052,38 @@ fi # Target-specific stuff (defaults) TOOLS_TARGET_PAIRS= - EXTRA_GNATTOOLS= - # Per-target case statement # ------------------------- case "${target}" in *-*-aix*) - TOOLS_TARGET_PAIRS="\ - mlib-tgt-specific.adb Date: Fri Apr 21 12:57:17 2023 +0200 tree-optimization/109573 - avoid ICEing on unexpected live def The following relaxes the assert in vectorizable_live_operation where we catch currently unhandled cases to also allow an intermediate copy as it happens here but also relax the assert to checking only. PR tree-optimization/109573 * tree-vect-loop.cc (vectorizable_live_operation): Allow unhandled SSA copy as well. Demote assert to checking only. * g++.dg/vect/pr109573.cc: New testcase. (cherry picked from commit cddfe6bc40b3dc0806e260bbfb4cac82d609a258) diff --git a/gcc/testsuite/g++.dg/vect/pr109573.cc b/gcc/testsuite/g++.dg/vect/pr109573.cc new file mode 100644 index 00000000000..d96f86f9579 --- /dev/null +++ b/gcc/testsuite/g++.dg/vect/pr109573.cc @@ -0,0 +1,91 @@ +// { dg-do compile } +// { dg-require-effective-target c++20 } + +void *operator new(__SIZE_TYPE__, void *__p) { return __p; } +template struct _Head_base { + _Head _M_head_impl; +}; +template struct _Tuple_impl; +template +struct _Tuple_impl<_Idx, _Head, _Tail...> : _Tuple_impl<_Idx + 1, _Tail...>, + _Head_base<_Head> { + template + _Tuple_impl(_UHead __head, _UTail... __tail) + : _Tuple_impl<_Idx + 1, _Tail...>(__tail...), _Head_base<_Head>(__head) {} +}; +template struct _Tuple_impl<_Idx, _Head> { + template _Tuple_impl(_UHead); +}; +template struct tuple : _Tuple_impl<0, _Elements...> { + template + tuple(_UElements... __elements) + : _Tuple_impl<0, _Elements...>(__elements...) {} +}; +unsigned long position_; +struct Zone { + template T *New(Args... args) { + return new (reinterpret_cast(position_)) T(args...); + } +}; +struct Label { + int pos_; + int near_link_pos_; +}; +enum Condition { below_equal }; +void bind(Label *); +Zone *zone(); +unsigned long deopt_info_address(); +int MakeDeferredCode___trans_tmp_2, MakeDeferredCode___trans_tmp_3, + Prologue___trans_tmp_6, MakeDeferredCode___trans_tmp_1; +struct MaglevAssembler { + template + void MakeDeferredCode(Function &&, Args &&...); + template + void JumpToDeferredIf(Condition, Function, Args... args) { + MakeDeferredCode(Function(), args...); + } + void Prologue(); +}; +struct ZoneLabelRef { + ZoneLabelRef(Zone *zone) : label_(zone->New