https://llvm.org/bugs/show_bug.cgi?id=23165

            Bug ID: 23165
           Summary: abort with "pure virtual method called", when a
                    virtual function is called on a POD temporary passed
                    as an argument (in program compiled w/ clang trunk
                    -std=c++11)
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 14171
  --> https://llvm.org/bugs/attachment.cgi?id=14171&action=edit
C++ testcase

STR:
 1. Compile attached program using clang 3.7 with -std=c++11:
     clang++-3.7 -std=c++11 test.cpp

   (Or use -std=gnu++0x)

 2. Run the resulting a.out

ACTUAL RESULTS:
The program aborts with:
> pure virtual method called
> terminate called without an active exception
> Aborted (core dumped)

EXPECTED RESULTS:
No abort; virtual function should run successfully.

I get EXPECTED RESULTS if I drop the "-std=c++11" command-line argument. I also
get EXPECTED RESULTS from clang++-3.6 (with the c++11 command-line argument
included).  So this is a regression, or at least a behavior-change.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to