Include patch for Opari 2 issues with Fortran line breaks.

This commit is contained in:
Christoph Niethammer 2016-08-09 12:24:27 +00:00
parent ea57eb5510
commit 1ee5b980f2
2 changed files with 46 additions and 0 deletions

View file

@ -49,3 +49,7 @@ then
CONFIGURE_OPTS+=" --with-papi-header=$PAPI_BASE/include --with-papi-lib=$PAPI_BASE/lib "
fi
src_prepare () {
patch -p1 < $SCLASS_DIR/$SCLASSFILE-0001.patch
}

View file

@ -0,0 +1,42 @@
Index: src/opari/opari2_parser_f.cc
===================================================================
--- src/opari/opari2_parser_f.cc (revision 1748)
+++ src/opari/opari2_parser_f.cc (working copy)
@@ -304,6 +304,12 @@
return result;
}
+bool
+OPARI2_FortranParser::is_empty_line( void )
+{
+ return m_lowline.find_first_not_of( " \t" ) == string::npos;
+}
+
/**@brief check if this line is a comment line*/
bool
OPARI2_FortranParser::is_comment_line( void )
@@ -816,7 +822,7 @@
found_continuation_line = true;
m_sentinel = prev_sentinel;
}
- else if ( found_continuation_line )
+ else if ( found_continuation_line && !is_empty_line() )
{
cerr << m_curr_file << ":" << m_lineno - 1
<< ": ERROR: missing continuation line\n";
Index: src/opari/opari2_parser_f.h
===================================================================
--- src/opari/opari2_parser_f.h (revision 1748)
+++ src/opari/opari2_parser_f.h (working copy)
@@ -98,6 +98,10 @@
bool
is_sub_unit_header( void );
+/**@brief check if this line is empty*/
+ bool
+ is_empty_line( void );
+
/**@brief check if this line is a comment line*/
bool
is_comment_line( void );