summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/20030902-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/20030902-1.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20030902-1.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20030902-1.c b/gcc/testsuite/gcc.c-torture/compile/20030902-1.c
new file mode 100644
index 00000000000..443b43921b8
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20030902-1.c
@@ -0,0 +1,37 @@
+typedef unsigned int size_t;
+typedef unsigned long int reg_syntax_t;
+struct re_pattern_buffer
+{
+ unsigned char *buffer;
+};
+typedef enum
+{
+ jump,
+ jump_n,
+} re_opcode_t;
+static int
+foo (bufp)
+ struct re_pattern_buffer *bufp;
+{
+ int mcnt;
+ unsigned char *p = bufp->buffer;
+ switch (((re_opcode_t) * p++))
+ {
+ unconditional_jump:
+ ;
+ /* This test case caused an ICE because the statement insertion
+ routines were failing to update basic block boundaries. */
+ case jump:
+ do
+ {
+ (mcnt) = *(p) & 0377;
+ }
+ while (0);
+ (p) += 2;
+ p += mcnt;
+ case jump_n:
+ (mcnt) = *(p + 2) & 0377;
+ if (mcnt)
+ goto unconditional_jump;
+ }
+}