<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 - cannot access any object in global module fragment from exported template function"
   href="https://bugs.llvm.org/show_bug.cgi?id=45173">45173</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>cannot access any object in global module fragment from exported template function
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>Modules
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sw6ueyz@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23220" name="attach_23220" title="source files - build with build.bat or build.sh">attachment 23220</a> <a href="attachment.cgi?id=23220&action=edit" title="source files - build with build.bat or build.sh">[details]</a></span>
source files - build with build.bat or build.sh

// accessing foo ( which is defined in global-module-fragment )
// in an exported-non-template-function succeeded
// but failed in an exported-template-function.

// see attached files and build with build.bat or build.sh


// my_module.cppm

module;

#include "foo.h"   // inline void foo() {}

export module my_module;

export namespace my_module
{
        void bar()
        {
                ::foo();             // OK
        }

        template< class Type >
        void baz()
        {
                ::foo();             // ERROR
        }
}</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>