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

📄 p7325.c

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 C
字号:
// I hate this type of test case.  I'm not sure how to code it better.// See the PR for what this tests.// prms-id: 7325// execution test - XFAIL *-*-*int fail = 0;struct A {  int i;  static const A* match_this;  static const A* match_arg;  A(): i(7) {    if (match_this)      if (match_this != this)	fail = 1;  }  A* get_this() { return this; }  A& operator = (const A& o) {    if (match_this)      if (match_this != this)	fail = 1;    if (match_arg)      if (match_arg != &o)	fail = 1;    match_arg = &o;    return *this;  }};const A* A::match_this;const A* A::match_arg;A a;A foo() { return a; }void f (){  A a;  A::match_this = &a;  a = foo ();  a = foo ();  A::match_this = 0;}void g (){  A::match_this = A().get_this();  A();  A();  A::match_this = 0;}int main() {  f();  g();  return fail;}

⌨️ 快捷键说明

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