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
This commit is contained in:
parent
d38e4e3fc3
commit
afc3f22f90
@ -1,3 +1,9 @@
|
||||
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>
|
||||
|
||||
PR target/47997
|
||||
|
@ -9216,7 +9216,8 @@ get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue,
|
||||
*residue = 0;
|
||||
|
||||
code = TREE_CODE (expr);
|
||||
if (code == ADDR_EXPR)
|
||||
if (code == ADDR_EXPR
|
||||
&& TREE_CODE (TREE_OPERAND (expr, 0)) != FUNCTION_DECL)
|
||||
{
|
||||
unsigned int bitalign;
|
||||
bitalign = get_object_alignment_1 (TREE_OPERAND (expr, 0), residue);
|
||||
|
@ -1,3 +1,9 @@
|
||||
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>
|
||||
|
||||
PR testsuite/49529
|
||||
|
13
gcc/testsuite/gcc.dg/torture/pr49169.c
Normal file
13
gcc/testsuite/gcc.dg/torture/pr49169.c
Normal file
@ -0,0 +1,13 @@
|
||||
#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" } } */
|
Loading…
Reference in New Issue
Block a user