[PATCH][PR67666] Handle single restrict pointer in struct in create_variable_info_for_1
Tom de Vries
Tom_deVries@mentor.com
Tue Sep 22 07:45:00 GMT 2015
Hi,
Consider this test-case:
struct ps
{
int *__restrict__ p;
};
void
f (struct ps &__restrict__ ps1)
{
*(ps1.p) = 1;
}
Atm, the restrict on p has no effect. Now, say we add a field to the struct:
struct ps
{
int *__restrict__ p;
int a;
};
Then the restrict on p does have the desired effect.
This patch fixes the handling of structs with a single field in alias
analysis.
Bootstrapped and reg-tested on x86_64.
OK for trunk?
Thanks,
- Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Handle-single-restrict-pointer-in-struct-in-create_v.patch
Type: text/x-patch
Size: 2584 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150922/4efe52d8/attachment.bin>
More information about the Gcc-patches
mailing list