public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102027] New: ABI break when using vector type in function arg/return value Date: Mon, 23 Aug 2021 18:10:12 +0000 [thread overview] Message-ID: <bug-102027-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102027 Bug ID: 102027 Summary: ABI break when using vector type in function arg/return value Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- We have an ABI break. Discovered by Running /root/rpmbuild/BUILD/gcc-11.2.1-20210728/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp ... FAIL: tmpdir-gcc.dg-struct-layout-1/t025 c_compat_x_tst.o-c_compat_y_alt.o execute FAIL: tmpdir-gcc.dg-struct-layout-1/t025 c_compat_x_alt.o-c_compat_y_tst.o execute Started with r11-263. $ cat m.c extern void test2237(); int main() { test2237(); } $ cat x.c #include "x.h" extern struct U2SF check2237(); void test2237() { check2237(); } $ cat y.c #include "x.h" struct U2SF check2237_ret; struct U2SF check2237() { return check2237_ret; } $ cat x.h struct U2SF { __attribute__((__vector_size__(2 * sizeof(float)))) float v; }; $ xgcc-11 -c m.c $ xgcc-11 -c x.c $ xgcc-10 -c y.c $ xgcc-11 m.o x.o y.o -o foo ./foo Segmentation fault (core dumped) while $ xgcc-11 -c y.c $ xgcc-11 m.o x.o y.o -o foo $ ./foo # OK $ gdb ./foo (gdb) r Starting program: /home/mpolacek/x/trunk/gcc/foo Program received signal SIGSEGV, Segmentation fault. 0x000000000040113f in check2237 () (gdb) bt #0 0x000000000040113f in check2237 () #1 0x0000000000401129 in test2237 () #2 0x0000000000401114 in main () (gdb) disas Dump of assembler code for function check2237: 0x000000000040112c <+0>: push %rbp 0x000000000040112d <+1>: mov %rsp,%rbp 0x0000000000401130 <+4>: mov %rdi,-0x8(%rbp) 0x0000000000401134 <+8>: mov -0x8(%rbp),%rax 0x0000000000401138 <+12>: mov 0x2ef1(%rip),%rdx # 0x404030 <check2237_ret> => 0x000000000040113f <+19>: mov %rdx,(%rax) 0x0000000000401142 <+22>: mov -0x8(%rbp),%rax 0x0000000000401146 <+26>: pop %rbp 0x0000000000401147 <+27>: ret End of assembler dump.
next reply other threads:[~2021-08-23 18:10 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-23 18:10 mpolacek at gcc dot gnu.org [this message] 2021-08-23 18:10 ` [Bug target/102027] [11/12 Regression] " mpolacek at gcc dot gnu.org 2021-08-23 18:49 ` ubizjak at gmail dot com 2021-08-23 19:12 ` ubizjak at gmail dot com 2021-08-23 19:58 ` pinskia at gcc dot gnu.org 2021-08-23 20:25 ` hjl.tools at gmail dot com 2021-08-24 1:47 ` hjl.tools at gmail dot com 2021-08-24 1:50 ` pinskia at gcc dot gnu.org 2021-08-24 7:12 ` rguenth at gcc dot gnu.org 2021-08-24 13:08 ` hjl.tools at gmail dot com 2022-04-21 7:50 ` rguenth at gcc dot gnu.org 2023-04-17 15:15 ` [Bug target/102027] [11/12/13/14 " woodard at redhat dot com 2023-05-29 10:05 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-102027-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).