This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/31775] static object mangling conflicts with extern object



------- Comment #1 from geoffk at gcc dot gnu dot org  2007-05-01 19:56 -------
This testcase is the same principle, but might use a different code path in the
compiler:

extern "C" void abort();
extern int *p;
int main()
{ 
  extern int i;
  i = 1;
  *p = 2;
  if (i == 2)
    abort ();
  return 0;
}

static int i;
int *p = &i;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]