]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: inline variables and modules
authorJason Merrill <jason@redhat.com>
Tue, 19 Nov 2024 20:59:40 +0000 (21:59 +0100)
committerJason Merrill <jason@redhat.com>
Thu, 21 Nov 2024 18:37:23 +0000 (19:37 +0100)
commit819f67a2f633d2000f09119f0e19b784ea0a4bd8
tree07f117d0ca70b2ddb43d4bde1b55d4d9f6e85abf
parent74498be0e6041d2abcd17cf2c0eed6cb034ce6a3
c++: inline variables and modules

We weren't writing out the definition of an inline variable, so the importer
either got an undefined symbol or 0.

gcc/cp/ChangeLog:

* module.cc (has_definition): Also true for inline vars.

gcc/testsuite/ChangeLog:

* g++.dg/modules/inline-1_a.C: New test.
* g++.dg/modules/inline-1_b.C: New test.
gcc/cp/module.cc
gcc/testsuite/g++.dg/modules/inline-1_a.C [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/inline-1_b.C [new file with mode: 0644]