mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 12:21:09 +08:00
[multiple changes]
2009-08-12 Andrey Belevantsev <abel@ispras.ru> PR rtl-optimization/41033 * alias.c (nonoverlapping_component_refs_p): Punt if strict aliasing is disabled. 2009-08-12 Richard Guenther <rguenther@suse.de> PR rtl-optimization/41033 * gcc.dg/pr41033.c: New test. From-SVN: r150680
This commit is contained in:
parent
c0e18b82d0
commit
4c7af93945
@ -1,3 +1,9 @@
|
||||
2009-08-12 Andrey Belevantsev <abel@ispras.ru>
|
||||
|
||||
PR rtl-optimization/41033
|
||||
* alias.c (nonoverlapping_component_refs_p): Punt when strict
|
||||
aliasing is disabled.
|
||||
|
||||
2009-08-11 Adam Nemet <anemet@caviumnetworks.com>
|
||||
|
||||
* config/mips/predicates.md (qi_mask_operand, hi_mask_operand,
|
||||
|
@ -1980,6 +1980,9 @@ nonoverlapping_component_refs_p (const_tree x, const_tree y)
|
||||
{
|
||||
const_tree fieldx, fieldy, typex, typey, orig_y;
|
||||
|
||||
if (!flag_strict_aliasing)
|
||||
return false;
|
||||
|
||||
do
|
||||
{
|
||||
/* The comparison has to be done at a common type, since we don't
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-08-12 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR rtl-optimization/41033
|
||||
* gcc.dg/pr41033.c: New test.
|
||||
|
||||
2009-08-11 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/41022
|
||||
|
24
gcc/testsuite/gcc.dg/pr41033.c
Normal file
24
gcc/testsuite/gcc.dg/pr41033.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* { dg-options "-O1 -fno-strict-aliasing" } */
|
||||
/* PR rtl-optimization/41033 */
|
||||
|
||||
struct X {
|
||||
int i;
|
||||
int j;
|
||||
};
|
||||
|
||||
int foo(struct X *p, struct X *q)
|
||||
{
|
||||
p->j = 1;
|
||||
q->i = 0;
|
||||
return p->j;
|
||||
}
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
int main()
|
||||
{
|
||||
struct X x;
|
||||
if (foo (&x, (struct X *)&x.j) != 0)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user