Bug 1253914 - Internal Compiler Error building folly
Summary: Internal Compiler Error building folly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-15 14:28 UTC by Tom Hughes
Modified: 2016-03-10 15:39 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-10 15:39:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Preprocessed source (4.10 MB, text/plain)
2015-08-15 14:28 UTC, Tom Hughes
no flags Details

Description Tom Hughes 2015-08-15 14:28:36 UTC
Created attachment 1063276 [details]
Preprocessed source

Description of problem:

Building folly (https://github.com/facebook/folly/) triggers an ICE on several files, for example:

libtool: compile:  g++ -DHAVE_CONFIG_H -I./.. -pthread -I/usr/include -std=gnu++0x -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c dynamic.cpp  -fPIC -DPIC -o .libs/dynamic.o
In file included from ./../folly/FBString.h:59:0,
                 from ./../folly/dynamic.h:78,
                 from dynamic.cpp:17:
./../folly/Traits.h: In substitution of 'template<class RHS, RHS rhs, class LHS> bool folly::detail::greater_than_impl(typename std::enable_if<(rhs < std::numeric_limits<_UIntType>::min()), LHS>::type) [with RHS = long int; RHS rhs = 9223372036854775807l; LHS = bool]':
./../folly/Traits.h:419:4:   required from 'bool folly::greater_than(LHS) [with RHS = long int; RHS rhs = 9223372036854775807l; LHS = bool]'
./../folly/Conv.h:103:5:   required from 'typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type folly::to(const Src&) [with Tgt = long int; Src = bool; typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type = long int]'
./../folly/dynamic-inl.h:604:30:   required from 'T folly::dynamic::asImpl() const [with T = long int]'
./../folly/dynamic-inl.h:384:68:   required from here
./../folly/Traits.h:379:10: warning: comparison of constant '9223372036854775807l' with boolean expression is always false [-Wbool-compare]
     (rhs < std::numeric_limits<LHS>::min()),
          ^
./../folly/Traits.h: In substitution of 'template<class RHS, RHS rhs, class LHS> bool folly::detail::greater_than_impl(typename std::enable_if<(rhs > std::numeric_limits<_UIntType>::max()), LHS>::type) [with RHS = long int; RHS rhs = 9223372036854775807l; LHS = bool]':
./../folly/Traits.h:419:4:   required from 'bool folly::greater_than(LHS) [with RHS = long int; RHS rhs = 9223372036854775807l; LHS = bool]'
./../folly/Conv.h:103:5:   required from 'typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type folly::to(const Src&) [with Tgt = long int; Src = bool; typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type = long int]'
./../folly/dynamic-inl.h:604:30:   required from 'T folly::dynamic::asImpl() const [with T = long int]'
./../folly/dynamic-inl.h:384:68:   required from here
./../folly/Traits.h:336:10: warning: comparison of constant '9223372036854775807l' with boolean expression is always true [-Wbool-compare]
     (rhs > std::numeric_limits<LHS>::max()),
          ^
./../folly/Traits.h: In substitution of 'template<class RHS, RHS rhs, class LHS> bool folly::detail::greater_than_impl(typename std::enable_if<(rhs > std::numeric_limits<_UIntType>::max()), LHS>::type) [with RHS = long int; RHS rhs = 9223372036854775807l; LHS = bool]':
./../folly/Traits.h:419:4:   required from 'bool folly::greater_than(LHS) [with RHS = long int; RHS rhs = 9223372036854775807l; LHS = bool]'
./../folly/Conv.h:103:5:   required from 'typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type folly::to(const Src&) [with Tgt = long int; Src = bool; typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type = long int]'
./../folly/dynamic-inl.h:604:30:   required from 'T folly::dynamic::asImpl() const [with T = long int]'
./../folly/dynamic-inl.h:384:68:   required from here
./../folly/Traits.h:336:10: warning: comparison of constant '9223372036854775807l' with boolean expression is always true [-Wbool-compare]
./../folly/Traits.h:336:10: warning: comparison of constant '9223372036854775807l' with boolean expression is always true [-Wbool-compare]
./../folly/Traits.h: In substitution of 'template<class RHS, RHS rhs, class LHS> bool folly::detail::greater_than_impl(typename std::enable_if<((rhs <= std::numeric_limits<_UIntType>::max()) && (rhs >= std::numeric_limits<_UIntType>::min())), LHS>::type) [with RHS = long int; RHS rhs = 9223372036854775807l; LHS = bool]':
./../folly/Traits.h:419:4:   required from 'bool folly::greater_than(LHS) [with RHS = long int; RHS rhs = 9223372036854775807l; LHS = bool]'
./../folly/Conv.h:103:5:   required from 'typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type folly::to(const Src&) [with Tgt = long int; Src = bool; typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type = long int]'
./../folly/dynamic-inl.h:604:30:   required from 'T folly::dynamic::asImpl() const [with T = long int]'
./../folly/dynamic-inl.h:384:68:   required from here
./../folly/Traits.h:358:10: warning: comparison of constant '9223372036854775807l' with boolean expression is always false [-Wbool-compare]
     (rhs <= std::numeric_limits<LHS>::max()
          ^
./../folly/Traits.h:359:14: warning: comparison of constant '9223372036854775807l' with boolean expression is always true [-Wbool-compare]
       && rhs >= std::numeric_limits<LHS>::min()),
              ^
./../folly/Traits.h: In substitution of 'template<class RHS, RHS rhs, class LHS> bool folly::detail::less_than_impl(typename std::enable_if<(rhs <= std::numeric_limits<_UIntType>::min()), LHS>::type) [with RHS = long int; RHS rhs = -9223372036854775808l; LHS = bool]':
./../folly/Traits.h:412:4:   required from 'bool folly::less_than(LHS) [with RHS = long int; RHS rhs = -9223372036854775808l; LHS = bool]'
./../folly/Conv.h:110:5:   required from 'typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type folly::to(const Src&) [with Tgt = long int; Src = bool; typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type = long int]'
./../folly/dynamic-inl.h:604:30:   required from 'T folly::dynamic::asImpl() const [with T = long int]'
./../folly/dynamic-inl.h:384:68:   required from here
./../folly/Traits.h:346:10: warning: comparison of constant '-9223372036854775808l' with boolean expression is always true [-Wbool-compare]
     (rhs <= std::numeric_limits<LHS>::min()),
          ^
./../folly/Traits.h: In substitution of 'template<class RHS, RHS rhs, class LHS> bool folly::detail::less_than_impl(typename std::enable_if<(rhs <= std::numeric_limits<_UIntType>::min()), LHS>::type) [with RHS = long int; RHS rhs = -9223372036854775808l; LHS = bool]':
./../folly/Traits.h:412:4:   required from 'bool folly::less_than(LHS) [with RHS = long int; RHS rhs = -9223372036854775808l; LHS = bool]'
./../folly/Conv.h:110:5:   required from 'typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type folly::to(const Src&) [with Tgt = long int; Src = bool; typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type = long int]'
./../folly/dynamic-inl.h:604:30:   required from 'T folly::dynamic::asImpl() const [with T = long int]'
./../folly/dynamic-inl.h:384:68:   required from here
./../folly/Traits.h:346:10: warning: comparison of constant '-9223372036854775808l' with boolean expression is always true [-Wbool-compare]
./../folly/Traits.h:346:10: warning: comparison of constant '-9223372036854775808l' with boolean expression is always true [-Wbool-compare]
./../folly/Traits.h: In substitution of 'template<class RHS, RHS rhs, class LHS> bool folly::detail::less_than_impl(typename std::enable_if<(rhs > std::numeric_limits<_UIntType>::max()), LHS>::type) [with RHS = long int; RHS rhs = -9223372036854775808l; LHS = bool]':
./../folly/Traits.h:412:4:   required from 'bool folly::less_than(LHS) [with RHS = long int; RHS rhs = -9223372036854775808l; LHS = bool]'
./../folly/Conv.h:110:5:   required from 'typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type folly::to(const Src&) [with Tgt = long int; Src = bool; typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type = long int]'
./../folly/dynamic-inl.h:604:30:   required from 'T folly::dynamic::asImpl() const [with T = long int]'
./../folly/dynamic-inl.h:384:68:   required from here
./../folly/Traits.h:336:10: warning: comparison of constant '-9223372036854775808l' with boolean expression is always false [-Wbool-compare]
     (rhs > std::numeric_limits<LHS>::max()),
          ^
./../folly/Traits.h: In substitution of 'template<class RHS, RHS rhs, class LHS> bool folly::detail::less_than_impl(typename std::enable_if<((rhs <= std::numeric_limits<_UIntType>::max()) && (rhs > std::numeric_limits<_UIntType>::min())), LHS>::type) [with RHS = long int; RHS rhs = -9223372036854775808l; LHS = bool]':
./../folly/Traits.h:412:4:   required from 'bool folly::less_than(LHS) [with RHS = long int; RHS rhs = -9223372036854775808l; LHS = bool]'
./../folly/Conv.h:110:5:   required from 'typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type folly::to(const Src&) [with Tgt = long int; Src = bool; typename std::enable_if<((std::is_integral<_Tp2>::value && std::is_integral<_Tp>::value) && (! std::is_same< <template-parameter-1-1>, <template-parameter-1-2> >::value)), Tgt>::type = long int]'
./../folly/dynamic-inl.h:604:30:   required from 'T folly::dynamic::asImpl() const [with T = long int]'
./../folly/dynamic-inl.h:384:68:   required from here
./../folly/Traits.h:325:10: warning: comparison of constant '-9223372036854775808l' with boolean expression is always true [-Wbool-compare]
     (rhs <= std::numeric_limits<LHS>::max()
          ^
./../folly/Traits.h:326:14: warning: comparison of constant '-9223372036854775808l' with boolean expression is always false [-Wbool-compare]
       && rhs > std::numeric_limits<LHS>::min()),
              ^
'
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccM9aAmP.out file, please attach this to your bugreport.

Version-Release number of selected component (if applicable):

gcc-5.1.1-4.fc22.x86_64

Comment 1 Marek Polacek 2015-08-17 08:58:12 UTC
This has been fixed in
commit 1774df35222fb21e5b38e5ed7b1083310070c25b
Author: miyuki <miyuki@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Sat Jun 20 00:10:00 2015 +0000

    PR c++/65882
    
    gcc/cp/
        * call.c (build_new_op_1): Check tf_warning flag in all cases.
    
    gcc/testsuite/
        * g++.dg/diagnostic/inhibit-warn-1.C: New test.
        * g++.dg/diagnostic/inhibit-warn-2.C: New test.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224702 138bc75d-0d04-0410-961f-82ee72b054a4

The fix is also in the GCC 5 branch so next Fedora GCC build should have this issue fixed.

Comment 2 Marek Polacek 2016-03-10 15:39:19 UTC
This one should be already fixed.


Note You need to log in before you can comment on or make changes to this bug.