Commit fdbff37f by Paolo Carlini

re PR c++/55801 (ICE with thread_local after ill-formed declaration)

/cp
2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/55801
	* decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
	of the argument is true.

/testsuite
2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/55801
	* g++.dg/tls/thread_local-ice.C: New.

From-SVN: r195050
parent f0d54148
2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55801
* decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
of the argument is true.
2013-01-08 Joel Brobecker <brobecker@adacore.com> 2013-01-08 Joel Brobecker <brobecker@adacore.com>
* parser.c (cp_parser_initializer_list): Move declaration * parser.c (cp_parser_initializer_list): Move declaration
......
/* Process declarations and variables for C++ compiler. /* Process declarations and variables for C++ compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007-2013
2011, 2012 Free Software Foundation, Inc. Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com) Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GCC. This file is part of GCC.
...@@ -2807,7 +2807,8 @@ var_defined_without_dynamic_init (tree var) ...@@ -2807,7 +2807,8 @@ var_defined_without_dynamic_init (tree var)
static bool static bool
var_needs_tls_wrapper (tree var) var_needs_tls_wrapper (tree var)
{ {
return (DECL_THREAD_LOCAL_P (var) return (!error_operand_p (var)
&& DECL_THREAD_LOCAL_P (var)
&& !DECL_GNU_TLS_P (var) && !DECL_GNU_TLS_P (var)
&& !DECL_FUNCTION_SCOPE_P (var) && !DECL_FUNCTION_SCOPE_P (var)
&& !var_defined_without_dynamic_init (var)); && !var_defined_without_dynamic_init (var));
......
2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55801
* g++.dg/tls/thread_local-ice.C: New.
2013-01-09 Andreas Schwab <schwab@suse.de> 2013-01-09 Andreas Schwab <schwab@suse.de>
* gcc.dg/guality/pr54693.c: Null-terminate arr. * gcc.dg/guality/pr54693.c: Null-terminate arr.
......
// PR c++/55801
// { dg-options "-std=c++11" }
// { dg-require-effective-target tls }
class C;
thread_local C O, O2 = O; // { dg-error "incomplete" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment