public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215
@ 2012-09-13  8:58 david.abdurachmanov at gmail dot com
  2012-09-13  9:27 ` [Bug driver/54563] " rguenth at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: david.abdurachmanov at gmail dot com @ 2012-09-13  8:58 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54563
           Summary: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at
                    tree-eh.c:2215
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: driver
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: david.abdurachmanov@gmail.com


Created attachment 28184
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28184
Pre-processed testcase

Tested with 190338 (pre-4.7.2) and 188597 (4.7.1). It only happens with double
and float. If you switch to int and pow function instead of powf it works fine.
It crashes only on C++11. Compiled files with -ansi (no C++11), exit code 0.

Current workaround/fix is to use std::pow() in the code.

GCC compiled with LLVM/clang on Mac OS X 10.8, Xcode 4.4 (build: 4F250)

$ clang -v
Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.0.0
Thread model: posix

sw_vers
ProductName:    Mac OS X
ProductVersion: 10.8
BuildVersion:   12A269

## Detailed information about GCC ##

c++: warning: -pipe ignored because -save-temps specified
Using built-in specs.
COLLECT_GCC=/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/c++
Target: x86_64-apple-darwin12.0.0
Configured with: ../configure
--prefix=/Volumes/build1/davidlt/test-4.7.0/a/tmp/BUILDROOT/28dac03f73e4471589c20bae3c32fbc1/opt/cmssw/osx108_amd64_gcc470/external/gcc/4.7.0-cms
--disable-multilib --disable-nls --enable-languages=c,c++,fortran,objc,obj-c++
--with-gmp=/Volumes/build1/davidlt/test-4.7.0/a/tmp/BUILDROOT/28dac03f73e4471589c20bae3c32fbc1/opt/cmssw/osx108_amd64_gcc470/external/gcc/4.7.0-cms
--with-mpfr=/Volumes/build1/davidlt/test-4.7.0/a/tmp/BUILDROOT/28dac03f73e4471589c20bae3c32fbc1/opt/cmssw/osx108_amd64_gcc470/external/gcc/4.7.0-cms
--with-mpc=/Volumes/build1/davidlt/test-4.7.0/a/tmp/BUILDROOT/28dac03f73e4471589c20bae3c32fbc1/opt/cmssw/osx108_amd64_gcc470/external/gcc/4.7.0-cms
--with-ppl=/Volumes/build1/davidlt/test-4.7.0/a/tmp/BUILDROOT/28dac03f73e4471589c20bae3c32fbc1/opt/cmssw/osx108_amd64_gcc470/external/gcc/4.7.0-cms
--with-cloog=/Volumes/build1/davidlt/test-4.7.0/a/tmp/BUILDROOT/28dac03f73e4471589c20bae3c32fbc1/opt/cmssw/osx108_amd64_gcc470/external/gcc/4.7.0-cms
--enable-cloog-backend=isl --enable-shared CC='clang -fPIC' CXX='clang++ -fPIC'
CPP='clang -E' CXXCPP='clang++ -E'
Thread model: posix
gcc version 4.7.1 (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.8.0' '-v' '-save-temps' '-c' '-D'
'GNU_GCC' '-D' '_GNU_SOURCE' '-D' '__STDC_LIMIT_MACROS' '-D'
'__STDC_FORMAT_MACROS' '-O2' '-pedantic' '-ansi' '-pthread' '-pipe' '-Wno-vla'
'-m64' '-std=c++11' '-msse3' '-ftree-vectorize' '-Wno-strict-overflow'
'-Werror=array-bounds' '-Werror=format-contains-nul' '-Werror=type-limits'
'-fvisibility-inlines-hidden' '-fno-math-errno' '--param'
'vect-max-version-for-alias-checks=50' '-fipa-pta' '-felide-constructors'
'-fmessage-length=0' '-ftemplate-depth=300' '-Wall' '-Wno-non-template-friend'
'-Wno-long-long' '-Wreturn-type' '-Wunused' '-Wparentheses' '-Wno-deprecated'
'-Werror=return-type' '-Werror=missing-braces' '-Werror=unused-value'
'-Werror=address' '-Werror=format' '-Werror=sign-compare'
'-Werror=write-strings' '-fdiagnostics-show-option' '-fPIC' '-MMD' '-o'
'osx108-ice-testcase.o' '-shared-libgcc' '-mtune=core2'

/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../libexec/gcc/x86_64-apple-darwin12.0.0/4.7.1/cc1plus
-E -quiet -v -iprefix
/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/
-MMD osx108-ice-testcase.d -MQ osx108-ice-testcase.o -D__DYNAMIC__ -D_REENTRANT
-D GNU_GCC -D _GNU_SOURCE -D __STDC_LIMIT_MACROS -D __STDC_FORMAT_MACROS
./osx108-ice-testcase.cc -fPIC -mmacosx-version-min=10.8.0 -m64 -msse3
-mtune=core2 -ansi -std=c++11 -pedantic -Wno-vla -Wno-strict-overflow
-Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -Wall
-Wno-non-template-friend -Wno-long-long -Wreturn-type -Wunused -Wparentheses
-Wno-deprecated -Werror=return-type -Werror=missing-braces -Werror=unused-value
-Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings
-ftree-vectorize -fvisibility-inlines-hidden -fno-math-errno -fipa-pta
-felide-constructors -fmessage-length=0 -ftemplate-depth=300
-fdiagnostics-show-option -fPIC -O2 -fpch-preprocess -o osx108-ice-testcase.ii
ignoring nonexistent directory
"/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/../../../../x86_64-apple-darwin12.0.0/include"
ignoring duplicate directory
"/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/../../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/../../../../include/c++/4.7.1"
ignoring duplicate directory
"/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/../../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/../../../../include/c++/4.7.1/x86_64-apple-darwin12.0.0"
ignoring duplicate directory
"/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/../../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/../../../../include/c++/4.7.1/backward"
ignoring duplicate directory
"/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/../../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/include"
ignoring nonexistent directory "/usr/local/include"
ignoring duplicate directory
"/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/../../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/include-fixed"
ignoring nonexistent directory
"/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/../../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/../../../../x86_64-apple-darwin12.0.0/include"
#include "..." search starts here:
#include <...> search starts here:

/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/../../../../include/c++/4.7.1

/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/../../../../include/c++/4.7.1/x86_64-apple-darwin12.0.0

/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/../../../../include/c++/4.7.1/backward

/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/include

/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/include-fixed

/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../lib/gcc/../../include
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.8.0' '-v' '-save-temps' '-c' '-D'
'GNU_GCC' '-D' '_GNU_SOURCE' '-D' '__STDC_LIMIT_MACROS' '-D'
'__STDC_FORMAT_MACROS' '-O2' '-pedantic' '-ansi' '-pthread' '-pipe' '-Wno-vla'
'-m64' '-std=c++11' '-msse3' '-ftree-vectorize' '-Wno-strict-overflow'
'-Werror=array-bounds' '-Werror=format-contains-nul' '-Werror=type-limits'
'-fvisibility-inlines-hidden' '-fno-math-errno' '--param'
'vect-max-version-for-alias-checks=50' '-fipa-pta' '-felide-constructors'
'-fmessage-length=0' '-ftemplate-depth=300' '-Wall' '-Wno-non-template-friend'
'-Wno-long-long' '-Wreturn-type' '-Wunused' '-Wparentheses' '-Wno-deprecated'
'-Werror=return-type' '-Werror=missing-braces' '-Werror=unused-value'
'-Werror=address' '-Werror=format' '-Werror=sign-compare'
'-Werror=write-strings' '-fdiagnostics-show-option' '-fPIC' '-MMD' '-o'
'osx108-ice-testcase.o' '-shared-libgcc' '-mtune=core2'

/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/../libexec/gcc/x86_64-apple-darwin12.0.0/4.7.1/cc1plus
-fpreprocessed osx108-ice-testcase.ii -fPIC -quiet -dumpbase
osx108-ice-testcase.cc -mmacosx-version-min=10.8.0 -m64 -msse3 -mtune=core2
-auxbase-strip osx108-ice-testcase.o -O2 -pedantic -Wno-vla
-Wno-strict-overflow -Werror=array-bounds -Werror=format-contains-nul
-Werror=type-limits -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type
-Wunused -Wparentheses -Wno-deprecated -Werror=return-type
-Werror=missing-braces -Werror=unused-value -Werror=address -Werror=format
-Werror=sign-compare -Werror=write-strings -ansi -std=c++11 -version
-ftree-vectorize -fvisibility-inlines-hidden -fno-math-errno -fipa-pta
-felide-constructors -fmessage-length=0 -ftemplate-depth=300
-fdiagnostics-show-option -fPIC --param vect-max-version-for-alias-checks=50 -o
osx108-ice-testcase.s
GNU C++ (GCC) version 4.7.1 (x86_64-apple-darwin12.0.0)
    compiled by GNU C version 4.7.1, GMP version 5.0.2, MPFR version 3.0.1, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.7.1 (x86_64-apple-darwin12.0.0)
    compiled by GNU C version 4.7.1, GMP version 5.0.2, MPFR version 3.0.1, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e0f77f95aed71d8a79831c62139ae76a
./osx108-ice-testcase.cc: In function 'void dummyFunction()':
./osx108-ice-testcase.cc:6:6: internal compiler error: in redirect_eh_edge_1,
at tree-eh.c:2215
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

## Failing code ##

#include <vector>
#include <cmath>

double getSomeDouble();

void dummyFunction()
{
    std::vector<double> vals;
    vals.push_back(powf(getSomeDouble(), 2.));
}

## Compilation ##

/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/c++
-c -DGNU_GCC -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -O2
-pedanti
c -ansi -pthread -pipe -Wno-vla -arch x86_64 -Wstrict-overflow -msse3
-ftree-vectorize -Wno-strict-overflow -Werror=array-bounds
-Werror=format-contains-nul -Werror=type-limits -fvi
sibility-inlines-hidden -fno-math-errno --param
vect-max-version-for-alias-checks=50 -fipa-pta -felide-constructors
-fmessage-length=0 -ftemplate-depth-300 -Wall -Wno-non-template-f
riend -Wno-long-long -Wreturn-type -Wunused -Wparentheses -Wno-deprecated
-Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=address
-Werror=format -Werror=sign
-compare -Werror=write-strings -fdiagnostics-show-option -fPIC -MMD
./osx108-ice-testcase.cc -o osx108-ice-testcase.o                               
macms05%
/Volumes/build1/davidlt/test-4.7.0/a/osx108_amd64_gcc470/external/gcc/4.7.0-cms/bin/c++
-c -DGNU_GCC -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -O2
-pedanti
c -ansi -pthread -pipe -Wno-vla -arch x86_64 -Wstrict-overflow -msse3
-ftree-vectorize -Wno-strict-overflow -Werror=array-bounds
-Werror=format-contains-nul -Werror=type-limits -fvi
sibility-inlines-hidden -fno-math-errno --param
vect-max-version-for-alias-checks=50 -fipa-pta -felide-constructors
-fmessage-length=0 -ftemplate-depth-300 -Wall -Wno-non-template-f
riend -Wno-long-long -Wreturn-type -Wunused -Wparentheses -Wno-deprecated
-Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=address
-Werror=format -Werror=sign
-compare -Werror=write-strings -fdiagnostics-show-option -fPIC -MMD -std=c++11
./osx108-ice-testcase.cc -o osx108-ice-testcase.o                               
./osx108-ice-testcase.cc: In function 'void dummyFunction()':
./osx108-ice-testcase.cc:6:6: internal compiler error: in redirect_eh_edge_1,
at tree-eh.c:2215
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug driver/54563] [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
@ 2012-09-13  9:27 ` rguenth at gcc dot gnu.org
  2012-09-13  9:39 ` [Bug middle-end/54563] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-13  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-09-13
     Ever Confirmed|0                           |1
      Known to fail|                            |4.7.0, 4.7.2, 4.8.0

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-13 09:27:30 UTC ---
Confirmed, ICEs this way at -O1.  Reducing.


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

* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
  2012-09-13  9:27 ` [Bug driver/54563] " rguenth at gcc dot gnu.org
