This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/59115] [c++1y] ICE with auto as template parameter


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

Adam Butcher <adam at jessamine dot co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adam at jessamine dot co.uk

--- Comment #1 from Adam Butcher <adam at jessamine dot co.uk> ---
The same ICE occurs without the use of 'auto'.  Modifying the testcase from

  template<typename T, auto, int = 0> void foo(T, auto) {}

to either

  template<typename T, float, int = 0> void foo(T, auto) {} 

or

  template<typename T, float, int = 0, typename X> void foo(T, X) {}

causes the same backtrace.  The default 0 for the int parm is also not
significant.  The ICE seems to be caused whenever an error_mark_node is left in
the template parameter list for whatever reason.  Looks like 4.8 used to bail
early in that case ("confused by earlier errors, bailing out").


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]