public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65882] New: Internal compiler error: Error reporting routines re-entered
@ 2015-04-25  8:29 yan12125 at gmail dot com
  2015-04-25  8:49 ` [Bug c++/65882] " trippels at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: yan12125 at gmail dot com @ 2015-04-25  8:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65882
           Summary: Internal compiler error: Error reporting routines
                    re-entered
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yan12125 at gmail dot com

I invoke the following command:

g++ -nostdlib -Wbool-compare -Wno-unused -Wno-deprecated-declarations -s
-std=c++11 json.ii

json.ii is the attached file. It's from hhvm.
https://github.com/facebook/folly/blob/master/folly/json.cpp

I encounter no problem if compiling folly separately. If I compile the whole
hhvm, the following error occurs.

The result is:
https://gist.github.com/yan12125/b5498cb6ac2be4a5649a

The compiler version is:
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-5.1.0/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-lto --enable-plugin --enable-install-libiberty
--with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib
--disable-werror --enable-checking=release --with-default-libstdcxx-abi=c++98
Thread model: posix
gcc version 5.1.0 (GCC)

OS: Arch Linux x86_64
I use the official gcc-multilib package

$ pacman -Qi gcc-multilib 
Name           : gcc-multilib
Version        : 5.1.0-1
Description    : The GNU Compiler Collection - C and C++ frontends for multilib
Architecture   : x86_64
URL            : http://gcc.gnu.org
Licenses       : GPL  LGPL  FDL  custom
Groups         : multilib-devel
Provides       : gcc=5.1.0-1
Depends On     : gcc-libs-multilib=5.1.0-1  binutils>=2.25  libmpc
Optional Deps  : None
Required By    : clang  dkms  dmd
Optional For   : None
Conflicts With : gcc
Replaces       : None
Installed Size : 108.38 MiB
Packager       : Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Build Date     : Thu 23 Apr 2015 09:33:01 PM CST
Install Date   : Sat 25 Apr 2015 01:48:42 PM CST
Install Reason : Explicitly installed
Install Script : Yes
Validated By   : Signature


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

* [Bug c++/65882] Internal compiler error: Error reporting routines re-entered
  2015-04-25  8:29 [Bug c++/65882] New: Internal compiler error: Error reporting routines re-entered yan12125 at gmail dot com
@ 2015-04-25  8:49 ` trippels at gcc dot gnu.org
  2015-04-25  9:14 ` yan12125 at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-04-25  8:49 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2015-04-25
                 CC|                            |trippels at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
There is no attachment. (you can compress the file if it is too large)


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

* [Bug c++/65882] Internal compiler error: Error reporting routines re-entered
  2015-04-25  8:29 [Bug c++/65882] New: Internal compiler error: Error reporting routines re-entered yan12125 at gmail dot com
  2015-04-25  8:49 ` [Bug c++/65882] " trippels at gcc dot gnu.org
@ 2015-04-25  9:14 ` yan12125 at gmail dot com
  2015-04-25  9:39 ` [Bug c++/65882] [5/6 Regression] " trippels at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: yan12125 at gmail dot com @ 2015-04-25  9:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from yan12125 at gmail dot com ---
Sorry, I don't know why the attachment is lost. I re-attach the file here:

https://gist.githubusercontent.com/yan12125/b5498cb6ac2be4a5649a/raw/json.ii


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

* [Bug c++/65882] [5/6 Regression] Internal compiler error: Error reporting routines re-entered
  2015-04-25  8:29 [Bug c++/65882] New: Internal compiler error: Error reporting routines re-entered yan12125 at gmail dot com
  2015-04-25  8:49 ` [Bug c++/65882] " trippels at gcc dot gnu.org
  2015-04-25  9:14 ` yan12125 at gmail dot com
