Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions flang/lib/Parser/prescan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ void Prescanner::LabelField(TokenSequence &token) {
int outCol{1};
const char *start{at_};
std::optional<int> badColumn;
SkipCComments();
for (; *at_ != '\n' && column_ <= 6; ++at_) {
if (*at_ == '\t') {
++at_;
Expand Down
4 changes: 4 additions & 0 deletions flang/test/Parser/inc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Old style C comments
*comments
*/
#define VAL 1
14 changes: 14 additions & 0 deletions flang/test/Parser/test.F
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
! RUN: %flang_fc1 -fdebug-unparse-no-sema %s 2>&1 | FileCheck %s

!CHECK: SUBROUTINE foo
!CHECK: INTEGER i
!CHECK: i = 1
!CHECK: PRINT *, i
!CHECK: END SUBROUTINE foo

subroutine foo ()
#include "inc.h"
integer :: i
i = VAL
print *,i
end subroutine foo
Loading