diff --git a/.devtoolset-8-gcc.metadata b/.devtoolset-8-gcc.metadata index 62a2a7c..df69f69 100644 --- a/.devtoolset-8-gcc.metadata +++ b/.devtoolset-8-gcc.metadata @@ -1,4 +1,4 @@ 7f4348418dc3efefd357b32a2b5c8010211ab284 SOURCES/doxygen-1.8.0.src.tar.gz -1fe3aa7ce95faa0f4d7f08f0dfefd86ff4b43015 SOURCES/gcc-8.2.1-20180905.tar.xz +9963f7eac3864dc1eb6d0978d0c9f7cc36c015a2 SOURCES/gcc-8.3.1-20190311.tar.xz c5a2b201bf05229647e73203c0bf2d9679d4d21f SOURCES/isl-0.16.1.tar.bz2 5ef03ca7aee134fe7dfecb6c9d048799f0810278 SOURCES/mpc-0.8.1.tar.gz diff --git a/.gitignore b/.gitignore index 0dd49da..90824b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ SOURCES/doxygen-1.8.0.src.tar.gz -SOURCES/gcc-8.2.1-20180905.tar.xz +SOURCES/gcc-8.3.1-20190311.tar.xz SOURCES/isl-0.16.1.tar.bz2 SOURCES/mpc-0.8.1.tar.gz diff --git a/SOURCES/0002-Pad-character-to-int-conversions-with-spaces-instead.patch b/SOURCES/0002-Pad-character-to-int-conversions-with-spaces-instead.patch index 2999a98..c0b375c 100644 --- a/SOURCES/0002-Pad-character-to-int-conversions-with-spaces-instead.patch +++ b/SOURCES/0002-Pad-character-to-int-conversions-with-spaces-instead.patch @@ -39,11 +39,8 @@ index d12ae5f..09da1d2 100644 /* Now write source to the buffer. */ gfc_target_encode_expr (source, buffer, buffer_size); -diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_19.f90 b/gcc/testsuite/gfortran.dg/c_ptr_tests_19.f90 -new file mode 100644 -index 0000000..a50cd68 --- /dev/null -+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_19.f90 ++++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 @@ -0,0 +1,62 @@ +! { dg-do compile } +! { dg-options "-fdump-tree-optimized -O -fdec-pad-with-spaces" } diff --git a/SOURCES/0004-Allow-conversion-between-Hollerith-constants-and-CHA.patch b/SOURCES/0004-Allow-conversion-between-Hollerith-constants-and-CHA.patch index 796d596..6b99600 100644 --- a/SOURCES/0004-Allow-conversion-between-Hollerith-constants-and-CHA.patch +++ b/SOURCES/0004-Allow-conversion-between-Hollerith-constants-and-CHA.patch @@ -25,10 +25,10 @@ index 8fa305c..fc1be48 100644 +static void +character2representation (gfc_expr *result, gfc_expr *src) +{ -+ int src_len, result_len; -+ int i; ++ size_t src_len, result_len; ++ size_t i; + src_len = src->value.character.length; -+ result_len = gfc_target_expr_size (result); ++ gfc_target_expr_size (result, &result_len); + + if (src_len > result_len) + gfc_warning (0, "The character constant at %L is too long to convert to %s", diff --git a/SOURCES/0009-Convert-LOGICAL-to-INTEGER-for-arithmetic-ops-and-vi.patch b/SOURCES/0009-Convert-LOGICAL-to-INTEGER-for-arithmetic-ops-and-vi.patch index e7e88a5..2747d91 100644 --- a/SOURCES/0009-Convert-LOGICAL-to-INTEGER-for-arithmetic-ops-and-vi.patch +++ b/SOURCES/0009-Convert-LOGICAL-to-INTEGER-for-arithmetic-ops-and-vi.patch @@ -65,7 +65,7 @@ index 667cc5073e3..33b441aa1bc 100644 { e->ts.type = BT_LOGICAL; @@ -3774,6 +3796,11 @@ resolve_operator (gfc_expr *e) - return resolve_function (e); + break; } + if (gfc_option.allow_std & GFC_STD_EXTRA_LEGACY) diff --git a/SOURCES/0016-Allow-calls-to-intrinsics-with-smaller-types-than-sp.patch b/SOURCES/0016-Allow-calls-to-intrinsics-with-smaller-types-than-sp.patch index f7ce2e2..6c4a55e 100644 --- a/SOURCES/0016-Allow-calls-to-intrinsics-with-smaller-types-than-sp.patch +++ b/SOURCES/0016-Allow-calls-to-intrinsics-with-smaller-types-than-sp.patch @@ -73,7 +73,7 @@ diff -Nrup a/gcc/fortran/interface.c b/gcc/fortran/interface.c static bool compare_type (gfc_symbol *s1, gfc_symbol *s2) @@ -743,7 +754,9 @@ compare_type (gfc_symbol *s1, gfc_symbol - return gfc_compare_types (&s1->ts, &s2->ts) || s2->ts.type == BT_ASSUMED; + return compare_type (s1, s2); } - diff --git a/SOURCES/gcc8-fortran-fdec-include-doc.patch b/SOURCES/gcc8-fortran-fdec-include-doc.patch new file mode 100644 index 0000000..9e519e9 --- /dev/null +++ b/SOURCES/gcc8-fortran-fdec-include-doc.patch @@ -0,0 +1,30 @@ +2018-11-21 Jakub Jelinek + + * invoke.texi (-fdec-include): Document. + +diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi +index ee84a0be8b1..33afab1517f 100644 +--- a/gcc/fortran/invoke.texi ++++ b/gcc/fortran/invoke.texi +@@ -119,7 +119,7 @@ by type. Explanations are in the following sections. + @gccoptlist{-fall-intrinsics -fbackslash -fcray-pointer -fd-lines-as-code @gol + -fd-lines-as-comments @gol + -fdec -fdec-structure -fdec-intrinsic-ints -fdec-static -fdec-math @gol +--fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 @gol ++-fdec-include -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 @gol + -fdefault-real-10 -fdefault-real-16 -fdollar-ok -ffixed-line-length-@var{n} @gol + -ffixed-line-length-none -ffree-form -ffree-line-length-@var{n} @gol + -ffree-line-length-none -fimplicit-none -finteger-4-integer-8 @gol +@@ -277,6 +277,12 @@ functions (e.g. TAND, ATAND, etc...) for compatability with older code. + Enable DEC-style STATIC and AUTOMATIC attributes to explicitly specify + the storage of variables and other objects. + ++@item -fdec-include ++@opindex @code{fdec-include} ++Enable parsing of INCLUDE as a statement in addition to parsing it as ++INCLUDE line. When parsed as INCLUDE statement, INCLUDE does not have to ++be on a single line and can use line continuations. ++ + @item -fdollar-ok + @opindex @code{fdollar-ok} + @cindex @code{$} diff --git a/SOURCES/gcc8-fortran-fdec-include.patch b/SOURCES/gcc8-fortran-fdec-include.patch new file mode 100644 index 0000000..01979df --- /dev/null +++ b/SOURCES/gcc8-fortran-fdec-include.patch @@ -0,0 +1,687 @@ +2018-11-21 Jakub Jelinek + Mark Eggleston + + * lang.opt (fdec-include): New option. + * options.c (set_dec_flags): Set also flag_dec_include. + * scanner.c (include_line): Change return type from bool to int. + In fixed form allow spaces in between include keyword letters. + For -fdec-include, allow in fixed form 0 in column 6. With + -fdec-include return -1 if the parsed line is not full include + statement and it could be successfully completed on continuation + lines. + (include_stmt): New function. + (load_file): Adjust include_line caller. If it returns -1, keep + trying include_stmt until it stops returning -1 whenever adding + further line of input. + +diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt +index 2b7f2903761..fe0c6934220 100644 +--- a/gcc/fortran/lang.opt ++++ b/gcc/fortran/lang.opt +@@ -440,6 +440,10 @@ fdec + Fortran Var(flag_dec_pad_with_spaces) + For character to integer conversions, use spaces for the pad rather than NUL. + ++fdec-include ++Fortran Var(flag_dec_include) ++Enable legacy parsing of INCLUDE as statement. ++ + fdec-intrinsic-ints + Fortran Var(flag_dec_intrinsic_ints) + Enable kind-specific variants of integer intrinsic functions. +diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c +index 73f5389361d..e59ba31ba7b 100644 +--- a/gcc/fortran/options.c ++++ b/gcc/fortran/options.c +@@ -68,6 +68,7 @@ set_dec_flags (int value) + flag_dec_intrinsic_ints |= value; + flag_dec_static |= value; + flag_dec_math |= value; ++ flag_dec_include |= value; + } + + +diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c +index 55d6dafdb5d..5b27ab5e52d 100644 +--- a/gcc/fortran/scanner.c ++++ b/gcc/fortran/scanner.c +@@ -2135,14 +2135,18 @@ static bool load_file (const char *, const char *, bool); + /* include_line()-- Checks a line buffer to see if it is an include + line. If so, we call load_file() recursively to load the included + file. We never return a syntax error because a statement like +- "include = 5" is perfectly legal. We return false if no include was +- processed or true if we matched an include. */ ++ "include = 5" is perfectly legal. We return 0 if no include was ++ processed, 1 if we matched an include or -1 if include was ++ partially processed, but will need continuation lines. */ + +-static bool ++static int + include_line (gfc_char_t *line) + { + gfc_char_t quote, *c, *begin, *stop; + char *filename; ++ const char *include = "include"; ++ bool allow_continuation = flag_dec_include; ++ int i; + + c = line; + +@@ -2158,42 +2162,133 @@ include_line (gfc_char_t *line) + else + { + if ((*c == '!' || *c == 'c' || *c == 'C' || *c == '*') +- && c[1] == '$' && (c[2] == ' ' || c[2] == '\t')) ++ && c[1] == '$' && c[2] == ' ') + c += 3; + } + } + +- while (*c == ' ' || *c == '\t') +- c++; ++ if (gfc_current_form == FORM_FREE) ++ { ++ while (*c == ' ' || *c == '\t') ++ c++; ++ if (gfc_wide_strncasecmp (c, "include", 7)) ++ { ++ if (!allow_continuation) ++ return 0; ++ for (i = 0; i < 7; ++i) ++ { ++ gfc_char_t c1 = gfc_wide_tolower (*c); ++ if (c1 != (unsigned char) include[i]) ++ break; ++ c++; ++ } ++ if (i == 0 || *c != '&') ++ return 0; ++ c++; ++ while (*c == ' ' || *c == '\t') ++ c++; ++ if (*c == '\0' || *c == '!') ++ return -1; ++ return 0; ++ } + +- if (gfc_wide_strncasecmp (c, "include", 7)) +- return false; ++ c += 7; ++ } ++ else ++ { ++ while (*c == ' ' || *c == '\t') ++ c++; ++ if (flag_dec_include && *c == '0' && c - line == 5) ++ { ++ c++; ++ while (*c == ' ' || *c == '\t') ++ c++; ++ } ++ if (c - line < 6) ++ allow_continuation = false; ++ for (i = 0; i < 7; ++i) ++ { ++ gfc_char_t c1 = gfc_wide_tolower (*c); ++ if (c1 != (unsigned char) include[i]) ++ break; ++ c++; ++ while (*c == ' ' || *c == '\t') ++ c++; ++ } ++ if (!allow_continuation) ++ { ++ if (i != 7) ++ return 0; ++ } ++ else if (i != 7) ++ { ++ if (i == 0) ++ return 0; ++ ++ /* At the end of line or comment this might be continued. */ ++ if (*c == '\0' || *c == '!') ++ return -1; ++ ++ return 0; ++ } ++ } + +- c += 7; + while (*c == ' ' || *c == '\t') + c++; + + /* Find filename between quotes. */ +- ++ + quote = *c++; + if (quote != '"' && quote != '\'') +- return false; ++ { ++ if (allow_continuation) ++ { ++ if (gfc_current_form == FORM_FREE) ++ { ++ if (quote == '&') ++ { ++ while (*c == ' ' || *c == '\t') ++ c++; ++ if (*c == '\0' || *c == '!') ++ return -1; ++ } ++ } ++ else if (quote == '\0' || quote == '!') ++ return -1; ++ } ++ return 0; ++ } + + begin = c; + ++ bool cont = false; + while (*c != quote && *c != '\0') +- c++; ++ { ++ if (allow_continuation && gfc_current_form == FORM_FREE) ++ { ++ if (*c == '&') ++ cont = true; ++ else if (*c != ' ' && *c != '\t') ++ cont = false; ++ } ++ c++; ++ } + + if (*c == '\0') +- return false; ++ { ++ if (allow_continuation ++ && (cont || gfc_current_form != FORM_FREE)) ++ return -1; ++ return 0; ++ } + + stop = c++; +- ++ + while (*c == ' ' || *c == '\t') + c++; + + if (*c != '\0' && *c != '!') +- return false; ++ return 0; + + /* We have an include line at this point. */ + +@@ -2205,9 +2300,130 @@ include_line (gfc_char_t *line) + exit (FATAL_EXIT_CODE); + + free (filename); +- return true; ++ return 1; + } + ++/* Similarly, but try to parse an INCLUDE statement, using gfc_next_char etc. ++ APIs. Return 1 if recognized as valid INCLUDE statement and load_file has ++ been called, 0 if it is not a valid INCLUDE statement and -1 if eof has ++ been encountered while parsing it. */ ++static int ++include_stmt (gfc_linebuf *b) ++{ ++ int ret = 0, i, length; ++ const char *include = "include"; ++ gfc_char_t c, quote = 0; ++ locus str_locus; ++ char *filename; ++ ++ continue_flag = 0; ++ end_flag = 0; ++ gcc_attribute_flag = 0; ++ openmp_flag = 0; ++ openacc_flag = 0; ++ continue_count = 0; ++ continue_line = 0; ++ gfc_current_locus.lb = b; ++ gfc_current_locus.nextc = b->line; ++ ++ gfc_skip_comments (); ++ gfc_gobble_whitespace (); ++ ++ for (i = 0; i < 7; i++) ++ { ++ c = gfc_next_char (); ++ if (c != (unsigned char) include[i]) ++ { ++ if (gfc_current_form == FORM_FIXED ++ && i == 0 ++ && c == '0' ++ && gfc_current_locus.nextc == b->line + 6) ++ { ++ gfc_gobble_whitespace (); ++ i--; ++ continue; ++ } ++ gcc_assert (i != 0); ++ if (c == '\n') ++ { ++ gfc_advance_line (); ++ gfc_skip_comments (); ++ if (gfc_at_eof ()) ++ ret = -1; ++ } ++ goto do_ret; ++ } ++ } ++ gfc_gobble_whitespace (); ++ ++ c = gfc_next_char (); ++ if (c == '\'' || c == '"') ++ quote = c; ++ else ++ { ++ if (c == '\n') ++ { ++ gfc_advance_line (); ++ gfc_skip_comments (); ++ if (gfc_at_eof ()) ++ ret = -1; ++ } ++ goto do_ret; ++ } ++ ++ str_locus = gfc_current_locus; ++ length = 0; ++ do ++ { ++ c = gfc_next_char_literal (INSTRING_NOWARN); ++ if (c == quote) ++ break; ++ if (c == '\n') ++ { ++ gfc_advance_line (); ++ gfc_skip_comments (); ++ if (gfc_at_eof ()) ++ ret = -1; ++ goto do_ret; ++ } ++ length++; ++ } ++ while (1); ++ ++ gfc_gobble_whitespace (); ++ c = gfc_next_char (); ++ if (c != '\n') ++ goto do_ret; ++ ++ gfc_current_locus = str_locus; ++ ret = 1; ++ filename = XNEWVEC (char, length + 1); ++ for (i = 0; i < length; i++) ++ { ++ c = gfc_next_char_literal (INSTRING_WARN); ++ gcc_assert (gfc_wide_fits_in_byte (c)); ++ filename[i] = (unsigned char) c; ++ } ++ filename[length] = '\0'; ++ if (!load_file (filename, NULL, false)) ++ exit (FATAL_EXIT_CODE); ++ ++ free (filename); ++ ++do_ret: ++ continue_flag = 0; ++ end_flag = 0; ++ gcc_attribute_flag = 0; ++ openmp_flag = 0; ++ openacc_flag = 0; ++ continue_count = 0; ++ continue_line = 0; ++ memset (&gfc_current_locus, '\0', sizeof (locus)); ++ memset (&openmp_locus, '\0', sizeof (locus)); ++ memset (&openacc_locus, '\0', sizeof (locus)); ++ memset (&gcc_attribute_locus, '\0', sizeof (locus)); ++ return ret; ++} + + /* Load a file into memory by calling load_line until the file ends. */ + +@@ -2215,7 +2431,7 @@ static bool + load_file (const char *realfilename, const char *displayedname, bool initial) + { + gfc_char_t *line; +- gfc_linebuf *b; ++ gfc_linebuf *b, *include_b = NULL; + gfc_file *f; + FILE *input; + int len, line_len; +@@ -2318,6 +2534,7 @@ load_file (const char *realfilename, const char *displayedname, bool initial) + for (;;) + { + int trunc = load_line (input, &line, &line_len, NULL); ++ int inc_line; + + len = gfc_wide_strlen (line); + if (feof (input) && len == 0) +@@ -2366,11 +2583,12 @@ load_file (const char *realfilename, const char *displayedname, bool initial) + } + + /* Preprocessed files have preprocessor lines added before the byte +- order mark, so first_line is not about the first line of the file ++ order mark, so first_line is not about the first line of the file + but the first line that's not a preprocessor line. */ + first_line = false; + +- if (include_line (line)) ++ inc_line = include_line (line); ++ if (inc_line > 0) + { + current_file->line++; + continue; +@@ -2403,6 +2621,36 @@ load_file (const char *realfilename, const char *displayedname, bool initial) + + while (file_changes_cur < file_changes_count) + file_changes[file_changes_cur++].lb = b; ++ ++ if (flag_dec_include) ++ { ++ if (include_b && b != include_b) ++ { ++ int inc_line2 = include_stmt (include_b); ++ if (inc_line2 == 0) ++ include_b = NULL; ++ else if (inc_line2 > 0) ++ { ++ do ++ { ++ if (gfc_current_form == FORM_FIXED) ++ { ++ for (gfc_char_t *p = include_b->line; *p; p++) ++ *p = ' '; ++ } ++ else ++ include_b->line[0] = '\0'; ++ if (include_b == b) ++ break; ++ include_b = include_b->next; ++ } ++ while (1); ++ include_b = NULL; ++ } ++ } ++ if (inc_line == -1 && !include_b) ++ include_b = b; ++ } + } + + /* Release the line buffer allocated in load_line. */ +diff --git a/gcc/testsuite/gfortran.dg/gomp/include_1.f b/gcc/testsuite/gfortran.dg/gomp/include_1.f +new file mode 100644 +index 00000000000..715eb5b97e3 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/gomp/include_1.f +@@ -0,0 +1,49 @@ ++c { dg-do compile } ++c { dg-options "-fopenmp -fdec" } ++ subroutine foo ++ implicit none ++c$ 0include 'include_1.inc' ++ i = 1 ++ end subroutine foo ++ subroutine bar ++ implicit none ++ i ++C$ ;n ++ +c ++ ++c some comment ++ ++*$ ll ++C comment line ++ uu ++ DD ++ ee'include_1.inc' ++ i = 1 ++ end subroutine bar ++ subroutine baz ++ implicit none ++ 0include ++ + 'include_1.inc' ++ i = 1 ++ end subroutine baz ++ subroutine qux ++ implicit none ++!$ i n C lude 'inc ++* another comment line ++ &lude_1.inc' ++ i = 1 ++ end subroutine qux ++ subroutine quux ++ implicit none ++C$ 0inc ++*$ 1lud ++c$ 2e ' ++!$ 3include_1.inc' ++ i = 1 ++ end subroutine quux ++ program include_12 ++ implicit none ++ include ++! comment ++c$ +'include_1.inc' ++ end program +diff --git a/gcc/testsuite/gfortran.dg/gomp/include_1.inc b/gcc/testsuite/gfortran.dg/gomp/include_1.inc +new file mode 100644 +index 00000000000..5dd841c5573 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/gomp/include_1.inc +@@ -0,0 +1 @@ ++ integer i +diff --git a/gcc/testsuite/gfortran.dg/gomp/include_2.f90 b/gcc/testsuite/gfortran.dg/gomp/include_2.f90 +new file mode 100644 +index 00000000000..9c4ff15afb8 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/gomp/include_2.f90 +@@ -0,0 +1,32 @@ ++! { dg-do compile } ++! { dg-options "-fopenmp -fdec-include" } ++subroutine foo ++ implicit none ++!$ incl& ! comment1 ++!$ &u& ++!$ &de & ! comment2 ++!$ 'include& ++ &_1.inc' ++ i = 1 ++end subroutine foo ++subroutine bar ++ implicit none ++!$ include & ++ ++! comment3 ++ ++!$ "include_1.inc" ++ i = 1 ++end subroutine bar ++subroutine baz ++ implicit none ++!$ include& ++!$ &'include_1.& ++!$ &inc' ++ i = 1 ++end subroutine baz ++subroutine qux ++ implicit none ++!$ include '& ++include_1.inc' ++end subroutine qux +diff --git a/gcc/testsuite/gfortran.dg/include_10.f b/gcc/testsuite/gfortran.dg/include_10.f +new file mode 100644 +index 00000000000..7df2a196954 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/include_10.f +@@ -0,0 +1,11 @@ ++c { dg-do compile } ++ subroutine foo ++ implicit none ++ include 'include_10.inc' ++ i = 1 ++ end subroutine foo ++ subroutine bar ++ implicit none ++ i n cl UD e'include_10.inc' ++ i = 1 ++ end subroutine bar +diff --git a/gcc/testsuite/gfortran.dg/include_10.inc b/gcc/testsuite/gfortran.dg/include_10.inc +new file mode 100644 +index 00000000000..5dd841c5573 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/include_10.inc +@@ -0,0 +1 @@ ++ integer i +diff --git a/gcc/testsuite/gfortran.dg/include_11.f b/gcc/testsuite/gfortran.dg/include_11.f +new file mode 100644 +index 00000000000..0e68a78c236 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/include_11.f +@@ -0,0 +1,20 @@ ++c { dg-do compile } ++ subroutine foo ++ implicit none ++c We used to accept following in fixed mode. Shall we at least ++c warn about it? ++include 'include_10.inc' ++ i = 1 ++ end subroutine foo ++ subroutine bar ++c Likewise here. ++ implicit none ++ include'include_10.inc' ++ i = 1 ++ end subroutine bar ++ subroutine baz ++c And here. ++ implicit none ++ include 'include_10.inc' ++ i = 1 ++ end subroutine baz +diff --git a/gcc/testsuite/gfortran.dg/include_12.f b/gcc/testsuite/gfortran.dg/include_12.f +new file mode 100644 +index 00000000000..4b3e3bed075 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/include_12.f +@@ -0,0 +1,65 @@ ++c { dg-do compile } ++c { dg-options "-fdec-include" } ++ subroutine foo ++ implicit none ++ 0include 'include_10.inc' ++ i = 1 ++ end subroutine foo ++ subroutine bar ++ implicit none ++ i ++ ;n ++ +c ++ ++c some comment ++ ++ ll ++C comment line ++ uu ++ DD ++ ee'include_10.inc' ++ i = 1 ++ end subroutine bar ++ subroutine baz ++ implicit none ++ 0include ++ + 'include_10.inc' ++ i = 1 ++ end subroutine baz ++ subroutine qux ++ implicit none ++ i n C lude 'inc ++* another comment line ++ &lude_10.inc' ++ i = 1 ++ end subroutine qux ++ subroutine quux ++ implicit none ++ 0inc ++ 1lud ++ 2e ' ++ 3include_10.inc' ++ i = 1 ++ end subroutine quux ++ program include_12 ++ implicit none ++ include ++! comment ++ +'include_10.inc' ++ end program ++ subroutine quuz ++ implicit none ++ integer include ++ include ++ +"include_10.inc" ++ i = 1 ++ include ++ + = 2 ++ write (*,*) include ++ end subroutine quuz ++ subroutine corge ++ implicit none ++ include ++ +'include_10.inc' ++ i = 1 ++ end subroutine corge +diff --git a/gcc/testsuite/gfortran.dg/include_13.f90 b/gcc/testsuite/gfortran.dg/include_13.f90 +new file mode 100644 +index 00000000000..418ee5585e2 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/include_13.f90 +@@ -0,0 +1,44 @@ ++! { dg-do compile } ++! { dg-options "-fdec" } ++subroutine foo ++ implicit none ++ incl& ! comment1 ++&u& ++ &de & ! comment2 ++'include& ++ &_10.inc' ++ i = 1 ++end subroutine foo ++subroutine bar ++ implicit none ++include & ++ ++! comment3 ++ ++"include_10.inc" ++ i = 1 ++end subroutine bar ++subroutine baz ++ implicit none ++ include& ++&'include_10.& ++&inc' ++ i = 1 ++end subroutine baz ++subroutine qux ++ implicit none ++ include '& ++include_10.inc' ++end subroutine qux ++subroutine quux ++ implicit none ++ include & ++ &'include_10.inc' ++ i = 1 ++end subroutine quux ++subroutine quuz ++ implicit none ++ include & ++ &"include_10.inc" ++ i = 1 ++end subroutine quuz diff --git a/SOURCES/gcc8-fortran-fpad-source.patch b/SOURCES/gcc8-fortran-fpad-source.patch new file mode 100644 index 0000000..d97c76e --- /dev/null +++ b/SOURCES/gcc8-fortran-fpad-source.patch @@ -0,0 +1,144 @@ +2018-11-23 Jakub Jelinek + + * lang.opt (fpad-source): New option. + * scanner.c (load_line): Don't pad fixed form lines if + !flag_pad_source. + * invoke.texi (-fno-pad-source): Document. + +diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi +index 33afab1517f..d6a278b1cc2 100644 +--- a/gcc/fortran/invoke.texi ++++ b/gcc/fortran/invoke.texi +@@ -121,7 +121,7 @@ by type. Explanations are in the following sections. + -fdec -fdec-structure -fdec-intrinsic-ints -fdec-static -fdec-math @gol + -fdec-include -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 @gol + -fdefault-real-10 -fdefault-real-16 -fdollar-ok -ffixed-line-length-@var{n} @gol +--ffixed-line-length-none -ffree-form -ffree-line-length-@var{n} @gol ++-ffixed-line-length-none -fpad-source -ffree-form -ffree-line-length-@var{n} @gol + -ffree-line-length-none -fimplicit-none -finteger-4-integer-8 @gol + -fmax-identifier-length -fmodule-private -ffixed-form -fno-range-check @gol + -fopenacc -fopenmp -freal-4-real-10 -freal-4-real-16 -freal-4-real-8 @gol +@@ -321,8 +321,9 @@ declared as @code{PUBLIC}. + @opindex @code{ffixed-line-length-}@var{n} + @cindex file format, fixed + Set column after which characters are ignored in typical fixed-form +-lines in the source file, and through which spaces are assumed (as +-if padded to that length) after the ends of short fixed-form lines. ++lines in the source file, and, unless @code{-fno-pad-source}, through which ++spaces are assumed (as if padded to that length) after the ends of short ++fixed-form lines. + + Popular values for @var{n} include 72 (the + standard and the default), 80 (card image), and 132 (corresponding +@@ -333,6 +334,15 @@ to them to fill out the line. + @option{-ffixed-line-length-0} means the same thing as + @option{-ffixed-line-length-none}. + ++@item -fno-pad-source ++@opindex @code{fpad-source} ++By default fixed-form lines have spaces assumed (as if padded to that length) ++after the ends of short fixed-form lines. This is not done either if ++@option{-ffixed-line-length-0}, @option{-ffixed-line-length-none} or ++if @option{-fno-pad-source} option is used. With any of those options ++continued character constants never have implicit spaces appended ++to them to fill out the line. ++ + @item -ffree-line-length-@var{n} + @opindex @code{ffree-line-length-}@var{n} + @cindex file format, free +diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt +index fe0c6934220..ae4957e176c 100644 +--- a/gcc/fortran/lang.opt ++++ b/gcc/fortran/lang.opt +@@ -536,6 +536,10 @@ ffixed-line-length- + Fortran RejectNegative Joined UInteger Var(flag_fixed_line_length) Init(72) + -ffixed-line-length- Use n as character line width in fixed mode. + ++fpad-source ++Fortran Var(flag_pad_source) Init(1) ++Pad shorter fixed form lines to line width with spaces. ++ + ffpe-trap= + Fortran RejectNegative JoinedOrMissing + -ffpe-trap=[...] Stop on following floating point exceptions. +diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c +index 5b27ab5e52d..2ef32b279fe 100644 +--- a/gcc/fortran/scanner.c ++++ b/gcc/fortran/scanner.c +@@ -1924,6 +1924,7 @@ next_char: + /* Pad lines to the selected line length in fixed form. */ + if (gfc_current_form == FORM_FIXED + && flag_fixed_line_length != 0 ++ && flag_pad_source + && !preprocessor_flag + && c != EOF) + { +diff --git a/gcc/testsuite/gfortran.dg/pad_source_1.f b/gcc/testsuite/gfortran.dg/pad_source_1.f +new file mode 100644 +index 00000000000..a616bba60de +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/pad_source_1.f +@@ -0,0 +1,8 @@ ++c { dg-do run } ++c { dg-skip-if "non-standard options" { *-*-* } { "-ffixed-line-length*" "-f*pad-source" } } ++ character(80) a ++ a = 'abc ++ +def' ++ if (a(:61) .ne. 'abc') stop 1 ++ if (a(62:) .ne. 'def') stop 2 ++ end +diff --git a/gcc/testsuite/gfortran.dg/pad_source_2.f b/gcc/testsuite/gfortran.dg/pad_source_2.f +new file mode 100644 +index 00000000000..bcf9439cd14 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/pad_source_2.f +@@ -0,0 +1,9 @@ ++c { dg-do run } ++c { dg-skip-if "non-standard options" { *-*-* } { "-ffixed-line-length*" } } ++c { dg-options "-fpad-source" } ++ character(80) a ++ a = 'abc ++ +def' ++ if (a(:61) .ne. 'abc') stop 1 ++ if (a(62:) .ne. 'def') stop 2 ++ end +diff --git a/gcc/testsuite/gfortran.dg/pad_source_3.f b/gcc/testsuite/gfortran.dg/pad_source_3.f +new file mode 100644 +index 00000000000..8fbdae0d67d +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/pad_source_3.f +@@ -0,0 +1,8 @@ ++c { dg-do run } ++c { dg-skip-if "non-standard options" { *-*-* } { "-ffixed-line-length*" } } ++c { dg-options "-fno-pad-source" } ++ character(80) a ++ a = 'abc ++ +def' ++ if (a .ne. 'abcdef') stop 1 ++ end +diff --git a/gcc/testsuite/gfortran.dg/pad_source_4.f b/gcc/testsuite/gfortran.dg/pad_source_4.f +new file mode 100644 +index 00000000000..5479cec217a +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/pad_source_4.f +@@ -0,0 +1,7 @@ ++c { dg-do run } ++c { dg-options "-ffixed-line-length-none" } ++ character(80) a ++ a = 'abc ++ +def' ++ if (a .ne. 'abcdef') stop 1 ++ end +diff --git a/gcc/testsuite/gfortran.dg/pad_source_5.f b/gcc/testsuite/gfortran.dg/pad_source_5.f +new file mode 100644 +index 00000000000..4122c85ba66 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/pad_source_5.f +@@ -0,0 +1,7 @@ ++c { dg-do run } ++c { dg-options "-ffixed-line-length-0" } ++ character(80) a ++ a = 'abc ++ +def' ++ if (a .ne. 'abcdef') stop 1 ++ end diff --git a/SOURCES/gcc8-fortran-include.patch b/SOURCES/gcc8-fortran-include.patch deleted file mode 100644 index 7b9a305..0000000 --- a/SOURCES/gcc8-fortran-include.patch +++ /dev/null @@ -1,240 +0,0 @@ -commit 858a1903ea946c9947d492209453a8973846b9f7 -Author: Jeff Law -Date: Tue May 29 13:56:59 2018 -0400 - - Fix bloomberg INCLUDE issue - -diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c -index 55d6daf..9c9a208 100644 ---- a/gcc/fortran/scanner.c -+++ b/gcc/fortran/scanner.c -@@ -2129,6 +2129,38 @@ preprocessor_line (gfc_char_t *c) - current_file->line++; - } - -+/* Add LINE with length LEN and truncation status TRUNC to -+ FILE_CHANGES. */ -+static void -+add_line (gfc_char_t *line, int len, int trunc) -+{ -+ gfc_linebuf *b; -+ -+ b = XCNEWVAR (gfc_linebuf, gfc_linebuf_header_size -+ + (len + 1) * sizeof (gfc_char_t)); -+ -+ -+ b->location = linemap_line_start (line_table, current_file->line++, len); -+ /* ??? We add the location for the maximum column possible here, -+ because otherwise if the next call creates a new line-map, it -+ will not reserve space for any offset. */ -+ if (len > 0) -+ linemap_position_for_column (line_table, len); -+ -+ b->file = current_file; -+ b->truncated = trunc; -+ wide_strcpy (b->line, line); -+ -+ if (line_head == NULL) -+ line_head = b; -+ else -+ line_tail->next = b; -+ -+ line_tail = b; -+ -+ while (file_changes_cur < file_changes_count) -+ file_changes[file_changes_cur++].lb = b; -+} - - static bool load_file (const char *, const char *, bool); - -@@ -2139,7 +2171,7 @@ static bool load_file (const char *, const char *, bool); - processed or true if we matched an include. */ - - static bool --include_line (gfc_char_t *line) -+include_line (FILE *input, gfc_char_t *line, int *len, int *trunc) - { - gfc_char_t quote, *c, *begin, *stop; - char *filename; -@@ -2173,6 +2205,33 @@ include_line (gfc_char_t *line) - while (*c == ' ' || *c == '\t') - c++; - -+ /* If we have reached EOL, read ahead to find the quote. We eat -+ any whitespace. We use getchar behind the back of load_line and -+ put it back if we do not find what we are looking for. */ -+ int new_line_len = 0; -+ int new_trunc = 0; -+ gfc_char_t *new_line = NULL; -+ if (*c == '\0') -+ { -+ unsigned char x; -+ -+ do -+ x = getc (input); -+ while (x == ' ' || x == '\t' || x == '\r' || x == '\n'); -+ -+ /* Always put the character back. */ -+ ungetc (x, input); -+ -+ /* If we did not fine the quote, put the character back and -+ return that no INCLUDE has processed. */ -+ if (x != '"' && x != '\'') -+ return false; -+ -+ /* Read the next line and continue processing. */ -+ new_trunc = load_line (input, &new_line, &new_line_len, NULL); -+ c = new_line; -+ } -+ - /* Find filename between quotes. */ - - quote = *c++; -@@ -2184,16 +2243,45 @@ include_line (gfc_char_t *line) - while (*c != quote && *c != '\0') - c++; - -+ /* Reached EOL without finding ending quote. */ - if (*c == '\0') -- return false; -+ { -+ /* If we loaded another line, then we want to add the -+ original line and return the current line. -+ -+ We do not try to support multi-line filenames for -+ INCLUDE statements. */ -+ if (new_line) -+ { -+ add_line (line, *len, *trunc); -+ *line = *new_line; -+ *len = new_line_len; -+ *trunc = new_trunc; -+ } -+ return false; -+ } - - stop = c++; - -+ /* Consume trailing whitespace on this line. */ - while (*c == ' ' || *c == '\t') - c++; - -+ /* If we encounter real characters before reaching EOL, then -+ we do not consider this an include line. */ - if (*c != '\0' && *c != '!') -- return false; -+ { -+ /* If we loaded another line, then we want to add the -+ original line and return the current line. */ -+ if (new_line) -+ { -+ add_line (line, *len, *trunc); -+ *line = *new_line; -+ *len = new_line_len; -+ *trunc = new_trunc; -+ } -+ return false; -+ } - - /* We have an include line at this point. */ - -@@ -2215,7 +2303,6 @@ static bool - load_file (const char *realfilename, const char *displayedname, bool initial) - { - gfc_char_t *line; -- gfc_linebuf *b; - gfc_file *f; - FILE *input; - int len, line_len; -@@ -2370,39 +2457,13 @@ load_file (const char *realfilename, const char *displayedname, bool initial) - but the first line that's not a preprocessor line. */ - first_line = false; - -- if (include_line (line)) -+ if (include_line (input, line, &len, &trunc)) - { - current_file->line++; - continue; - } - -- /* Add line. */ -- -- b = XCNEWVAR (gfc_linebuf, gfc_linebuf_header_size -- + (len + 1) * sizeof (gfc_char_t)); -- -- -- b->location -- = linemap_line_start (line_table, current_file->line++, len); -- /* ??? We add the location for the maximum column possible here, -- because otherwise if the next call creates a new line-map, it -- will not reserve space for any offset. */ -- if (len > 0) -- linemap_position_for_column (line_table, len); -- -- b->file = current_file; -- b->truncated = trunc; -- wide_strcpy (b->line, line); -- -- if (line_head == NULL) -- line_head = b; -- else -- line_tail->next = b; -- -- line_tail = b; -- -- while (file_changes_cur < file_changes_count) -- file_changes[file_changes_cur++].lb = b; -+ add_line (line, len, trunc); - } - - /* Release the line buffer allocated in load_line. */ -diff --git a/gcc/testsuite/gfortran.dg/include_10.f90 b/gcc/testsuite/gfortran.dg/include_10.f90 -new file mode 100644 -index 0000000..5a9bb5b ---- /dev/null -+++ b/gcc/testsuite/gfortran.dg/include_10.f90 -@@ -0,0 +1,11 @@ -+! { dg-do compile } -+! -+! Ensure that we handle the pathname on a separate line than -+! the include directivbe -+! -+ -+subroutine one() -+ include -+ "include_4.inc" -+ integer(i4) :: i -+end subroutine one -diff --git a/gcc/testsuite/gfortran.dg/include_11.f90 b/gcc/testsuite/gfortran.dg/include_11.f90 -new file mode 100644 -index 0000000..44b23e03 ---- /dev/null -+++ b/gcc/testsuite/gfortran.dg/include_11.f90 -@@ -0,0 +1,10 @@ -+! { dg-do compile } -+! -+! Ensure that we can make an assignment to a variable named -+! include. -+! -+ -+subroutine one() -+ integer :: include -+ include = 5 -+end subroutine one -diff --git a/gcc/testsuite/gfortran.dg/include_12.f90 b/gcc/testsuite/gfortran.dg/include_12.f90 -new file mode 100644 -index 0000000..8679b20 ---- /dev/null -+++ b/gcc/testsuite/gfortran.dg/include_12.f90 -@@ -0,0 +1,11 @@ -+! { dg-do compile } -+! -+! Ensure we can make an assignment to a variable named include using -+! a line continuation -+! -+ -+subroutine one() -+ integer :: include -+ include & -+ = 5 -+end subroutine one diff --git a/SOURCES/gcc8-fortran-pr87919-2.patch b/SOURCES/gcc8-fortran-pr87919-2.patch new file mode 100644 index 0000000..00364ce --- /dev/null +++ b/SOURCES/gcc8-fortran-pr87919-2.patch @@ -0,0 +1,87 @@ +2018-12-03 Fritz Reese + Mark Eggleston + + PR fortran/87919 + * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros. + (set_dec_flags): Set/unset DEC and std flags according to value. + (post_dec_flags, set_init_local_zero): New functions. + (gfc_init_options): Use set_init_local_zero and post_dec_flags. + (gfc_handle_options) : Use + SET_BITFLAG. + : Use set_init_local_zero. + : Pass value to set_dec_flags. + : Remove. + +diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c +index b35bed32974..48e35e3524d 100644 +--- a/gcc/fortran/options.c ++++ b/gcc/fortran/options.c +@@ -147,11 +147,7 @@ gfc_init_options (unsigned int decoded_options_count, + + gfc_option.flag_preprocessed = 0; + gfc_option.flag_d_lines = -1; +- gfc_option.flag_init_integer = GFC_INIT_INTEGER_OFF; +- gfc_option.flag_init_integer_value = 0; +- gfc_option.flag_init_logical = GFC_INIT_LOGICAL_OFF; +- gfc_option.flag_init_character = GFC_INIT_CHARACTER_OFF; +- gfc_option.flag_init_character_value = (char)0; ++ set_init_local_zero (0); + + gfc_option.fpe = 0; + /* All except GFC_FPE_INEXACT. */ +@@ -261,6 +257,9 @@ gfc_post_options (const char **pfilename) + char *source_path; + int i; + ++ /* Finalize DEC flags. */ ++ post_dec_flags (flag_dec); ++ + /* Excess precision other than "fast" requires front-end + support. */ + if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD) +@@ -644,7 +643,7 @@ gfc_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, + break; + + case OPT_fcheck_array_temporaries: +- gfc_option.rtcheck |= GFC_RTCHECK_ARRAY_TEMPS; ++ SET_BITFLAG (gfc_option.rtcheck, value, GFC_RTCHECK_ARRAY_TEMPS); + break; + + case OPT_fd_lines_as_code: +@@ -694,12 +693,7 @@ gfc_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, + break; + + case OPT_finit_local_zero: +- gfc_option.flag_init_integer = GFC_INIT_INTEGER_ON; +- gfc_option.flag_init_integer_value = 0; +- flag_init_real = GFC_INIT_REAL_ZERO; +- gfc_option.flag_init_logical = GFC_INIT_LOGICAL_FALSE; +- gfc_option.flag_init_character = GFC_INIT_CHARACTER_ON; +- gfc_option.flag_init_character_value = (char)0; ++ set_init_local_zero (value); + break; + + case OPT_finit_logical_: +@@ -798,12 +792,8 @@ gfc_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, + break; + + case OPT_fdec: +- /* Enable all DEC extensions. */ +- set_dec_flags (1); +- break; +- +- case OPT_fdec_structure: +- flag_dec_structure = 1; ++ /* Set (or unset) the DEC extension flags. */ ++ set_dec_flags (value); + break; + } + +@@ -895,3 +885,7 @@ gfc_get_option_string (void) + result[--pos] = '\0'; + return result; + } ++ ++#undef SET_BITFLAG ++#undef SET_BITFLAG2 ++#undef SET_FLAG diff --git a/SOURCES/gcc8-fortran-pr87919.patch b/SOURCES/gcc8-fortran-pr87919.patch new file mode 100644 index 0000000..bda21dc --- /dev/null +++ b/SOURCES/gcc8-fortran-pr87919.patch @@ -0,0 +1,419 @@ +2018-12-03 Fritz Reese + Mark Eggleston + + PR fortran/87919 + * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros. + (set_dec_flags): Set/unset DEC and std flags according to value. + (set_init_local_zero): New helper for -finit-local-zero flag group. + (gfc_init_options): Fix disabling of init flags, array temporaries + check, and dec flags when value is zero (from -fno-*). + +diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c +index e59ba31ba7b..b35bed32974 100644 +--- a/gcc/fortran/options.c ++++ b/gcc/fortran/options.c +@@ -32,6 +32,20 @@ along with GCC; see the file COPYING3. If not see + + gfc_option_t gfc_option; + ++#define SET_FLAG(flag, condition, on_value, off_value) \ ++ do \ ++ { \ ++ if (condition) \ ++ flag = (on_value); \ ++ else \ ++ flag = (off_value); \ ++ } while (0) ++ ++#define SET_BITFLAG2(m) m ++ ++#define SET_BITFLAG(flag, condition, value) \ ++ SET_BITFLAG2 (SET_FLAG (flag, condition, (flag | (value)), (flag & ~(value)))) ++ + + /* Set flags that control warnings and errors for different + Fortran standards to their default values. Keep in sync with +@@ -47,30 +61,55 @@ set_default_std_flags (void) + gfc_option.warn_std = GFC_STD_F95_DEL | GFC_STD_LEGACY; + } + +- +-/* Set all the DEC extension flags. */ ++/* Set (or unset) the DEC extension flags. */ + + static void + set_dec_flags (int value) + { ++ /* Set (or unset) other DEC compatibility extensions. */ ++ SET_BITFLAG (flag_dollar_ok, value, value); ++ SET_BITFLAG (flag_cray_pointer, value, value); ++ SET_BITFLAG (flag_dec_structure, value, value); ++ SET_BITFLAG (flag_dec_intrinsic_ints, value, value); ++ SET_BITFLAG (flag_dec_static, value, value); ++ SET_BITFLAG (flag_dec_math, value, value); ++ SET_BITFLAG (flag_dec_include, value, value); ++} ++ ++/* Finalize DEC flags. */ ++ ++static void ++post_dec_flags (int value) ++{ ++ /* Don't warn for legacy code if -fdec is given; however, setting -fno-dec ++ does not force these warnings. We make one final determination on this ++ at the end because -std= is always set first; thus, we can avoid ++ clobbering the user's desired standard settings in gfc_handle_option ++ e.g. when -fdec and -fno-dec are both given. */ + if (value) + { +- /* Allow legacy code without warnings. */ + gfc_option.allow_std |= GFC_STD_F95_OBS | GFC_STD_F95_DEL +- | GFC_STD_GNU | GFC_STD_LEGACY; ++ | GFC_STD_GNU | GFC_STD_LEGACY; + gfc_option.warn_std &= ~(GFC_STD_LEGACY | GFC_STD_F95_DEL); + } +- +- /* Set other DEC compatibility extensions. */ +- flag_dollar_ok |= value; +- flag_cray_pointer |= value; +- flag_dec_structure |= value; +- flag_dec_intrinsic_ints |= value; +- flag_dec_static |= value; +- flag_dec_math |= value; +- flag_dec_include |= value; + } + ++/* Enable (or disable) -finit-local-zero. */ ++ ++static void ++set_init_local_zero (int value) ++{ ++ gfc_option.flag_init_integer_value = 0; ++ gfc_option.flag_init_character_value = (char)0; ++ ++ SET_FLAG (gfc_option.flag_init_integer, value, GFC_INIT_INTEGER_ON, ++ GFC_INIT_INTEGER_OFF); ++ SET_FLAG (gfc_option.flag_init_logical, value, GFC_INIT_LOGICAL_FALSE, ++ GFC_INIT_LOGICAL_OFF); ++ SET_FLAG (gfc_option.flag_init_character, value, GFC_INIT_CHARACTER_ON, ++ GFC_INIT_CHARACTER_OFF); ++ SET_FLAG (flag_init_real, value, GFC_INIT_REAL_ZERO, GFC_INIT_REAL_OFF); ++} + + /* Return language mask for Fortran options. */ + +diff --git a/gcc/testsuite/gfortran.dg/array_temporaries_5.f90 b/gcc/testsuite/gfortran.dg/array_temporaries_5.f90 +new file mode 100644 +index 00000000000..dd147ba38ed +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/array_temporaries_5.f90 +@@ -0,0 +1,10 @@ ++! { dg-do run } ++! { dg-options "-fcheck-array-temporaries -fno-check-array-temporaries" } ++! ++! PR fortran/87919 ++! ++! Ensure -fno-check-array-temporaries disables array temporary checking. ++! ++ ++! Note that 'include' drops the dg-output check from the original test case. ++include 'array_temporaries_2.f90' +diff --git a/gcc/testsuite/gfortran.dg/dec_bitwise_ops_3.f90 b/gcc/testsuite/gfortran.dg/dec_bitwise_ops_3.f90 +new file mode 100644 +index 00000000000..c28cf81fc04 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/dec_bitwise_ops_3.f90 +@@ -0,0 +1,29 @@ ++! { dg-do compile } ++! { dg-options "-std=legacy -fdec -fno-dec" } ++! ++! PR fortran/87919 ++! ++! Make sure -fno-dec disables bitwise ops and check for the right errors. ++! -std=legacy is added to avoid the .XOR. extension warning. ++! ++ ++include 'dec_bitwise_ops_1.f90' ++ ++! { dg-error "Operands of logical operator" " " { target *-*-* } 33 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 34 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 35 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 46 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 47 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 48 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 59 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 60 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 61 } ++! { dg-error "Operand of .not. operator" " " { target *-*-* } 72 } ++! { dg-error "Operand of .not. operator" " " { target *-*-* } 73 } ++! { dg-error "Operand of .not. operator" " " { target *-*-* } 74 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 85 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 86 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 87 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 98 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 99 } ++! { dg-error "Operands of logical operator" " " { target *-*-* } 100 } +diff --git a/gcc/testsuite/gfortran.dg/dec_d_lines_3.f b/gcc/testsuite/gfortran.dg/dec_d_lines_3.f +new file mode 100644 +index 00000000000..2df4341c0e4 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/dec_d_lines_3.f +@@ -0,0 +1,14 @@ ++! { dg-do compile } ++! { dg-options "-ffixed-form -fdec -fno-dec" } ++! ++! PR fortran/87919 ++! ++! Ensure -fno-dec disables -fdec, leaving d-lines as code by default. ++! ++ ++include 'dec_d_lines_2.f' ++ ++! { dg-error "character in statement label" " " { target *-*-*} 6 } ++! { dg-error "Unclassifiable statement" " " { target *-*-*} 6 } ++! { dg-error "character in statement label" " " { target *-*-*} 7 } ++! { dg-error "Unclassifiable statement" " " { target *-*-*} 7 } +diff --git a/gcc/testsuite/gfortran.dg/dec_exp_4.f90 b/gcc/testsuite/gfortran.dg/dec_exp_4.f90 +new file mode 100644 +index 00000000000..9d8b10db6a7 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/dec_exp_4.f90 +@@ -0,0 +1,12 @@ ++! { dg-do compile } ++! { dg-options "-fdec -fno-dec" } ++! ++! PR fortran/87919 ++! ++! Make sure -fno-dec disables -fdec as with dec_exp_2. ++! ++ ++include 'dec_exp_2.f90' ++ ++! { dg-error "Missing exponent" "" { target *-*-* } 9 } ++! { dg-error "Missing exponent" "" { target *-*-* } 11 } +diff --git a/gcc/testsuite/gfortran.dg/dec_exp_5.f90 b/gcc/testsuite/gfortran.dg/dec_exp_5.f90 +new file mode 100644 +index 00000000000..faf3a9b306b +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/dec_exp_5.f90 +@@ -0,0 +1,11 @@ ++! { dg-do run "xfail *-*-*" } ++! { dg-options "-fdec -fno-dec" } ++! ++! PR fortran/87919 ++! ++! Make sure -fno-dec disables -fdec as with dec_exp_3. ++! ++ ++include 'dec_exp_3.f90' ++ ++! { XFAIL "Bad real number" "" { target *-*-* } 13 } +diff --git a/gcc/testsuite/gfortran.dg/dec_io_7.f90 b/gcc/testsuite/gfortran.dg/dec_io_7.f90 +new file mode 100644 +index 00000000000..4a931c15fe7 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/dec_io_7.f90 +@@ -0,0 +1,20 @@ ++! { dg-do compile } ++! { dg-options "-fdec -fno-dec" } ++! ++! PR fortran/87919 ++! ++! Make sure -fno-dec rejects -fdec I/O specifiers as with dec_io_1. ++! ++ ++include 'dec_io_1.f90' ++ ++! { dg-error "is a DEC extension" "" { target *-*-* } 12 } ++! { dg-error "is a DEC extension" "" { target *-*-* } 24 } ++! { dg-error "is a DEC extension" "" { target *-*-* } 58 } ++! { dg-error "is a DEC extension" "" { target *-*-* } 64 } ++! { dg-error "is a DEC extension" "" { target *-*-* } 68 } ++! { dg-error "is a DEC extension" "" { target *-*-* } 74 } ++! { dg-error "is a DEC extension" "" { target *-*-* } 78 } ++! { dg-error "is a DEC extension" "" { target *-*-* } 84 } ++! { dg-error "is a DEC extension" "" { target *-*-* } 90 } ++! { dg-error "is a DEC extension" "" { target *-*-* } 96 } +diff --git a/gcc/testsuite/gfortran.dg/dec_structure_24.f90 b/gcc/testsuite/gfortran.dg/dec_structure_24.f90 +new file mode 100644 +index 00000000000..02842b315dc +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/dec_structure_24.f90 +@@ -0,0 +1,32 @@ ++! { dg-do compile } ++! ++! PR fortran/87919 ++! ++! Should fail to compile without the -fdec or -fdec-structure options. ++! ++! Contributed by Mark Eggleston ++ ++include 'dec_structure_1.f90' ++ ++! { dg-error "-fdec-structure" " " { target *-*-* } 14 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 19 } ++! { dg-error "-fdec-structure" " " { target *-*-* } 21 } ++! { dg-error "-fdec-structure" " " { target *-*-* } 22 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 25 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 26 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 27 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 28 } ++! { dg-error "is not a variable" " " { target *-*-* } 30 } ++! { dg-error "Bad character" " " { target *-*-* } 32 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 34 } ++! { dg-error "Bad character" " " { target *-*-* } 36 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 38 } ++! { dg-error "Bad character" " " { target *-*-* } 40 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 42 } ++! { dg-error "Bad character" " " { target *-*-* } 44 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 46 } ++! { dg-error "Bad character" " " { target *-*-* } 48 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 50 } ++! { dg-error "Bad character" " " { target *-*-* } 52 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 54 } ++! { dg-error "function result" " " { target *-*-* } 29 } +diff --git a/gcc/testsuite/gfortran.dg/dec_structure_25.f90 b/gcc/testsuite/gfortran.dg/dec_structure_25.f90 +new file mode 100644 +index 00000000000..a64d85a88a4 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/dec_structure_25.f90 +@@ -0,0 +1,11 @@ ++! { dg-do run } ++! { dg-options "-fdec" } ++! ++! PR fortran/87919 ++! ++! Should compile and run with the -fdec option. ++! ++! Contributed by Mark Eggleston ++! ++ ++include 'dec_structure_1.f90' +diff --git a/gcc/testsuite/gfortran.dg/dec_structure_26.f90 b/gcc/testsuite/gfortran.dg/dec_structure_26.f90 +new file mode 100644 +index 00000000000..7829103b995 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/dec_structure_26.f90 +@@ -0,0 +1,34 @@ ++! { dg-do compile } ++! { dg-options "-fdec -fno-dec-structure" } ++! ++! PR fortran/87919 ++! ++! Should fail to compile with -fdec and -fno-dec-structure. ++! ++! Contributed by Mark Eggleston ++! ++ ++include 'dec_structure_1.f90' ++ ++! { dg-error "-fdec-structure" " " { target *-*-* } 14 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 19 } ++! { dg-error "-fdec-structure" " " { target *-*-* } 21 } ++! { dg-error "-fdec-structure" " " { target *-*-* } 22 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 25 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 26 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 27 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 28 } ++! { dg-error "is not a variable" " " { target *-*-* } 30 } ++! { dg-error "Bad character" " " { target *-*-* } 32 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 34 } ++! { dg-error "Bad character" " " { target *-*-* } 36 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 38 } ++! { dg-error "Bad character" " " { target *-*-* } 40 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 42 } ++! { dg-error "Bad character" " " { target *-*-* } 44 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 46 } ++! { dg-error "Bad character" " " { target *-*-* } 48 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 50 } ++! { dg-error "Bad character" " " { target *-*-* } 52 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 54 } ++! { dg-error "function result" " " { target *-*-* } 29 } +diff --git a/gcc/testsuite/gfortran.dg/dec_structure_27.f90 b/gcc/testsuite/gfortran.dg/dec_structure_27.f90 +new file mode 100644 +index 00000000000..1257365deb8 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/dec_structure_27.f90 +@@ -0,0 +1,34 @@ ++! { dg-do compile } ++! { dg-options "-fdec-structure -fno-dec-structure" } ++! ++! PR fortran/87919 ++! ++! Should fail to compile with -fdec-structure and -fno-dec-structure. ++! ++! Contributed by Mark Eggleston ++! ++ ++include 'dec_structure_1.f90' ++ ++! { dg-error "-fdec-structure" " " { target *-*-* } 14 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 19 } ++! { dg-error "-fdec-structure" " " { target *-*-* } 21 } ++! { dg-error "-fdec-structure" " " { target *-*-* } 22 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 25 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 26 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 27 } ++! { dg-error "Unclassifiable statement" " " { target *-*-* } 28 } ++! { dg-error "is not a variable" " " { target *-*-* } 30 } ++! { dg-error "Bad character" " " { target *-*-* } 32 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 34 } ++! { dg-error "Bad character" " " { target *-*-* } 36 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 38 } ++! { dg-error "Bad character" " " { target *-*-* } 40 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 42 } ++! { dg-error "Bad character" " " { target *-*-* } 44 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 46 } ++! { dg-error "Bad character" " " { target *-*-* } 48 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 50 } ++! { dg-error "Bad character" " " { target *-*-* } 52 } ++! { dg-error "Expecting END PROGRAM" " " { target *-*-* } 54 } ++! { dg-error "function result" " " { target *-*-* } 29 } +diff --git a/gcc/testsuite/gfortran.dg/dec_type_print_3.f90 b/gcc/testsuite/gfortran.dg/dec_type_print_3.f90 +new file mode 100644 +index 00000000000..f766bdf0022 +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/dec_type_print_3.f90 +@@ -0,0 +1,21 @@ ++! { dg-do compile } ++! { dg-options "-fdec -fno-dec" } ++! ++! PR fortran/87919 ++! ++! Ensure that -fno-dec disables the usage of TYPE as an alias for PRINT. ++! ++ ++include 'dec_type_print.f90' ++ ++! { dg-error "Invalid character in name" "" { target *-*-* } 52 } ++! { dg-error "Invalid character in name" "" { target *-*-* } 53 } ++! { dg-error "Invalid character in name" "" { target *-*-* } 54 } ++! { dg-error "Invalid character in name" "" { target *-*-* } 55 } ++! { dg-error "Invalid character in name" "" { target *-*-* } 56 } ++! { dg-error "Invalid character in name" "" { target *-*-* } 57 } ++! { dg-error "Invalid character in name" "" { target *-*-* } 58 } ++! { dg-error "Unclassifiable statement" "" { target *-*-* } 59 } ++! { dg-error "conflicts with PROCEDURE" "" { target *-*-* } 60 } ++! { dg-error "Cannot assign to a named constant" "" { target *-*-* } 80 } ++ +diff --git a/gcc/testsuite/gfortran.dg/init_flag_20.f90 b/gcc/testsuite/gfortran.dg/init_flag_20.f90 +new file mode 100644 +index 00000000000..6f15c1ace0d +--- /dev/null ++++ b/gcc/testsuite/gfortran.dg/init_flag_20.f90 +@@ -0,0 +1,15 @@ ++! { dg-do compile } ++! { dg-options "-fbackslash -finit-local-zero -fno-init-local-zero -fdump-tree-original" } ++! ++! PR fortran/87919 ++! ++! Make sure -fno-init-local-zero disables -finit-local-zero. ++! ++ ++include 'init_flag_1.f90' ++ ++! Make sure no initialization code is generated. ++! { dg-final { scan-tree-dump-times "r\[1-4] *= *\[0\{]" 0 "original" } } ++! { dg-final { scan-tree-dump-times "l\[12] *= *\[0\{]" 0 "original" } } ++! { dg-final { scan-tree-dump-times "i\[1-4] *= *\[0\{]" 0 "original" } } ++! { dg-final { scan-tree-dump-times "memmove *\[(]\[^,]*c\[1-4]" 0 "original" } } diff --git a/SOURCES/gcc8-libstdc++-docs.patch b/SOURCES/gcc8-libstdc++-docs.patch index e73a92b..5f6a2ae 100644 --- a/SOURCES/gcc8-libstdc++-docs.patch +++ b/SOURCES/gcc8-libstdc++-docs.patch @@ -4,7 +4,7 @@ FSF

-+ Release 8.2.1 ++ Release 8.3.1 +

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation @@ -17,7 +17,7 @@

- The API documentation, rendered into HTML, can be viewed online + The API documentation, rendered into HTML, can be viewed locally -+ for the 8.2.1 release, ++ for the 8.3.1 release, + online for each GCC release and diff --git a/SOURCES/gcc8-pr85400.patch b/SOURCES/gcc8-pr85400.patch new file mode 100644 index 0000000..0c0d887 --- /dev/null +++ b/SOURCES/gcc8-pr85400.patch @@ -0,0 +1,94 @@ +2018-05-10 Eric Botcazou + + PR c++/85400 + * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs. + + * decl2.c (adjust_var_decl_tls_model): New static function. + (comdat_linkage): Call it on a variable. + (maybe_make_one_only): Likewise. + +--- gcc/c-family/c-attribs.c ++++ gcc/c-family/c-attribs.c +@@ -2299,14 +2299,13 @@ handle_visibility_attribute (tree *node, tree name, tree args, + + static tree + handle_tls_model_attribute (tree *node, tree name, tree args, +- int ARG_UNUSED (flags), bool *no_add_attrs) ++ int ARG_UNUSED (flags), ++ bool *ARG_UNUSED (no_add_attrs)) + { + tree id; + tree decl = *node; + enum tls_model kind; + +- *no_add_attrs = true; +- + if (!VAR_P (decl) || !DECL_THREAD_LOCAL_P (decl)) + { + warning (OPT_Wattributes, "%qE attribute ignored", name); +--- gcc/cp/decl2.c ++++ gcc/cp/decl2.c +@@ -1838,6 +1838,17 @@ mark_vtable_entries (tree decl) + } + } + ++/* Adjust the TLS model on variable DECL if need be, typically after ++ the linkage of DECL has been modified. */ ++ ++static void ++adjust_var_decl_tls_model (tree decl) ++{ ++ if (CP_DECL_THREAD_LOCAL_P (decl) ++ && !lookup_attribute ("tls_model", DECL_ATTRIBUTES (decl))) ++ set_decl_tls_model (decl, decl_default_tls_model (decl)); ++} ++ + /* Set DECL up to have the closest approximation of "initialized common" + linkage available. */ + +@@ -1888,6 +1899,9 @@ comdat_linkage (tree decl) + + if (TREE_PUBLIC (decl)) + DECL_COMDAT (decl) = 1; ++ ++ if (VAR_P (decl)) ++ adjust_var_decl_tls_model (decl); + } + + /* For win32 we also want to put explicit instantiations in +@@ -1926,6 +1940,8 @@ maybe_make_one_only (tree decl) + /* Mark it needed so we don't forget to emit it. */ + node->forced_by_abi = true; + TREE_USED (decl) = 1; ++ ++ adjust_var_decl_tls_model (decl); + } + } + } +--- /dev/null ++++ gcc/testsuite/g++.dg/tls/pr85400.C +@@ -0,0 +1,24 @@ ++// PR c++/85400 ++// Testcase by Brian Vandenberg ++ ++// { dg-do link { target c++11 } } ++// { dg-require-effective-target fpic } ++// { dg-require-effective-target shared } ++// { dg-require-effective-target tls } ++// { dg-options "-shared -fPIC -O" } ++// { dg-add-options tls } ++ ++struct Test ++{ ++ int blah (int y) ++ { ++ thread_local int mything = 3; ++ mything = y > 0 ? y : mything; ++ return mything; ++ } ++}; ++ ++int stuff (Test& test, int y) ++{ ++ return test.blah(y); ++} diff --git a/SOURCES/gcc8-pr89629.patch b/SOURCES/gcc8-pr89629.patch new file mode 100644 index 0000000..dd00aa7 --- /dev/null +++ b/SOURCES/gcc8-pr89629.patch @@ -0,0 +1,64 @@ +2019-03-11 Jonathan Wakely + + PR libstdc++/89629 + * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes): + Use correct type for len_aligned. + * testsuite/20_util/hash/89629.cc: New test. + +--- libstdc++-v3/libsupc++/hash_bytes.cc (revision 269583) ++++ libstdc++-v3/libsupc++/hash_bytes.cc (revision 269584) +@@ -139,7 +139,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + + // Remove the bytes not divisible by the sizeof(size_t). This + // allows the main loop to process the data as 64-bit integers. +- const int len_aligned = len & ~0x7; ++ const size_t len_aligned = len & ~(size_t)0x7; + const char* const end = buf + len_aligned; + size_t hash = seed ^ (len * mul); + for (const char* p = buf; p != end; p += 8) +--- libstdc++-v3/testsuite/20_util/hash/89629.cc (nonexistent) ++++ libstdc++-v3/testsuite/20_util/hash/89629.cc (revision 269584) +@@ -0,0 +1,43 @@ ++// Copyright (C) 2019 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 3, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING3. If not see ++// . ++ ++// { dg-do run { target { lp64 || llp64 } } } ++// { dg-require-effective-target c++11 } ++// { dg-require-effective-target run_expensive_tests } ++ ++#include ++#include ++ ++void ++test01() ++{ ++ const std::size_t big = std::size_t(1) << 31; ++ std::string s; ++ try { ++ s.resize(big, 'a'); ++ } catch (const std::bad_alloc&) { ++ return; // try to avoid a FAIL if memory allocation fails ++ } ++ // PR libstdc++/89629 ++ (void) std::hash{}(s); ++} ++ ++int ++main() ++{ ++ test01(); ++} diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec index aae5c44..9b17c41 100644 --- a/SPECS/gcc.spec +++ b/SPECS/gcc.spec @@ -1,9 +1,9 @@ %{?scl:%global __strip %%{_scl_root}/usr/bin/strip} %{?scl:%global __objdump %%{_scl_root}/usr/bin/objdump} %{?scl:%scl_package gcc} -%global DATE 20180905 -%global SVNREV 264110 -%global gcc_version 8.2.1 +%global DATE 20190311 +%global SVNREV 269592 +%global gcc_version 8.3.1 %global gcc_major 8 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. @@ -250,6 +250,8 @@ Patch9: gcc8-foffload-default.patch Patch10: gcc8-Wno-format-security.patch Patch11: gcc8-rh1512529-aarch64.patch Patch12: gcc8-mcet.patch +Patch13: gcc8-pr85400.patch +Patch14: gcc8-pr89629.patch Patch1000: gcc8-libstdc++-compat.patch Patch1001: gcc8-alt-compat-test.patch @@ -280,8 +282,12 @@ Patch3018: 0018-Fill-in-missing-array-dimensions-using-the-lower-bou.patch Patch3019: 0019-Add-tests-for-AUTOMATIC-keyword.patch Patch3022: 0022-Default-values-for-certain-field-descriptors-in-form.patch Patch3023: gcc8-fortranlines.patch -Patch3024: gcc8-fortran-include.patch Patch3025: gcc8-fortran-equivalence.patch +Patch3026: gcc8-fortran-fdec-include.patch +Patch3027: gcc8-fortran-fdec-include-doc.patch +Patch3028: gcc8-fortran-fpad-source.patch +Patch3029: gcc8-fortran-pr87919.patch +Patch3030: gcc8-fortran-pr87919-2.patch %if 0%{?rhel} >= 7 %global nonsharedver 48 @@ -621,6 +627,8 @@ This package contains Leak Sanitizer static runtime library. %patch10 -p0 -b .Wno-format-security~ %patch11 -p0 -b .rh1512529-aarch64~ %patch12 -p0 -b .mcet~ +%patch13 -p0 -b .pr85400~ +%patch14 -p0 -b .pr89629~ %patch1000 -p0 -b .libstdc++-compat~ %ifarch %{ix86} x86_64 @@ -668,8 +676,12 @@ cd .. %patch3019 -p1 -b .fortran19~ %patch3022 -p1 -b .fortran22~ %patch3023 -p1 -b .fortran23~ -%patch3024 -p1 -b .fortran24~ %patch3025 -p1 -b .fortran25~ +%patch3026 -p1 -b .fortran26~ +%patch3027 -p1 -b .fortran27~ +%patch3028 -p1 -b .fortran28~ +%patch3029 -p1 -b .fortran29~ +%patch3030 -p1 -b .fortran30~ %endif echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE @@ -1330,6 +1342,7 @@ mv -f %{buildroot}%{_prefix}/%{_lib}/libubsan.*a $FULLLPATH/ %endif %if %{build_liblsan} mv -f %{buildroot}%{_prefix}/%{_lib}/liblsan.*a $FULLPATH/ +mv -f %{buildroot}%{_prefix}/%{_lib}/liblsan_preinit.o $FULLPATH/ %endif %ifarch sparcv9 ppc @@ -2020,6 +2033,14 @@ fi %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/vec_types.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/htmintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/htmxlintrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/bmi2intrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/bmiintrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xmmintrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mm_malloc.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/emmintrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mmintrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/x86intrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amo.h %endif %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/unwind-arm-common.h @@ -2430,6 +2451,7 @@ fi %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/liblsan.so +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/liblsan_preinit.o %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/liblsan.a %doc rpm.doc/changelogs/libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT %endif @@ -2474,6 +2496,27 @@ fi %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Mon Mar 11 2019 Marek Polacek 8.3.1-3 +- update from Fedora 8.3.1-3 +- two small autoFDO fixes (#1684650) +- fix std::hash for 2GB+ strings (PR libstdc++/89629) + +* Thu Feb 28 2019 Marek Polacek 8.3.1-2.1 +- TLS model fix (#1679868, PR c++/85400) + +* Mon Feb 25 2019 Marek Polacek 8.3.1-2 +- update from Fedora 8.3.1-2 gcc (#1664796) +- put liblsan_preinit.o to FULLPATH instead of FULLLPATH + +* Tue Feb 5 2019 Marek Polacek 8.2.1-7.1 +- add liblsan_preinit.o (#1667885) + +* Wed Jan 9 2019 Marek Polacek 8.2.1-7 +- update from Fedora gcc-8.2.1-7 (#1664796) +- drop gcc8-fortran-include.patch +- add -fdec-include and -fpad-source (#1647048) +- include forgotten ppc* intrinsic headers + * Tue Sep 11 2018 Jeff Law 8.2.1-3 - Sync legacy fortran support (#1625506)