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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-09-26
      Known to work|                            |4.8.5
            Version|5.4.0                       |8.2.1
   Target Milestone|---                         |6.5
            Summary|G++ produces >300MB .rodata |[6/7/8/9 Regression] G++
                   |section to initialize       |produces >300MB .rodata
                   |struct with big array       |section to initialize
                   |                            |struct with big array
     Ever confirmed|0                           |1
      Known to fail|                            |8.2.1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed with GCC 8.  I think the issue is that FooGrid::FooGrid _is_
constexpr as can be seen in dumps:

;; Function constexpr FooGrid::FooGrid() (null)
;; enabled by -tree-original


{
  <<cleanup_point <<< Unknown tree: expr_stmt
  (void) (((struct FooGrid *) this)->arr = <<< Unknown tree: vec_init_expr
  D.2204
   >>>) >>>>>;
}

and that we lower this VEC_INIT_EXPR to just

FooGrid::FooGrid (struct FooGrid * const this)
{
  this->arr = *.LC0;
}


GCC 4.8 compiles this instantanously.

Reply via email to