public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "michael at talosis dot ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/59782] New: libcpp does not avoid bug #48326 when compiled by older GCC
Date: Sun, 12 Jan 2014 23:33:00 -0000	[thread overview]
Message-ID: <bug-59782-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59782

            Bug ID: 59782
           Summary: libcpp does not avoid bug #48326 when compiled by
                    older GCC
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: michael at talosis dot ca

GCC 4.7.0 and other older versions have a bug (#48326) where the target
attribute can leak, causing illegal instructions to be emitted in code intended
to be generic.

GCC 4.6.0 through 4.8.2 also contain code that triggers this bug, in
libcpp/lex.c.  That file uses the target attribute to opportunistically use
MMX/SSE even in a generic binary.

The result is that bootstrap is blocked if starting from 4.7.0 when the actual
CPU does not support the new instructions.

Currently the problem block of code is preprocessed in if GCC 4.5.0 or later is
detected.  It should instead only be used for 4.7.1 or later.

Note that it is somewhat important to also fix this in 4.7.4.  This bug only
bites when upgrading from an old GCC.  If someone has an old GCC with C++ not
installed, then they cannot move directly to 4.8.x, and will have to build
4.7.x as an intermediate.


             reply	other threads:[~2014-01-12 23:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-12 23:33 michael at talosis dot ca [this message]
2014-01-13  9:53 ` [Bug preprocessor/59782] " rguenth at gcc dot gnu.org
2014-01-13 10:09 ` jakub at gcc dot gnu.org
2014-01-13 10:59 ` ubizjak at gmail dot com
2014-01-14  1:21 ` michael at talosis dot ca
2014-01-15  0:53 ` pinskia at gcc dot gnu.org
2014-01-15  8:31 ` jakub at gcc dot gnu.org
2021-09-02  2:12 ` pinskia at gcc dot gnu.org
2022-04-10  0:29 ` pinskia 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-59782-4@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: link
Be 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).