www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18421] New: rdmd test-case for pragma(lib) support is

https://issues.dlang.org/show_bug.cgi?id=18421

          Issue ID: 18421
           Summary: rdmd test-case for pragma(lib) support is incompatible
                    with GDC
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: tools
          Assignee: nobody puremagic.com
          Reporter: joseph.wakeling webdrake.net

`rdmd_test` includes a test-case to ensure that `rdmd` works for programs that
use `pragma(lib)` to load libraries (see
https://issues.dlang.org/show_bug.cgi?id=16978 for the motivation).

The correctness sought here is not in any direct handling of `pragma(lib)`, but
in ensuring that the way `rdmd` invokes the D compiler will allow the
`pragma(lib)` call to succeed.

Since GDC does not support `pragma(lib)`, the test case will fail when `gdmd`
is used as the D compiler invoked by `rdmd`.  As this is a fault in the
compiler rather than `rdmd`, the test case can simply be disabled when testing
with `gdmd` (since from `rdmd`'s point of view, it suffices to demonstrate that
it works with D compilers that support `pragma(lib)`).

However, this is merely a workaround, not a fix.  Long-term, the test-case
should be re-enabled as soon as GDC support for `pragma(lib)` is available. 
This issue has been created in order to ensure that this task does not get
forgotten ;-)

--
Feb 11 2018