public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58006] New: ICE regression compiling VegaStrike on f19 with -ffast-math and -ftree-parallelize-loops=2
@ 2013-07-27 20:51 ermo.gcc.gnu.org at spammesenseless dot net
  2013-07-27 20:57 ` [Bug c++/58006] " ermo.gcc.gnu.org at spammesenseless dot net
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: ermo.gcc.gnu.org at spammesenseless dot net @ 2013-07-27 20:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58006
           Summary: ICE regression compiling VegaStrike on f19 with
                    -ffast-math and -ftree-parallelize-loops=2
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ermo.gcc.gnu.org at spammesenseless dot net

When trying to compile rev. 13636 of VegaStrike (using the CMake build method)
with gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1), g++ ICEs on the following
compilation target on both a C2D E7500 and an AMD Athlon II 240e running
fedora19 x86_64:

[ermo@sheila build]$ make
/usr/bin/cmake -H/home/ermo/VegaStrike/trunk/vegastrike
-B/home/ermo/VegaStrike/trunk/vegastrike/build --check-build-system
CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start
/home/ermo/VegaStrike/trunk/vegastrike/build/CMakeFiles
/home/ermo/VegaStrike/trunk/vegastrike/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/ermo/VegaStrike/trunk/vegastrike/build'
make -f CMakeFiles/OPcollide.dir/build.make CMakeFiles/OPcollide.dir/depend
make[2]: Entering directory `/home/ermo/VegaStrike/trunk/vegastrike/build'
cd /home/ermo/VegaStrike/trunk/vegastrike/build && /usr/bin/cmake -E
cmake_depends "Unix Makefiles" /home/ermo/VegaStrike/trunk/vegastrike
/home/ermo/VegaStrike/trunk/vegastrike
/home/ermo/VegaStrike/trunk/vegastrike/build
/home/ermo/VegaStrike/trunk/vegastrike/build
/home/ermo/VegaStrike/trunk/vegastrike/build/CMakeFiles/OPcollide.dir/DependInfo.cmake
--color=
make[2]: Leaving directory `/home/ermo/VegaStrike/trunk/vegastrike/build'
make -f CMakeFiles/OPcollide.dir/build.make CMakeFiles/OPcollide.dir/build
make[2]: Entering directory `/home/ermo/VegaStrike/trunk/vegastrike/build'
make[2]: Nothing to be done for `CMakeFiles/OPcollide.dir/build'.
make[2]: Leaving directory `/home/ermo/VegaStrike/trunk/vegastrike/build'
/usr/bin/cmake -E cmake_progress_report
/home/ermo/VegaStrike/trunk/vegastrike/build/CMakeFiles  1 2 3 4 5 6 7 8
[  8%] Built target OPcollide
make -f CMakeFiles/engine_com.dir/build.make CMakeFiles/engine_com.dir/depend
make[2]: Entering directory `/home/ermo/VegaStrike/trunk/vegastrike/build'
cd /home/ermo/VegaStrike/trunk/vegastrike/build && /usr/bin/cmake -E
cmake_depends "Unix Makefiles" /home/ermo/VegaStrike/trunk/vegastrike
/home/ermo/VegaStrike/trunk/vegastrike
/home/ermo/VegaStrike/trunk/vegastrike/build
/home/ermo/VegaStrike/trunk/vegastrike/build
/home/ermo/VegaStrike/trunk/vegastrike/build/CMakeFiles/engine_com.dir/DependInfo.cmake
--color=
make[2]: Leaving directory `/home/ermo/VegaStrike/trunk/vegastrike/build'
make -f CMakeFiles/engine_com.dir/build.make CMakeFiles/engine_com.dir/build
make[2]: Entering directory `/home/ermo/VegaStrike/trunk/vegastrike/build'
/usr/bin/cmake -E cmake_progress_report
/home/ermo/VegaStrike/trunk/vegastrike/build/CMakeFiles 
[  8%] Building CXX object
CMakeFiles/engine_com.dir/src/gfx/cockpit_generic.cpp.o
/usr/bin/c++    -O2  -mtune=native -march=native -mfpmath=sse -msse3 -mmmx
-ftree-vectorize -ffast-math -fassociative-math -funsafe-math-optimizations
-funroll-loops  -ftree-parallelize-loops=2  -DNV_CUBE_MAP
-DBOOST_PYTHON_NO_PY_SIGNATURES -include config.h -pipe -Wall
-fvisibility=hidden -I/home/ermo/VegaStrike/trunk/vegastrike/src
-I/home/ermo/VegaStrike/trunk/vegastrike/src/cmd
-I/home/ermo/VegaStrike/trunk/vegastrike/build -I/usr/include/python2.7
-I/home/ermo/VegaStrike/trunk/vegastrike/boost/1_53 -I/usr/include/AL
-I/usr/include/SDL -I/usr/include/vorbis -I/usr/include/ogg    -o
CMakeFiles/engine_com.dir/src/gfx/cockpit_generic.cpp.o -c
/home/ermo/VegaStrike/trunk/vegastrike/src/gfx/cockpit_generic.cpp
/home/ermo/VegaStrike/trunk/vegastrike/src/gfx/cockpit_generic.cpp: In member
function ‘bool Cockpit::Update()’:
/home/ermo/VegaStrike/trunk/vegastrike/src/gfx/cockpit_generic.cpp:494:6:
internal compiler error: Segmentation fault
 bool Cockpit::Update()
      ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccnOEb2C.out file, please attach this to
your bugreport.
make[2]: *** [CMakeFiles/engine_com.dir/src/gfx/cockpit_generic.cpp.o] Error 1
make[2]: Leaving directory `/home/ermo/VegaStrike/trunk/vegastrike/build'
make[1]: *** [CMakeFiles/engine_com.dir/all] Error 2
make[1]: Leaving directory `/home/ermo/VegaStrike/trunk/vegastrike/build'
make: *** [all] Error 2
[ermo@sheila build]$ 

It turns out that the minimal repro case is adding just -mtune=native
-march=native -ffast-math -ftree-parallelize-loops=2 to that particular
compilation target.

Note that on fedora18, which uses gcc-4.7.2, the exact same configuration does
not result in an ICE.

Vega Strike build instructions can be found here:

http://wiki.vega-strike.org/HowTo:Compile_from_SVN_on_Linux

I used the following ccmake configuration (only differences to default listed):

CPUINTEL_native                  ON
CPU_SMP                          2
DISABLE_FFMPEG                   ON
CMAKE_VERBOSE_MAKEFILE           ON (only listed in the advanced config
options)


P.S. I am aware that there might be some redundancy in the build configuration
CFLAGS.
>From gcc-bugs-return-426840-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jul 27 20:53:02 2013
Return-Path: <gcc-bugs-return-426840-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23083 invoked by alias); 27 Jul 2013 20:53:02 -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 22947 invoked by uid 48); 27 Jul 2013 20:52:59 -0000
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/58003] internal compiler error: in convert_mpz_to_unsigned, at fortran/simplify.c:165
Date: Sat, 27 Jul 2013 20:53:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: burnus at gcc dot gnu.org
X-Bugzilla-Status: NEW
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:
Message-ID: <bug-58003-4-sjbPF3mp1N@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58003-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58003-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: 2013-07/txt/msg01347.txt.bz2
Content-length: 1051

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX003

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Chris Gilbreth from comment #0)
> (Is this valid Fortran?)

First, it is definitely a bug - internal compiler errors are always a bug.

Regarding the validity: The number z'0F00F00080000001' = 1081127795507068929 is
too large for a (signed) 32-bit integer. Hence, the compiler complains. The
Fortran standard does not provide a real answer to what value is should have
and the code is, hence, invalid

However, with -fno-range-check the compiler is requested to ignore the overflow
and, for a given platform, the is an expected value, given how overflows are
handled.

* * *

The code fails at the assert:

convert_mpz_to_unsigned (mpz_t x, int bitsize)
...
  if (mpz_sgn (x) < 0)
...
  else
    {
      /* Confirm that no bits above the signed range are set.  */
      gcc_assert (mpz_scan1 (x, bitsize-1) == ULONG_MAX);
    }

Namely, the possibility that the input value is - on purpose - overflowing is
not handled.


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

end of thread, other threads:[~2013-08-18 18:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-27 20:51 [Bug c++/58006] New: ICE regression compiling VegaStrike on f19 with -ffast-math and -ftree-parallelize-loops=2 ermo.gcc.gnu.org at spammesenseless dot net
2013-07-27 20:57 ` [Bug c++/58006] " ermo.gcc.gnu.org at spammesenseless dot net
2013-07-27 20:57 ` paolo.carlini at oracle dot com
2013-07-27 21:06 ` [Bug tree-optimization/58006] " ermo.gcc.gnu.org at spammesenseless dot net
2013-07-27 21:24 ` [Bug tree-optimization/58006] [4.8/4.9 Regression] ICE compiling VegaStrike with -ffast-math -ftree-parallelize-loops=2 glisse at gcc dot gnu.org
2013-07-28 11:45 ` glisse at gcc dot gnu.org
2013-07-28 17:10 ` paolo.carlini at oracle dot com
2013-08-12  9:23 ` vincent.legoll at gmail dot com
2013-08-16 15:29 ` jakub at gcc dot gnu.org
2013-08-16 15:30 ` jakub at gcc dot gnu.org
2013-08-18 18:43 ` jakub 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).