<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 since "[Attribute/Diagnostics] Print macro if definition is an attribute declaration""
   href="https://bugs.llvm.org/show_bug.cgi?id=41852">41852</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression since "[Attribute/Diagnostics] Print macro if definition is an attribute declaration"
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>martin@martin.st
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, leonardchan@google.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Since "[Attribute/Diagnostics] Print macro if definition is an attribute
declaration" (recommitted version in SVN r360109), including imagehlp.h from
mingw-w64 headers on i686 fails with the following failed assertion:

$ cat test.c
typedef int WINBOOL;
typedef unsigned int UINT_PTR,*PUINT_PTR;
typedef unsigned long long ULONG64,*PULONG64;
#define WINAPI __stdcall
#define CALLBACK __stdcall

typedef WINBOOL (CALLBACK WINAPI *PSYMBOLSERVERCALLBACKPROC)(UINT_PTR
action,ULONG64 data,ULONG64 context);

$ ~/clang-nightly/bin/clang -target i686-w64-mingw32 -c test.c
clang-9: ../tools/clang/lib/Sema/SemaType.cpp:5661: void
{anonymous}::DeclaratorLocFiller::VisitParenTypeLoc(clang::ParenTypeLoc):
Assertion `Chunk.Kind == DeclaratorChunk::Paren' failed.
Stack dump:
0.      Program arguments: /home/martin/clang-nightly-sun/bin/clang-9 -cc1
-triple i686-w64-windows-gnu -emit-obj -mrelax-all -disable-free
-main-file-name test.c -mrelocation-model static -mthread-model posix
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu
pentium4 -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/home/martin/test.gcno -resource-dir
/home/martin/clang-nightly-sun/lib/clang/9.0.0 -internal-isystem
/home/martin/clang-nightly-sun/lib/clang/9.0.0/include -internal-isystem
/home/martin/clang-nightly/i686-w64-mingw32/sys-root/mingw/include
-internal-isystem /home/martin/clang-nightly/i686-w64-mingw32/include
-internal-isystem /home/martin/clang-nightly/include -fdebug-compilation-dir
/home/martin -ferror-limit 19 -fmessage-length 199 -fno-use-cxa-atexit
-fobjc-runtime=gcc -fdwarf-exceptions -fdiagnostics-show-option
-fcolor-diagnostics -o test.o -x c test.c -faddrsig 
1.      test.c:7:107: current parser token ';'
 #0 0x000055ac981c1c9a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/martin/clang-nightly-sun/bin/clang-9+0x1e81c9a)
 #1 0x000055ac981bf944 llvm::sys::RunSignalHandlers()
(/home/martin/clang-nightly-sun/bin/clang-9+0x1e7f944)
 #2 0x000055ac981bfa82 (/home/martin/clang-nightly-sun/bin/clang-9+0x1e7fa82)
 #3 0x00007fc01316f890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00007fc011e20e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007fc011e22801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007fc011e1239a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #7 0x00007fc011e12412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #8 0x000055ac99dcb03f (/home/martin/clang-nightly-sun/bin/clang-9+0x3a8b03f)
 #9 0x000055ac99dd279b (/home/martin/clang-nightly-sun/bin/clang-9+0x3a9279b)
#10 0x000055ac99dd4bb9 clang::Sema::GetTypeForDeclarator(clang::Declarator&,
clang::Scope*) (/home/martin/clang-nightly-sun/bin/clang-9+0x3a94bb9)
#11 0x000055ac9995ac6e clang::Sema::HandleDeclarator(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>)
(/home/martin/clang-nightly-sun/bin/clang-9+0x361ac6e)
#12 0x000055ac9995ba1a clang::Sema::ActOnDeclarator(clang::Scope*,
clang::Declarator&) (/home/martin/clang-nightly-sun/bin/clang-9+0x361ba1a)
#13 0x000055ac99739cc0
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
(/home/martin/clang-nightly-sun/bin/clang-9+0x33f9cc0)
#14 0x000055ac99748d8b clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/home/martin/clang-nightly-sun/bin/clang-9+0x3408d8b)
#15 0x000055ac99749353
clang::Parser::ParseSimpleDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool,
clang::Parser::ForRangeInit*)
(/home/martin/clang-nightly-sun/bin/clang-9+0x3409353)
#16 0x000055ac9974968d
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
(/home/martin/clang-nightly-sun/bin/clang-9+0x340968d)
#17 0x000055ac99727d9a
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) (/home/martin/clang-nightly-sun/bin/clang-9+0x33e7d9a)
#18 0x000055ac997291c9
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/home/martin/clang-nightly-sun/bin/clang-9+0x33e91c9)
#19 0x000055ac9971ee39 clang::ParseAST(clang::Sema&, bool, bool)
(/home/martin/clang-nightly-sun/bin/clang-9+0x33dee39)
#20 0x000055ac98de5d78 clang::CodeGenAction::ExecuteAction()
(/home/martin/clang-nightly-sun/bin/clang-9+0x2aa5d78)
#21 0x000055ac9887e98e clang::FrontendAction::Execute()
(/home/martin/clang-nightly-sun/bin/clang-9+0x253e98e)
#22 0x000055ac98840f06
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/martin/clang-nightly-sun/bin/clang-9+0x2500f06)
#23 0x000055ac9892421d
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/martin/clang-nightly-sun/bin/clang-9+0x25e421d)
#24 0x000055ac96f47508 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/martin/clang-nightly-sun/bin/clang-9+0xc07508)
#25 0x000055ac96edfda1 main
(/home/martin/clang-nightly-sun/bin/clang-9+0xb9fda1)
#26 0x00007fc011e03b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#27 0x000055ac96f432fa _start
(/home/martin/clang-nightly-sun/bin/clang-9+0xc032fa)
clang-9: error: unable to execute command: Aborted (core dumped)</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>