20041219-1.c
816 Bytes
-
re PR middle-end/18191 (Struct member is not getting default-initialized) · 6fa91b48
gcc/ PR middle-end/18191 PR middle-end/18965 PR middle-end/18999 * expr.c (categorize_ctor_elements_1): Count the total number of elements in the constructor. (categorize_ctor_elements): Return it in a new argument. * tree.h (categorize_ctor_elements): Adjust prototype. * gimplify.c (gimplify_init_ctor_eval_range): New. (gimplify_init_ctor_eval): Gimplify RANGE_EXPR. (gimplify_init_constructor): Block clear the object if the constructor has fewer elements than the object type. Only try to add assignments to individual elements when we have to. testsuite/ * gcc.dg/20041219-1.c: New test. Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu> From-SVN: r92415
Steven Bosscher committed