[Bug c++/100925] New: tree check fail in make_range_step, at fold-const.c:5061
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Jun 5 17:48:32 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100925
Bug ID: 100925
Summary: tree check fail in make_range_step, at
fold-const.c:5061
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
For this C++ code:
struct QScopedPointerDeleter {
static void cleanup(int *);
};
class QScopedPointer {
typedef int *QScopedPointer::*RestrictedBool;
public:
operator RestrictedBool() { return d ? nullptr : &QScopedPointer::d; }
void reset() {
if (d)
QScopedPointerDeleter::cleanup(d);
}
int *d;
};
class DOpenGLPaintDevicePrivate {
public:
QScopedPointer fbo;
} DOpenGLPaintDeviceresize_d;
void DOpenGLPaintDeviceresize() {
if (DOpenGLPaintDeviceresize_d.fbo)
DOpenGLPaintDeviceresize_d.fbo.reset();
}
compiled with recent gcc trunk, does this:
$ /home/dcb/gcc/results.20210605//bin/g++ -c -w -O1 bug722.cc 2>&1 | more
during GIMPLE pass: reassoc
bug722.cc: In function ‘void DOpenGLPaintDeviceresize()’:
bug722.cc:19:6: internal compiler error: tree check: expected boolean_type or
enumeral_type or integer_type, have offset_type in make_range_step, at fold-co
nst.c:5061
19 | void DOpenGLPaintDeviceresize() {
| ^~~~~~~~~~~~~~~~~~~~~~~~
0x8a9565 tree_check_failed(tree_node const*, char const*, int, char const*, ..
.)
../../trunk.git/gcc/tree.c:8684
0x7a0a73 any_integral_type_check(tree_node*, char const*, int, char const*)
../../trunk.git/gcc/tree.h:3617
0x7ad465 any_integral_type_check(tree_node*, char const*, int, char const*)
../../trunk.git/gcc/tree.h:3485
0x7ad465 make_range_step(unsigned int, tree_code, tree_node*, tree_node*, tree
_node*, tree_node**, tree_node**, int*, bool*)
../../trunk.git/gcc/fold-const.c:5061
The problem first seems to occur sometime between date 20210527 and 20210604.
Git hashes 6c67afaf524a5e0e and ad3f0ad4bafe3770.
I will have my usual go at refining the range of the git hashes.
More information about the Gcc-bugs
mailing list