Commit 70749e9c by Ian Lance Taylor

Don't crash on Sizeof of undefined type.

From-SVN: r167883
parent e495c136
...@@ -6722,7 +6722,7 @@ Builtin_call_expression::do_integer_constant_value(bool iota_is_constant, ...@@ -6722,7 +6722,7 @@ Builtin_call_expression::do_integer_constant_value(bool iota_is_constant,
if (arg == NULL) if (arg == NULL)
return false; return false;
Type* arg_type = arg->type(); Type* arg_type = arg->type();
if (arg_type->is_error_type()) if (arg_type->is_error_type() || arg_type->is_undefined())
return false; return false;
if (arg_type->is_abstract()) if (arg_type->is_abstract())
return false; return false;
......
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