[Bug c++/121335] Vulkan module ICE

2025-08-18 Thread nshead at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121335

Nathaniel Shead  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID
 CC||nshead at gcc dot gnu.org
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=99000

--- Comment #9 from Nathaniel Shead  ---
It sounds like the ICE you had no longer occurs?  If so I'll close this bug,
feel free to reopen otherwise :)

[Bug c++/121335] Vulkan module ICE

2025-08-07 Thread kongmingd234 at proton dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121335

--- Comment #8 from kongmingd234  ---
You were right on both accounts, clearing the folder worked. The errors I'm
getting are real errors I believe, as copying more code from the vulkan
tutorial reduced the errors.
Now I just have to figure out how to get vulkan to work.

[Bug c++/121335] Vulkan module ICE

2025-08-07 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121335

--- Comment #7 from Patrick Palka  ---
I can't reproduce the std.cc ICE. Sometimes such ICEs happen when there's stale
stuff in the ./gcm.cache/ folder. Can you remove this folder and see if the
std.cc ICE still happens?

For the vulkan_first_test.cpp errors, can you confirm that these errors aren't
present when using ordinary includes instead of modules? They seem like
legitimate errors instead of a compiler bug.

[Bug c++/121335] Vulkan module ICE

2025-08-07 Thread kongmingd234 at proton dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121335

--- Comment #6 from kongmingd234  ---

Here is the new output of putting the includes before the imports.
As you can see, the std module still has the ICE, but the main file does not,
instead, there are other errors.


Compiling /usr/include/vulkan/vulkan.cppm
c++ -fmodules -std=c++23 -O3 /usr/include/vulkan/vulkan.cppm -c -o /dev/null
Compiling /usr/local/src/gcc/installed-here/include/c++/16.0.0/bits/std.cc
c++ -fmodules -std=c++23 -O3
/usr/local/src/gcc/installed-here/include/c++/16.0.0/bits/std.cc -c -o
/dev/null
In file included from
/usr/local/src/gcc/installed-here/include/c++/16.0.0/bits/locale_facets_nonio.h:2071,
 from
/usr/local/src/gcc/installed-here/include/c++/16.0.0/locale:45,
 from
/usr/local/src/gcc/installed-here/include/c++/16.0.0/format:49,
 from
/usr/local/src/gcc/installed-here/include/c++/16.0.0/ostream:44,
 from
/usr/local/src/gcc/installed-here/include/c++/16.0.0/istream:43,
 from
/usr/local/src/gcc/installed-here/include/c++/16.0.0/sstream:42,
 from
/usr/local/src/gcc/installed-here/include/c++/16.0.0/complex:50,
 from
/usr/local/src/gcc/installed-here/include/c++/16.0.0/x86_64-pc-linux-gnu/bits/stdc++.h:141,
 from
/usr/local/src/gcc/installed-here/include/c++/16.0.0/bits/std.cc:30:
/usr/local/src/gcc/installed-here/include/c++/16.0.0/bits/locale_facets_nonio.tcc:42:12:
internal compiler error: in lookup_mark, at cp/tree.cc:2524
   42 | struct __use_cache<__moneypunct_cache<_CharT, _Intl> >
  |^~~
