diff --git a/gdb-fortran-stride-intel-1of6.patch b/gdb-fortran-stride-intel-1of6.patch index f17c83a..b1c131d 100644 --- a/gdb-fortran-stride-intel-1of6.patch +++ b/gdb-fortran-stride-intel-1of6.patch @@ -1,7 +1,7 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00843.html +Subject: [PATCH v2 1/6] fortran: allow multi-dimensional subarrays + From: Christoph Weinmann -[PATCH 1/6] fortran: allow multi-dimensional subarrays -https://sourceware.org/ml/gdb-patches/2015-12/msg00007.html -Message-Id: <1448976075-11456-2-git-send-email-christoph.t.weinmann@intel.com> Add an argument count for subrange expressions in Fortran. Based on the counted value calculate a new array with the @@ -34,17 +34,16 @@ new> $3 = ( ( 21, 31, 41) ( 22, 32, 42) ( 23, 33, 43) ) * value.h: Add function definition. - Signed-off-by: Christoph Weinmann --- - gdb/eval.c | 309 ++++++++++++++++++++++++++++++++++++++++++++++------------ - gdb/f-exp.y | 2 + - gdb/valops.c | 157 ++++++++++++++++++++++++------ - gdb/value.h | 2 + + gdb/eval.c | 309 ++++++++++++++++++++++++++++++++++++++++++++++------------- + gdb/f-exp.y | 2 + + gdb/valops.c | 157 ++++++++++++++++++++++++------ + gdb/value.h | 2 + 4 files changed, 375 insertions(+), 95 deletions(-) diff --git a/gdb/eval.c b/gdb/eval.c -index 84e2e34..2ceccbc 100644 +index 78ad946..c9f325f 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -399,29 +399,253 @@ init_array_element (struct value *array, struct value *element, @@ -395,7 +394,7 @@ index 84e2e34..2ceccbc 100644 error (_("Can't get dimensions for a non-array type")); diff --git a/gdb/f-exp.y b/gdb/f-exp.y -index 56629dc..ab23df0 100644 +index 4faac32..9343abb 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -308,6 +308,8 @@ arglist : subrange @@ -408,7 +407,7 @@ index 56629dc..ab23df0 100644 /* There are four sorts of subrange types in F90. */ diff --git a/gdb/valops.c b/gdb/valops.c -index 5e5f685..f8d23fb 100644 +index 5a244a9..09ea877 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -3759,56 +3759,151 @@ value_of_this_silent (const struct language_defn *lang) @@ -595,7 +594,7 @@ index 5e5f685..f8d23fb 100644 /* Create a value for a FORTRAN complex number. Currently most of the diff --git a/gdb/value.h b/gdb/value.h -index eea0e59..05939c4 100644 +index 2eac5ef..3400460 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1056,6 +1056,8 @@ extern struct value *varying_to_slice (struct value *); @@ -608,4 +607,5 @@ index eea0e59..05939c4 100644 struct type *); -- -1.7.0.7 +2.5.0 + diff --git a/gdb-fortran-stride-intel-2of6.patch b/gdb-fortran-stride-intel-2of6.patch index 12f7515..bf48143 100644 --- a/gdb-fortran-stride-intel-2of6.patch +++ b/gdb-fortran-stride-intel-2of6.patch @@ -1,7 +1,7 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00841.html +Subject: [PATCH v2 2/6] fortran: combine subarray and string computation + From: Christoph Weinmann -[PATCH 2/6] fortran: combine subarray and string computation -https://sourceware.org/ml/gdb-patches/2015-12/msg00010.html -Message-Id: <1448976075-11456-3-git-send-email-christoph.t.weinmann@intel.com> Strings only have one dimension, but the element computation is identical to the subarray computation for ranges and indices. @@ -13,14 +13,13 @@ identical to the subarray computation for ranges and indices. string types. - Signed-off-by: Christoph Weinmann --- - gdb/eval.c | 10 +--------- - 1 files changed, 1 insertions(+), 9 deletions(-) + gdb/eval.c | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/gdb/eval.c b/gdb/eval.c -index 2ceccbc..0c1b607 100644 +index c9f325f..164d7ab 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -2034,16 +2034,8 @@ evaluate_subexp_standard (struct type *expect_type, @@ -42,4 +41,5 @@ index 2ceccbc..0c1b607 100644 case TYPE_CODE_PTR: case TYPE_CODE_FUNC: -- -1.7.0.7 +2.5.0 + diff --git a/gdb-fortran-stride-intel-3of6.patch b/gdb-fortran-stride-intel-3of6.patch index ebe3a87..50a6582 100644 --- a/gdb-fortran-stride-intel-3of6.patch +++ b/gdb-fortran-stride-intel-3of6.patch @@ -1,7 +1,7 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00845.html +Subject: [PATCH v2 3/6] fortran: change subrange enum to bit field + From: Christoph Weinmann -[PATCH 3/6] fortran: change subrange enum to bit field -https://sourceware.org/ml/gdb-patches/2015-12/msg00006.html -Message-Id: <1448976075-11456-4-git-send-email-christoph.t.weinmann@intel.com> Change Fortran subrange enum for subrange expressions to represent a bitfield for easier manipulation. Consequently @@ -24,17 +24,16 @@ behaviour of GDB is unchanged. boundaries provided by the user. - Signed-off-by: Christoph Weinmann --- - gdb/eval.c | 14 ++++++-------- - gdb/f-exp.y | 11 ++++++----- - gdb/f-lang.h | 6 ++---- - gdb/parse.c | 21 ++++++++------------- + gdb/eval.c | 14 ++++++-------- + gdb/f-exp.y | 11 ++++++----- + gdb/f-lang.h | 6 ++---- + gdb/parse.c | 21 ++++++++------------- 4 files changed, 22 insertions(+), 30 deletions(-) diff --git a/gdb/eval.c b/gdb/eval.c -index 0c1b607..47ba602 100644 +index 164d7ab..9b8b051 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -480,12 +480,12 @@ value_f90_subarray (struct value *array, struct expression *exp, @@ -70,7 +69,7 @@ index 0c1b607..47ba602 100644 /* Both user provided low and high bound have to be inside the diff --git a/gdb/f-exp.y b/gdb/f-exp.y -index ab23df0..1ff768c 100644 +index 9343abb..b1206de 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -315,26 +315,27 @@ arglist : arglist ',' exp %prec ABOVE_COMMA @@ -107,7 +106,7 @@ index ab23df0..1ff768c 100644 ; diff --git a/gdb/f-lang.h b/gdb/f-lang.h -index f7a14d7..20cf5bd 100644 +index eeca107..4d56bf7 100644 --- a/gdb/f-lang.h +++ b/gdb/f-lang.h @@ -44,10 +44,8 @@ extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR, @@ -124,7 +123,7 @@ index f7a14d7..20cf5bd 100644 /* A common block. */ diff --git a/gdb/parse.c b/gdb/parse.c -index a24c52a..7e45c05 100644 +index 4191fc6..d500279 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -1006,22 +1006,17 @@ operator_length_standard (const struct expression *expr, int endpos, @@ -159,4 +158,5 @@ index a24c52a..7e45c05 100644 break; -- -1.7.0.7 +2.5.0 + diff --git a/gdb-fortran-stride-intel-4of6.patch b/gdb-fortran-stride-intel-4of6.patch index 650236e..6563d71 100644 --- a/gdb-fortran-stride-intel-4of6.patch +++ b/gdb-fortran-stride-intel-4of6.patch @@ -1,7 +1,7 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00842.html +Subject: [PATCH v2 4/6] fortran: enable parsing of stride parameter for subranges + From: Christoph Weinmann -[PATCH 4/6] fortran: enable parsing of stride parameter for subranges -https://sourceware.org/ml/gdb-patches/2015-12/msg00009.html -Message-Id: <1448976075-11456-5-git-send-email-christoph.t.weinmann@intel.com> Allow the user to provide a stride parameter for Fortran subarrays. The stride parameter can be any integer except @@ -20,17 +20,16 @@ subarrays. The stride parameter can be any integer except accordingly. - Signed-off-by: Christoph Weinmann --- - gdb/eval.c | 10 +++++++++- - gdb/f-exp.y | 33 +++++++++++++++++++++++++++++++-- - gdb/f-lang.h | 5 +++-- - gdb/parse.c | 3 +++ + gdb/eval.c | 10 +++++++++- + gdb/f-exp.y | 33 +++++++++++++++++++++++++++++++-- + gdb/f-lang.h | 5 +++-- + gdb/parse.c | 3 +++ 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/gdb/eval.c b/gdb/eval.c -index 47ba602..15b2ad4 100644 +index 9b8b051..308ada3 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -438,7 +438,7 @@ value_f90_subarray (struct value *array, struct expression *exp, @@ -58,7 +57,7 @@ index 47ba602..15b2ad4 100644 /* User input is an index. E.g.: "p arry(5)". */ else diff --git a/gdb/f-exp.y b/gdb/f-exp.y -index 1ff768c..01480b0 100644 +index b1206de..5151fee 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -316,8 +316,8 @@ arglist : arglist ',' exp %prec ABOVE_COMMA @@ -109,7 +108,7 @@ index 1ff768c..01480b0 100644 { } ; diff --git a/gdb/f-lang.h b/gdb/f-lang.h -index 20cf5bd..6cc0672 100644 +index 4d56bf7..0ad57af 100644 --- a/gdb/f-lang.h +++ b/gdb/f-lang.h @@ -44,8 +44,9 @@ extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR, @@ -125,7 +124,7 @@ index 20cf5bd..6cc0672 100644 /* A common block. */ diff --git a/gdb/parse.c b/gdb/parse.c -index 7e45c05..e67a426 100644 +index d500279..07248c3 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -1018,6 +1018,9 @@ operator_length_standard (const struct expression *expr, int endpos, @@ -139,4 +138,5 @@ index 7e45c05..e67a426 100644 default: -- -1.7.0.7 +2.5.0 + diff --git a/gdb-fortran-stride-intel-5of6.patch b/gdb-fortran-stride-intel-5of6.patch index 1ce5440..9a7dba3 100644 --- a/gdb-fortran-stride-intel-5of6.patch +++ b/gdb-fortran-stride-intel-5of6.patch @@ -1,7 +1,7 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00844.html +Subject: [PATCH v2 5/6] fortran: calculate subarray with stride values. + From: Christoph Weinmann -[PATCH 5/6] fortran: calculate subarray with stride values. -https://sourceware.org/ml/gdb-patches/2015-12/msg00011.html -Message-Id: <1448976075-11456-6-git-send-email-christoph.t.weinmann@intel.com> Calculate elements of a subarray using a provided stride value The stride value can be a positive or negative integer, but may @@ -30,16 +30,15 @@ $3 = (1, 3, 5, 7, 9) value_slice_1. - Signed-off-by: Christoph Weinmann --- - gdb/eval.c | 110 +++++++++++++++++++++++++++++++++++++++++++++------------ - gdb/valops.c | 85 ++++++++++++++++++++++++++++++++------------ - gdb/value.h | 2 +- - 3 files changed, 150 insertions(+), 47 deletions(-) + gdb/eval.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++------------- + gdb/valops.c | 87 +++++++++++++++++++++++++++++++++------------- + gdb/value.h | 2 +- + 3 files changed, 152 insertions(+), 48 deletions(-) diff --git a/gdb/eval.c b/gdb/eval.c -index 15b2ad4..b8cd080 100644 +index 308ada3..d01b579 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -437,8 +437,8 @@ value_f90_subarray (struct value *array, struct expression *exp, @@ -215,7 +214,7 @@ index 15b2ad4..b8cd080 100644 for (i = 0; i < nargs; i++) { struct subscript_store *index = &subscript_array[i]; -@@ -625,12 +682,19 @@ value_f90_subarray (struct value *array, struct expression *exp, +@@ -625,12 +682,20 @@ value_f90_subarray (struct value *array, struct expression *exp, if (index->kind == SUBSCRIPT_RANGE) { struct type *range_type, *interim_array_type; @@ -225,6 +224,7 @@ index 15b2ad4..b8cd080 100644 + bounds plus the start element itself. It may be modified by + a user provided stride value. */ + new_length = index->range.high - index->range.low; ++ + new_length /= index->range.stride; range_type @@ -239,7 +239,7 @@ index 15b2ad4..b8cd080 100644 interim_array_type = create_array_type (NULL, temp_type, diff --git a/gdb/valops.c b/gdb/valops.c -index f8d23fb..6c9112f 100644 +index 09ea877..83c8462 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -3759,10 +3759,13 @@ value_of_this_silent (const struct language_defn *lang) @@ -297,6 +297,15 @@ index f8d23fb..6c9112f 100644 elt_stride = TYPE_LENGTH (TYPE_INDEX_TYPE (array_type)); elt_offs *= elt_size; +@@ -3825,7 +3839,7 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count) + if (call_count == 1) + { + range_type = TYPE_INDEX_TYPE (array_type); +- slice_range_size = elem_count; ++ slice_range_size = ary_low_bound + elem_count - 1; + + /* Check if the array bounds are valid. */ + if (get_discrete_bounds (range_type, &ary_low_bound, &ary_high_bound) < 0) @@ -3837,7 +3851,7 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count) else { @@ -386,7 +395,7 @@ index f8d23fb..6c9112f 100644 } diff --git a/gdb/value.h b/gdb/value.h -index 05939c4..d687468 100644 +index 3400460..c18ef2e 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1056,7 +1056,7 @@ extern struct value *varying_to_slice (struct value *); @@ -399,4 +408,5 @@ index 05939c4..d687468 100644 extern struct value *value_literal_complex (struct value *, struct value *, struct type *); -- -1.7.0.7 +2.5.0 + diff --git a/gdb-fortran-stride-intel-6of6-testcasefix.patch b/gdb-fortran-stride-intel-6of6-testcasefix.patch deleted file mode 100644 index d67920b..0000000 --- a/gdb-fortran-stride-intel-6of6-testcasefix.patch +++ /dev/null @@ -1,52 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2016-01/msg00135.html -Subject: Re: [PATCH 0/6] fortran: multi-dimensional subarrays with strides - - ---vkogqOf2sHV7VnPd -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline - -On Thu, 03 Dec 2015 21:51:19 +0100, Jan Kratochvil wrote: -> Just I see - reproducible with FSF GDB trunk - one new: -> FAIL: gdb.fortran/static-arrays.exp: print ar3(:2,:2,:2) -> happening on x86_64 in -m32 target mode and on i686 native host. -> It PASSes in the most common case of native x86_64. Tested on Fedora 23. -> print ar3(:2,:2,:2)^M -> -$52 = (( ( 111, 211) ( 121, 221) ) ( ( 112, 212) ( 122, 222) ) )^M -> -(gdb) PASS: gdb.fortran/static-arrays.exp: print ar3(:2,:2,:2) -> +$52 = (( ( 1221, 211) ( 121, 221) ) ( ( 112, 212) ( 122, 222) ) )^M -> +(gdb) FAIL: gdb.fortran/static-arrays.exp: print ar3(:2,:2,:2) - -That was easier than I expected: - -gfortran -fcheck=bounds --> -At line 44 of file gdb.fortran/static-arrays.f90 -Fortran runtime error: Index '11' of dimension 1 of array 'ar4' above upper bound of 10 - -There is: - integer, dimension(10,-7:3, -15:-5) :: ar4 -+ - do i = 1, 11, 1 - - -Jan - ---vkogqOf2sHV7VnPd -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline; filename=1 - ---- gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/static-arrays.f90-orig 2016-01-08 19:19:18.421828196 +0100 -+++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/static-arrays.f90 2016-01-08 19:41:09.778142683 +0100 -@@ -38,7 +38,7 @@ subroutine sub - end do - end do - -- do i = 1, 11, 1 -+ do i = 1, 10, 1 - do j = -7, 3, 1 - do k = -15, -5, 1 - ar4(i,j,k) = i*100 + (j+8)*10 + (k+16) - ---vkogqOf2sHV7VnPd-- - diff --git a/gdb-fortran-stride-intel-6of6.patch b/gdb-fortran-stride-intel-6of6.patch index ba77c19..47faef2 100644 --- a/gdb-fortran-stride-intel-6of6.patch +++ b/gdb-fortran-stride-intel-6of6.patch @@ -1,7 +1,7 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00847.html +Subject: [PATCH v2 6/6] fortran: test cases for subarray strides and slices + From: Christoph Weinmann -[PATCH 6/6] fortran: test cases for subarray strides and slices -https://sourceware.org/ml/gdb-patches/2015-12/msg00012.html -Message-Id: <1448976075-11456-7-git-send-email-christoph.t.weinmann@intel.com> Add test cases for subarray creation with range, literal and stride value permutations for one, two, and three dimensional @@ -14,21 +14,20 @@ testsuite/gdb.fortran/ * static-arrays.f90: New file. - Signed-off-by: Christoph Weinmann --- - gdb/testsuite/gdb.fortran/static-arrays.exp | 380 +++++++++++++++++++++++++++ - gdb/testsuite/gdb.fortran/static-arrays.f90 | 55 ++++ - 2 files changed, 435 insertions(+), 0 deletions(-) + gdb/testsuite/gdb.fortran/static-arrays.exp | 421 ++++++++++++++++++++++++++++ + gdb/testsuite/gdb.fortran/static-arrays.f90 | 55 ++++ + 2 files changed, 476 insertions(+) create mode 100644 gdb/testsuite/gdb.fortran/static-arrays.exp create mode 100644 gdb/testsuite/gdb.fortran/static-arrays.f90 diff --git a/gdb/testsuite/gdb.fortran/static-arrays.exp b/gdb/testsuite/gdb.fortran/static-arrays.exp new file mode 100644 -index 0000000..077f6fb +index 0000000..cc9ecc0 --- /dev/null +++ b/gdb/testsuite/gdb.fortran/static-arrays.exp -@@ -0,0 +1,380 @@ +@@ -0,0 +1,421 @@ +# Copyright 2015 Free Software Foundation, Inc. +# +# Contributed by Intel Corp. @@ -146,94 +145,120 @@ index 0000000..077f6fb + +# Test subarrays of 3 dimensional arrays with literals and subrange variations +gdb_test "print ar3\(2:4,3:4,7:8\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 237, 337, 437\\) \\( 247, 347, 447\\) \\) \\( \\( 238, 338, 438\\) \\( 248, 348, 448\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 237, 337, 437\\) \\( 247, 347, 447\\)\ ++ \\) \\( \\( 238, 338, 438\\) \\( 248, 348, 448\\) \\) \\)" \ + "print ar3\(2:4,3:4,7:8\)" +gdb_test "print ar3\(2:3,4:5,8:\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 248, 348\\) \\( 258, 358\\) \\) \\( \\( 249, 349\\) \\( 259, 359\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 248, 348\\) \\( 258, 358\\) \\) \\(\ ++ \\( 249, 349\\) \\( 259, 359\\) \\) \\)" \ + "print ar3\(2:3,4:5,8:\)" +gdb_test "print ar3\(2:3,4:5,:2\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 241, 341\\) \\( 251, 351\\) \\) \\( \\( 242, 342\\) \\( 252, 352\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 241, 341\\) \\( 251, 351\\) \\) \\(\ ++ \\( 242, 342\\) \\( 252, 352\\) \\) \\)" \ + "print ar3\(2:3,4:5,:2\)" + +gdb_test "print ar3\(2:3,8:,7:8\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 287, 387\\) \\( 297, 397\\) \\) \\( \\( 288, 388\\) \\( 298, 398\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 287, 387\\) \\( 297, 397\\) \\) \\(\ ++ \\( 288, 388\\) \\( 298, 398\\) \\) \\)" \ + "print ar3\(2:3,8:,7:8\)" +gdb_test "print ar3\(2:3,8:,8:\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 288, 388\\) \\( 298, 398\\) \\) \\( \\( 289, 389\\) \\( 299, 399\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 288, 388\\) \\( 298, 398\\) \\) \\(\ ++ \\( 289, 389\\) \\( 299, 399\\) \\) \\)" \ + "print ar3\(2:3,8:,8:\)" +gdb_test "print ar3\(2:3,8:,:2\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 281, 381\\) \\( 291, 391\\) \\) \\( \\( 282, 382\\) \\( 292, 392\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 281, 381\\) \\( 291, 391\\) \\) \\(\ ++ \\( 282, 382\\) \\( 292, 392\\) \\) \\)" \ + "print ar3\(2:3,8:,:2\)" + +gdb_test "print ar3\(2:3,:2,7:8\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 217, 317\\) \\( 227, 327\\) \\) \\( \\( 218, 318\\) \\( 228, 328\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 217, 317\\) \\( 227, 327\\) \\) \\(\ ++ \\( 218, 318\\) \\( 228, 328\\) \\) \\)" \ + "print ar3\(2:3,:2,7:8\)" +gdb_test "print ar3\(2:3,:2,8:\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 218, 318\\) \\( 228, 328\\) \\) \\( \\( 219, 319\\) \\( 229, 329\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 218, 318\\) \\( 228, 328\\) \\) \\(\ ++ \\( 219, 319\\) \\( 229, 329\\) \\) \\)" \ + "print ar3\(2:3,:2,8:\)" +gdb_test "print ar3\(2:3,:2,:2\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 211, 311\\) \\( 221, 321\\) \\) \\( \\( 212, 312\\) \\( 222, 322\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 211, 311\\) \\( 221, 321\\) \\) \\(\ ++ \\( 212, 312\\) \\( 222, 322\\) \\) \\)" \ + "print ar3\(2:3,:2,:2\)" + +gdb_test "print ar3\(8:,3:4,7:8\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 837, 937\\) \\( 847, 947\\) \\) \\( \\( 838, 938\\) \\( 848, 948\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 837, 937\\) \\( 847, 947\\) \\) \\(\ ++ \\( 838, 938\\) \\( 848, 948\\) \\) \\)" \ + "print ar3\(8:,3:4,7:8\)" +gdb_test "print ar3\(8:,4:5,8:\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 848, 948\\) \\( 858, 958\\) \\) \\( \\( 849, 949\\) \\( 859, 959\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 848, 948\\) \\( 858, 958\\) \\) \\(\ ++ \\( 849, 949\\) \\( 859, 959\\) \\) \\)" \ + "print ar3\(8:,4:5,8:\)" +gdb_test "print ar3\(8:,4:5,:2\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 841, 941\\) \\( 851, 951\\) \\) \\( \\( 842, 942\\) \\( 852, 952\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 841, 941\\) \\( 851, 951\\) \\) \\(\ ++ \\( 842, 942\\) \\( 852, 952\\) \\) \\)" \ + "print ar3\(8:,4:5,:2\)" + +gdb_test "print ar3\(8:,8:,7:8\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 887, 987\\) \\( 897, 997\\) \\) \\( \\( 888, 988\\) \\( 898, 998\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 887, 987\\) \\( 897, 997\\) \\) \\(\ ++ \\( 888, 988\\) \\( 898, 998\\) \\) \\)" \ + "print ar3\(8:,8:,7:8\)" +gdb_test "print ar3\(8:,8:,8:\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 888, 988\\) \\( 898, 998\\) \\) \\( \\( 889, 989\\) \\( 899, 999\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 888, 988\\) \\( 898, 998\\) \\) \\(\ ++ \\( 889, 989\\) \\( 899, 999\\) \\) \\)" \ + "print ar3\(8:,8:,8:\)" +gdb_test "print ar3\(8:,8:,:2\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 881, 981\\) \\( 891, 991\\) \\) \\( \\( 882, 982\\) \\( 892, 992\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 881, 981\\) \\( 891, 991\\) \\) \\(\ ++ \\( 882, 982\\) \\( 892, 992\\) \\) \\)" \ + "print ar3\(8:,8:,:2\)" + +gdb_test "print ar3\(8:,:2,7:8\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 817, 917\\) \\( 827, 927\\) \\) \\( \\( 818, 918\\) \\( 828, 928\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 817, 917\\) \\( 827, 927\\) \\) \\(\ ++ \\( 818, 918\\) \\( 828, 928\\) \\) \\)" \ + "print ar3\(8:,:2,7:8\)" +gdb_test "print ar3\(8:,:2,8:\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 818, 918\\) \\( 828, 928\\) \\) \\( \\( 819, 919\\) \\( 829, 929\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 818, 918\\) \\( 828, 928\\) \\) \\(\ ++ \\( 819, 919\\) \\( 829, 929\\) \\) \\)" \ + "print ar3\(8:,:2,8:\)" +gdb_test "print ar3\(8:,:2,:2\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 811, 911\\) \\( 821, 921\\) \\) \\( \\( 812, 912\\) \\( 822, 922\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 811, 911\\) \\( 821, 921\\) \\) \\(\ ++ \\( 812, 912\\) \\( 822, 922\\) \\) \\)" \ + "print ar3\(8:,:2,:2\)" + + +gdb_test "print ar3\(:2,3:4,7:8\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 137, 237\\) \\( 147, 247\\) \\) \\( \\( 138, 238\\) \\( 148, 248\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 137, 237\\) \\( 147, 247\\) \\) \\(\ ++ \\( 138, 238\\) \\( 148, 248\\) \\) \\)" \ + "print ar3 \(:2,3:4,7:8\)." +gdb_test "print ar3\(:2,3:4,8:\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 138, 238\\) \\( 148, 248\\) \\) \\( \\( 139, 239\\) \\( 149, 249\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 138, 238\\) \\( 148, 248\\) \\) \\(\ ++ \\( 139, 239\\) \\( 149, 249\\) \\) \\)" \ + "print ar3\(:2,3:4,8:\)" +gdb_test "print ar3\(:2,3:4,:2\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 131, 231\\) \\( 141, 241\\) \\) \\( \\( 132, 232\\) \\( 142, 242\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 131, 231\\) \\( 141, 241\\) \\) \\(\ ++ \\( 132, 232\\) \\( 142, 242\\) \\) \\)" \ + "print ar3\(:2,3:4,:2\)" + -+gdb_test "print ar3\(:2,8:,7:8\)" "\\$\[0-9\]+ = \\(\\( \\( 187, 287\\) \\( 197, 297\\) \\) \\( \\( 188, 288\\) \\( 198, 298\\) \\) \\)" \ ++gdb_test "print ar3\(:2,8:,7:8\)" "\\$\[0-9\]+ = \\(\\( \\( 187, 287\\) \\(\ ++ 197, 297\\) \\) \\( \\( 188, 288\\) \\( 198, 298\\) \\) \\)" \ + "print ar3\(:2,8:,7:8\)" -+gdb_test "print ar3\(:2,8:,8:\)" "\\$\[0-9\]+ = \\(\\( \\( 188, 288\\) \\( 198, 298\\) \\) \\( \\( 189, 289\\) \\( 199, 299\\) \\) \\)" \ ++gdb_test "print ar3\(:2,8:,8:\)" "\\$\[0-9\]+ = \\(\\( \\( 188, 288\\) \\( 198,\ ++ 298\\) \\) \\( \\( 189, 289\\) \\( 199, 299\\) \\) \\)" \ + "print ar3\(:2,8:,8:\)" -+gdb_test "print ar3\(:2,8:,:2\)" "\\$\[0-9\]+ = \\(\\( \\( 181, 281\\) \\( 191, 291\\) \\) \\( \\( 182, 282\\) \\( 192, 292\\) \\) \\)" \ ++gdb_test "print ar3\(:2,8:,:2\)" "\\$\[0-9\]+ = \\(\\( \\( 181, 281\\) \\( 191,\ ++ 291\\) \\) \\( \\( 182, 282\\) \\( 192, 292\\) \\) \\)" \ + "print ar3\(:2,8:,:2\)" + +gdb_test "print ar3\(:2,:2,7:8\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 117, 217\\) \\( 127, 227\\) \\) \\( \\( 118, 218\\) \\( 128, 228\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 117, 217\\) \\( 127, 227\\) \\) \\(\ ++ \\( 118, 218\\) \\( 128, 228\\) \\) \\)" \ + "print ar3\(:2,:2,7:8\)" +gdb_test "print ar3\(:2,:2,8:\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 118, 218\\) \\( 128, 228\\) \\) \\( \\( 119, 219\\) \\( 129, 229\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 118, 218\\) \\( 128, 228\\) \\) \\(\ ++ \\( 119, 219\\) \\( 129, 229\\) \\) \\)" \ + "print ar3\(:2,:2,8:\)" +gdb_test "print ar3\(:2,:2,:2\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 111, 211\\) \\( 121, 221\\) \\) \\( \\( 112, 212\\) \\( 122, 222\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 111, 211\\) \\( 121, 221\\) \\) \\(\ ++ \\( 112, 212\\) \\( 122, 222\\) \\) \\)" \ + "print ar3\(:2,:2,:2\)" + -+ +#Tests for subarrays of 3 dimensional arrays with literals and subranges +gdb_test "print ar3\(3,3:4,7:8\)" \ + "\\$\[0-9\]+ = \\(\\( 337, 347\\) \\( 338, 348\\) \\)" \ @@ -347,10 +372,12 @@ index 0000000..077f6fb + "\\$\[0-9\]+ = \\(23, 43, 63\\)" \ + "print ar2\(2:6:2,3\)" +gdb_test "print ar3\(2:6:2,3:5:2,4:7:3\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 234, 434, 634\\) \\( 254, 454, 654\\) \\) \\( \\( 237, 437, 637\\) \\( 257, 457, 657\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 234, 434, 634\\) \\( 254, 454, 654\\)\ ++ \\) \\( \\( 237, 437, 637\\) \\( 257, 457, 657\\) \\) \\)" \ + "print ar3\(2:6:2,3:5:2,4:7:3\)" +gdb_test "print ar3\(2:6:2,5,4:7:3\)" \ -+ "\\$\[0-9\]+ = \\(\\( 254, 454, 654\\) \\( 257, 457, 657\\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( 254, 454, 654\\) \\( 257, 457, 657\\)\ ++ \\)" \ + "print ar3\(2:6:2,5,4:7:3\)" + +# Stride < 0 @@ -358,21 +385,27 @@ index 0000000..077f6fb + "\\$\[0-9\]+ = \\(8, 6, 4, 2\\)" \ + "print ar1\(8:2:-2\)" +gdb_test "print ar2\(8:2:-2,3:4\)" \ -+ "\\$\[0-9\]+ = \\(\\( 83, 63, 43, 23\\) \\( 84, 64, 44, 24\\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( 83, 63, 43, 23\\) \\( 84, 64, 44, 24\\)\ ++ \\)" \ + "print ar2\(8:2:-2,3:4\)" +gdb_test "print ar2\(2:6:2,3\)" \ + "\\$\[0-9\]+ = \\(23, 43, 63\\)" \ + "print ar2\(2:6:2,3\)" +gdb_test "print ar3\(2:3,7:3:-4,4:7:3\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 274, 374\\) \\( 234, 334\\) \\) \\( \\( 277, 377\\) \\( 237, 337\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 274, 374\\) \\( 234, 334\\) \\) \\(\ ++ \\( 277, 377\\) \\( 237, 337\\) \\) \\)" \ + "print ar3\(2:3,7:3:-4,4:7:3\)" +gdb_test "print ar3\(2:6:2,5,7:4:-3\)" \ -+ "\\$\[0-9\]+ = \\(\\( 257, 457, 657\\) \\( 254, 454, 654\\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( 257, 457, 657\\) \\( 254, 454, 654\\)\ ++ \\)" \ + "print ar3\(2:6:2,5,7:4:-3\)" + +# Tests with negative and mixed indices +gdb_test "p ar4\(2:4, -2:1, -15:-14\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 261, 361, 461\\) \\( 271, 371, 471\\) \\( 281, 381, 481\\) \\( 291, 391, 491\\) \\) \\( \\( 262, 362, 462\\) \\( 272, 372, 472\\) \\( 282, 382, 482\\) \\( 292, 392, 492\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 261, 361, 461\\) \\( 271, 371, 471\\)\ ++ \\( 281, 381, 481\\) \\( 291, 391, 491\\) \\) \\( \\( 262,\ ++ 362, 462\\) \\( 272, 372, 472\\) \\( 282, 382, 482\\) \\( 292,\ ++ 392, 492\\) \\) \\)" \ + "print ar4(2:4, -2:1, -15:-14)" + +gdb_test "p ar4\(7,-6:2:3,-7\)" \ @@ -380,11 +413,18 @@ index 0000000..077f6fb + "print ar4(7,-6:2:3,-7)" + +gdb_test "p ar4\(9:2:-2, -6:2:3, -6:-15:-3\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 930, 730, 530, 330\\) \\( 960, 760, 560, 360\\) \\( 990, 790, 590, 390\\) \\) \\( \\( 927, 727, 527, 327\\) \\( 957, 757, 557, 357\\) \\( 987, 787, 587, 387\\) \\) \\( \\( 924, 724, 524, 324\\) \\( 954, 754, 554, 354\\) \\( 984, 784, 584, 384\\) \\) \\( \\( 921, 721, 521, 321\\) \\( 951, 751, 551, 351\\) \\( 981, 781, 581, 381\\) \\) \\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 930, 730, 530, 330\\) \\( 960, 760,\ ++ 560, 360\\) \\( 990, 790, 590, 390\\) \\) \\( \\( 927, 727,\ ++ 527, 327\\) \\( 957, 757, 557, 357\\) \\( 987, 787, 587,\ ++ 387\\) \\) \\( \\( 924, 724, 524, 324\\) \\( 954, 754, 554,\ ++ 354\\) \\( 984, 784, 584, 384\\) \\) \\( \\( 921, 721, 521,\ ++ 321\\) \\( 951, 751, 551, 351\\) \\( 981, 781, 581, 381\\) \\)\ ++ \\)" \ + "print ar4(9:2:-2, -6:2:3, -6:-15:-3)" + +gdb_test "p ar4\(:,:,:\)" \ -+ "\\$\[0-9\]+ = \\(\\( \\( 111, 211, 311, 411, 511, 611, 711, 811, .*" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 111, 211, 311, 411, 511, 611, 711,\ ++ 811, .*" \ + "print ar4(:,:,:)" + +# Provoke error messages for bad user input @@ -411,7 +451,7 @@ index 0000000..077f6fb + "Assignment of value to subarray" diff --git a/gdb/testsuite/gdb.fortran/static-arrays.f90 b/gdb/testsuite/gdb.fortran/static-arrays.f90 new file mode 100644 -index 0000000..af1a20c +index 0000000..f22fcbe --- /dev/null +++ b/gdb/testsuite/gdb.fortran/static-arrays.f90 @@ -0,0 +1,55 @@ @@ -455,7 +495,7 @@ index 0000000..af1a20c + end do + end do + -+ do i = 1, 11, 1 ++ do i = 1, 10, 1 + do j = -7, 3, 1 + do k = -15, -5, 1 + ar4(i,j,k) = i*100 + (j+8)*10 + (k+16) @@ -471,4 +511,5 @@ index 0000000..af1a20c + call sub +end -- -1.7.0.7 +2.5.0 + diff --git a/gdb.spec b/gdb.spec index eca3aa3..fe04163 100644 --- a/gdb.spec +++ b/gdb.spec @@ -27,7 +27,7 @@ Version: 7.11 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 57%{?dist} +Release: 58%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL Group: Development/Debuggers @@ -523,7 +523,6 @@ Patch1060: gdb-fortran-stride-intel-3of6.patch Patch1061: gdb-fortran-stride-intel-4of6.patch Patch1062: gdb-fortran-stride-intel-5of6.patch Patch1063: gdb-fortran-stride-intel-6of6.patch -Patch1068: gdb-fortran-stride-intel-6of6-testcasefix.patch Patch888: gdb-vla-intel.patch Patch983: gdb-vla-intel-logical-not.patch Patch889: gdb-vla-intel-stringbt-fix.patch @@ -758,7 +757,6 @@ find -name "*.info*"|xargs rm -f %patch1061 -p1 %patch1062 -p1 %patch1063 -p1 -%patch1068 -p1 %patch888 -p1 %patch983 -p1 %patch889 -p1 @@ -1386,6 +1384,9 @@ then fi %changelog +* Fri Feb 26 2016 Jan Kratochvil - 7.11-58.fc24 +- Rebase VLA (Fortran dynamic arrays) strides (multi-dim. subarrays) from Intel. + * Thu Feb 25 2016 Jan Kratochvil - 7.11-57.fc24 - Release bump only.