@ 2015-04-25  9:39 ` trippels at gcc dot gnu.org
  2015-04-27  9:05 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-04-25  9:39 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
            Summary|Internal compiler error:    |[5/6 Regression] Internal
                   |Error reporting routines    |compiler error: Error
                   |re-entered                  |reporting routines
                   |                            |re-entered

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 tmp % cat json.ii
template <bool> struct A
{
  typedef int type;
};
template <typename _Tp> struct numeric_limits
{
  static constexpr _Tp
  max ()
  {
    return 0;
  }
};
template <> struct numeric_limits<long>
{
  static constexpr int
  max ()
  {
    return 5;
  }
};
template <typename RHS, RHS rhs, typename LHS>
void greater_than_impl (typename A<(rhs > numeric_limits<LHS>::max ())>::type)
{
}
template <typename, int rhs, typename LHS> void greater_than (LHS)
{
  greater_than_impl<int, rhs, LHS>;
}
struct B
{
  long m_fn1 () const;
  template <class T> T m_fn2 () const;
};
template <class, class Src>
void
to (Src value)
{
  greater_than<long, numeric_limits<long>::max ()> (value);
}
bool asImpl___trans_tmp_1;
template <class T>
T
B::m_fn2 () const
{
  to<T> (asImpl___trans_tmp_1);
};
long
B::m_fn1 () const
{
  m_fn2<long> ();
}

markus@x4 tmp % g++ -Wbool-compare -c -std=c++11 json.ii
json.ii: In instantiation of ‘void greater_than(LHS) [with
<template-parameter-1-1> = long int; int rhs = 5; LHS = bool]’:
json.ii:38:52:   required from ‘void to(Src) [with <template-parameter-1-1> =
long int; Src = bool]’
json.ii:45:9:   required from ‘T B::m_fn2() const [with T = long int]’
json.ii:50:16:   required from here
json.ii:22:41: warning: comparison of constant ‘5’ with boolean expression is
always true [-Wbool-compare]
 void greater_than_impl (typename A<(rhs > numeric_limits<LHS>::max ())>::type)
                                         ^
json.ii:22:41: warning: comparison of constant ‘5’ with boolean expression is
always true [-Wbool-compare]
‘
Internal compiler error: Error reporting routines re-entered.
0x611701 build_new_op_1
        ../../gcc/gcc/cp/call.c:5691
0x61238e build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*,
tree_node*, tree_node**, int)
        ../../gcc/gcc/cp/call.c:5750
0x73f5ce build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code,
tree_node*, tree_code, tree_node**, int)
        ../../gcc/gcc/cp/typeck.c:3805
0x676cda tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:14730
0x6663af tsubst_expr
        ../../gcc/gcc/cp/pt.c:14352
0x670f4c tsubst_template_arg
        ../../gcc/gcc/cp/pt.c:9654
0x66c26a tsubst_template_args
        ../../gcc/gcc/cp/pt.c:10205
0x682cb0 tsubst_aggr_type
        ../../gcc/gcc/cp/pt.c:10402
0x66e65d tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:12366
0x6f2b40 dump_template_bindings
        ../../gcc/gcc/cp/error.c:369
0x6f2b40 dump_substitution
        ../../gcc/gcc/cp/error.c:1448
0x6f6214 decl_to_string
        ../../gcc/gcc/cp/error.c:2910
0x6f6214 cp_printer
        ../../gcc/gcc/cp/error.c:3494
0x1350407 pp_format(pretty_printer*, text_info*)
        ../../gcc/gcc/pretty-print.c:613
0x1350c90 pp_format_verbatim(pretty_printer*, text_info*)
        ../../gcc/gcc/pretty-print.c:672
0x1350d6d pp_verbatim(pretty_printer*, char const*, ...)
        ../../gcc/gcc/pretty-print.c:875
0x6e84fa print_instantiation_full_context
        ../../gcc/gcc/cp/error.c:3273
0x6e84fa maybe_print_instantiation_context
        ../../gcc/gcc/cp/error.c:3417
0x6f4db3 cp_diagnostic_starter
        ../../gcc/gcc/cp/error.c:3109
0x134d499 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        ../../gcc/gcc/diagnostic.c:866
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-484611-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Apr 25 10:12:39 2015
Return-Path: <gcc-bugs-return-484611-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7762 invoked by alias); 25 Apr 2015 10:12:39 -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 7732 invoked by uid 55); 25 Apr 2015 10:12:35 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/52085] incomplete enum not completed correctly if packed was used
Date: Sat, 25 Apr 2015 10:12:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.5.1
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-52085-4-pJuvNjLA7G@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-52085-4@http.gcc.gnu.org/bugzilla/>
References: <bug-52085-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-04/txt/msg02163.txt.bz2
Content-length: 645

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

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Sat Apr 25 10:12:01 2015
New Revision: 222440

URL: https://gcc.gnu.org/viewcvs?rev"2440&root=gcc&view=rev
Log:
    PR c/52085
    * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
    attribute.

    * gcc.dg/enum-incomplete-2.c: New test.
    * gcc.dg/enum-mode-1.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/enum-incomplete-2.c
    trunk/gcc/testsuite/gcc.dg/enum-mode-1.c
Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-decl.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/65882] [5/6 Regression] Internal compiler error: Error reporting routines re-entered
  2015-04-25  8:29 [Bug c++/65882] New: Internal compiler error: Error reporting routines re-entered yan12125 at gmail dot com
                   ` (2 preceding siblings ...)
  2015-04-25  9:39 ` [Bug c++/65882] [5/6 Regression] " trippels at gcc dot gnu.org
@ 2015-04-27  9:05 ` rguenth at gcc dot gnu.org
  2015-04-28  6:45 ` maltsevm at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-04-27  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.2


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

* [Bug c++/65882] [5/6 Regression] Internal compiler error: Error reporting routines re-entered
  2015-04-25  8:29 [Bug c++/65882] New: Internal compiler error: Error reporting routines re-entered yan12125 at gmail dot com
                   ` (3 preceding siblings ...)
  2015-04-27  9:05 ` rguenth at gcc dot gnu.org
@ 2015-04-28  6:45 ` maltsevm at gmail dot com
  2015-06-09  8:01 ` trippels at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: maltsevm at gmail dot com @ 2015-04-28  6:45 UTC (permalink / raw)
  To: gcc-bugs

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

Mikhail Maltsev <maltsevm at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maltsevm at gmail dot com

--- Comment #4 from Mikhail Maltsev <maltsevm at gmail dot com> ---
For the record. Proposed patch (also contains slightly more reduced testcase):
https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01558.html


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

* [Bug c++/65882] [5/6 Regression] Internal compiler error: Error reporting routines re-entered
  2015-04-25  8:29 [Bug c++/65882] New: Internal compiler error: Error reporting routines re-entered yan12125 at gmail dot com
                   ` (4 preceding siblings ...)
  2015-04-28  6:45 ` maltsevm at gmail dot com
@ 2015-06-09  8:01 ` trippels at gcc dot gnu.org
  2015-06-24  0:53 ` miyuki at gcc dot gnu.org
  2015-06-24  0:57 ` miyuki at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-06-09  8:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
