public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97951] New: Template specialization of function template fails for fixed-sized SVE vector types.
@ 2020-11-23 14:19 david.tellenbach at arm dot com
  2020-11-23 15:33 ` [Bug c++/97951] " rsandifo at gcc dot gnu.org
  2020-11-23 22:03 ` david.tellenbach at arm dot com
  0 siblings, 2 replies; 3+ messages in thread
From: david.tellenbach at arm dot com @ 2020-11-23 14:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97951
           Summary: Template specialization of function template fails for
                    fixed-sized SVE vector types.
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: david.tellenbach at arm dot com
  Target Milestone: ---

Following the ACLE for SVE Version 00bet6, fixed-length types can be declared
by using the 

  __attribute__((arm_sve_vector_bits(N)))

type attribute. However, the following snippet fails using g++-10 (Ubuntu
10.1.0-2ubuntu1~18.04) 10.1.0:

g++-10 -march=armv8-a+sve -msve-vector-bits=512 main.cc -c

main.cc:

#include <arm_sve.h>

typedef svfloat32_t PacketXf __attribute__((arm_sve_vector_bits(512)));

template<typename T>
T func(const float& f)
{
  return f;
}

template<>
PacketXf func(const float& f)
{
  return svdup_n_f32(f);
}

producing the following diagnostics:

main.cc:9:10: error: template-id 'func<>' for 'PacketXf func(const float&)'
does not match any template declaration
    9 | PacketXf func(const float& f) { return svdup_n_f32(f); }
      |          ^~~~
main.cc:6:3: note: candidate is: 'template<class T> T func(const float&)'
    6 | T func(const float& f) { return f; }
      |   ^~~~

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

* [Bug c++/97951] Template specialization of function template fails for fixed-sized SVE vector types.
  2020-11-23 14:19 [Bug c++/97951] New: Template specialization of function template fails for fixed-sized SVE vector types david.tellenbach at arm dot com
@ 2020-11-23 15:33 ` rsandifo at gcc dot gnu.org
  2020-11-23 22:03 ` david.tellenbach at arm dot com
  1 sibling, 0 replies; 3+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-11-23 15:33 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu.org
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-11-23

--- Comment #1 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Could you try GCC 10.2?  I believe this was fixed by
g:ecd56bc41563a84808fe4e1a2c7341bf8a621c92.

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

* [Bug c++/97951] Template specialization of function template fails for fixed-sized SVE vector types.
  2020-11-23 14:19 [Bug c++/97951] New: Template specialization of function template fails for fixed-sized SVE vector types david.tellenbach at arm dot com
  2020-11-23 15:33 ` [Bug c++/97951] " rsandifo at gcc dot gnu.org
@ 2020-11-23 22:03 ` david.tellenbach at arm dot com
  1 sibling, 0 replies; 3+ messages in thread
From: david.tellenbach at arm dot com @ 2020-11-23 22:03 UTC (permalink / raw)
  To: gcc-bugs

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

David Tellenbach <david.tellenbach at arm dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|WAITING                     |RESOLVED

--- Comment #2 from David Tellenbach <david.tellenbach at arm dot com> ---
Thanks, I can confirm this is fixed in GCC 10.2 and works as expected.

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

end of thread, other threads:[~2020-11-23 22:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 14:19 [Bug c++/97951] New: Template specialization of function template fails for fixed-sized SVE vector types david.tellenbach at arm dot com
2020-11-23 15:33 ` [Bug c++/97951] " rsandifo at gcc dot gnu.org
2020-11-23 22:03 ` david.tellenbach at arm dot com

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).