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

            Bug ID: 103645
           Summary: Gimplifier does not remove empty struct stores in a
                    few cases
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: internal-improvement, missed-optimization
          Severity: minor
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
typedef struct { } spinlock_t;
void init_waitqueue_head(spinlock_t *q)
{
 q = (spinlock_t) { };
}
---- CUT -----

Most likely this is due to compound_literal_expr handling.

  *q = <<< Unknown tree: compound_literal_expr
    struct spinlock_t D.1982 = {}; >>>;

Reply via email to