public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65882] [5/6 Regression] Internal compiler error: Error reporting routines re-entered
Date: Sat, 25 Apr 2015 09:39:00 -0000	[thread overview]
Message-ID: <bug-65882-4-V1CBygSQsz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65882-4@http.gcc.gnu.org/bugzilla/>

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


  parent reply	other threads:[~2015-04-25  9:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-25  8:29 [Bug c++/65882] New: " 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 [this message]
2015-04-27  9:05 ` [Bug c++/65882] [5/6 Regression] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-65882-4-V1CBygSQsz@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).