PR ipa/60026
* tree-inline.c (copy_forbidden): Fail for
__attribute__((optimize (0))) functions.
* c-c++-common/torture/pr60026.c: New test.
From-SVN: r207463
2014-02-04 Jakub Jelinek <jakub@redhat.com>
+ PR ipa/60026
+ * tree-inline.c (copy_forbidden): Fail for
+ __attribute__((optimize (0))) functions.
+
PR other/58712
* omp-low.c (simd_clone_struct_copy): If from->inbranch
is set, copy one less argument.
2014-02-04 Jakub Jelinek <jakub@redhat.com>
+ PR ipa/60026
+ * c-c++-common/torture/pr60026.c: New test.
+
PR rtl-optimization/57915
* gcc.target/i386/pr57915.c: New test.
--- /dev/null
+/* PR ipa/60026 */
+/* { dg-do compile } */
+
+struct S { int f; } a;
+
+__attribute__((optimize (0)))
+struct S foo (int x, struct S y)
+{
+ int b = y.f;
+ return a;
+}
+
+void
+bar ()
+{
+ while (a.f)
+ {
+ struct S c = {0};
+ foo (0, c);
+ }
+}
+
+int
+main ()
+{
+ bar ();
+ return 0;
+}
goto fail;
}
+ tree fs_opts;
+ fs_opts = DECL_FUNCTION_SPECIFIC_OPTIMIZATION (fun->decl);
+ if (fs_opts)
+ {
+ struct cl_optimization *os = TREE_OPTIMIZATION (fs_opts);
+ if (!os->x_optimize)
+ {
+ reason = G_("function %q+F compiled without optimizations");
+ goto fail;
+ }
+ }
+
fail:
fun->cannot_be_copied_reason = reason;
fun->cannot_be_copied_set = true;