0x29b73cf internal_error(char const*, ...)
../.././gcc/diagnostic-global-context.cc:517
0xb1f6fb fancy_abort(char const*, int, char const*)
../.././gcc/diagnostic.cc:1810
0x895526 lookup_mark(tree_node*, bool)
../.././gcc/cp/tree.cc:2524
0xcd0bac name_lookup::dedup(bool)
../.././gcc/cp/name-lookup.cc:486
0xcd0bac name_lookup::dedup(bool)
../.././gcc/cp/name-lookup.cc:481
0xcd0bac name_lookup::search_unqualified(tree_node*, cp_binding_level*)
../.././gcc/cp/name-lookup.cc:1184
0xcd5c86 lookup_name(tree_node*, LOOK_where, LOOK_want)
../.././gcc/cp/name-lookup.cc:8131
0xce85df lookup_name(tree_node*, LOOK_want)
../.././gcc/cp/name-lookup.h:410
0xce85df cp_parser_lookup_name
../.././gcc/cp/parser.cc:33057
0xd30376 cp_parser_template_name
../.././gcc/cp/parser.cc:19945
0xd30b4a cp_parser_template_id
../.././gcc/cp/parser.cc:19552
0xd314b6 cp_parser_class_name
../.././gcc/cp/parser.cc:27449
0xd2b1c7 cp_parser_qualifying_entity
../.././gcc/cp/parser.cc:7704
0xd2b1c7 cp_parser_nested_name_specifier_opt
../.././gcc/cp/parser.cc:7390
0xd3a7a7 cp_parser_class_head
../.././gcc/cp/parser.cc:28119
0xd1b62b cp_parser_class_specifier
../.././gcc/cp/parser.cc:27570
0xd1d0cb cp_parser_type_specifier
../.././gcc/cp/parser.cc:20722
0xd3bb17 cp_parser_decl_specifier_seq
../.././gcc/cp/parser.cc:17308
0xd421c1 cp_parser_single_declaration
../.././gcc/cp/parser.cc:34027
0xd4271e cp_parser_template_declaration_after_parameters
../.././gcc/cp/parser.cc:33784
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
Compiling vulkan_first_test.cpp
c++ -fmodules -std=c++23 -O3 vulkan_first_test.cpp -c -o vulkan_first_test.o
vulkan_first_test.cpp: In member function ‘void
HelloTriangleApplication::createLogicalDevice()’:
vulkan_first_test.cpp:36:72: error: ‘physicalDevice’ was not declared in this
scope; did you mean ‘VkPhysicalDevice’?
   36 | std::vector queueFamilyProperties =
physicalDevice.getQueueFamilyProperties();
  |   
^~
  |   
VkPhysicalDevice
vulkan_first_test.cpp:92:146: error: designated initializers cannot be used
with a non-aggregate type ‘vk::DeviceQueueCreateInfo’
   92 | eInfo deviceQueueCreateInfo { .queueFamilyIndex = graphicsIndex,
.queueCount = 1, .pQueuePriorities = &queuePriority };
  |
 ^
vulkan_first_test.cpp:92:146: error: no matching function for call to
‘vk::DeviceQueueCreateInfo::DeviceQueueCreateInfo()’
vulkan_first_test.cpp:93:145: error: designated initializers cannot be used
with a non-aggregate type ‘vk::DeviceCreateInfo’
   93 | o  deviceCreateInfo{ .pNext =  &features, .queueCreateInfoCount =
1, .pQueueCreateInfos = &deviceQueueCreateInfo };
  |
 ^
vulkan_first_test.cpp:93:145: error

[Bug c++/121335] Vulkan module ICE

2025-08-05 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121335

--- Comment #5 from Patrick Palka  ---
i.e. place #includes first:

#define GLFW_INCLUDE_VULKAN
#include 
import std;
import vulkan_hpp;

[Bug c++/121335] Vulkan module ICE

2025-08-05 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121335

Patrick Palka  changed:

   What|Removed |Added

 CC||ppalka at gcc dot gnu.org

--- Comment #4 from Patrick Palka  ---
Can you try swapping the order of #include and import in your
vulkan_first_test.cpp file? You may be running into PR99000.

[Bug c++/121335] Vulkan module ICE

2025-08-04 Thread kongmingd234 at proton dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121335

--- Comment #3 from kongmingd234  ---
g++ -fmodules -std=c++23 -O3 /usr/include/vulkan/vulkan.cppm -c -o /dev/null
g++ -fmodules -std=c++23 -O3
/usr/local/src/gcc/installed-here/include/c++/16.0.0/bits/std.cc -c -o
/dev/null
g++ -fmodules -std=c++23 -O3 vulkan_first_test.cpp -c -o vulkan_first_test.o

Sorry for the late response. I could not preprocess the vulkan module interface
unit, so I uploaded it unpreprocessed.

[Bug c++/121335] Vulkan module ICE

2025-08-04 Thread kongmingd234 at proton dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121335

--- Comment #2 from kongmingd234  ---
Created attachment 62050
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62050&action=edit
Module interface unit

There is inconsistent macro definitions when I use -E to preprocess the file.

[Bug c++/121335] Vulkan module ICE

2025-07-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121335

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Ever confirmed|0   |1
 Blocks||103524
 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2025-07-31

--- Comment #1 from Andrew Pinski  ---
Can you provide the exact command lines in sequence to reproduce the failures?

Also provide the preprocessed source for the module vulkan_hpp ?


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524
[Bug 103524] [meta-bug] modules issue