aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr117375.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr117375.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr117375.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr117375.c b/gcc/testsuite/gcc.dg/pr117375.c
new file mode 100644
index 0000000..9679a03
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr117375.c
@@ -0,0 +1,13 @@
+/* PR middle-end/117375 ICE with -fdiagnostics-show-context=1 patch in sink pass. */
+/* { dg-do compile }
+ { dg-options "-O2 -Wall -fdiagnostics-show-context=1" } */
+
+int st, st_0;
+int nbFilledBytes, max;
+void ec_enc_shrink();
+void max_allowed() {
+ int nbAvailableBytes = nbFilledBytes;
+ if (st && st_0)
+ if (max < nbAvailableBytes)
+ ec_enc_shrink();
+}