<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Regression: assert "Function return type does not match operand type of return inst!" when building ObjC code for arm"
   href="http://llvm.org/bugs/show_bug.cgi?id=15998">15998</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression: assert "Function return type does not match operand type of return inst!" when building ObjC code for arm
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>hummer:src thakis$ cat test.mm
template <typename NST> struct scoped_nsprotocol {
  scoped_nsprotocol() {}
};

@interface View
@end
@protocol protocol1
@end
@protocol protocol2
@end
class Controller {
 public:
  Controller();
  scoped_nsprotocol<View<protocol1> > p1;
  scoped_nsprotocol<View<protocol2> > p2;
};
Controller::Controller() {}
hummer:src thakis$ third_party/llvm-build/Release+Asserts/bin/clang -c test.mm
hummer:src thakis$ third_party/llvm-build/Release+Asserts/bin/clang -c test.mm
-arch arm
Function return type does not match operand type of return inst!
  ret %struct.scoped_nsprotocol.0* %call
 %struct.scoped_nsprotocol*Broken module found, compilation aborted!
0  clang             0x00000001018315d8 llvm::sys::PrintStackTrace(__sFILE*) +
40
1  clang             0x0000000101831b44 SignalHandler(int) + 564
2  libsystem_c.dylib 0x00007fff87fa194a _sigtramp + 26
3  libsystem_c.dylib 0x0000000102840a00 _sigtramp + 2055860432
4  clang             0x00000001018318f6 abort + 22
5  clang             0x00000001017e865e (anonymous
namespace)::Verifier::abortIfBroken() + 510
6  clang             0x00000001017e8316 (anonymous
namespace)::Verifier::runOnFunction(llvm::Function&) + 1958
7  clang             0x00000001017cefdb
llvm::FPPassManager::runOnFunction(llvm::Function&) + 347
8  clang             0x00000001017ce7fb
llvm::FunctionPassManagerImpl::run(llvm::Function&) + 219
9  clang             0x00000001017ce6ce
llvm::FunctionPassManager::run(llvm::Function&) + 94
10 clang             0x00000001001af264
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 5460
11 clang             0x00000001002a0f28
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 600
12 clang             0x00000001002e4144 clang::ParseAST(clang::Sema&, bool,
bool) + 516
13 clang             0x000000010029fe97 clang::CodeGenAction::ExecuteAction() +
215
14 clang             0x0000000100066f17 clang::FrontendAction::Execute() + 119
15 clang             0x000000010004223d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 957
16 clang             0x0000000100009e5d
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3693
17 clang             0x0000000100001081 cc1_main(char const**, char const**,
char const*, void*) + 801
18 clang             0x0000000100007133 main + 6963
19 clang             0x0000000100000d34 start + 52
20 clang             0x000000000000003f start + 4294964031
Stack dump:
0.    Program arguments:
/Volumes/MacintoshHD2/src/chrome-git/src/third_party/llvm-build/Release+Asserts/bin/clang
-cc1 -triple armv4t-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free
-main-file-name test.mm -mrelocation-model pic -pic-level 2 -mdisable-fp-elim
-masm-verbose -target-abi apcs-gnu -target-cpu arm7tdmi -msoft-float
-mfloat-abi soft -target-feature +soft-float -target-feature +soft-float-abi
-target-feature -neon -target-linker-version 136 -coverage-file
/Users/thakis/src/chrome-git/src/test.o -resource-dir
/Volumes/MacintoshHD2/src/chrome-git/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.3
-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
-fdeprecated-macro -fdebug-compilation-dir /Users/thakis/src/chrome-git/src
-ferror-limit 19 -fmessage-length 271 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime=macosx-10.8.0 -fobjc-default-synthesize-properties
-fencode-extended-block-signature -fobjc-exceptions -fcxx-exceptions
-fexceptions -fsjlj-exceptions -fdiagnostics-show-option -fcolor-diagnostics
-backend-option -vectorize-loops -o test.o -x objective-c++ test.mm 
1.    <eof> parser at end of file
2.    Per-function optimization
3.    Running pass 'Module Verifier' on function
'@_ZN17scoped_nsprotocolI4ViewEC1Ev'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 179138)
Target: arm-apple-darwin12.3.0


This works fine with Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM
3.2svn) (but maybe only because that's build without asserts?).

It is still an issue at today's head (r181805).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>