[Bug c++/109556] internal compiler error: in iterative_hash_template_arg, at cp/pt.cc:1927

2023-04-19 Thread fabian.sauter+bz_gcc at apsensing dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109556

--- Comment #2 from Fabian Sauter  
---
Created attachment 54884
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54884=edit
Preprocessed Source

Ah, it failed to upload with: "The file you are trying to attach is 2505
kilobytes (KB) in size. Attachments cannot be more than 1000 KB."

I compressed it!

[Bug c++/109556] New: internal compiler error: in iterative_hash_template_arg, at cp/pt.cc:1927

2023-04-19 Thread fabian.sauter+bz_gcc at apsensing dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109556

Bug ID: 109556
   Summary: internal compiler error: in
iterative_hash_template_arg, at cp/pt.cc:1927
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: fabian.sauter+bz_gcc at apsensing dot com
  Target Milestone: ---

I'm using gcc 13.0.1-0 on Fedora 38.
I hope this is the correct place to report this bug since in the log it states
I should report it at RedHats bug tracker but I was not able to find a gcc
section there.

Compiling mpunits (https://github.com/mpusz/units) fails with gcc13. With gcc12
it still works.

I'm still failing to reduce the problem to a single failing source header file.

Let me know if you need anything else.


## How to Reproduce:
git clone https://github.com/mpusz/units.git
cd units && mkdir build && cd build
cmake ..
cmake --build .

## Related Issues
https://github.com/mpusz/units/issues/450

## Output:
```
[ 30%] Building CXX object
CMakeFiles/test_headers.dir/headers/src/systems/si/include/units/isq/si/absorbed_dose.cpp.o
In file included from
/home/fabian/Repos/units/src/systems/si/include/units/isq/si/force.h:33,
 from
/home/fabian/Repos/units/src/systems/si/include/units/isq/si/energy.h:32,
 from
/home/fabian/Repos/units/./src/systems/si/include/units/isq/si/absorbed_dose.h:32,
 from
/home/fabian/Repos/units/build/headers/src/systems/si/include/units/isq/si/absorbed_dose.cpp:1:
/home/fabian/Repos/units/src/systems/si/include/units/isq/si/mass.h: In
substitution of ‘template  requires (Dimension)
&& (UnitOf) && (Representation) class units::quantity [with D =
units::isq::si::dim_mass; U = units::isq::si::gigagram; Rep = long int]’:
/home/fabian/Repos/units/src/systems/si/include/units/isq/si/mass.h:88:7:  
required by substitution of ‘template  requires (UnitOf) && (Representation) using units::isq::si::mass
= units::quantity [with U =
units::isq::si::gigagram; Rep = long int]’
/home/fabian/Repos/units/src/systems/si/include/units/isq/si/mass.h:218:37:  
required from here
/home/fabian/Repos/units/src/systems/si/include/units/isq/si/mass.h:88:7:
internal compiler error: in iterative_hash_template_arg, at cp/pt.cc:1927
   88 | using mass = quantity;
  |   ^~~~
Please submit a full bug report, with preprocessed source.
See  for instructions.
Preprocessed source stored into /tmp/ccG8HXcN.out file, please attach this to
your bugreport.
gmake[2]: *** [CMakeFiles/test_headers.dir/build.make:1182:
CMakeFiles/test_headers.dir/headers/src/systems/si/include/units/isq/si/absorbed_dose.cpp.o]
Error 1
gmake[1]: *** [CMakeFiles/Makefile2:575: CMakeFiles/test_headers.dir/all] Error
2
gmake: *** [Makefile:136: all] Error 2
```