This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/65719] Link error with constexpr variable template
- From: "ldionne.2 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 03 Jun 2015 19:21:26 +0000
- Subject: [Bug c++/65719] Link error with constexpr variable template
- Auto-submitted: auto-generated
- References: <bug-65719-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65719
--- Comment #3 from Louis Dionne <ldionne.2 at gmail dot com> ---
This bug is a real, real pain. I'm willing to help fixing it and/or to provide
test cases, but it'll take me forever if someone on your side does not assist,
since I don't know the GCC code base. I've looked at the changes introduced in
r213641 and I wasn't able to see an obvious cause for the bug, but then again I
don't know GCC.
What I can tell is this: If you look at the produced assembly
(https://goo.gl/Uxc8Dl), you can clearly see that no symbol is ever emitted for
`f<int>`. When you explicitly instantiate `f<int>`, however, the symbol is
emitted. If `f<int>` is not constexpr, the symbol is also emitted.