> But Diego doesn't think there was any real reason to abort on trying to > copy a STATEMENT_LIST, so it seems to me that we could revert my earlier > patch for 40975 and just add support for copying STATEMENT_LIST. So > 40975-2.patch adds that support.
FWIW this assertion caught an impressive number of bugs in Ada over the years related to COND_EXPR: when they are incorrectly shared, gimplifying them on one side creates a STATEMENT_LIST and stopped the copying on the other side. I'm not sure you can copy statements if they have any side-effects; this looks quite dangerous to me. Instead statement-expressions should be wrapped up in a SAVE_EXPR/TARGET_EXPR to protect them and prevent copying. -- Eric Botcazou