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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |ppalka at gcc dot gnu.org
   Last reconfirmed|                            |2021-10-06

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
After fixing PR98930, GCC trunk now almost links the testcase.  The one
remaining link error is:

/usr/bin/ld: /tmp/cc6x1IEI.o: in function `int* a<&(main::x2)>()':
102198.C:(.text+0x30): undefined reference to `main::x2'


Further reduced testcase:

template<int* p>
auto f() { return p; }

int main() {
  if constexpr (false) {
    static int x;
    f<&x>();
  }
}

Reply via email to