[PATCH] Fix up g++.dg/cpp*/feat-cxx*.C tests (PR testsuite/90772, take 2, was: [PATCH] Avoid unnecessary inclusion of <stdexcept> header)
Jakub Jelinek
jakub@redhat.com
Thu Jun 6 20:35:00 GMT 2019
On Thu, Jun 06, 2019 at 10:19:52PM +0200, Jakub Jelinek wrote:
> Not only those, but apparently also ::size_t or std::plus; this broke
> FAIL: g++.dg/cpp1y/feat-cxx14.C (test for excess errors)
> FAIL: g++.dg/cpp1z/feat-cxx1z.C -std=gnu++17 (test for excess errors)
> FAIL: g++.dg/cpp1z/pr85569.C -std=c++17 (test for excess errors)
> FAIL: g++.dg/cpp2a/feat-cxx2a.C (test for excess errors)
>
> Fixed thusly, tested on x86_64-linux with check-c++-all, ok for trunk?
Bill has mentioned two other tests that are failing for similar reasons, so
here is an updated patch to cover those two too. Tested again on
x86_64-linux with check-c++-all, ok for trunk?
2019-06-06 Jakub Jelinek <jakub@redhat.com>
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 <functional>.
* g++.dg/tree-ssa/pr80293.C: Include <cstdint>.
* g++.dg/tree-ssa/pr69336.C: Include <stdexcept>.
--- gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C.jj 2017-09-12 09:35:46.955698280 +0200
+++ gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C 2019-06-06 22:08:59.853528085 +0200
@@ -303,11 +303,11 @@
#if __has_include(<array>)
# define STD_ARRAY 1
# include <array>
- template<typename _Tp, size_t _Num>
+ template<typename _Tp, std::size_t _Num>
using array = std::array<_Tp, _Num>;
#elif __has_include(<tr1/array>)
# define TR1_ARRAY 1
# include <tr1/array>
- template<typename _Tp, size_t _Num>
+ template<typename _Tp, std::size_t _Num>
typedef std::tr1::array<_Tp, _Num> array;
#endif
--- gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C.jj 2019-01-16 09:35:07.360276820 +0100
+++ gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C 2019-06-06 22:09:21.571184644 +0200
@@ -292,12 +292,12 @@
#if __has_include(<array>)
# define STD_ARRAY 1
# include <array>
- template<typename _Tp, size_t _Num>
+ template<typename _Tp, std::size_t _Num>
using array = std::array<_Tp, _Num>;
#elif __has_include(<tr1/array>)
# define TR1_ARRAY 1
# include <tr1/array>
- template<typename _Tp, size_t _Num>
+ template<typename _Tp, std::size_t _Num>
typedef std::tr1::array<_Tp, _Num> array;
#endif
--- gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C.jj 2019-01-16 09:35:07.800269539 +0100
+++ gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C 2019-06-06 22:09:37.432934738 +0200
@@ -291,12 +291,12 @@
#if __has_include(<array>)
# define STD_ARRAY 1
# include <array>
- template<typename _Tp, size_t _Num>
+ template<typename _Tp, std::size_t _Num>
using array = std::array<_Tp, _Num>;
#elif __has_include(<tr1/array>)
# define TR1_ARRAY 1
# include <tr1/array>
- template<typename _Tp, size_t _Num>
+ template<typename _Tp, std::size_t _Num>
typedef std::tr1::array<_Tp, _Num> array;
#endif
--- gcc/testsuite/g++.dg/cpp1z/pr85569.C.jj 2018-12-05 09:16:42.870128432 +0100
+++ gcc/testsuite/g++.dg/cpp1z/pr85569.C 2019-06-06 22:15:46.462120520 +0200
@@ -2,6 +2,7 @@
#include <utility>
#include <tuple>
+#include <functional>
#define LIFT_FWD(x) std::forward<decltype(x)>(x)
--- gcc/testsuite/g++.dg/tree-ssa/pr80293.C.jj 2017-04-24 19:28:04.179949309 +0200
+++ gcc/testsuite/g++.dg/tree-ssa/pr80293.C 2019-06-06 22:31:53.851868545 +0200
@@ -2,6 +2,7 @@
// { dg-options "-O2 -std=gnu++11 -fdump-tree-optimized" } */
#include <array>
+#include <cstdint>
// Return a copy of the underlying memory of an arbitrary value.
template <
--- gcc/testsuite/g++.dg/tree-ssa/pr69336.C.jj 2016-01-25 22:33:17.211951114 +0100
+++ gcc/testsuite/g++.dg/tree-ssa/pr69336.C 2019-06-06 22:30:33.808132272 +0200
@@ -3,6 +3,7 @@
#include <array>
#include <utility>
+#include <stdexcept>
template<class Key, class T, size_t N> struct static_map
Jakub
More information about the Gcc-patches
mailing list