public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/61146] New: wide-int error when building GCC with clang
Date: Sun, 11 May 2014 18:47:00 -0000	[thread overview]
Message-ID: <bug-61146-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 61146
           Summary: wide-int error when building GCC with clang
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olegendo at gcc dot gnu.org

Created attachment 32776
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32776&action=edit
compressed build log

Building an SH cross GCC on OSX with clang results in the following errors:

../../gcc-trunk/gcc/wide-int.cc:1269:23: error: invalid use of a cast in a
inline asm context requiring an l-value: remove the cast or build with
-fheinous-gnu-extensions
          umul_ppmm (val[1], val[0], op1.ulow (), op2.ulow ());
          ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc-trunk/gcc/../include/longlong.h:505:24: note: expanded from macro
'umul_ppmm'
           : "=a" ((UDItype) (w0)),                                     \
                              ^
../../gcc-trunk/gcc/wide-int.cc:1269:15: error: invalid use of a cast in a
inline asm context requiring an l-value: remove the cast or build with
-fheinous-gnu-extensions
          umul_ppmm (val[1], val[0], op1.ulow (), op2.ulow ());
          ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc-trunk/gcc/../include/longlong.h:506:24: note: expanded from macro
'umul_ppmm'
             "=d" ((UDItype) (w1))                                      \
                              ^
../../gcc-trunk/gcc/wide-int.cc:1278:22: error: invalid use of a cast in a
inline asm context requiring an l-value: remove the cast or build with
-fheinous-gnu-extensions
          umul_ppmm (upper, val[0], op1.ulow (), op2.ulow ());
          ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc-trunk/gcc/../include/longlong.h:505:24: note: expanded from macro
'umul_ppmm'
           : "=a" ((UDItype) (w0)),                                     \
                              ^
../../gcc-trunk/gcc/wide-int.cc:1278:15: error: invalid use of a cast in a
inline asm context requiring an l-value: remove the cast or build with
-fheinous-gnu-extensions
          umul_ppmm (upper, val[0], op1.ulow (), op2.ulow ());
          ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc-trunk/gcc/../include/longlong.h:506:24: note: expanded from macro
'umul_ppmm'
             "=d" ((UDItype) (w1))

The full log is attached, which shows also other (spurious) warnings.

The problem can be worked around by setting
export CFLAGS="-fheinous-gnu-extensions"
export CXXFLAGS="-fheinous-gnu-extensions"
export CFLAGS_FOR_TARGET="-O2"
export CXXFLAGS_FOR_TARGET="-O2"

The *FLAGS_FOR_TARGET are required or else they will be set to *FLAGS, which
will pass -fheinous-gnu-extensions to the SH xgcc when building libgcc etc. (PR
25672)

The clang version on my OSX system:
clang -v
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix


             reply	other threads:[~2014-05-11 18:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-11 18:47 olegendo at gcc dot gnu.org [this message]
2014-05-11 18:54 ` [Bug other/61146] " pinskia at gcc dot gnu.org
2014-05-11 19:37 ` pinskia at gcc dot gnu.org
2014-05-11 19:48 ` glisse at gcc dot gnu.org
2014-05-27 20:36 ` mrs at gcc dot gnu.org
2014-05-27 20:37 ` mrs at gcc dot gnu.org
2014-05-27 20:43 ` mrs at gcc dot gnu.org
2014-05-28 16:18 ` fxcoudert at gcc dot gnu.org
2014-05-28 17:00 ` mrs at gcc dot gnu.org
2014-05-28 17:06 ` dominiq at lps dot ens.fr
2014-05-28 18:40 ` howarth.at.gcc at gmail dot com
2014-05-28 18:50 ` dominiq at lps dot ens.fr
2014-05-28 18:52 ` mikestump at comcast dot net
2014-05-28 19:09 ` howarth.at.gcc at gmail dot com
2014-05-28 19:37 ` manu at gcc dot gnu.org
2014-05-28 20:02 ` mikestump at comcast dot net

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-61146-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).