aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-09-05 15:30:23 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-09-05 15:30:23 +0200
commit728347922a60d5e560a4071d23c492e8baeab115 (patch)
treefe8d6c7512fc1b1137aa84003bd9b504d3d69998 /gcc/testsuite/gcc.c-torture
parent5a4c9a493153f6f579cd81905d0ab743dd88a33d (diff)
downloadgcc-728347922a60d5e560a4071d23c492e8baeab115.zip
gcc-728347922a60d5e560a4071d23c492e8baeab115.tar.gz
gcc-728347922a60d5e560a4071d23c492e8baeab115.tar.bz2
re PR middle-end/91001 (internal compiler error: in extract_insn, at recog.c:2310)
PR middle-end/91001 PR middle-end/91105 PR middle-end/91106 * calls.c (load_register_parameters): For TYPE_TRANSPARENT_AGGR types, use type of their first field instead of type of args[i].tree_value. * gcc.c-torture/compile/pr91001.c: New test. From-SVN: r275408
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr91001.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr91001.c b/gcc/testsuite/gcc.c-torture/compile/pr91001.c
new file mode 100644
index 0000000..4b6a017
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr91001.c
@@ -0,0 +1,31 @@
+/* PR middle-end/91001 */
+/* PR middle-end/91105 */
+/* PR middle-end/91106 */
+
+struct __attribute__((packed)) S { short b; char c; };
+struct T { short b, c, d; };
+struct __attribute__((packed)) R { int b; char c; };
+union __attribute__((aligned(128), transparent_union)) U { struct S c; } u;
+union __attribute__((aligned(32), transparent_union)) V { struct T c; } v;
+union __attribute__((aligned(32), transparent_union)) W { struct R c; } w;
+void foo (union U);
+void bar (union V);
+void baz (union W);
+
+void
+qux (void)
+{
+ foo (u);
+}
+
+void
+quux (void)
+{
+ bar (v);
+}
+
+void
+corge (void)
+{
+ baz (w);
+}