From 436e7c2734c1bd7fc2a08e3d43b0b7cf97da8654 Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Fri, 12 Aug 2016 09:15:05 +0000 Subject: [PATCH] Revert "New patch for the empty line issue with Fortran in Scorep 2.0.0." This reverts commit 81acc276338c66d9a908a021aa97aa49d3467873. --- .../scorep/scorep-2.0.2-0001.patch | 76 ++++++++----------- 1 file changed, 31 insertions(+), 45 deletions(-) diff --git a/packages/performance/scorep/scorep-2.0.2-0001.patch b/packages/performance/scorep/scorep-2.0.2-0001.patch index 90dc565..ca4654e 100644 --- a/packages/performance/scorep/scorep-2.0.2-0001.patch +++ b/packages/performance/scorep/scorep-2.0.2-0001.patch @@ -1,56 +1,42 @@ Index: src/opari/opari2_parser_f.cc =================================================================== ---- src/opari/opari2_parser_f.cc (revision 1749) +--- src/opari/opari2_parser_f.cc (revision 1748) +++ src/opari/opari2_parser_f.cc (working copy) -@@ -763,11 +763,13 @@ - lines.push_back( m_lowline ); +@@ -304,6 +304,12 @@ + return result; + } - bool found_continuation_line; -- string prev_sentinel = m_sentinel; -- unsigned ignored_lines = 0; -+ bool last_was_continuation_line = false; -+ string prev_sentinel = m_sentinel; -+ unsigned ignored_lines = 0; - do - { -- found_continuation_line = false; -+ last_was_continuation_line = found_continuation_line; -+ found_continuation_line = false; - - if ( m_options.form == F_FREE ) - { -@@ -778,7 +780,7 @@ - --com; - } - string::size_type amp = m_lowline.find_last_not_of( " \t", com ); -- if ( m_lowline[ amp ] == '&' ) -+ if ( m_lowline[ amp ] == '&' || ( is_empty_line() && last_was_continuation_line ) ) - { - found_continuation_line = true; - } -@@ -822,8 +824,15 @@ ++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 && !is_empty_line() ) -+ else if ( is_empty_line() && last_was_continuation_line && m_options.form == F_FREE ) +- else if ( found_continuation_line ) ++ else if ( found_continuation_line && !is_empty_line() ) { -+ found_continuation_line = true; -+ lines.push_back( m_lowline ); -+ m_sentinel = prev_sentinel; -+ ignored_lines--; -+ } -+ else if ( found_continuation_line ) -+ { cerr << m_curr_file << ":" << m_lineno - 1 << ": ERROR: missing continuation line\n"; - cleanup_and_exit(); -@@ -840,7 +849,6 @@ - OPARI2_Directive* d_new = - NewDirective( lines, directive_prefix, m_options.lang, m_curr_file, - m_lineno - lines.size() - ignored_lines + 1 ); -- - if ( d_new ) - { - m_waitfor_loopstart = d_new->NeedsEndLoopDirective(); +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 );