*** Bug 66467 has been marked as a duplicate of this bug. ***


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

* [Bug c++/65882] [5/6 Regression] Internal compiler error: Error reporting routines re-entered
  2015-04-25  8:29 [Bug c++/65882] New: Internal compiler error: Error reporting routines re-entered yan12125 at gmail dot com
                   ` (5 preceding siblings ...)
  2015-06-09  8:01 ` trippels at gcc dot gnu.org
@ 2015-06-24  0:53 ` miyuki at gcc dot gnu.org
  2015-06-24  0:57 ` miyuki at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: miyuki at gcc dot gnu.org @ 2015-06-24  0:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Mikhail Maltsev <miyuki at gcc dot gnu.org> ---
Author: miyuki
Date: Wed Jun 24 00:53:02 2015
New Revision: 224864

URL: https://gcc.gnu.org/viewcvs?rev=224864&root=gcc&view=rev
Log:
Backport from mainline:

2015-06-20  Mikhail Maltsev  <maltsevm@gmail.com>
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.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-1.C
    branches/gcc-5-branch/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C
Modified:
    branches/gcc-5-branch/gcc/cp/ChangeLog
    branches/gcc-5-branch/gcc/cp/call.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/65882] [5/6 Regression] Internal compiler error: Error reporting routines re-entered
  2015-04-25  8:29 [Bug c++/65882] New: Internal compiler error: Error reporting routines re-entered yan12125 at gmail dot com
                   ` (6 preceding siblings ...)
  2015-06-24  0:53 ` miyuki at gcc dot gnu.org
@ 2015-06-24  0:57 ` miyuki at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: miyuki at gcc dot gnu.org @ 2015-06-24  0:57 UTC (permalink / raw)
  To: gcc-bugs

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

Mikhail Maltsev <miyuki at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |miyuki at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #8 from Mikhail Maltsev <miyuki at gcc dot gnu.org> ---
Fixed for GCC 5.2 and 6.


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

end of thread, other threads:[~2015-06-24  0:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-25  8:29 [Bug c++/65882] New: Internal compiler error: Error reporting routines re-entered yan12125 at gmail dot com
2015-04-25  8:49 ` [Bug c++/65882] " trippels at gcc dot gnu.org
2015-04-25  9:14 ` yan12125 at gmail dot com
2015-04-25  9:39 ` [Bug c++/65882] [5/6 Regression] " trippels at gcc dot gnu.org
2015-04-27  9:05 ` rguenth at gcc dot gnu.org
2015-04-28  6:45 ` maltsevm at gmail dot com
2015-06-09  8:01 ` trippels at gcc dot gnu.org
2015-06-24  0:53 ` miyuki at gcc dot gnu.org
2015-06-24  0:57 ` miyuki 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).