⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 badopt1.c

📁 linux下编程用 编译软件
💻 C
字号:
// { dg-do run  }// { dg-options "-O2" }// Based on a testcase by Bryan Weston <bryanw@bluemoon.sps.mot.com>// egcs 1.1 fails to increment countstruct Base { Base() {} }; // removing the constructor fixes the problemstruct Derived : Base {}; // so does removing the base classint main() {  int count = 0;  Derived* array[1]; // making this Base*[1] does not fix the problem  array[count++] = new Derived (); // but then new Base() does  if (count!=1)    return 1;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -