aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.misc-tests/gcov-pr114599.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests/gcov-pr114599.c')
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-pr114599.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr114599.c b/gcc/testsuite/gcc.misc-tests/gcov-pr114599.c
new file mode 100644
index 0000000..e4c78c9
--- /dev/null
+++ b/gcc/testsuite/gcc.misc-tests/gcov-pr114599.c
@@ -0,0 +1,25 @@
+/* PR middle-end/114599 */
+/* { dg-do compile } */
+/* { dg-options "-fcondition-coverage" } */
+
+/* Check that a function with a condition inlined into a function without a
+ conditional works. When inlining happens the condition -> expression
+ mapping must be carried over. */
+
+extern int type;
+
+void fn (void);
+
+__attribute__((always_inline))
+inline void
+do_all_fn_doall_arg (void)
+{
+ if (type)
+ fn ();
+}
+
+void
+do_all_fn_LHASH_DOALL_ARG_arg2 (void)
+{
+ do_all_fn_doall_arg ();
+}