https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110766

--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
Reduced C++ code seems to be:

template <int _Nw> struct _Base_bitset { 
  unsigned long _M_w[_Nw];
  unsigned long &_M_getword() { return _M_w[0]; }
};
struct bitset : _Base_bitset<0> { 
  int _Unchecked_set___val;
  void set() {
    long __trans_tmp_4;
    if (_Unchecked_set___val)
      _M_getword() |= __trans_tmp_4;
  }
  void reset() {
    long __trans_tmp_5, __trans_tmp_3;
    __trans_tmp_5 = 1 << __trans_tmp_3;
    _M_getword() &= __trans_tmp_5;
  }
};
using PlayBehaviourSet = bitset;
struct CSoundFile {
  PlayBehaviourSet m_playBehaviour;
  void UpgradeModule();
};
void CSoundFile::UpgradeModule() {
  for (int i = 0; i < 5; i++) {
    m_playBehaviour.set();
    m_playBehaviour.reset();
  }
}

cvise $ ~/gcc/results/bin/gcc -c -O2 bug943.cc
during GIMPLE pass: sccp
bug943.cc: In member function ‘void CSoundFile::UpgradeModule()’:
bug943.cc:23:6: internal compiler error: in gimple_phi_arg_def_from_edge, at
gimple.h:4699
   23 | void CSoundFile::UpgradeModule() {
      |      ^~~~~~~~~~
0x123f7dc final_value_replacement_loop(loop*)
        ../../trunk.year/gcc/tree-scalar-evolution.cc:0
0x12fdfb7 (anonymous namespace)::pass_scev_cprop::execute(function*)
        ../../trunk.year/gcc/tree-ssa-loop.cc:411
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
cvise $

Reply via email to