diff options
author | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-06-15 10:09:11 +0200 |
---|---|---|
committer | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-06-16 08:58:12 +0200 |
commit | def081f8c614ebda18a7bc8348f84292f52533ed (patch) | |
tree | 57e19cc32d5324af7a8267ff57c646759389cfc7 /gcc/testsuite/gcc.dg | |
parent | f2fa8fd1cc3bdfb6d2b17ee07650329786f510f3 (diff) |
wip
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/ipa-ea-11-cast-to-void-ptr-0.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-ea-11-cast-to-void-ptr-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-ea-11-cast-to-void-ptr-0.c index d79b1574ce4..ec503593742 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-ea-11-cast-to-void-ptr-0.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-ea-11-cast-to-void-ptr-0.c @@ -1,10 +1,10 @@ /* { dg-do link } */ -/* { dg-options "-flto -fipa-dead-field-eliminate -fdump-ipa-structure-reorg " } */ +/* { dg-options "-flto -fipa-type-escape-analysis -fdump-ipa-type-escape-analysis -fprint-escape-analysis" } */ #include <stddef.h> struct astruct_s { _Bool a; _Bool b; _Bool c;}; -struct bstruct_s { _Bool a; _Bool b; _Bool c;}; +struct bstruct_s { _Bool a; _Bool b; _Bool c; _Bool d;}; struct bstruct_s *casting_to_void (struct astruct_s *s) { @@ -13,18 +13,17 @@ struct bstruct_s *casting_to_void (struct astruct_s *s) int main() { - struct astruct_s astruct; // This should not escape - struct bstruct_s bstruct; // This should not escape - astruct.a = 0; - bstruct.b = 0; + struct astruct_s astruct; + struct bstruct_s bstruct; + casting_to_void(&astruct); } // The type -/* { dg-final { scan-wpa-ipa-dump " record bstruct_s .boolean_type a;boolean_type b;boolean_type c;. reason: g=0 p=0 r=0 c=1 v=0 u=0" "type-escape-analysis" } } */ +/* { dg-final { scan-wpa-ipa-dump " record bstruct_s .boolean_type a;boolean_type b;boolean_type c;boolean d;. reason: g=0 p=0 r=0 c=1 v=0 u=0 i=0" "type-escape-analysis" } } */ /* { dg-final { scan-wpa-ipa-dump " record astruct_s .boolean_type a;boolean_type b;boolean_type c;. reason: g=0 p=0 r=0 c=1 v=0 u=0" "type-escape-analysis" } } */ // The pointer -/* { dg-final { scan-wpa-ipa-dump " record bstruct_s .boolean_type a;boolean_type b;boolean_type c;.. reason: g=0 p=0 r=0 c=1 v=0 u=0" "type-escape-analysis" } } */ +/* { dg-final { scan-wpa-ipa-dump " record bstruct_s .boolean_type a;boolean_type b;boolean_type c;boolean d.. reason: g=0 p=0 r=0 c=1 v=0 u=0 i=0" "type-escape-analysis" } } */ /* { dg-final { scan-wpa-ipa-dump " record astruct_s .boolean_type a;boolean_type b;boolean_type c;.. reason: g=0 p=0 r=0 c=1 v=0 u=0" "type-escape-analysis" } } */ // But there are incomplete types... should does be marked as escaping as well here? |