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++/61539] [4.8/4.9/4.10 Regression] ICE: in unify_one_argument, at cp/pt.c:15465
Date: Tue, 17 Jun 2014 19:48:00 -0000	[thread overview]
Message-ID: <bug-61539-4-e0bx6fbH5T@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61539-4@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 10395 bytes --]

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-06-17
                 CC|                            |trippels at gcc dot gnu.org
   Target Milestone|---                         |4.8.5
            Summary|ICE: in unify_one_argument, |[4.8/4.9/4.10 Regression]
                   |at cp/pt.c:15465            |ICE: in unify_one_argument,
                   |validate(value_store,       |at cp/pt.c:15465
                   |new_tokens, (T*)0, 0);      |
     Ever confirmed|0                           |1
      Known to fail|                            |4.10.0, 4.8.3, 4.9.0

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Confirmed.

markus@x4 tmp % cat test.ii
template <typename _CharT> class A;
template <typename> class B;
template <class charT> class C;
template <> class C<char>
{
  virtual void xparse (int &, const B<A<char> > &) const;
};
template <class T, class charT = char> class G : C<charT>
{
public:
  G (void *) {}
  void default_value (const T &);
  void xparse (int &, const B<A<charT> > &) const;
};
template <class T, class charT>
void validate (int &, const B<A<charT> > &, T *, int);
template <class T, class charT>
void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
{
  validate (p1, p2, (T *)0, 0);
}
template <class T> G<T> *value (T *) { G<T> *r = new G<T>(0); }
namespace Eigen
{
template <typename T> struct D;
template <typename, int, int, int = 0 ?: 0, int = 0, int = 0 > class F;
template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
          int _MaxCols>
struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
{
  typedef _Scalar Scalar;
};
template <typename, int, int, int, int, int _MaxCols> class F
{
public:
  typedef typename Eigen::D<F>::Scalar Scalar;
  F (const Scalar &, const Scalar &, const Scalar &);
};
template <class... T>
void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
}
int main (int, char *[])
{
  Eigen::F<double, 3, 1> a (0, 0, 0);
  value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
}

markus@x4 tmp % clang++ -w -c -std=c++11 test.ii
markus@x4 tmp % g++ -c -std=c++11 test.ii
test.ii: In substitution of ‘template<class ... T> void Eigen::validate(int&,
const B<A<char> >&, Eigen::F<T ...>*) [with T = <missing>]’:
test.ii:20:30:   required from ‘void G<T, charT>::xparse(int&, const B<A<charT>
>&) const [with T = Eigen::F<double, 3, 1>; charT = char]’
test.ii:46:1:   required from here
test.ii:20:30: internal compiler error: in unify_one_argument, at cp/pt.c:16504
   validate (p1, p2, (T *)0, 0);
                              ^
0x5e66fc unify_one_argument
        ../../gcc/gcc/cp/pt.c:16503
0x5e7562 unify_pack_expansion
        ../../gcc/gcc/cp/pt.c:17322
0x5e5b6b unify
        ../../gcc/gcc/cp/pt.c:18077
0x4fccc7 try_class_unification
        ../../gcc/gcc/cp/pt.c:17084
0x5e2bff unify
        ../../gcc/gcc/cp/pt.c:18105
0x5e2dec unify
        ../../gcc/gcc/cp/pt.c:17973
0x5e64f7 unify_one_argument
        ../../gcc/gcc/cp/pt.c:16509
0x5e894c type_unification_real
        ../../gcc/gcc/cp/pt.c:16581
0x5f2973 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool)
        ../../gcc/gcc/cp/pt.c:16019
0x55e9d1 add_template_candidate_real
        ../../gcc/gcc/cp/call.c:3008
0x55f4ac add_template_candidate
        ../../gcc/gcc/cp/call.c:3105
0x55f4ac add_candidates
        ../../gcc/gcc/cp/call.c:5233
0x561cf9 perform_overload_resolution
        ../../gcc/gcc/cp/call.c:3953
0x56430a build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
        ../../gcc/gcc/cp/call.c:4030
0x6e1d74 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/gcc/cp/semantics.c:2365
0x5b7446 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:14958
0x5c7a4e tsubst_expr
        ../../gcc/gcc/cp/pt.c:14137
0x5c8455 tsubst_expr
        ../../gcc/gcc/cp/pt.c:13563
0x5c8a37 tsubst_expr
        ../../gcc/gcc/cp/pt.c:13735
0x5c55ae instantiate_decl(tree_node*, int, bool)
        ../../gcc/gcc/cp/pt.c:20047
