Commit bd4a51ab by Richard Biener

re PR middle-end/37418 (error: type mismatch in address expression, verify_gimple failed)

2008-10-16  Joseph Myers  <joseph@codesourcery.com>
        Richard Guenther  <rguenther@suse.de>

	PR middle-end/37418
	* tree-ssa.c (useless_type_conversion_p_1): Do not treat
	volatile qualified functions or methods as relevant.

	* gcc.c-torture/compile/pr37418-1.c,
	gcc.c-torture/compile/pr37418-2.c,
	gcc.c-torture/compile/pr37418-3.c,
	gcc.c-torture/compile/pr37418-4.c: New tests.

From-SVN: r141165
parent 5b429886
2008-10-16 Richard Guenther <rguenther@suse.de>
PR middle-end/37418
* tree-ssa.c (useless_type_conversion_p_1): Do not treat
volatile qualified functions or methods as relevant.
2008-10-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/37525
......
2008-10-16 Joseph Myers <joseph@codesourcery.com>
PR middle-end/37418
* gcc.c-torture/compile/pr37418-1.c,
gcc.c-torture/compile/pr37418-2.c,
gcc.c-torture/compile/pr37418-3.c,
gcc.c-torture/compile/pr37418-4.c: New tests.
2008-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34670
......
typedef void ft(int);
void f(int args)__attribute__((noreturn));
void f2(ft *p __attribute__((noreturn)))
{
p = f;
}
typedef void ft(int);
volatile ft f;
void f2(ft *p __attribute__((noreturn)))
{
p = f;
}
typedef void ft(int);
void f(int args)__attribute__((const));
void f2(ft *p __attribute__((const)))
{
p = f;
}
typedef void ft(int);
const ft f;
void f2(ft *p __attribute__((const)))
{
p = f;
}
......@@ -1125,9 +1125,14 @@ useless_type_conversion_p_1 (tree outer_type, tree inner_type)
{
/* Don't lose casts between pointers to volatile and non-volatile
qualified types. Doing so would result in changing the semantics
of later accesses. */
if ((TYPE_VOLATILE (TREE_TYPE (outer_type))
!= TYPE_VOLATILE (TREE_TYPE (inner_type)))
of later accesses. For function types the volatile qualifier
is used to indicate noreturn functions. */
if (TREE_CODE (TREE_TYPE (outer_type)) != FUNCTION_TYPE
&& TREE_CODE (TREE_TYPE (outer_type)) != METHOD_TYPE
&& TREE_CODE (TREE_TYPE (inner_type)) != FUNCTION_TYPE
&& TREE_CODE (TREE_TYPE (inner_type)) != METHOD_TYPE
&& (TYPE_VOLATILE (TREE_TYPE (outer_type))
!= TYPE_VOLATILE (TREE_TYPE (inner_type)))
&& TYPE_VOLATILE (TREE_TYPE (outer_type)))
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