public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100925] New: tree check fail in make_range_step, at fold-const.c:5061
@ 2021-06-05 17:48 dcb314 at hotmail dot com
  2021-06-05 18:29 ` [Bug c++/100925] " dcb314 at hotmail dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2021-06-05 17:48 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-06-18  8:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05 17:48 [Bug c++/100925] New: tree check fail in make_range_step, at fold-const.c:5061 dcb314 at hotmail dot com
2021-06-05 18:29 ` [Bug c++/100925] " dcb314 at hotmail dot com
2021-06-05 19:12 ` dcb314 at hotmail dot com
2021-06-05 19:36 ` dcb314 at hotmail dot com
2021-06-05 19:59 ` [Bug tree-optimization/100925] [12 Regression] tree check fail in make_range_step with -O1 in reassoc pinskia at gcc dot gnu.org
2021-06-05 20:06 ` pinskia at gcc dot gnu.org
2021-06-06  0:21 ` pinskia at gcc dot gnu.org
2021-06-09  1:36 ` pinskia at gcc dot gnu.org
2021-06-09 19:20 ` cvs-commit at gcc dot gnu.org
2021-06-09 19:20 ` pinskia at gcc dot gnu.org
2021-06-18  8:24 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).