[LLVMbugs] [Bug 9843] New: PCH crash with conflicting identifiers

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 4 12:41:31 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=9843

           Summary: PCH crash with conflicting identifiers
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: scshunt at csclub.uwaterloo.ca
                CC: llvmbugs at cs.uiuc.edu


While attempting to hack around precompiled headers, I discovered that the
following managed to elicit a pure virtual function call crash. Filing
immediately; haven't performed any reduction yet.

// Test this without pch.
// RUN: %clang_cc1 -DPASS1 -DPASS2 -std=c++0x -fsyntax-only -verify %s

// Test with pch.
// RUN: %clang_cc1 -x c++-header -DPASS1 -std=c++0x -emit-pch -o %t %s
// RUN: %clang_cc1 -DPASS2 -std=c++0x -include-pch %t -fsyntax-only -verify %s 

#ifdef PASS1
struct foo {
  foo(int) : foo() { } // expected-note{{it delegates to}}
  foo();
};
#undef PASS1
#endif

#ifdef PASS2
foo::foo() : foo(1) { } // expected-error{{creates a delegation cycle}} \
                        // expected-note{{which delegates to}}
#endif

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list