https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119370
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> --- > Reduced testcase: > ... > S a[3]; Array size 1 is enough. My reduced testcase was: #pragma omp declare target struct SSD { SSD(); } sd[1]; #pragma omp end declare target input1.ii.018t.ompexp is the following. The fail is for the assert: gimple_add_tmp_var (tmp=...) at gimplify.cc:834 834 gcc_assert (!DECL_CHAIN (tmp) && !DECL_SEEN_IN_BIND_EXPR_P (tmp)); where in gimplify_target_expr / gimplify_expr: (gdb) p debug(*expr_p) TARGET_EXPR <D.3017, 0> (gdb) p debug(*pre_p) D.3015 = &sd; --------------- void __static_initialization_and_destruction_0 () { long int D.3017; struct SSD * D.3016; struct SSD * D.3015; struct SSD * retval.0; <bb 2> : D.3015 = &sd; D.3016 = D.3015; D.3017 = 0; goto <bb 4>; [INV] <bb 3> : SSD::SSD (D.3016); D.3017 = D.3017 + -1; D.3016 = D.3016 + 1; <bb 4> : if (D.3017 >= 0) goto <bb 3>; [INV] else goto <bb 5>; [INV] <bb 5> : ------------------------