Commit 8f66db3b by Richard Guenther Committed by Richard Biener

re PR middle-end/47281 (error: non-trivial conversion at assignment)

2011-01-14  Richard Guenther  <rguenther@suse.de>

	PR middle-end/47281
	Revert
	2011-01-11  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/46076
        * tree-ssa.c (useless_type_conversion_p): Conversions from
        unprototyped to empty argument list function types are useless.

	* gcc.dg/torture/pr47281.c: New testcase.
	* gcc.dg/tree-ssa/pr46076.c: XFAIL.

From-SVN: r168781
parent 6c0c92e6
2011-01-14 Richard Guenther <rguenther@suse.de> 2011-01-14 Richard Guenther <rguenther@suse.de>
PR middle-end/47281
Revert
2011-01-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46076
* tree-ssa.c (useless_type_conversion_p): Conversions from
unprototyped to empty argument list function types are useless.
2011-01-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47286 PR tree-optimization/47286
* tree-ssa-structalias.c (new_var_info): Register variables * tree-ssa-structalias.c (new_var_info): Register variables
are global. are global.
......
2011-01-14 Richard Guenther <rguenther@suse.de> 2011-01-14 Richard Guenther <rguenther@suse.de>
PR middle-end/47281
* gcc.dg/torture/pr47281.c: New testcase.
* gcc.dg/tree-ssa/pr46076.c: XFAIL.
2011-01-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47286 PR tree-optimization/47286
* gcc.dg/tree-ssa/pr47286.c: New testcase. * gcc.dg/tree-ssa/pr47286.c: New testcase.
......
/* { dg-do compile } */
struct T;
typedef void F(void);
F* aux(void (*x)())
{
return x;
}
void make_mess (int);
F*
get_funloc (void (*x)(int), F* (*y)())
{
return y(x);
}
F*
foo ()
{
return get_funloc (make_mess, aux);
}
/* { dg-do link } */ /* { dg-do link } */
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
extern void link_error (void); extern void link_error (void) { /* XFAIL */ }
typedef unsigned char(*Calculable)(void); typedef unsigned char(*Calculable)(void);
......
...@@ -1410,11 +1410,6 @@ useless_type_conversion_p (tree outer_type, tree inner_type) ...@@ -1410,11 +1410,6 @@ useless_type_conversion_p (tree outer_type, tree inner_type)
if (!prototype_p (outer_type)) if (!prototype_p (outer_type))
return true; return true;
/* A conversion between unprototyped and empty argument list is ok. */
if (TYPE_ARG_TYPES (outer_type) == void_list_node
&& !prototype_p (inner_type))
return true;
/* If the unqualified argument types are compatible the conversion /* If the unqualified argument types are compatible the conversion
is useless. */ is useless. */
if (TYPE_ARG_TYPES (outer_type) == TYPE_ARG_TYPES (inner_type)) if (TYPE_ARG_TYPES (outer_type) == TYPE_ARG_TYPES (inner_type))
......
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