From 0d391d25ae4899249202ec9d68a8c576165d5ba2 Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@codesourcery.com>
Date: Wed, 31 Dec 2014 13:31:29 +0000
Subject: [PATCH] fix a GTY(())-related ICE in Objective-c++ (add a testcase to
 try an excercise this more).

gcc/objcp:
	* config-lang.in (gtfiles): Update list.

gcc/testsuite:
	* obj-c++.dg/standard-headers.mm New File.

From-SVN: r219124
---
 gcc/objcp/ChangeLog                          |  4 +
 gcc/objcp/config-lang.in                     |  2 +-
 gcc/testsuite/ChangeLog                      |  4 +
 gcc/testsuite/obj-c++.dg/standard-headers.mm | 89 ++++++++++++++++++++
 4 files changed, 98 insertions(+), 1 deletion(-)
 create mode 100644 gcc/testsuite/obj-c++.dg/standard-headers.mm

diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog
index 247113820840..89e49b350bf6 100644
--- a/gcc/objcp/ChangeLog
+++ b/gcc/objcp/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-31  Iain Sandoe  <iain@codesourcery.com>
+
+	* config-lang.in (gtfiles): Update list.
+
 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
 
 	* objcp-decl.h: Adjust.
diff --git a/gcc/objcp/config-lang.in b/gcc/objcp/config-lang.in
index bc0402264915..e623521a23ec 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/ChangeLog b/gcc/testsuite/ChangeLog
index f28736aeb8e4..6e7a99e01d11 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-31  Iain Sandoe  <iain@codesourcery.com>
+
+	* obj-c++.dg/standard-headers.mm New.
+
 2014-12-30  Jan Hubicka  <hubicka@ucw.cz>
 
 	* gcc.dg/vect/slp-9.c: Disable einline.
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 000000000000..68af5d114275
--- /dev/null
+++ b/gcc/testsuite/obj-c++.dg/standard-headers.mm
@@ -0,0 +1,89 @@
+// Contributed by Iain Sandoe <iain@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>
-- 
GitLab