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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #2)
> Confirmed.  The following simplified test case also reproduces the error
> with today's top of trunk.  5.1.0 compiles the test case successfully so
> this is a regression.
> 
> $ cat u.cpp && /home/msebor/build/gcc-trunk-svn/gcc/xg++
> -B/home/msebor/build/gcc-trunk-svn/gcc -S -Wall -Wextra -o/dev/null
> -std=c++14 u.cpp
> struct A
> {    
>   template <int>
>   static void (*pf)();
> };
> 
> template <int>
> void foo () {
>   (void)A::pf<true>;
> }
> 
> void bar () {
>   foo<0>();
> }
> u.cpp: In instantiation of ‘void foo() [with int <anonymous> = 0]’:
> u.cpp:13:10:   required from here
> u.cpp:9:9: error: ‘template<int <anonymous> > void (* A::pf)()<<anonymous>
> >’ is not a function template
>    (void)A::pf<true>;
>          ^
> 
> u.cpp:9:9: error: ‘pf<true>’ is not a member of ‘A’

This test seems to regress between 5.2 and 5.3.

Reply via email to