This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/35661] New: __attribute__((cold)) generates wrong code
- From: "zuxy dot meng at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Mar 2008 20:14:41 -0000
- Subject: [Bug c/35661] New: __attribute__((cold)) generates wrong code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
On MinGW32, GCC 4.3.0 marks the .text.unlikely section as "w"(writable) instead
of "x"(executable), which makes the assembler to pad the section with zeros
instead of NOPs. Runtime behavior is almost always incorrect and in many cases
an application will crash.
--
Summary: __attribute__((cold)) generates wrong code
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zuxy dot meng at gmail dot com
GCC build triplet: i686-pc-mingw32
GCC host triplet: i686-pc-mingw32
GCC target triplet: i686-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35661