Commit daaf6209 by Jan Hubicka Committed by Jan Hubicka

re PR c++/62127 (ICE with VLA in constructor)


	PR tree-optimization/62127
	* g++.dg/torture/pr62127.C: New testcase.
	* tree.c (remap_type_1): When remapping array, remap
	also its type.

From-SVN: r216150
parent 01d6452f
2014-10-13 Jan Hubicka <hubicka@ucw.cz>
PR tree-optimization/62127
* tree.c (remap_type_1): When remapping array, remap
also its type.
2014-10-13 Christophe Lyon <christophe.lyon@linaro.org> 2014-10-13 Christophe Lyon <christophe.lyon@linaro.org>
* Makefile.in: (check-%): Update comment, as RUNTESTFLAGS no * Makefile.in: (check-%): Update comment, as RUNTESTFLAGS no
2014-10-13 Jan Hubicka <hubicka@ucw.cz>
PR tree-optimization/62127
* g++.dg/torture/pr62127.C: New testcase.
2014-09-19 Marat Zakirov <m.zakirov@samsung.com> 2014-09-19 Marat Zakirov <m.zakirov@samsung.com>
* c-c++-common/asan/bitfield-5.c: New test. * c-c++-common/asan/bitfield-5.c: New test.
......
// { dg-do compile }
struct A
{
A(int);
};
A::A(int i)
{
int x[1][i];
x[0][0] = 0;
}
...@@ -496,6 +496,8 @@ remap_type_1 (tree type, copy_body_data *id) ...@@ -496,6 +496,8 @@ remap_type_1 (tree type, copy_body_data *id)
if (TYPE_MAIN_VARIANT (new_tree) != new_tree if (TYPE_MAIN_VARIANT (new_tree) != new_tree
&& TREE_TYPE (type) == TREE_TYPE (TYPE_MAIN_VARIANT (type))) && TREE_TYPE (type) == TREE_TYPE (TYPE_MAIN_VARIANT (type)))
TREE_TYPE (new_tree) = TREE_TYPE (TYPE_MAIN_VARIANT (new_tree)); TREE_TYPE (new_tree) = TREE_TYPE (TYPE_MAIN_VARIANT (new_tree));
else
TREE_TYPE (new_tree) = remap_type (TREE_TYPE (new_tree), id);
if (TYPE_MAIN_VARIANT (new_tree) != new_tree) if (TYPE_MAIN_VARIANT (new_tree) != new_tree)
{ {
......
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