@ 2012-09-13  9:39 ` rguenth at gcc dot gnu.org
  2012-09-13 12:40 ` hjl.tools at gmail dot com
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-13  9:39 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
           Priority|P3                          |P2
          Component|driver                      |middle-end
      Known to work|                            |4.6.3
   Target Milestone|---                         |4.7.2
            Summary|[4.7][C++11] MacOS 10.8,    |[4.7/4.8 Regression] ICE in
                   |ICE in redirect_eh_edge_1,  |redirect_eh_edge_1, at
                   |at tree-eh.c:2215           |tree-eh.c:2215
           Severity|major                       |normal

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-13 09:39:10 UTC ---
Reduced testcase:

struct vector
{
  ~vector();
};
extern "C" float powf(float, float);
double getSomeDouble();
double x;
void dummyFunction()
{
  vector vals;
  x = powf(getSomeDouble(), 2.);
}


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

* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
  2012-09-13  9:27 ` [Bug driver/54563] " rguenth at gcc dot gnu.org
  2012-09-13  9:39 ` [Bug middle-end/54563] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
@ 2012-09-13 12:40 ` hjl.tools at gmail dot com
  2012-09-14 15:42 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2012-09-13 12:40 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wschmidt at gcc dot gnu.org

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-09-13 12:40:26 UTC ---
It is caused by revision 174196:

http://gcc.gnu.org/ml/gcc-cvs/2011-05/msg00977.html


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

* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
                   ` (2 preceding siblings ...)
  2012-09-13 12:40 ` hjl.tools at gmail dot com
@ 2012-09-14 15:42 ` jakub at gcc dot gnu.org
  2012-09-14 16:18 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-14 15:42 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-14 15:41:48 UTC ---
