Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Original-commit: flang-compiler/f18@7ef7029 Reviewed-on: flang-compiler/f18#777
- Loading branch information
Showing
74 changed files
with
1,973 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* keyword macros | ||
integer, parameter :: KWM = 666 | ||
#define KWM 777 | ||
if (KWM .eq. 777) then | ||
print *, 'pp001.F pass' | ||
else | ||
print *, 'pp001.F FAIL: ', KWM | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* #undef | ||
integer, parameter :: KWM = 777 | ||
#define KWM 666 | ||
#undef KWM | ||
if (KWM .eq. 777) then | ||
print *, 'pp002.F pass' | ||
else | ||
print *, 'pp002.F FAIL: ', KWM | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* function-like macros | ||
integer function IFLM(x) | ||
integer :: x | ||
IFLM = x | ||
end function IFLM | ||
program main | ||
#define IFLM(x) ((x)+111) | ||
integer :: res | ||
res = IFLM(666) | ||
if (res .eq. 777) then | ||
print *, 'pp003.F pass' | ||
else | ||
print *, 'pp003.F FAIL: ', res | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* KWMs case-sensitive | ||
integer, parameter :: KWM = 777 | ||
#define KWM 666 | ||
if (kwm .eq. 777) then | ||
print *, 'pp004.F pass' | ||
else | ||
print *, 'pp004.F FAIL: ', kwm | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* KWM split across continuation, implicit padding | ||
integer, parameter :: KWM = 666 | ||
#define KWM 777 | ||
integer :: res | ||
res = KW | ||
+M | ||
if (res .eq. 777) then | ||
print *, 'pp005.F pass' | ||
else | ||
print *, 'pp005.F FAIL: ', res | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* ditto, but with intervening *comment line | ||
integer, parameter :: KWM = 666 | ||
#define KWM 777 | ||
integer :: res | ||
res = KW | ||
*comment | ||
+M | ||
if (res .eq. 777) then | ||
print *, 'pp006.F pass' | ||
else | ||
print *, 'pp006.F FAIL: ', res | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* KWM split across continuation, clipped after column 72 | ||
integer, parameter :: KWM = 666 | ||
#define KWM 777 | ||
integer :: res | ||
* 'comment' is in column 73 | ||
* 1 2 3 4 5 6 7 | ||
*234567890123456789012345678901234567890123456789012345678901234567890123 | ||
res = KW comment | ||
+M | ||
if (res .eq. 777) then | ||
print *, 'pp007.F pass' | ||
else | ||
print *, 'pp007.F FAIL: ', res | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* KWM with spaces in name at invocation NOT replaced | ||
integer, parameter :: KWM = 777 | ||
#define KWM 666 | ||
integer :: res | ||
res = K W M | ||
if (res .eq. 777) then | ||
print *, 'pp008.F pass' | ||
else | ||
print *, 'pp008.F FAIL: ', res | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* FLM call split across continuation, implicit padding | ||
integer function IFLM(x) | ||
integer :: x | ||
IFLM = x | ||
end function IFLM | ||
program main | ||
#define IFLM(x) ((x)+111) | ||
integer :: res | ||
res = IFL | ||
+M(666) | ||
if (res .eq. 777) then | ||
print *, 'pp009.F pass' | ||
else | ||
print *, 'pp009.F FAIL: ', res | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* ditto, but with intervening *comment line | ||
integer function IFLM(x) | ||
integer :: x | ||
IFLM = x | ||
end function IFLM | ||
program main | ||
#define IFLM(x) ((x)+111) | ||
integer :: res | ||
res = IFL | ||
*comment | ||
+M(666) | ||
if (res .eq. 777) then | ||
print *, 'pp010.F pass' | ||
else | ||
print *, 'pp010.F FAIL: ', res | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* FLM call name split across continuation, clipped | ||
integer function IFLM(x) | ||
integer :: x | ||
IFLM = x | ||
end function IFLM | ||
program main | ||
#define IFLM(x) ((x)+111) | ||
integer :: res | ||
* 'comment' is in column 73 | ||
* 1 2 3 4 5 6 7 | ||
*234567890123456789012345678901234567890123456789012345678901234567890123 | ||
res = IFL comment | ||
+M(666) | ||
if (res .eq. 777) then | ||
print *, 'pp011.F pass' | ||
else | ||
print *, 'pp011.F FAIL: ', res | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* FLM call name split across continuation | ||
integer function IFLM(x) | ||
integer :: x | ||
IFLM = x | ||
end function IFLM | ||
program main | ||
#define IFLM(x) ((x)+111) | ||
integer :: res | ||
res = IFL | ||
+M(666) | ||
if (res .eq. 777) then | ||
print *, 'pp012.F pass' | ||
else | ||
print *, 'pp012.F FAIL: ', res | ||
end if | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
! | ||
! Licensed under the Apache License, Version 2.0 (the "License"); | ||
! you may not use this file except in compliance with the License. | ||
! You may obtain a copy of the License at | ||
! | ||
! http://www.apache.org/licenses/LICENSE-2.0 | ||
! | ||
! Unless required by applicable law or agreed to in writing, software | ||
! distributed under the License is distributed on an "AS IS" BASIS, | ||
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
! See the License for the specific language governing permissions and | ||
! limitations under the License. | ||
|
||
* FLM call split between name and ( | ||
integer function IFLM(x) | ||
integer :: x | ||
IFLM = x | ||
end function IFLM | ||
program main | ||
#define IFLM(x) ((x)+111) | ||
integer :: res | ||
res = IFLM | ||
+(666) | ||
if (res .eq. 777) then | ||
print *, 'pp013.F pass' | ||
else | ||
print *, 'pp013.F FAIL: ', res | ||
end if | ||
end |
Oops, something went wrong.