https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122111
Bug ID: 122111
Summary: ice during GIMPLE pass: widening_mul with -O3
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
The following C++ code:
char getBufferStart();
void checkOffset(unsigned Addr, long long Size) {
Addr + Size || getBufferStart();
}
struct COFFObjectFile {
void section_rel_begin() const;
};
unsigned getNumberOfRelocations();
char *getFirstReloc_Base;
void COFFObjectFile::section_rel_begin() const {
long long NumRelocs = getNumberOfRelocations();
checkOffset(int(getFirstReloc_Base), sizeof(int) * NumRelocs);
}
on raspberry pi 5, does this:
dcb@raspberrypi:~/cvise $ ../gcc/results/bin/g++ -c -w -O3 bug1125.cc
bug1125.cc: In member function ‘void COFFObjectFile::section_rel_begin()
const’:
bug1125.cc:10:6: error: invalid types in nop conversion
10 | void COFFObjectFile::section_rel_begin() const {
| ^~~~~~~~~~~~~~
long long int
char *
_15 = (long long int) getFirstReloc_Base.1_1;
during GIMPLE pass: widening_mul
bug1125.cc:10:6: internal compiler error: verify_gimple failed