llnl / llnl/rose

Failed Parse on Character Array with multiple sub-index (FORTRAN)

Open
#323 0 comments 0 reactions 1 assignee Claimed by @peihunglin View on GitHub
Dominant language
C
Stars
688
Forks
144
PR merge metrics
No merged PRs in 30d

Description

Hello! I'm facing an issue with a specific program that access string sub-literals (Sorry if this is a known issue, or not supported, feel free to delete this if this is the case)

The offending code sample is:

```
program main

implicit none

integer :: k

character*80 c(80)

do k = 1, 15

c(k)(1:k) = 'FAILED PARSE'

end do

end program main
```

Full error log is:

```
WARNING: resetSourcePosition: sourceLocatedNode = 0x7fffbd1b16b0 = SgPntrArrRefExp = array_ref_of_array_ref_of_var_ref_of_c_at_expr_list_exp_var_ref_of_k_at_subscript_exp_integer_value_exp_1_var_ref_of_k_integer_value_exp_1

WARNING: resetSourcePosition: sourceLocatedNode = 0x7fffbd1b16b0 = SgPntrArrRefExp = array_ref_of_array_ref_of_var_ref_of_c_at_expr_list_exp_var_ref_of_k_at_subscript_exp_integer_value_exp_1_var_ref_of_k_integer_value_exp_1

WARNING: resetSourcePosition: sourceLocatedNode = 0x7fffbd084a00 = SgAssignOp = SgAssignOp_undef_name

WARNING: resetSourcePosition: sourceLocatedNode = 0x7fffbd084a00 = SgAssignOp = SgAssignOp_undef_name

Inside of Sg_File_Info::display(targetLocatedNode->get_startOfConstruct()->get_line () != newLineNumber: debug) of this pointer = 0x7f0ceb7815f0
isTransformation = false
isCompilerGenerated = false
isOutputInCodeGeneration = true (output in code generator)
isShared = false
isFrontendSpecific = false
isSourcePositionUnavailableInFrontend = true (source position unavailable in frontend)
isCommentOrDirective = false
isToken = false
isDefaultArgument = false
isImplicitCast = false
(computed) filename = NULL_FILE
(computed) line = 0 column = 0
(internal) file_id = -2
(internal) filename = NULL_FILE
(internal line = 0 column = 0
(computed) physical_file_id = -2 = NULL_FILE
(computed) physical_line = 0
source_sequence_number = 0

Inside of Sg_File_Info::display(targetLocatedNode->get_endOfConstruct()->get_line () != newLineNumber: debug) of this pointer = 0x7f0ceb781660
isTransformation = false
isCompilerGenerated = false
isOutputInCodeGeneration = true (output in code generator)
isShared = false
isFrontendSpecific = false
isSourcePositionUnavailableInFrontend = true (source position unavailable in frontend)
isCommentOrDirective = false
isToken = false
isDefaultArgument = false
isImplicitCast = false
(computed) filename = NULL_FILE
(computed) line = 0 column = 0
(internal) file_id = -2
(internal) filename = NULL_FILE
(internal line = 0 column = 0
(computed) physical_file_id = -2 = NULL_FILE
(computed) physical_line = 0
source_sequence_number = 0

identityTranslator: ../rose/src/src/frontend/OpenFortranParser_SAGE_Connection/fortran_support.C:731: void resetEndingSourcePosition(SgLocatedNode*, int): Assertion `targetLocatedNode->get_endOfConstruct()->isSourcePositionUnavailableInFrontend() == false' failed.
Aborted (core dumped)
```

Hope it helps!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.