public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/66551] New: [SPARC64] Fails to bootstrap in stage 3 with linker error
@ 2015-06-16  8:17 glaubitz at physik dot fu-berlin.de
  2015-06-16 10:30 ` [Bug target/66551] " ebotcazou at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2015-06-16  8:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66551

            Bug ID: 66551
           Summary: [SPARC64] Fails to bootstrap in stage 3 with linker
                    error
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glaubitz at physik dot fu-berlin.de
  Target Milestone: ---
            Target: sparc*-*-*

Created attachment 35787
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35787&action=edit
Build log for gcc-5_5.1.1 on sparc64

Hello!

I'm currently working on bringing the sparc64 port of Debian back on track and
as part of that, I tried building gcc-5_5.1.1. Unfortunately, the build fails
at stage 3 with:

/«PKGBUILDDIR»/build/./prev-gcc/xg++ -B/«PKGBUILDDIR»/build/./prev-gcc/
-B/usr/sparc64-linux-gnu/bin/ -nostdinc++
-B/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/src/.libs
-B/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/libsupc++/.libs 
-I/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/include/sparc64-linux-gnu
 -I/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/include 
-I/«PKGBUILDDIR»/src/libstdc++-v3/libsupc++
-L/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/src/.libs
-L/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/libsupc++/.libs -c
 -DIN_GCC_FRONTEND -g -O2 -DIN_GCC    -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-I. -I. -I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include
-I../../src/gcc/../libcpp/include  -I../../src/gcc/../libdecnumber
-I../../src/gcc/../libdecnumber/dpd -I../libdecnumber
-I../../src/gcc/../libbacktrace   -o cc1obj-checksum.o -MT cc1obj-checksum.o
-MMD -MP -MF ./.deps/cc1obj-checksum.TPo cc1obj-checksum.c
/«PKGBUILDDIR»/build/./prev-gcc/xg++ -B/«PKGBUILDDIR»/build/./prev-gcc/
-B/usr/sparc64-linux-gnu/bin/ -nostdinc++
-B/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/src/.libs
-B/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/libsupc++/.libs 
-I/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/include/sparc64-linux-gnu
 -I/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/include 
-I/«PKGBUILDDIR»/src/libstdc++-v3/libsupc++
-L/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/src/.libs
-L/«PKGBUILDDIR»/build/prev-sparc64-linux-gnu/libstdc++-v3/libsupc++/.libs  
-g -O2 -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  -o
cc1obj \
      objc/objc-lang.o objc/objc-act.o hash-table.o
objc/objc-runtime-shared-support.o objc/objc-gnu-runtime-abi-01.o
objc/objc-next-runtime-abi-01.o objc/objc-next-runtime-abi-02.o
objc/objc-encoding.o objc/objc-map.o attribs.o c/c-errors.o c/c-decl.o
c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o
c/c-array-notation.o c-family/c-common.o c-family/c-cppbuiltin.o
c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o
c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o
c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o
c-family/c-ada-spec.o c-family/c-cilkplus.o c-family/array-notation-common.o
c-family/cilk.o c-family/c-ubsan.o sparc-c.o glibc-c.o cc1obj-checksum.o \
      libbackend.a main.o  libcommon-target.a libcommon.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a  
../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a  -lisl -lmpc -lmpfr -lgmp -rdynamic -ldl  -lz
collect2: error: ld returned 1 exit status
../../src/gcc/objc/Make-lang.in:66: recipe for target 'cc1obj' failed
make[5]: *** [cc1obj] Error 1
make[5]: Leaving directory '/«PKGBUILDDIR»/build/gcc'
Makefile:4446: recipe for target 'all-stage3-gcc' failed
make[4]: *** [all-stage3-gcc] Error 2
make[4]: Leaving directory '/«PKGBUILDDIR»/build'
Makefile:20995: recipe for target 'stage3-bubble' failed
make[3]: *** [stage3-bubble] Error 2
make[3]: Leaving directory '/«PKGBUILDDIR»/build'
Makefile:21058: recipe for target 'bootstrap' failed
make[2]: *** [bootstrap] Error 2
make[2]: Leaving directory '/«PKGBUILDDIR»/build'
s=`cat status`; rm -f status; \

Attaching the build log, let me know if you need more info. I have full root
access to a very fast sparc machine with a sparc64 build root, so I can do lots
of testing etc.

Adrian
>From gcc-bugs-return-489058-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 16 08:22:05 2015
Return-Path: <gcc-bugs-return-489058-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 129575 invoked by alias); 16 Jun 2015 08:22:05 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 129509 invoked by uid 48); 16 Jun 2015 08:22:01 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/65767] Test pr65276 failed on arm-none-eabi
Date: Tue, 16 Jun 2015 08:22:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: testsuite
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: REOPENED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65767-4-KbmaLxy3zD@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65767-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65767-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg01390.txt.bz2
Content-length: 653

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65767

--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
How about adding:

--cut here--
Index: g++.dg/lto/pr65276_0.C
===================================================================
--- g++.dg/lto/pr65276_0.C      (revision 224475)
+++ g++.dg/lto/pr65276_0.C      (working copy)
@@ -59,3 +59,5 @@
   };
   static ios_base::Init __ioinit;
 }
+
+std2::exception::~exception() noexcept { }
--cut here--

The above patch fixes the testcase for me.
>From gcc-bugs-return-489059-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 16 08:24:16 2015
Return-Path: <gcc-bugs-return-489059-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22908 invoked by alias); 16 Jun 2015 08:24:16 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 22867 invoked by uid 48); 16 Jun 2015 08:24:12 -0000
From: "rv at rasmusvillemoes dot dk" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/66552] New: Missed optimization when shift amount is result of signed modulus
Date: Tue, 16 Jun 2015 08:24:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: rv at rasmusvillemoes dot dk
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcctarget
Message-ID: <bug-66552-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg01391.txt.bz2
Content-length: 1142

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf552

            Bug ID: 66552
           Summary: Missed optimization when shift amount is result of
                    signed modulus
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rv at rasmusvillemoes dot dk
  Target Milestone: ---
            Target: x86/generic

In code such as

unsigned f(unsigned x, int n)
{
  return x >> (n % 32);
}

I think gcc should be allowed to assume that n is either positive or divisible
by 32 (i.e., that the result of the % is non-negative). So it should actually
compile this the same as it does x >> (n & 31). However, it seems to generate
code to compute the actual value of n%32 and then uses that.

Even if one doesn't want to optimize based on UB, this is silly on a platform
like x86: There, gcc already knows that the shift instruction only depends on
the lower 5 bits, and those 5 bits do not depend on the full result of the
modulus (whether following C99 or not).


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/66551] [SPARC64] Fails to bootstrap in stage 3 with linker error
  2015-06-16  8:17 [Bug target/66551] New: [SPARC64] Fails to bootstrap in stage 3 with linker error glaubitz at physik dot fu-berlin.de
@ 2015-06-16 10:30 ` ebotcazou at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2015-06-16 10:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66551

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2015-06-16
                 CC|                            |ebotcazou at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Attaching the build log, let me know if you need more info. I have full root
> access to a very fast sparc machine with a sparc64 build root, so I can do
> lots of testing etc.

So this is a full 64-bit compiler and not the 32-bit sparc64 compiler usually
built on Debian?  If so, what base compiler are you using (gcc -v)?


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-16 10:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-16  8:17 [Bug target/66551] New: [SPARC64] Fails to bootstrap in stage 3 with linker error glaubitz at physik dot fu-berlin.de
2015-06-16 10:30 ` [Bug target/66551] " ebotcazou 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).