diff options
author | Richard Guenther <rguenther@suse.de> | 2009-08-26 09:02:01 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-08-26 09:02:01 +0000 |
commit | bacd3fb68cce3b4b7c8c8bf5acd234ef080219c0 (patch) | |
tree | 35bfe979726778b00f3f6636a9666c41bd299094 /gcc/testsuite/gcc.dg/tree-ssa/restrict-4.c | |
parent | 7b3d1847e637cae5e6ea174718df19ceaa5ae290 (diff) | |
download | gcc-bacd3fb68cce3b4b7c8c8bf5acd234ef080219c0.zip gcc-bacd3fb68cce3b4b7c8c8bf5acd234ef080219c0.tar.gz gcc-bacd3fb68cce3b4b7c8c8bf5acd234ef080219c0.tar.bz2 |
tree-ssa-structalias.c (create_variable_info_for): Remove strange whole-program condition, prepare to be called for non-globals.
2009-08-26 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (create_variable_info_for): Remove
strange whole-program condition, prepare to be called for non-globals.
(intra_create_variable_infos): For restrict qualified DECL_BY_REFERENCE
params build a representative with known type and track its fields.
* gcc.dg/tree-ssa/restrict-4.c: New testcase.
From-SVN: r151117
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/restrict-4.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/restrict-4.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/restrict-4.c b/gcc/testsuite/gcc.dg/tree-ssa/restrict-4.c new file mode 100644 index 0000000..3a36def --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/restrict-4.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-lim1-details" } */ + +struct Foo +{ + int n; + int * __restrict__ p; +}; +void bar(struct Foo f, int * __restrict__ q) +{ + int i; + for (i = 0; i < f.n; ++i) + { + *q += f.p[i]; + } +} + +/* { dg-final { scan-tree-dump "Executing store motion" "lim1" } } */ +/* { dg-final { cleanup-tree-dump "lim1" } } */ |