Commit afc3f22f by Richard Sandiford

re PR rtl-optimization/49169 (ARM: optimisations strip the Thumb/ARM mode bit…

re PR rtl-optimization/49169 (ARM: optimisations strip the Thumb/ARM mode bit off function pointers)

gcc/
2011-07-24  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/49169
	* fold-const.c (get_pointer_modulus_and_residue): Don't rely on
	the alignment of function decls.

gcc/testsuite/
2011-07-24  Michael Hope  <michael.hope@linaro.org>
	    Richard Sandiford  <richard.sandiford@linaro.org>

	PR tree-optimization/49169
	* gcc.dg/torture/pr49169.c: New test.

From-SVN: r175427
parent d38e4e3f
2011-06-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49169
* fold-const.c (get_pointer_modulus_and_residue): Don't rely on
the alignment of function decls.
2011-06-26 Iain Sandoe <iains@gcc.gnu.org> 2011-06-26 Iain Sandoe <iains@gcc.gnu.org>
PR target/47997 PR target/47997
......
...@@ -9216,7 +9216,8 @@ get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue, ...@@ -9216,7 +9216,8 @@ get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue,
*residue = 0; *residue = 0;
code = TREE_CODE (expr); code = TREE_CODE (expr);
if (code == ADDR_EXPR) if (code == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (expr, 0)) != FUNCTION_DECL)
{ {
unsigned int bitalign; unsigned int bitalign;
bitalign = get_object_alignment_1 (TREE_OPERAND (expr, 0), residue); bitalign = get_object_alignment_1 (TREE_OPERAND (expr, 0), residue);
......
2011-06-27 Michael Hope <michael.hope@linaro.org>
Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/49169
* gcc.dg/torture/pr49169.c: New test.
2011-06-26 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> 2011-06-26 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR testsuite/49529 PR testsuite/49529
......
#include <stdlib.h>
#include <stdint.h>
int
main (void)
{
void *p = main;
if ((intptr_t) p & 1)
abort ();
return 0;
}
/* { dg-final { scan-assembler "abort" } } */
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