public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c/16660] New: attribute((aligned)) doesn't work for variables on the stack @ 2004-07-21 20:43 jens dot maurer at gmx dot net 2004-07-21 21:14 ` [Bug target/16660] " pinskia at gcc dot gnu dot org 2004-08-15 4:27 ` pinskia at gcc dot gnu dot org 0 siblings, 2 replies; 5+ messages in thread From: jens dot maurer at gmx dot net @ 2004-07-21 20:43 UTC (permalink / raw) To: gcc-bugs Running the program below compiled with "-mpreferred-stack-boundary=2" gets a "segmentation fault" because the variable "tmp" is not properly aligned on a 16-byte boundary (required for movaps), violating the aligned(16) request in the attribute. void f() { unsigned long tmp[4] __attribute__((aligned(16))); asm("movaps %%xmm0, (%0)" : : "r" (tmp) : "memory"); } int main() { f(); } -- Summary: attribute((aligned)) doesn't work for variables on the stack Product: gcc Version: 3.4.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jens dot maurer at gmx dot net CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/16660] attribute((aligned)) doesn't work for variables on the stack 2004-07-21 20:43 [Bug c/16660] New: attribute((aligned)) doesn't work for variables on the stack jens dot maurer at gmx dot net @ 2004-07-21 21:14 ` pinskia at gcc dot gnu dot org 2004-08-15 4:27 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-07-21 21:14 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- Component|c |target Keywords| |wrong-code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/16660] attribute((aligned)) doesn't work for variables on the stack 2004-07-21 20:43 [Bug c/16660] New: attribute((aligned)) doesn't work for variables on the stack jens dot maurer at gmx dot net 2004-07-21 21:14 ` [Bug target/16660] " pinskia at gcc dot gnu dot org @ 2004-08-15 4:27 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-08-15 4:27 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-15 04:27 ------- Confirmed, note that the inline-asm can be improved: asm("movaps %%xmm0, %0" : : "m" (*tmp) ); -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2004-08-15 04:27:30 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660 ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <bug-16660-1824@http.gcc.gnu.org/bugzilla/>]
* [Bug target/16660] attribute((aligned)) doesn't work for variables on the stack [not found] <bug-16660-1824@http.gcc.gnu.org/bugzilla/> @ 2005-11-06 6:11 ` pinskia at gcc dot gnu dot org 2006-03-18 17:43 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-11-06 6:11 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from pinskia at gcc dot gnu dot org 2005-11-06 06:11 ------- *** Bug 24691 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sabre at nondot dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/16660] attribute((aligned)) doesn't work for variables on the stack [not found] <bug-16660-1824@http.gcc.gnu.org/bugzilla/> 2005-11-06 6:11 ` pinskia at gcc dot gnu dot org @ 2006-03-18 17:43 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu dot org @ 2006-03-18 17:43 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from pinskia at gcc dot gnu dot org 2006-03-18 17:43 ------- Actually this is just a missed diagnostic. The compiler cannot align the stack variables where the alignment is greater than stack alignment that the compiler can give for the stack. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|wrong-code |diagnostic http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-03-18 17:43 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-07-21 20:43 [Bug c/16660] New: attribute((aligned)) doesn't work for variables on the stack jens dot maurer at gmx dot net 2004-07-21 21:14 ` [Bug target/16660] " pinskia at gcc dot gnu dot org 2004-08-15 4:27 ` pinskia at gcc dot gnu dot org [not found] <bug-16660-1824@http.gcc.gnu.org/bugzilla/> 2005-11-06 6:11 ` pinskia at gcc dot gnu dot org 2006-03-18 17:43 ` pinskia at gcc dot gnu dot org
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).