Apple headers are broken then, powf isn't marked throw ().  Of course, we
shouldn't ICE on it though.


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

* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
                   ` (3 preceding siblings ...)
  2012-09-14 15:42 ` jakub at gcc dot gnu.org
@ 2012-09-14 16:18 ` jakub at gcc dot gnu.org
  2012-09-14 18:26 ` wschmidt at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-14 16:18 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-14 16:17:38 UTC ---
I'd say the bug is somewhere on the C++ FE side, this is a
DEF_C99_C90_RES_BUILTIN, in -std=c++03 -O2 we don't ICE on it, but with -O2
(-std=gnu++03 or -std=c++11 or -std=gnu++11) somehow it is marked as builtin,
but doesn't inherit throw () from the builtin.
IMHO that doesn't make sense.  Either it is not builtin and we therefore
shouldn't treat it as such, or it is builtin and then we should know that it
never throws.
Sure, tree-ssa-math-opts.c could have added lots of
maybe_clean_or_replace_eh_stmt and gimple_purge_all_dead_eh_edges calls just in
case or give up optimizing if the calls can throw, but none of those builtins
really ever throw, so my preference would be to fix this there.  Jason?


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

* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
                   ` (4 preceding siblings ...)
  2012-09-14 16:18 ` jakub at gcc dot gnu.org
