https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119292
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 60761 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60761&action=edit better example For x86_64 since -freorder-blocks-and-partition is turned on by default, the throw part will go into the code section which in turn might not be loaded into memory if not used. Note this a better example. GCC has code that will split off part of the function and then inline the first part. So it could in theory split off throw part of the function and then ICF comes a long (which needs be improved to support matching constant vs non-constant in this case). I am not sure how much savings it will be either.