summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorErick Ochoa <erick.ochoa@theobroma-systems.com>2020-01-31 23:38:46 +0100
committerErick Ochoa <erick.ochoa@theobroma-systems.com>2020-04-28 23:35:31 +0200
commit50b79d45642bfb6c080d888e9066f2b9bb683345 (patch)
tree28bce297749192a09781fb308d6397d1d11e5c6b /gcc/testsuite/gcc.dg
parent61f779856ea690c7b1aea557a3d174b0b8dff2d0 (diff)
deref test case
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-structreorg-39-typedef-0.c11
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-structreorg-40-typedef-0.c12
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-structreorg-41-deref-0.c14
3 files changed, 37 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-39-typedef-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-39-typedef-0.c
new file mode 100644
index 00000000000..d9554d529e2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-39-typedef-0.c
@@ -0,0 +1,11 @@
+/* { dg-do run } */
+/* { dg-options "-flto -flto-partition=none -fipa-typelist -fdump-ipa-typelist -fipa-typelist-field=b -fipa-typelist-struct=astruct_s" } */
+
+int
+main()
+{
+ typedef struct astruct_s { _Bool a; _Bool b; _Bool c;} astruct_s;
+ astruct_s astruct;
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-40-typedef-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-40-typedef-0.c
new file mode 100644
index 00000000000..64f08aee7cd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-40-typedef-0.c
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+/* { dg-options "-flto -flto-partition=none -fipa-typelist -fdump-ipa-typelist -fipa-typelist-field=b -fipa-typelist-struct=astruct_s" } */
+
+int
+main()
+{
+ struct astruct_s { _Bool a; _Bool b; _Bool c;};
+ typedef struct astruct_s astruct_s;
+ astruct_s astruct;
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-41-deref-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-41-deref-0.c
new file mode 100644
index 00000000000..0947a242fc1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-41-deref-0.c
@@ -0,0 +1,14 @@
+/* { dg-do run } */
+/* { dg-options "-flto -flto-partition=none -fipa-typelist -fdump-ipa-typelist -fipa-typelist-field=b -fipa-typelist-struct=astruct_s" } */
+
+int
+main()
+{
+ struct astruct_s { _Bool a; _Bool b; _Bool c;};
+ struct astruct_s astruct;
+ struct astruct_s *t, *copy;
+ t = &astruct;
+ copy = *t;
+ return 0;
+}
+