[PATCH] Fix PR C++/38648 ICE with string literal
Wed Dec 31 02:03:00 GMT 2008
The problem here is that in some cases while defining a function
current_function_decl is NULL. We would ICE when checking to see if
the function is an compiler generated one or not for while seeing if
we could generate an assignment to an array.
This patch fixes the problem by checking to see if
current_function_decl is NULL.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
* typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
* g++.dg/expr/string-1.C: New test.
* g++.dg/expr/string-2.C: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Gcc-patches