modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/compile/pr40676.c (about)

     1  extern int f1();
     2  extern int f2(void*);
     3  extern void* f3(int);
     4  int xmsih;
     5  typedef unsigned short XWCHAR;
     6  
     7  inline unsigned int xstrlenW( const XWCHAR *str )
     8  {
     9      const XWCHAR *s = str;
    10      while (*s) s++;
    11      return s - str;
    12  }
    13  
    14  
    15  static int msi_dialog_register_class( void )
    16  {
    17      int cls;
    18  
    19      if( !f2( &cls ) )
    20          return 0;
    21      if( !f2( &cls ) )
    22          return 0;
    23      xmsih = f1();
    24      if( !xmsih )
    25          return 0;
    26      return 1;
    27  }
    28  
    29  void *xmsi_dialog_create(const XWCHAR* szDialogName)
    30  {
    31      msi_dialog_register_class();
    32      return f3(xstrlenW(szDialogName));
    33  }