public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/67688] New: [MinGW/Cygwin] Attributes selectany and section cannot be used together
@ 2015-09-23 0:50 thiago at kde dot org
2015-10-01 18:56 ` [Bug target/67688] " ktietz at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: thiago at kde dot org @ 2015-09-23 0:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67688
Bug ID: 67688
Summary: [MinGW/Cygwin] Attributes selectany and section cannot
be used together
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: thiago at kde dot org
Target Milestone: ---
The following program:
__declspec(selectany) __attribute__((section("foo"))) int i = 0;
Fails to compile with:
error: i causes a section type conflict
The same program compiles with clang -target i386-mingw -fms-compatibility and
produces the assembly:
.section foo,"dw",discard,_i
.globl _i # @i
.align 4
_i:
.long 0 # 0x0
The similar program:
#pragma data_seg("foo")
__declspec(selectany) __declspec(allocate("foo")) int i = 0;
compiles without error with MSVC and produces assembly:
PUBLIC i
; COMDAT i
foo SEGMENT
i DD 00H
foo ENDS
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/67688] [MinGW/Cygwin] Attributes selectany and section cannot be used together
2015-09-23 0:50 [Bug c/67688] New: [MinGW/Cygwin] Attributes selectany and section cannot be used together thiago at kde dot org
@ 2015-10-01 18:56 ` ktietz at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-10-01 18:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67688
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |ktietz at gcc dot gnu.org
Resolution|--- |DUPLICATE
--- Comment #1 from Kai Tietz <ktietz at gcc dot gnu.org> ---
This report is a duplicate of PR/51726.
Fix for it also resolves this problem.
*** This bug has been marked as a duplicate of bug 51726 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-01 18:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-23 0:50 [Bug c/67688] New: [MinGW/Cygwin] Attributes selectany and section cannot be used together thiago at kde dot org
2015-10-01 18:56 ` [Bug target/67688] " ktietz at gcc dot gnu.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).