aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40676.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40676.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40676.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40676.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40676.c
new file mode 100644
index 000000000..b04262882
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40676.c
@@ -0,0 +1,33 @@
+extern int f1();
+extern int f2(void*);
+extern void* f3(int);
+int xmsih;
+typedef unsigned short XWCHAR;
+
+inline unsigned int xstrlenW( const XWCHAR *str )
+{
+ const XWCHAR *s = str;
+ while (*s) s++;
+ return s - str;
+}
+
+
+static int msi_dialog_register_class( void )
+{
+ int cls;
+
+ if( !f2( &cls ) )
+ return 0;
+ if( !f2( &cls ) )
+ return 0;
+ xmsih = f1();
+ if( !xmsih )
+ return 0;
+ return 1;
+}
+
+void *xmsi_dialog_create(const XWCHAR* szDialogName)
+{
+ msi_dialog_register_class();
+ return f3(xstrlenW(szDialogName));
+}