File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1656,6 +1656,10 @@ void CompilerInvocation::setDefaultPredefinitions() {
16561656 fortranOptions.predefinitions .emplace_back (" __64BIT__" , " 1" );
16571657 }
16581658 break ;
1659+ case llvm::Triple::ArchType::aarch64:
1660+ fortranOptions.predefinitions .emplace_back (" __aarch64__" , " 1" );
1661+ fortranOptions.predefinitions .emplace_back (" __aarch64" , " 1" );
1662+ break ;
16591663 }
16601664}
16611665
Original file line number Diff line number Diff line change 1+ ! Test predefined macro for AArch64
2+
3+ ! REQUIRES: aarch64-registered-target
4+
5+ ! RUN: %flang_fc1 -triple aarch64-unknown-linux-gnu -cpp -E %s | FileCheck %s
6+
7+ ! CHECK: integer :: var1 = 1
8+ ! CHECK: integer :: var2 = 1
9+
10+ #if __aarch64__
11+ integer :: var1 = __aarch64__
12+ #endif
13+ #if __aarch64
14+ integer :: var2 = __aarch64
15+ #endif
16+ end program
You can’t perform that action at this time.
0 commit comments