public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53836] New: ICE: unexpected expression of kind template_parm_index
@ 2012-07-03  8:23 roger.ferrer at bsc dot es
  2012-07-03  8:29 ` [Bug c++/53836] " roger.ferrer at bsc dot es
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: roger.ferrer at bsc dot es @ 2012-07-03  8:23 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53836
           Summary: ICE: unexpected expression of kind template_parm_index
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: roger.ferrer@bsc.es


Created attachment 27733
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27733
Preprocessed source

Hello,

the following testcase fails to compile in g++ 4.7.1

// -- test.cc
template <int N>
struct A { };

template <int Q>
void g()
{
    const int M ( Q );

    A<M> a;
}

void h()
{
    g<3>();
}

$ g++ -c test.cc
test.cc: In function ‘void g()’:
test.cc:9:8: internal compiler error: unexpected expression ‘Q’ of kind
template_parm_index
Please submit a full bug report,
with preprocessed source if appropriate.
Preprocessed source stored into /tmp/cc7IeEc0.out file, please attach this to
your bugreport.

Using 'const int M = Q;' instead works fine.

g++ 4.4 and g++ 4.5 fail (without an ICE), but g++ 4.6.3 works fine so it looks
to me as a 4.7 regression.

Kind regards,


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

end of thread, other threads:[~2012-09-13 15:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-03  8:23 [Bug c++/53836] New: ICE: unexpected expression of kind template_parm_index roger.ferrer at bsc dot es
2012-07-03  8:29 ` [Bug c++/53836] " roger.ferrer at bsc dot es
2012-07-03 17:27 ` daniel.kruegler at googlemail dot com
2012-08-13 15:27 ` [Bug c++/53836] [4.7/4.8 Regression] " paolo.carlini at oracle dot com
2012-08-13 21:07 ` hjl.tools at gmail dot com
2012-09-07  9:23 ` rguenth at gcc dot gnu.org
2012-09-13 15:14 ` jason at gcc dot gnu.org
2012-09-13 15:15 ` jason at gcc dot gnu.org
2012-09-13 15:31 ` jason 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).