Test fentry and no_instrument_function overriding.
gcc/testsuite/:
2014-09-15 Andi Kleen <ak@linux.intel.com>
* gcc.dg/pg-override.c: New test.
* gcc.dg/pg.c: New test.
* gcc.target/i386/fentry-override.c: New test.
* gcc.target/i386/fentry.c: New test.
From-SVN: r215285
+2014-09-15 Andi Kleen <ak@linux.intel.com>
+
+ * gcc.dg/pg-override.c: New test.
+ * gcc.dg/pg.c: New test.
+ * gcc.target/i386/fentry-override.c: New test.
+ * gcc.target/i386/fentry.c: New test.
+
2014-09-15 Jakub Jelinek <jakub@redhat.com>
PR fortran/56408
--- /dev/null
+/* Test -fprofile override */
+/* { dg-do compile } */
+/* { dg-options "-fprofile" { target { { i686-*-* x86_64-*-* } } } } */
+/* { dg-final { scan-assembler-not "mcount" } } */
+/* Origin: Andi Kleen */
+extern void foobar(const char *);
+
+__attribute__((no_instrument_function)) void func(void)
+{
+ foobar ("Hello world\n");
+}
+
+__attribute__((no_instrument_function)) void func2(void)
+{
+ int i;
+ for (i = 0; i < 10; i++)
+ foobar ("Hello world");
+}
--- /dev/null
+/* Test -fprofile override */
+/* { dg-do compile } */
+/* { dg-options "-fprofile" { target { { i686-*-* x86_64-*-* } } } } */
+/* { dg-final { scan-assembler-not "mcount" } } */
+/* Origin: Andi Kleen */
+extern void foobar(const char *);
+
+__attribute__((no_instrument_function)) void func(void)
+{
+ foobar ("Hello world\n");
+}
+
+__attribute__((no_instrument_function)) void func2(void)
+{
+ int i;
+ for (i = 0; i < 10; i++)
+ foobar ("Hello world");
+}
--- /dev/null
+/* Test -mfentry override */
+/* { dg-do compile } */
+/* { dg-options "-mfentry" } */
+/* { dg-final { scan-assembler-not "__fentry__" } } */
+/* Origin: Andi Kleen */
+extern void foobar(const char *);
+
+void __attribute__((no_instrument_function)) func(void)
+{
+ foobar ("Hello world\n");
+}
+
+void __attribute__((no_instrument_function)) func2(void)
+{
+ int i;
+ for (i = 0; i < 10; i++)
+ foobar ("Hello world");
+}
--- /dev/null
+/* Test -mfentry */
+/* { dg-do compile } */
+/* { dg-options "-fprofile -mfentry" } */
+/* { dg-final { scan-assembler "__fentry__" } } */
+/* Origin: Andi Kleen */
+extern void foobar(const char *);
+
+void func(void)
+{
+ foobar ("Hello world\n");
+}
+
+void func2(void)
+{
+ int i;
+ for (i = 0; i < 10; i++)
+ foobar ("Hello world");
+}