[RFH] testcases for lto-stream-out dumps

Jan Hubicka hubicka@ucw.cz
Thu Nov 22 21:14:00 GMT 2018


Hi,
the following testcase is supposed to check that "stream_me_once" is
streamed just once from WPA to ltrans and thus I want to scan dump 
<output>.000i.0.lto-stream-out

I think however that dejagnu is confused by the extra .0 in filename
(which distinguishes the partition number and is intended) and I get
FAIL: gcc.dg/lto/type-merge-1
c_lto_type-merge-1_0.o-c_lto_type-merge-1_1.o link, -O0 -flto
-flto-partition=none -fuse-linker-plugin
ERROR: /aux/hubicka/trunk4/gcc/testsuite/gcc.dg/lto/type-merge-1_0.c:
error executing dg-final: bad level "6"

Any idea what to do here?  I found discussion at 
https://patchwork.ozlabs.org/patch/330161/
but I am still unsure how to fix this.

Honza

Index: gcc.dg/lto/type-merge-1_0.c
===================================================================
--- gcc.dg/lto/type-merge-1_0.c	(nonexistent)
+++ gcc.dg/lto/type-merge-1_0.c	(working copy)
@@ -0,0 +1,9 @@
+/* { dg-lto-do link }  */
+/* { dg-extra-ld-options {"-fdump-ipa-lto-stream-out -fdump-noaddr"} }  */ 
+enum a {aa,bb,cc};
+struct stream_me_once {enum a *ptr[5];} b;
+void set(void)
+{
+  b.ptr[0] = 0;
+}
+/* { dg-final { scan-wpa-ipa-dump-times "record_type . stream_me_once" 1 "0.lto-stream-out" } } */
Index: gcc.dg/lto/type-merge-1_1.c
===================================================================
--- gcc.dg/lto/type-merge-1_1.c	(nonexistent)
+++ gcc.dg/lto/type-merge-1_1.c	(working copy)
@@ -0,0 +1,10 @@
+#include <stdlib.h>
+enum a ;
+struct stream_me_once {enum a *ptr[5];} b;
+void set (void);
+int
+main(void)
+{
+  set();
+  return (size_t)b.ptr[0];
+}



More information about the Gcc-patches mailing list