+2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58671
+ * decl2.c (var_defined_without_dynamic_init): Handle gracefully
+ self-initialization.
+
2015-01-13 Jason Merrill <jason@redhat.com>
PR c++/64356
counts as dynamic initialization. */
if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (var)))
return false;
- /* If it's in this TU, its initializer has been processed. */
- gcc_assert (DECL_INITIALIZED_P (var));
+ /* If it's in this TU, its initializer has been processed, unless
+ it's a case of self-initialization, then DECL_INITIALIZED_P is
+ false while the initializer is handled by finish_id_expression. */
+ if (!DECL_INITIALIZED_P (var))
+ return false;
/* If it has no initializer or a constant one, it's not dynamic. */
return (!DECL_NONTRIVIALLY_INITIALIZED_P (var)
|| DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (var));
+2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58671
+ * g++.dg/tls/thread_local-ice3.C: New.
+
2015-01-14 H.J. Lu <hongjiu.lu@intel.com>
* gcc.target/i386/fentry-override.c: Properly place {} in target
* gcc.dg/atomic-invalid.c: Check for invalid memory model
warnings instead of errors.
-
2015-01-14 Ilya Verbin <ilya.verbin@intel.com>
* lib/target-supports.exp (check_effective_target_lto): Check for -flto
PR lto/64415
* gcc.dg/lto/pr64415_0.c: New testcase.
- * gcc.dg/lto/pr64415_1.c: Likewise.
+ * gcc.dg/lto/pr64415_1.c: Likewise.
2015-01-14 Martin Liska <mliska@suse.cz>
--- /dev/null
+// PR c++/58671
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target tls }
+
+thread_local int i = i;