aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2020-01-16 10:46:40 -0500
committerJason Merrill <jason@redhat.com>2020-01-16 17:40:15 -0500
commit801f5b96775288e55193a66a746caab1ddd56f4a (patch)
tree4ca550165104863c6e01a704dfb637864051b2bf /gcc/c/c-parser.c
parentf48c6014133c8989702458f9082e34ba6dd326d4 (diff)
downloadgcc-801f5b96775288e55193a66a746caab1ddd56f4a.zip
gcc-801f5b96775288e55193a66a746caab1ddd56f4a.tar.gz
gcc-801f5b96775288e55193a66a746caab1ddd56f4a.tar.bz2
PR c++/93280 - ICE with aggregate assignment and DMI.
I recently added an assert to cp-gimplify to catch any TARGET_EXPR_DIRECT_INIT_P being expanded without a target object, and this testcase found one. We started out with a TARGET_EXPR around the CONSTRUCTOR, which would normally mean that the member initializer would be used to directly initialize the appropriate member of whatever object the TARGET_EXPR ends up initializing. But then gimplify_modify_expr_rhs stripped the TARGET_EXPR in order to assign directly from the elements of the CONSTRUCTOR, leaving no object for the TARGET_EXPR_DIRECT_INIT_P to initialize. I considered setting CONSTRUCTOR_PLACEHOLDER_BOUNDARY in that case, which implies TARGET_EXPR_NO_ELIDE, but decided that there's no particular reason the A initializer needs to initialize a member of a B rather than a distinct A object, so let's only set TARGET_EXPR_DIRECT_INIT_P when we're using the DMI in a constructor. * init.c (get_nsdmi): Set TARGET_EXPR_DIRECT_INIT_P here. * typeck2.c (digest_nsdmi_init): Not here.
Diffstat (limited to 'gcc/c/c-parser.c')
0 files changed, 0 insertions, 0 deletions