]> git.wh0rd.org - ICEs.git/blobdiff - 568732/reduce-ice
more
[ICEs.git] / 568732 / reduce-ice
diff --git a/568732/reduce-ice b/568732/reduce-ice
new file mode 100755 (executable)
index 0000000..0260dbc
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Run like:
+#  multidelta -level=# ./reduce-ice $FILE
+#  levels: 0 0 1 1 2 2 10 10
+#
+
+FILE=writepart.i
+CC=gcc-5.3.0
+CFLAGS="-O2"
+STRING="internal compiler error.*dwarf2out_finish"
+
+: <<EOF
+In function ‘memcpy’,
+    inlined from ‘PART2diskpart’ at writepart.i:2345:5,
+    inlined from ‘put_boot’ at writepart.i:2375:6:
+writepart.i:1373:10: warning: call to __builtin___memcpy_chk will always overflow destination buffer
+   return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+          ^
+In function ‘memcpy’,
+    inlined from ‘PART2diskpart’ at writepart.i:2345:5,
+    inlined from ‘put_boot’ at writepart.i:2400:6:
+writepart.i:1373:10: warning: call to __builtin___memcpy_chk will always overflow destination buffer
+   return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+          ^
+In function ‘memcpy’,
+    inlined from ‘PART2diskpart’ at writepart.i:2345:5,
+    inlined from ‘put_boot’ at writepart.i:2411:3:
+writepart.i:1373:10: warning: call to __builtin___memcpy_chk will always overflow destination buffer
+   return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+          ^
+EOF
+
+output=$($CC -pipe -c $CFLAGS $FILE -o /dev/null 2>&1)
+[[ $(echo "$output" | grep -c 'call to __builtin___memcpy_chk will always overflow destination buffer') -eq 3 ]]