re PR c/39712 (type mismatch in address expression)

2009-04-11  Richard Guenther  <rguenther@suse.de>

	PR c/39712
	* c-gimplify.c (c_gimplify_expr): Adjust check for mismatched
	address expressions.

	* gcc.dg/pr39712.c: New testcase.

From-SVN: r145950
This commit is contained in:
Richard Guenther 2009-04-11 07:32:52 +00:00 committed by Richard Biener
parent 4d7221309b
commit fa78c0c18b
4 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2009-04-11 Richard Guenther <rguenther@suse.de>
PR c/39712
* c-gimplify.c (c_gimplify_expr): Adjust check for mismatched
address expressions.
2009-04-11 Dave Korn <dave.korn.cygwin@gmail.com>
* config/i386/cygwin-stdint.h (INT_LEAST32_TYPE): Update to

View File

@ -201,7 +201,8 @@ c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED,
ADDR_EXPR instead and wrap a conversion around it. */
if (code == ADDR_EXPR
&& TREE_CODE (TREE_TYPE (TREE_OPERAND (*expr_p, 0))) == ARRAY_TYPE
&& TREE_CODE (TREE_TYPE (TREE_TYPE (*expr_p))) != ARRAY_TYPE)
&& !lang_hooks.types_compatible_p (TREE_TYPE (TREE_TYPE (*expr_p)),
TREE_TYPE (TREE_OPERAND (*expr_p, 0))))
{
tree type = TREE_TYPE (*expr_p);
TREE_TYPE (*expr_p)

View File

@ -1,3 +1,8 @@
2009-04-10 Richard Guenther <rguenther@suse.de>
PR c/39712
* gcc.dg/pr39712.c: New testcase.
2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
PR c++/28301

View File

@ -0,0 +1,9 @@
/* { dg-do compile } */
int is_table[2][16];
int is_table_lsf[2][2][16];
void compute_stereo()
{
int (*is_tab)[16];
is_tab = is_table;
}