On Thu, Dec 19, 2019 at 9:05 AM Christophe Lyon <christophe.l...@linaro.org> wrote:
> On Tue, 17 Dec 2019 at 22:46, Jason Merrill <ja...@redhat.com> wrote: > > > > The variable templates patch way back when forgot to add handling here. > The > > simplest answer seems to be recursing to the underlying declaration. > > > > Tested x86_64-pc-linux-gnu, applying to trunk. > > > > * decl.c (redeclaration_error_message): Recurse for variable > > templates. > > > Hi, > > This patch introduced regressions on aarch64: > g++.dg/ext/sve-sizeless-1.C -std=gnu++14 (test for errors, line 77) > g++.dg/ext/sve-sizeless-1.C -std=gnu++17 (test for errors, line 77) > g++.dg/ext/sve-sizeless-1.C -std=gnu++2a (test for errors, line 77) > g++.dg/ext/sve-sizeless-2.C -std=gnu++14 (test for errors, line 77) > g++.dg/ext/sve-sizeless-2.C -std=gnu++17 (test for errors, line 77) > g++.dg/ext/sve-sizeless-2.C -std=gnu++2a (test for errors, line 77) > The code I removed that gave that error was from 2004, predating alias templates; I can't see anything in the standard to prohibit redefining an alias template to refer to the same type, as you definitely can with a non-template alias or typedef, and other compilers allow it. So I think the tests should be fixed. Jason