[llvm-bugs] [Bug 33087] New: declare target fails to emit diagnostic when identifier redeclared

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 18 00:01:25 PDT 2017


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

            Bug ID: 33087
           Summary: declare target fails to emit diagnostic when
                    identifier redeclared
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: andrey.vul at gmail.com
                CC: llvm-bugs at lists.llvm.org

The test case shown below should emit the diagnostic "error: 'rc' must not
appear in both clauses 'to' and 'link'", but it fails to do so when 'rc' is
declared multiple times.

Test case:
int rc;
#pragma omp declare target link(rc)
#ifndef OK
int rc;
#endif
#pragma omp declare target to(rc)

This has been reproduced in Clang 4.0 for both PowerPC and amd64.

The diagnostician is failing to check against all declarations of an identifier
in its handling of declare target.

-- 
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/20170518/39913e4b/attachment.html>


More information about the llvm-bugs mailing list