Commit f298ca26 by Jason Merrill Committed by Jason Merrill

re PR c++/50361 ([C++0x] [4.7 Regression] ICE with std::initializer_list and nullptr)

	PR c++/50361
	* expr.c (count_type_elements): Handle NULLPTR_TYPE.

From-SVN: r178882
parent a61bd030
2011-09-15 Jason Merrill <jason@redhat.com>
PR c++/50361
* expr.c (count_type_elements): Handle NULLPTR_TYPE.
2011-09-15 Jan Hubicka <jh@suse.cz>
* ipa-inline-analysis.c (add_condition): Add conditions parameter;
......@@ -5296,6 +5296,7 @@ count_type_elements (const_tree type, bool for_ctor_p)
case POINTER_TYPE:
case OFFSET_TYPE:
case REFERENCE_TYPE:
case NULLPTR_TYPE:
return 1;
case ERROR_MARK:
......
2011-09-15 Jason Merrill <jason@redhat.com>
PR c++/50361
* g++.dg/cpp0x/nullptr23.C: New.
2011-09-15 Ira Rosen <ira.rosen@linaro.org>
* gcc.dg/vect/bb-slp-25.c: New.
......
// PR c++/50361
// { dg-options -std=c++0x }
#include <initializer_list>
struct Foo
{
Foo(std::initializer_list<Foo>) { };
template<class T> Foo(T t) { T u(t); };
private:
union Data
{
Data() : null(nullptr) {}
std::nullptr_t null;
} u_;
};
int main()
{
Foo f = { {} };
}
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