(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.c-torture/
compile/
BUG1.c
       1  struct _XtTextSource {
       2  	/* ... */
       3      	void (* SetSelection)();
       4  	/* ... */
       5      };
       6  
       7  typedef struct _XtTextSource *XtTextSource;
       8  
       9  typedef struct _TextPart {
      10      	XtTextSource source;
      11  	/* ... */
      12  } TextPart;
      13  
      14  typedef struct _TextRec {
      15  	/* ... */
      16  	TextPart    text;
      17  } TextRec;
      18  
      19  typedef struct _TextRec      *TextWidget;
      20  
      21  
      22  void XtTextUnsetSelection(w)
      23      TextWidget          w;		   /* original is: Widget w; */
      24  {
      25      register TextWidget ctx = (TextWidget) w;
      26      void (*nullProc)() = 0;
      27  
      28  /*
      29   * the following line causes the error, when optimizing:
      30   */
      31  
      32      if (ctx->text.source->SetSelection != nullProc) {
      33  
      34  	foo();
      35  
      36      }
      37  }