@ 2012-09-14 18:26 ` wschmidt at gcc dot gnu.org
  2012-09-14 18:30 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-09-14 18:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-09-14 18:25:52 UTC ---
I tend to agree; this isn't the only place in the middle-end this could cause
trouble.  The handling of pow/powf in reassociation comes to mind as another
place where this could cause trouble.


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

* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
                   ` (5 preceding siblings ...)
  2012-09-14 18:26 ` wschmidt at gcc dot gnu.org
@ 2012-09-14 18:30 ` jakub at gcc dot gnu.org
  2012-09-14 19:10 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-14 18:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-14 18:30:18 UTC ---
Seems the C++ FE ignores the nothrow attribute from builtins and instead just
uses its own cfns.gperf.  pow is in there, but powf/powl is not (as C++03 is
based in C90).  Even in C++11 powf/powl isn't considered throw().


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

* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
                   ` (6 preceding siblings ...)
  2012-09-14 18:30 ` jakub at gcc dot gnu.org
@ 2012-09-14 19:10 ` jakub at gcc dot gnu.org
  2012-09-17  9:19 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-14 19:10 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-14 19:09:51 UTC ---
Created attachment 28192
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28192
gcc48-pr54563.patch

Actually it doesn't seem to be too hard to handle it in execute_cse_sincos, the
gsi_replace calls already pass true as last argument, so no need to call
maybe_cleanup_eh_stmt, just gimple_purge_dead_eh_edges needs to be called if
we've changed the last stmt in a bb.  Untested yet.


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

* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
                   ` (7 preceding siblings ...)
  2012-09-14 19:10 ` jakub at gcc dot gnu.org
@ 2012-09-17  9:19 ` jakub at gcc dot gnu.org
  2012-09-17  9:26 ` [Bug middle-end/54563] [4.7 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-17  9:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-17 09:18:44 UTC ---
Author: jakub
Date: Mon Sep 17 09:18:35 2012
New Revision: 191378

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191378
Log:
    PR tree-optimization/54563
    * tree-ssa-math-opts.c (execute_cse_sincos): Call
    gimple_purge_dead_eh_edges if last call has been changed.

    * g++.dg/torture/pr54563.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr54563.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-math-opts.c


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

* [Bug middle-end/54563] [4.7 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
                   ` (8 preceding siblings ...)
  2012-09-17  9:19 ` jakub at gcc dot gnu.org
@ 2012-09-17  9:26 ` jakub at gcc dot gnu.org
  2012-09-20 10:26 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-17  9:26 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.8.0
            Summary|[4.7/4.8 Regression] ICE in |[4.7 Regression] ICE in
                   |redirect_eh_edge_1, at      |redirect_eh_edge_1, at
                   |tree-eh.c:2215              |tree-eh.c:2215
      Known to fail|4.8.0                       |

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-17 09:25:51 UTC ---
Fixed on the trunk so far.


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

