Skip to content

Conversation

@jan-kelemen
Copy link
Contributor

Compiling with /GL (Whole program optimization) and /LTCG (Link-time code generation) flags on MSVC 2022 causes an error/warning (depends if /sdl flag is also used) to be issued:

C:\Users\puma\.conan2\p\b\spirv2755296b2b5cb\b\src\source\table.cpp(60): error C4703: potentially uninitialized local pointer variable 'ext_inst_table' used [C:\Users\puma\.conan2\p\b\spirv2755296b2b5cb\b\bui
ld\source\SPIRV-Tools-shared.vcxproj]
LINK : fatal error LNK1257: code generation failed [C:\Users\puma\.conan2\p\b\spirv2755296b2b5cb\b\build\source\SPIRV-Tools-shared.vcxproj]

The code should actually be OK, as spvExtInstTableGet does check the same set of values for the env variable as is in the switch case above the modified code which does an early return.

@jan-kelemen jan-kelemen force-pushed the init_variables_for_whole_program_optimization branch from 23504a9 to c285973 Compare April 16, 2025 17:48
@s-perron s-perron enabled auto-merge (squash) April 16, 2025 23:28
@s-perron s-perron merged commit 096bb07 into KhronosGroup:main Apr 17, 2025
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants