Stephen Peckham 282da83756 [XCOFF][AIX] Issue an error when specifying an alias for a common symbol
Summary:

There is no support in XCOFF for labels on common symbols. Therefore, an alias for a common symbol is not supported. Issue an error in the front end when an aliasee is a common symbol. Issue a similar error in the back end in case an IR specifies an alias for a common symbol.

Reviewed by: hubert.reinterpretcast, DiggerLin

Differential Revision:  https://reviews.llvm.org/D158739
2023-08-31 11:43:47 -04:00

7 lines
327 B
C

// RUN: %clang_cc1 -triple powerpc-ibm-aix -S -fcommon %s -verify -o -
// RUN: %clang_cc1 -triple powerpc64-ibm-aix -S -fcommon %s -verify -o -
int xxxxxx;
extern int yyyyyy __attribute__((__alias__("xxxxxx") )); //expected-error {{alias to a variable in a common section is not allowed}}
void *gggggg() { return &yyyyyy; }