* [Bug middle-end/54563] [4.7 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
                   ` (9 preceding siblings ...)
  2012-09-17  9:26 ` [Bug middle-end/54563] [4.7 " jakub at gcc dot gnu.org
@ 2012-09-20 10:26 ` jakub at gcc dot gnu.org
  2012-09-20 15:59 ` jakub at gcc dot gnu.org
  2013-03-25 13:31 ` rguenth at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-20 10:26 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.2                       |4.7.3

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-20 10:20:37 UTC ---
GCC 4.7.2 has been released.


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

* [Bug middle-end/54563] [4.7 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
                   ` (10 preceding siblings ...)
  2012-09-20 10:26 ` jakub at gcc dot gnu.org
@ 2012-09-20 15:59 ` jakub at gcc dot gnu.org
  2013-03-25 13:31 ` rguenth at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-20 15:59 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-20 15:58:56 UTC ---
Author: jakub
Date: Thu Sep 20 15:58:51 2012
New Revision: 191571

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191571
Log:
    Backported from mainline
    2012-09-17  Jakub Jelinek  <jakub@redhat.com>

    PR tree-optimization/54563
    * tree-ssa-math-opts.c (execute_cse_sincos): Call
    gimple_purge_dead_eh_edges if last call has been changed.

    * g++.dg/torture/pr54563.C: New test.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/torture/pr54563.C
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_7-branch/gcc/tree-ssa-math-opts.c


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

* [Bug middle-end/54563] [4.7 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
  2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
                   ` (11 preceding siblings ...)
  2012-09-20 15:59 ` jakub at gcc dot gnu.org
@ 2013-03-25 13:31 ` rguenth at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-03-25 13:31 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-25 13:30:57 UTC ---
Fixed.


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

end of thread, other threads:[~2013-03-25 13:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-13  8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
2012-09-13  9:27 ` [Bug driver/54563] " rguenth at gcc dot gnu.org
2012-09-13  9:39 ` [Bug middle-end/54563] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
2012-09-13 12:40 ` hjl.tools at gmail dot com
2012-09-14 15:42 ` jakub at gcc dot gnu.org
2012-09-14 16:18 ` jakub at gcc dot gnu.org
2012-09-14 18:26 ` wschmidt at gcc dot gnu.org
2012-09-14 18:30 ` jakub at gcc dot gnu.org
2012-09-14 19:10 ` jakub at gcc dot gnu.org
2012-09-17  9:19 ` jakub at gcc dot gnu.org
2012-09-17  9:26 ` [Bug middle-end/54563] [4.7 " jakub at gcc dot gnu.org
2012-09-20 10:26 ` jakub at gcc dot gnu.org
2012-09-20 15:59 ` jakub at gcc dot gnu.org
2013-03-25 13:31 ` rguenth 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).