<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 - Different compilation of code with implicit modules replacement and without them."
href="https://bugs.llvm.org/show_bug.cgi?id=51045">51045</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Different compilation of code with implicit modules replacement and without them.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>12.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Keywords</th>
<td>compile-fail
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++2a
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mathleonid@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>I have the code (That is split into many files). If I compile it with modulemap
file and using implicit modules, then clang fails with error. If I compile the
main file by hand (no modules options, just includes), then no error prodiced
and object file successfully creates.
As examples of this commands may be:
clang++ -x c++ -std=gnu++20 -I /usr/local/include/ -L /usr/local/lib -lpthread
-lm -lc -lexecinfo -Wno-unused-command-line-argument -pipe -I
/usr/include/c++/v1 -I . -I /usr/include -Wno-macro-redefined
-Wno-pragma-system-header-outside-header -DLCC -I /home/leonid/lcc/prebuilt/
-Ofast /home/leonid/lcc/prebuilt/A0B39086240016481C.h -c
Not fails
And
clang++ -x c++ -std=gnu++20 -I /usr/local/include/ -L /usr/local/lib -lpthread
-lm -lc -lexecinfo -Wno-unused-command-line-argument -pipe -I
/usr/include/c++/v1 -I . -I /usr/include -Wno-macro-redefined
-Wno-pragma-system-header-outside-header -DLCC -I /home/leonid/lcc/prebuilt/
-I /home/leonid/lcc/ -Ofast /home/leonid/lcc/prebuilt/A0B39086240016481C.h
-fmodules -fmodule-map-file=/home/leonid/lcc/prebuilt/map.modulemap
-fprebuilt-module-path=/home/leonid/lcc/prebuilt/ -c
-fprebuilt-implicit-modules -fimplicit-modules -Xclang -fdisable-module-hash
-fprebuilt-module-path=prebuilt -fprebuilt-implicit-modules
-fmodules-cache-path=cache
Fails.
The report generated by clang is in attachment.</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>