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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|WAITING                     |NEW
   Target Milestone|---                         |6.2
            Summary|Internal Error compiling    |[6/7 Regression] internal
                   |LMMS on ARM (Endian Little) |compiler error: in
                   |                            |cxx_eval_call_expression
      Known to fail|                            |6.1.0, 7.0

--- Comment #5 from ktkachov at gcc dot gnu.org ---
Thanks, I've confirmed it on arm, aarch64 and x86_64. It looks like a C++
frontend issue. A reduced testcase is:

class QBasicAtomicPointer {
public:
  typedef int *Type;
  constexpr QBasicAtomicPointer(Type);
};
template <typename T> class QAtomicPointer : QBasicAtomicPointer {
public:
  constexpr QAtomicPointer(T *value = 0) : QBasicAtomicPointer(value) {}
};

class JobQueue {
  void m_fn1();
  QAtomicPointer<int> m_items[4];
} MixerWorkerThreadglobalJobQueue;
void JobQueue::m_fn1() {
  int *_job;
  m_items[1] = _job;
}

ICEs with just -fdeclone-ctor-dtor and doesn't ICE without.
The backtrace (on GCC 6) is:
MixerWorkerThread.ii:11:7: internal compiler error: in
cxx_eval_call_expression, at cp/constexpr.c:1455
 class JobQueue {
       ^~~~~~~~
0x7f2526 cxx_eval_call_expression
        $SRC/gcc/cp/constexpr.c:1455
0x7f31a8 cxx_eval_constant_expression
        $SRC/gcc/cp/constexpr.c:3563
0x7ee4d4 cxx_eval_outermost_constant_expr
        $SRC/gcc/cp/constexpr.c:4128
0x7fa511 maybe_constant_init(tree_node*, tree_node*)
        $SRC/gcc/cp/constexpr.c:4445
0x7388ab build_vec_init(tree_node*, tree_node*, tree_node*, bool, int, int)
        $SRC/gcc/cp/init.c:4177
0x7d2540 cp_gimplify_expr(tree_node**, gimple**, gimple**)
        $SRC/gcc/cp/cp-gimplify.c:594
0xa8064d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        $SRC/gcc/gimplify.c:10201
0xa858e6 gimplify_stmt(tree_node**, gimple**)
        $SRC/gcc/gimplify.c:5688
0xa81e20 gimplify_cleanup_point_expr
        $SRC/gcc/gimplify.c:5464
0xa81e20 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        $SRC/gcc/gimplify.c:10657
0xa858e6 gimplify_stmt(tree_node**, gimple**)
        $SRC/gcc/gimplify.c:5688
0xa8691f gimplify_bind_expr
        $SRC/gcc/gimplify.c:1142
0xa81ff0 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        $SRC/gcc/gimplify.c:10491
0xa858e6 gimplify_stmt(tree_node**, gimple**)
        $SRC/gcc/gimplify.c:5688
0xa81093 gimplify_statement_list
        $SRC/gcc/gimplify.c:1537
0xa81093 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        $SRC/gcc/gimplify.c:10709
0xa858e6 gimplify_stmt(tree_node**, gimple**)
        $SRC/gcc/gimplify.c:5688
0xa87723 gimplify_body(tree_node*, bool)
        $SRC/gcc/gimplify.c:11438
0xa87e56 gimplify_function_tree(tree_node*)
        $SRC/gcc/gimplify.c:11594
0x904a87 cgraph_node::analyze()
        $SRC/gcc/cgraphunit.c:625
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to