public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102772] [12 regression] g++.dg/torture/pr80334.C FAILs Date: Tue, 22 Mar 2022 15:12:33 +0000 [thread overview] Message-ID: <bug-102772-4-ncYf0mqBfX@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102772-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102772 --- Comment #16 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- > --- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > If the movaps that it fails on are: > movaps %xmm1, thr.1@ntpoff(%ebx) > movdqu 16(%eax), %xmm2 > movaps %xmm2, thr.1@ntpoff+16(%ebx) > then I'd say it must be some Solaris bug, because: > .section .tbss,"awT",@nobits > .align 16 > .type thr.1, @object > .size thr.1, 36 > thr.1: > .zero 36 > so thr.1 symbol should be 16-byte aligned and so movaps to that address should > work. > On pointer2.o, is the .tbss section properly 16-byte aligned? > On i686-linux I see in readelf -Wa: > [ 8] .tbss NOBITS 00000000 000360 000024 00 WAT 0 0 > 16 Same on Solaris: [ 8] .tbss NOBITS 00000000 000330 000024 00 WAT 0 0 16 > What about the executable (in that case the PT_TLS segment is more important > (whether it has 16-byte p_align). Same here: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align [...] TLS 0x00c3d0 0x0806c3d0 0x00000000 0x00000 0x00024 RW 0x10 > If Solaris dynamic linker doesn't ensure proper alignment of TLS vars (or > assembler or linker screw it up in the middle), it would be nice to find out if > it does for all alignments or just say higher than 8-byte, and perhaps add some > workaround on the GCC side somewhere. > On the pointer2.f90 testcase it is symtab_node::can_increase_alignment_p that > decides if the alignment of the var can be done, so perhaps we'd need a target > hook that for Solaris would say that one can't increase alignment of TLS vars. We could try that once we know for certain that's the case (and get it fixed at the same time). However, when gld is in use, the test fails in exactly the same way. > But the question is if in > struct __attribute__((aligned (32))) S { long long buf[4]; }; > __thread struct S s; > S *foo (void) { return &s; } > it won't return not properly 32-byte aligned pointer too (and is that in all > threads or just some (initial vs. other threads)? I've wrapped that in a small test programming, calling foo both from the initial thread and a new one: in all cases, the return value from foo was 32-byte aligned as expected. One thing I wondered about: Solaris ld used to be very picky about exactly following the use of registers in TLS sequences: the Linker and Libraries guide documents %eax for TLS LE: https://docs.oracle.com/cd/E37838_01/html/E36783/man-tlsam.html#scrolltoc Maybe the use of %ebx in this code is the program? At least the test program above does use %eax, as expected. We had issues like this both for amd64 and sparc in the past.
next prev parent reply other threads:[~2022-03-22 15:12 UTC|newest] Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-15 11:39 [Bug target/102772] New: " ro at gcc dot gnu.org 2021-10-15 11:40 ` [Bug target/102772] " ro at gcc dot gnu.org 2021-10-15 11:40 ` ro at gcc dot gnu.org 2021-10-15 11:40 ` ro at gcc dot gnu.org 2021-10-15 12:06 ` hjl.tools at gmail dot com 2021-10-15 13:02 ` rguenth at gcc dot gnu.org 2021-10-15 14:29 ` ro at CeBiTec dot Uni-Bielefeld.DE 2021-10-15 20:44 ` hjl.tools at gmail dot com 2021-11-16 11:51 ` jakub at gcc dot gnu.org 2021-11-23 12:36 ` ro at gcc dot gnu.org 2022-03-17 15:05 ` jakub at gcc dot gnu.org 2022-03-17 15:14 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-03-21 11:44 ` jakub at gcc dot gnu.org 2022-03-21 12:01 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-03-21 12:03 ` ro at gcc dot gnu.org 2022-03-21 12:03 ` ro at gcc dot gnu.org 2022-03-21 13:17 ` jakub at gcc dot gnu.org 2022-03-21 13:31 ` jakub at gcc dot gnu.org 2022-03-22 15:12 ` ro at CeBiTec dot Uni-Bielefeld.DE [this message] 2022-03-22 17:00 ` jakub at gcc dot gnu.org 2022-03-23 13:56 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-03-23 14:11 ` jakub at gcc dot gnu.org 2022-03-23 14:17 ` jakub at gcc dot gnu.org 2022-03-25 12:48 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-03-25 12:53 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-03-25 12:54 ` jakub at gcc dot gnu.org 2022-03-25 13:00 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-03-25 13:06 ` jakub at gcc dot gnu.org 2022-03-25 13:13 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-03-25 13:18 ` jakub at gcc dot gnu.org 2022-03-25 13:22 ` ro at gcc dot gnu.org 2022-03-25 13:49 ` jakub at gcc dot gnu.org 2022-03-30 14:06 ` cvs-commit at gcc dot gnu.org 2022-03-30 14:45 ` jakub at gcc dot gnu.org 2022-03-30 14:52 ` redi at gcc dot gnu.org 2022-03-30 14:56 ` redi at gcc dot gnu.org 2022-03-30 15:04 ` redi at gcc dot gnu.org 2022-03-30 15:13 ` redi at gcc dot gnu.org 2022-03-30 15:23 ` jakub at gcc dot gnu.org 2022-03-31 13:46 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-03-31 13:47 ` ro at gcc dot gnu.org 2022-03-31 14:16 ` redi at gcc dot gnu.org 2022-03-31 14:18 ` redi at gcc dot gnu.org 2022-03-31 14:49 ` jakub at gcc dot gnu.org 2022-03-31 15:15 ` redi at gcc dot gnu.org 2022-03-31 15:47 ` jakub at gcc dot gnu.org 2022-04-04 11:54 ` jakub at gcc dot gnu.org 2022-04-11 9:13 ` jakub at gcc dot gnu.org 2022-04-11 14:19 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-04-11 14:19 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-04-11 15:29 ` jakub at gcc dot gnu.org 2022-04-12 7:53 ` jakub at gcc dot gnu.org 2022-04-13 14:47 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-05-06 8:31 ` [Bug target/102772] [12/13 " jakub at gcc dot gnu.org 2023-05-08 12:22 ` [Bug target/102772] [12/13/14 " rguenth 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-102772-4-ncYf0mqBfX@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).