[llvm-bugs] [Bug 46336] New: clang assert when using PragmaLoopHint with c++11 attribute.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 15 21:36:43 PDT 2020


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

            Bug ID: 46336
           Summary: clang assert when using PragmaLoopHint  with c++11
                    attribute.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jennifer.yu at intel.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

The following test assert.  This is regress from change of 
commit 9c2e770034d04a0966b84cac14a9e3fb3b0d4ab7

bash-4.4$ clang -cc1 x.cpp
clang: /export/iusers/jyu2/git/llorg/llvm/clang/lib/Parse/ParseStmt.cpp:2199:
clang::StmtResult
clang::Parser::ParsePragmaLoopHint(clang::Parser::StmtVector&,
clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&): Assertion
`Attrs.Range.getBegin().isInvalid() && "start of attribute range already set"'
failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.


bash-4.4$ cat x.cpp

void foo(int i) {
  switch (i) {
  case 1:
    #pragma unroll
    [[fallthrough]];
  case 2:
    for (int i = 0; i < 10; ++i);
    break;
  }
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200616/a919891b/attachment.html>


More information about the llvm-bugs mailing list