Please submit a full bug report,
>From gcc-bugs-return-454422-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 17 19:52:19 2014
Return-Path: <gcc-bugs-return-454422-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3051 invoked by alias); 17 Jun 2014 19:52:19 -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 3026 invoked by uid 48); 17 Jun 2014 19:52:15 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61539] [4.8/4.9/4.10 Regression] ICE: in unify_one_argument, at cp/pt.c:15465
Date: Tue, 17 Jun 2014 19:52: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.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels 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: 4.8.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61539-4-Ec8QOooSFE@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61539-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61539-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-06/txt/msg01504.txt.bz2
Content-length: 1197

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

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Another smaller testcase (clang rejects this):

markus@x4 tmp % cat foo.ii
template <class> class A;
template <> class A<char>
{
  virtual void m_fn1 (int &, const int &) const;
};
template <typename, int> class B;
template <class, class = int> class C : A<char>
{
public:
  C (void *) {}
  void m_fn1 (int &, const int &) const;
};
C<B<double, 0> > *a = new C<B<double, 0>>(0);
template <class... T> void validate (B<T...> *);
template <class T, class charT>
void C<T, charT>::m_fn1 (int &, const int &) const
{
  validate ((T *)0);
}

markus@x4 tmp % g++ -c -std=c++11 foo.ii
foo.ii: In substitution of ‘template<class ... T> void validate(B<T ...>*)
[with T = <missing>]’:
foo.ii:18:19:   required from ‘void C< <template-parameter-1-1>,
<template-parameter-1-2> >::m_fn1(int&, const int&) const [with
<template-parameter-1-1> = B<double, 0>; <template-parameter-1-2> = int]’
foo.ii:19:1:   required from here
foo.ii:18:19: internal compiler error: in unify_one_argument, at cp/pt.c:16504

PR60942 looks like a dup.
>From gcc-bugs-return-454423-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 17 19:52:37 2014
Return-Path: <gcc-bugs-return-454423-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4349 invoked by alias); 17 Jun 2014 19:52:37 -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 3691 invoked by uid 48); 17 Jun 2014 19:52:30 -0000
From: "rose.garcia-eggl2fk at yopmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/61388] [4.8 Regression] linux/microblaze fails to build: undefined machine-specific constraint at this point: "Q"
Date: Tue, 17 Jun 2014 19:52:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: 4.8.3
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rose.garcia-eggl2fk at yopmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61388-4-V5kt8QVfN9@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61388-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61388-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: 2014-06/txt/msg01505.txt.bz2
Content-length: 899

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

--- Comment #5 from Rose Garcia <rose.garcia-eggl2fk at yopmail dot com> ---
(In reply to Michael Eager from comment #3)
> What sources are you building?

GCC 4.8.3 release tarball, as already mentioned.

>
> When I build --target=microblaze-xilinx-elf from the current sources, I see
> the same warning message for microblaze.md that you list.  I do not see the
> other errors.  Constraint "Q" is defined in constraints.md.

others building gcc 4.8.3 reported the same problem.
the problem is that this patch entered the *stable* release series between
4.8.2 and 4.8.3, and apparently depends on changes from the 4.9.x devel branch.


this patch reportedly fixes the problem:
http://www.openadk.org/cgi-bin/gitweb.cgi?p=openadk.git;a=blob;f=toolchain/gcc/patches/4.8.3/miscompile.microblaze;hÕ75054aa9a6b9c6081753289dcfc4b3e47c5af7;hb=HEAD


  reply	other threads:[~2014-06-17 19:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 17:36 [Bug c++/61539] New: ICE: in unify_one_argument, at cp/pt.c:15465 validate(value_store, new_tokens, (T*)0, 0); ilja.j.honkonen at nasa dot gov
2014-06-17 19:48 ` trippels at gcc dot gnu.org [this message]
2014-06-17 20:46 ` [Bug c++/61539] [4.8/4.9/4.10 Regression] ICE: in unify_one_argument, at cp/pt.c:15465 trippels at gcc dot gnu.org
2014-06-18 13:30 ` trippels at gcc dot gnu.org
2014-06-26 12:51 ` rguenth at gcc dot gnu.org
2014-06-30 15:12 ` jason at gcc dot gnu.org
2014-06-30 15:59 ` jason at gcc dot gnu.org
2014-06-30 16:11 ` jason at gcc dot gnu.org
2014-06-30 17:31 ` jason at gcc dot gnu.org
2014-06-30 17:36 ` jason 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-61539-4-e0bx6fbH5T@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).