]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Mark asm statements as necessary in ipa-fnsummary
authorJan Hubicka <hubicka@ucw.cz>
Sun, 17 Nov 2024 14:48:29 +0000 (15:48 +0100)
committerJan Hubicka <hubicka@ucw.cz>
Sun, 17 Nov 2024 14:48:29 +0000 (15:48 +0100)
I forgot to mark asm statements as necessary in ipa-fnsummary. This should
mask failure of gcc.dg/guality/pr36728-2.c where the patch enabled
cloning which breaks debug info.

gcc/ChangeLog:

* ipa-fnsummary.cc (find_necessary_statements): ASM statements are
necessary.

gcc/ipa-fnsummary.cc

index 87e08dad8467a4867df887c889f32682af61ce90..e6bdc00696945c65261f2099807d387925e5dac6 100644 (file)
@@ -2804,7 +2804,8 @@ find_necessary_statements (struct cgraph_node *node)
              || (is_ctrl_stmt (stmt)
                  && (gimple_code (stmt) != GIMPLE_COND
                      || !guards_builtin_unreachable (bb, cache)))
-             || gimple_store_p (stmt))
+             || gimple_store_p (stmt)
+             || gimple_code (stmt) == GIMPLE_ASM)
            mark_stmt_necessary (stmt, worklist);
        }
     }