Hi, Whilst working on another patch for ObjC++, I found that trunk ICEs on #include <string> (on Darwin always, on Linux if you tickle ggc).
After the usual fun with tracking down a GTY(()) issue, it turned out to be triggered by 216263 (changes in the gtfiles for cp that were not reflected in objcp). However, it appears that the list was a bit out of sync in general. I've added a test-case that exercises the c++ headers to try and assist with catching this kind of issue. Probably almost an "obvious" patch, but I'd be interested in any ideas to make this sync more automatic (it's an easy omission to make). OK for trunk? Iain gcc/objcp: * config-lang.in (gtfiles): Update list. gcc/testsuite: * obj-c++.dg/standard-headers.mm New File.
From fda7470f52b0bd9ff66dd808f88429d9ab3fc9ea Mon Sep 17 00:00:00 2001 From: Iain Sandoe <i...@codesourcery.com> Date: Mon, 22 Dec 2014 10:48:48 +0000 Subject: [PATCH] Update gtfiles, add a testcase to catch obvious fails caused by future changes --- gcc/objcp/config-lang.in | 2 +- gcc/testsuite/obj-c++.dg/standard-headers.mm | 89 ++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/obj-c++.dg/standard-headers.mm diff --git a/gcc/objcp/config-lang.in b/gcc/objcp/config-lang.in index bc04022..e623521 100644 --- a/gcc/objcp/config-lang.in +++ b/gcc/objcp/config-lang.in @@ -45,6 +45,6 @@ subdir_requires="objc cp" # This list is separated in two parts: the first one is identical to # the C++ one, the second one contains our ObjC++ additions. -gtfiles="\$(srcdir)/cp/rtti.c \$(srcdir)/cp/mangle.c \$(srcdir)/cp/name-lookup.h \$(srcdir)/cp/name-lookup.c \$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.h \$(srcdir)/cp/call.c \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/semantics.c \$(srcdir)/cp/tree.c \$(srcdir)/cp/parser.h \$(srcdir)/cp/parser.c \$(srcdir)/cp/method.c \$(srcdir)/cp/typeck2.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-objc.h \$(srcdir)/c-family/c-lex.c \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c \$(srcdir)/cp/class.c \$(srcdir)/cp/cp-objcp-common.c \ +gtfiles="\$(srcdir)/cp/rtti.c \$(srcdir)/cp/mangle.c \$(srcdir)/cp/name-lookup.h \$(srcdir)/cp/name-lookup.c \$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.h \$(srcdir)/cp/call.c \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/semantics.c \$(srcdir)/cp/tree.c \$(srcdir)/cp/parser.h \$(srcdir)/cp/parser.c \$(srcdir)/cp/method.c \$(srcdir)/cp/typeck2.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-objc.h \$(srcdir)/c-family/c-lex.c \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c \$(srcdir)/cp/class.c \$(srcdir)/cp/cp-objcp-common.c \$(srcdir)/cp/except.c \$(srcdir)/cp/vtable-class-hierarchy.c \$(srcdir)/cp/constexpr.c \ \$(srcdir)/objc/objc-map.h \$(srcdir)/objc/objc-act.h \$(srcdir)/objc/objc-act.c \$(srcdir)/objc/objc-runtime-shared-support.c \$(srcdir)/objc/objc-gnu-runtime-abi-01.c \$(srcdir)/objc/objc-next-runtime-abi-01.c \$(srcdir)/objc/objc-next-runtime-abi-02.c \$(srcdir)/c-family/c-cppbuiltin.c" diff --git a/gcc/testsuite/obj-c++.dg/standard-headers.mm b/gcc/testsuite/obj-c++.dg/standard-headers.mm new file mode 100644 index 0000000..68af5d1 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/standard-headers.mm @@ -0,0 +1,89 @@ +// Contributed by Iain Sandoe <i...@codesourcery.com>, December 2014. */ +// { dg-do compile } +// { dg-options "-std=c++11 -Wno-deprecated" } + +// Try to catch any problems in standard headers. + +// n4296 Section 17.6.1.1 Table 14 + +#include <algorithm> +#include <array> +#include <atomic> +#include <bitset> +#include <chrono> +// NOT present at 5.0.0 #include <codecvt> +#include <complex> +#include <condition_variable> +#include <deque> +#include <exception> +#include <forward_list> +#include <fstream> +#include <functional> +// FIXME: CURRENTLY FAILS #include <future> +#include <initializer_list> +#include <iomanip> +#include <ios> +#include <iosfwd> +#include <iostream> +#include <istream> +#include <iterator> +#include <limits> +#include <list> +#include <regex> +#include <locale> +#include <scoped_allocator> +#include <map> +#include <set> +#include <memory> +#include <sstream> +#include <mutex> +#include <stack> +#include <new> +#include <stdexcept> +#include <numeric> +#include <streambuf> +#include <ostream> +#include <string> +#include <queue> +// LEGACY #include <strstream> +#include <system_error> +#include <ratio> +#include <thread> +#include <tuple> +#include <type_traits> +#include <typeindex> +#include <typeinfo> +#include <unordered_map> +#include <unordered_set> +#include <utility> +#include <valarray> +#include <vector> + +// n4296 Section 17.6.1.1 Table 15 + +#include <cassert> +#include <ccomplex> +#include <cctype> +#include <cerrno> +#include <cfenv> +#include <cfloat> +#include <cinttypes> +#include <ciso646> +#include <climits> +#include <clocale> +#include <cmath> +#include <csetjmp> +#include <csignal> +#include <cstdalign> +#include <cstdarg> +#include <cstdbool> +#include <cstddef> +#include <cstdint> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <ctgmath> +#include <ctime> +// NOT present everywhere #include <cuchar> +#include <cwchar> +#include <cwctype> -- 1.8.4.2