GNU bug report logs -
#29183
27.0.50; SIGSEGV on C-g on Windows
Previous Next
Reported by: John Mastro <john.b.mastro <at> gmail.com>
Date: Mon, 6 Nov 2017 22:00:02 UTC
Severity: normal
Tags: fixed
Merged with 29213
Found in version 27.0.50
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 11/08/2017 10:53 AM, Eli Zaretskii wrote:
> it sounds like our assumption that this attribute should be a no-op in
> this case is incorrect, or maybe it's a bug in GCC 7.2?
The GCC 7.2 documentation
<https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Common-Variable-Attributes.html#index-aligned-variable-attribute>
says:
> When used on a struct, or struct member, the |aligned| attribute can
> only increase the alignment; in order to decrease it, the |packed|
> attribute must be specified as well.
so it appears to be a bug.
What is the difference in assembly-language output when you compile with
this:
static struct thread_state GCALIGNED main_thread;
versus this?
static struct thread_state main_thread;
What is the assembly-language output when compiling the following little program, when compiled the same way that you compile thread.c?
struct thread_state { int x; };
static struct thread_state __attribute__ ((aligned (8))) a;
static struct thread_state b;
struct thread_state *c[] = { &a, &b };
On my platform, compiling this with gcc -S yields the following, which looks properly aligned:
.file "t.c"
.local a
.comm a,4,8
.local b
.comm b,4,4
.globl c
.data
.align 16
.type c, @object
.size c, 16
c:
.quad a
.quad b
.ident "GCC: (GNU) 7.2.1 20170915 (Red Hat 7.2.1-2)"
.section .note.GNU-stack,"",@progbits
This bug report was last modified 7 years and 233 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.