diff -Nrcpad gcc-4.9.2/ChangeLog gcc-4.9.3/ChangeLog *** gcc-4.9.2/ChangeLog Thu Oct 30 08:25:09 2014 --- gcc-4.9.3/ChangeLog Fri Jun 26 17:57:24 2015 *************** *** 1,3 **** --- 1,19 ---- + 2015-06-26 Release Manager + + * GCC 4.9.3 released. + + 2015-05-03 Matthias Klose + + * configure.ac: Match $host configured with triplets. + * configure: Regenerate. + + 2014-12-04 Tobias Burnus + + * configure.ac: Permit also ISL 0.14 with CLooG. + * Makefile.def: Make more dependent on mpfr, mpc, isl, and cloog. + * Makefile.in: Regenerate. + * configure: Regenerate. + 2014-10-30 Release Manager * GCC 4.9.2 released. diff -Nrcpad gcc-4.9.2/INSTALL/binaries.html gcc-4.9.3/INSTALL/binaries.html *** gcc-4.9.2/INSTALL/binaries.html Thu Oct 30 08:29:03 2014 --- gcc-4.9.3/INSTALL/binaries.html Fri Jun 26 17:59:20 2015 *************** *** 1,6 **** !

*-ibm-aix*

--- 623,646 ----

To enable a workaround for the Cortex-A53 erratum number 835769 by default (for all CPUs regardless of -mcpu option given) at configure time use the --enable-fix-cortex-a53-835769 option. This will enable the fix by ! default and can be explicitly disabled during compilation by passing the -mno-fix-cortex-a53-835769 option. Conversely, --disable-fix-cortex-a53-835769 will disable the workaround by default. The workaround is disabled by default if neither of --enable-fix-cortex-a53-835769 or --disable-fix-cortex-a53-835769 is given at configure time.

+

To enable a workaround for the Cortex-A53 erratum number 843419 by default + (for all CPUs regardless of -mcpu option given) at configure time use the + --enable-fix-cortex-a53-843419 option. This workaround is applied at + link time. Enabling the workaround will cause GCC to pass the relevant option + to the linker. It can be explicitly disabled during compilation by passing the + -mno-fix-cortex-a53-843419 option. Conversely, + --disable-fix-cortex-a53-843419 will disable the workaround by default. + The workaround is disabled by default if neither of + --enable-fix-cortex-a53-843419 or + --disable-fix-cortex-a53-843419 is given at configure time. +


*-ibm-aix*

diff -Nrcpad gcc-4.9.2/INSTALL/test.html gcc-4.9.3/INSTALL/test.html *** gcc-4.9.2/INSTALL/test.html Thu Oct 30 08:29:02 2014 --- gcc-4.9.3/INSTALL/test.html Fri Jun 26 17:59:19 2015 *************** *** 1,6 **** ! --- 3769,3792 ---- To enable a workaround for the Cortex-A53 erratum number 835769 by default (for all CPUs regardless of -mcpu option given) at configure time use the @option{--enable-fix-cortex-a53-835769} option. This will enable the fix by ! default and can be explicitly disabled during compilation by passing the @option{-mno-fix-cortex-a53-835769} option. Conversely, @option{--disable-fix-cortex-a53-835769} will disable the workaround by default. The workaround is disabled by default if neither of @option{--enable-fix-cortex-a53-835769} or @option{--disable-fix-cortex-a53-835769} is given at configure time. + To enable a workaround for the Cortex-A53 erratum number 843419 by default + (for all CPUs regardless of -mcpu option given) at configure time use the + @option{--enable-fix-cortex-a53-843419} option. This workaround is applied at + link time. Enabling the workaround will cause GCC to pass the relevant option + to the linker. It can be explicitly disabled during compilation by passing the + @option{-mno-fix-cortex-a53-843419} option. Conversely, + @option{--disable-fix-cortex-a53-843419} will disable the workaround by default. + The workaround is disabled by default if neither of + @option{--enable-fix-cortex-a53-843419} or + @option{--disable-fix-cortex-a53-843419} is given at configure time. + @html
diff -Nrcpad gcc-4.9.2/gcc/doc/invoke.texi gcc-4.9.3/gcc/doc/invoke.texi *** gcc-4.9.2/gcc/doc/invoke.texi Thu Oct 16 13:51:45 2014 --- gcc-4.9.3/gcc/doc/invoke.texi Fri Jun 26 17:47:23 2015 *************** *** 1,4 **** ! @c Copyright (C) 1988-2014 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. --- 1,4 ---- ! @c Copyright (C) 1988-2015 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. *************** *** 8,14 **** @c man end @c man begin COPYRIGHT ! Copyright @copyright{} 1988-2014 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or --- 8,14 ---- @c man end @c man begin COPYRIGHT ! Copyright @copyright{} 1988-2015 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or *************** Objective-C and Objective-C++ Dialects}. *** 480,485 **** --- 480,486 ---- -momit-leaf-frame-pointer -mno-omit-leaf-frame-pointer @gol -mtls-dialect=desc -mtls-dialect=traditional @gol -mfix-cortex-a53-835769 -mno-fix-cortex-a53-835769 @gol + -mfix-cortex-a53-843419 -mno-fix-cortex-a53-843419 @gol -march=@var{name} -mcpu=@var{name} -mtune=@var{name}} @emph{Adapteva Epiphany Options} *************** See RS/6000 and PowerPC Options. *** 948,954 **** -m64 -m31 -mdebug -mno-debug -mesa -mzarch @gol -mtpf-trace -mno-tpf-trace -mfused-madd -mno-fused-madd @gol -mwarn-framesize -mwarn-dynamicstack -mstack-size -mstack-guard @gol ! -mhotpatch[=@var{halfwords}] -mno-hotpatch} @emph{Score Options} @gccoptlist{-meb -mel @gol --- 949,955 ---- -m64 -m31 -mdebug -mno-debug -mesa -mzarch @gol -mtpf-trace -mno-tpf-trace -mfused-madd -mno-fused-madd @gol -mwarn-framesize -mwarn-dynamicstack -mstack-size -mstack-guard @gol ! -mhotpatch=@var{halfwords},@var{halfwords}} @emph{Score Options} @gccoptlist{-meb -mel @gol *************** registers after writing to their lower 3 *** 7401,7406 **** --- 7402,7417 ---- Enabled for Alpha, AArch64 and x86 at levels @option{-O2}, @option{-O3}, @option{-Os}. + @item -fno-lifetime-dse + @opindex fno-lifetime-dse + In C++ the value of an object is only affected by changes within its + lifetime: when the constructor begins, the object has an indeterminate + value, and any changes during the lifetime of the object are dead when + the object is destroyed. Normally dead store elimination will take + advantage of this; if your code relies on the value of the object + storage persisting beyond the lifetime of the object, you can use this + flag to disable this optimization. + @item -flive-range-shrinkage @opindex flive-range-shrinkage Attempt to decrease register pressure through register live range *************** Enable or disable the workaround for the *** 11427,11432 **** --- 11438,11451 ---- This will involve inserting a NOP instruction between memory instructions and 64-bit integer multiply-accumulate instructions. + @item -mfix-cortex-a53-843419 + @itemx -mno-fix-cortex-a53-843419 + @opindex mfix-cortex-a53-843419 + @opindex mno-fix-cortex-a53-843419 + Enable or disable the workaround for the ARM Cortex-A53 erratum number 843419. + This erratum workaround is made at link time and this will only pass the + corresponding flag to the linker. + @item -march=@var{name} @opindex march Specify the name of the target architecture, optionally suffixed by one or *************** Supported values for @var{cpu_type} are *** 18951,18962 **** @samp{e6500}, @samp{ec603e}, @samp{G3}, @samp{G4}, @samp{G5}, @samp{titan}, @samp{power3}, @samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6}, @samp{power6x}, @samp{power7}, @samp{power8}, @samp{powerpc}, ! @samp{powerpc64}, and @samp{rs64}. ! @option{-mcpu=powerpc}, and @option{-mcpu=powerpc64} specify pure 32-bit ! PowerPC and 64-bit PowerPC architecture machine ! types, with an appropriate, generic processor model assumed for ! scheduling purposes. The other options specify a specific processor. Code generated under those options runs best on that processor, and may not run at all on --- 18970,18982 ---- @samp{e6500}, @samp{ec603e}, @samp{G3}, @samp{G4}, @samp{G5}, @samp{titan}, @samp{power3}, @samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6}, @samp{power6x}, @samp{power7}, @samp{power8}, @samp{powerpc}, ! @samp{powerpc64}, @samp{powerpc64le}, and @samp{rs64}. ! @option{-mcpu=powerpc}, @option{-mcpu=powerpc64}, and ! @option{-mcpu=powerpc64le} specify pure 32-bit PowerPC (either ! endian), 64-bit big endian PowerPC and 64-bit little endian PowerPC ! architecture machine types, with an appropriate, generic processor ! model assumed for scheduling purposes. The other options specify a specific processor. Code generated under those options runs best on that processor, and may not run at all on *************** The default is to not print debug inform *** 20244,20256 **** @item -march=@var{cpu-type} @opindex march ! Generate code that runs on @var{cpu-type}, which is the name of a system ! representing a certain processor type. Possible values for @var{cpu-type} are @samp{g5}, @samp{g6}, @samp{z900}, @samp{z990}, ! @samp{z9-109}, @samp{z9-ec} and @samp{z10}. ! When generating code using the instructions available on z/Architecture, ! the default is @option{-march=z900}. Otherwise, the default is ! @option{-march=g5}. @item -mtune=@var{cpu-type} @opindex mtune --- 20264,20276 ---- @item -march=@var{cpu-type} @opindex march ! Generate code that runs on @var{cpu-type}, which is the name of a ! system representing a certain processor type. Possible values for @var{cpu-type} are @samp{g5}, @samp{g6}, @samp{z900}, @samp{z990}, ! @samp{z9-109}, @samp{z9-ec}, @samp{z10}, @samp{z196}, and ! @samp{zEC12}. When generating code using the instructions available ! on z/Architecture, the default is @option{-march=z900}. Otherwise, ! the default is @option{-march=g5}. @item -mtune=@var{cpu-type} @opindex mtune *************** In order to be efficient the extra code *** 20306,20322 **** at an address aligned to the value given by @var{stack-size}. The @var{stack-guard} option can only be used in conjunction with @var{stack-size}. ! @item -mhotpatch[=@var{halfwords}] ! @itemx -mno-hotpatch @opindex mhotpatch If the hotpatch option is enabled, a ``hot-patching'' function prologue is generated for all functions in the compilation unit. The funtion label is prepended with the given number of two-byte ! Nop instructions (@var{halfwords}, maximum 1000000) or 12 Nop ! instructions if no argument is present. Functions with a ! hot-patching prologue are never inlined automatically, and a ! hot-patching prologue is never generated for functions functions ! that are explicitly inline. This option can be overridden for individual functions with the @code{hotpatch} attribute. --- 20326,20342 ---- at an address aligned to the value given by @var{stack-size}. The @var{stack-guard} option can only be used in conjunction with @var{stack-size}. ! @item -mhotpatch=@var{pre-halfwords},@var{post-halfwords} @opindex mhotpatch If the hotpatch option is enabled, a ``hot-patching'' function prologue is generated for all functions in the compilation unit. The funtion label is prepended with the given number of two-byte ! NOP instructions (@var{pre-halfwords}, maximum 1000000). After ! the label, 2 * @var{post-halfwords} bytes are appended, using the ! largest NOP like instructions the architecture allows (maximum ! 1000000). ! ! If both arguments are zero, hotpatching is disabled. This option can be overridden for individual functions with the @code{hotpatch} attribute. *************** the rules of the ABI@. *** 21099,21106 **** Set the instruction set, register set, and instruction scheduling parameters for machine type @var{cpu_type}. Supported values for @var{cpu_type} are @samp{v7}, @samp{cypress}, @samp{v8}, @samp{supersparc}, @samp{hypersparc}, ! @samp{leon}, @samp{leon3}, @samp{sparclite}, @samp{f930}, @samp{f934}, ! @samp{sparclite86x}, @samp{sparclet}, @samp{tsc701}, @samp{v9}, @samp{ultrasparc}, @samp{ultrasparc3}, @samp{niagara}, @samp{niagara2}, @samp{niagara3} and @samp{niagara4}. --- 21119,21126 ---- Set the instruction set, register set, and instruction scheduling parameters for machine type @var{cpu_type}. Supported values for @var{cpu_type} are @samp{v7}, @samp{cypress}, @samp{v8}, @samp{supersparc}, @samp{hypersparc}, ! @samp{leon}, @samp{leon3}, @samp{leon3v7}, @samp{sparclite}, @samp{f930}, ! @samp{f934}, @samp{sparclite86x}, @samp{sparclet}, @samp{tsc701}, @samp{v9}, @samp{ultrasparc}, @samp{ultrasparc3}, @samp{niagara}, @samp{niagara2}, @samp{niagara3} and @samp{niagara4}. *************** implementations. *** 21118,21124 **** @table @asis @item v7 ! cypress @item v8 supersparc, hypersparc, leon, leon3 --- 21138,21144 ---- @table @asis @item v7 ! cypress, leon3v7 @item v8 supersparc, hypersparc, leon, leon3 *************** option @option{-mcpu=@var{cpu_type}} doe *** 21183,21193 **** The same values for @option{-mcpu=@var{cpu_type}} can be used for @option{-mtune=@var{cpu_type}}, but the only useful values are those that select a particular CPU implementation. Those are @samp{cypress}, ! @samp{supersparc}, @samp{hypersparc}, @samp{leon}, @samp{leon3}, @samp{f930}, ! @samp{f934}, @samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc}, ! @samp{ultrasparc3}, @samp{niagara}, @samp{niagara2}, @samp{niagara3} and ! @samp{niagara4}. With native Solaris and GNU/Linux toolchains, @samp{native} ! can also be used. @item -mv8plus @itemx -mno-v8plus --- 21203,21213 ---- The same values for @option{-mcpu=@var{cpu_type}} can be used for @option{-mtune=@var{cpu_type}}, but the only useful values are those that select a particular CPU implementation. Those are @samp{cypress}, ! @samp{supersparc}, @samp{hypersparc}, @samp{leon}, @samp{leon3}, ! @samp{leon3v7}, @samp{f930}, @samp{f934}, @samp{sparclite86x}, @samp{tsc701}, ! @samp{ultrasparc}, @samp{ultrasparc3}, @samp{niagara}, @samp{niagara2}, ! @samp{niagara3} and @samp{niagara4}. With native Solaris and GNU/Linux ! toolchains, @samp{native} can also be used. @item -mv8plus @itemx -mno-v8plus diff -Nrcpad gcc-4.9.2/gcc/doc/jcf-dump.1 gcc-4.9.3/gcc/doc/jcf-dump.1 *** gcc-4.9.2/gcc/doc/jcf-dump.1 Thu Oct 30 09:06:54 2014 --- gcc-4.9.3/gcc/doc/jcf-dump.1 Fri Jun 26 18:37:25 2015 *************** *** 1,4 **** ! .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== --- 1,4 ---- ! .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== *************** *** 133,139 **** .\" ======================================================================== .\" .IX Title "JCF-DUMP 1" ! .TH JCF-DUMP 1 "2014-10-30" "gcc-4.9.2" "GNU" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l --- 133,139 ---- .\" ======================================================================== .\" .IX Title "JCF-DUMP 1" ! .TH JCF-DUMP 1 "2015-06-26" "gcc-4.9.3" "GNU" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -Nrcpad gcc-4.9.2/gcc/doc/jv-convert.1 gcc-4.9.3/gcc/doc/jv-convert.1 *** gcc-4.9.2/gcc/doc/jv-convert.1 Thu Oct 30 09:06:55 2014 --- gcc-4.9.3/gcc/doc/jv-convert.1 Fri Jun 26 18:37:25 2015 *************** *** 1,4 **** ! .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== --- 1,4 ---- ! .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== *************** *** 133,139 **** .\" ======================================================================== .\" .IX Title "JV-CONVERT 1" ! .TH JV-CONVERT 1 "2014-10-30" "gcc-4.9.2" "GNU" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l --- 133,139 ---- .\" ======================================================================== .\" .IX Title "JV-CONVERT 1" ! .TH JV-CONVERT 1 "2015-06-26" "gcc-4.9.3" "GNU" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -Nrcpad gcc-4.9.2/gcc/doc/md.texi gcc-4.9.3/gcc/doc/md.texi *** gcc-4.9.2/gcc/doc/md.texi Fri Aug 22 17:30:39 2014 --- gcc-4.9.3/gcc/doc/md.texi Wed Jun 10 17:16:58 2015 *************** Altivec vector register *** 2117,2122 **** --- 2117,2143 ---- @item wa Any VSX register if the -mvsx option was used or NO_REGS. + When using any of the register constraints (@code{wa}, @code{wd}, + @code{wf}, @code{wg}, @code{wh}, @code{wi}, @code{wj}, @code{wk}, + @code{wl}, @code{wm}, @code{ws}, @code{wt}, @code{wu}, @code{wv}, + @code{ww}, or @code{wy}) that take VSX registers, you must use + @code{%x} in the template so that the correct register is used. + Otherwise the register number output in the assembly file will be + incorrect if an Altivec register is an operand of a VSX instruction + that expects VSX register numbering. + + @smallexample + asm ("xvadddp %x0,%x1,%x2" : "=wa" (v1) : "wa" (v2), "wa" (v3)); + @end smallexample + + is correct, but: + + @smallexample + asm ("xvadddp %0,%1,%2" : "=wa" (v1) : "wa" (v2), "wa" (v3)); + @end smallexample + + is not correct. + @item wd VSX vector register to hold vector double data or NO_REGS. *************** must be a @code{label_ref}. *** 8410,8418 **** @cindex @code{pc} and attributes @item (pc) ! This refers to the address of the @emph{current} insn. It might have ! been more consistent with other usage to make this the address of the ! @emph{next} insn but this would be confusing because the length of the current insn is to be computed. @end table --- 8431,8439 ---- @cindex @code{pc} and attributes @item (pc) ! For non-branch instructions and backward branch instructions, this refers ! to the address of the current insn. But for forward branch instructions, ! this refers to the address of the next insn, because the length of the current insn is to be computed. @end table diff -Nrcpad gcc-4.9.2/gcc/doc/rebuild-gcj-db.1 gcc-4.9.3/gcc/doc/rebuild-gcj-db.1 *** gcc-4.9.2/gcc/doc/rebuild-gcj-db.1 Thu Oct 30 09:18:33 2014 --- gcc-4.9.3/gcc/doc/rebuild-gcj-db.1 Fri Jun 26 18:49:08 2015 *************** *** 1,4 **** ! .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== --- 1,4 ---- ! .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== *************** *** 133,139 **** .\" ======================================================================== .\" .IX Title "REBUILD-GCJ-DB 1" ! .TH REBUILD-GCJ-DB 1 "2014-10-30" "gcc-4.9.2" "GNU" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l --- 133,139 ---- .\" ======================================================================== .\" .IX Title "REBUILD-GCJ-DB 1" ! .TH REBUILD-GCJ-DB 1 "2015-06-26" "gcc-4.9.3" "GNU" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -Nrcpad gcc-4.9.2/gcc/doc/tm.texi gcc-4.9.3/gcc/doc/tm.texi *** gcc-4.9.2/gcc/doc/tm.texi Wed Jun 11 23:49:49 2014 --- gcc-4.9.3/gcc/doc/tm.texi Sun Nov 16 15:50:33 2014 *************** to return a nonzero value when it is req *** 4441,4450 **** of spill registers and print a fatal error message. @end deftypefn - @deftypevr {Target Hook} {unsigned int} TARGET_FLAGS_REGNUM - If the target has a dedicated flags register, and it needs to use the post-reload comparison elimination pass, then this value should be set appropriately. - @end deftypevr - @node Scalar Return @subsection How Scalar Function Values Are Returned @cindex return values in registers --- 4441,4446 ---- *************** for comparisons whose argument is a @cod *** 6047,6056 **** @smallexample #define SELECT_CC_MODE(OP,X,Y) \ ! (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ ! ? ((OP == EQ || OP == NE) ? CCFPmode : CCFPEmode) \ ! : ((GET_CODE (X) == PLUS || GET_CODE (X) == MINUS \ ! || GET_CODE (X) == NEG) \ ? CC_NOOVmode : CCmode)) @end smallexample --- 6043,6053 ---- @smallexample #define SELECT_CC_MODE(OP,X,Y) \ ! (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ ! ? ((OP == LT || OP == LE || OP == GT || OP == GE) \ ! ? CCFPEmode : CCFPmode) \ ! : ((GET_CODE (X) == PLUS || GET_CODE (X) == MINUS \ ! || GET_CODE (X) == NEG || GET_CODE (x) == ASHIFT) \ ? CC_NOOVmode : CCmode)) @end smallexample *************** then @code{REVERSIBLE_CC_MODE (@var{mode *** 6093,6102 **** You need not define this macro if it would always returns zero or if the floating-point format is anything other than @code{IEEE_FLOAT_FORMAT}. For example, here is the definition used on the SPARC, where floating-point ! inequality comparisons are always given @code{CCFPEmode}: @smallexample ! #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode) @end smallexample @end defmac --- 6090,6100 ---- You need not define this macro if it would always returns zero or if the floating-point format is anything other than @code{IEEE_FLOAT_FORMAT}. For example, here is the definition used on the SPARC, where floating-point ! inequality comparisons are given either @code{CCFPEmode} or @code{CCFPmode}: @smallexample ! #define REVERSIBLE_CC_MODE(MODE) \ ! ((MODE) != CCFPEmode && (MODE) != CCFPmode) @end smallexample @end defmac *************** comparison done in CC_MODE @var{mode}. *** 6106,6112 **** @code{REVERSIBLE_CC_MODE (@var{mode})} is nonzero. Define this macro in case machine has some non-standard way how to reverse certain conditionals. For instance in case all floating point conditions are non-trapping, compiler may ! freely convert unordered compares to ordered one. Then definition may look like: @smallexample --- 6104,6110 ---- @code{REVERSIBLE_CC_MODE (@var{mode})} is nonzero. Define this macro in case machine has some non-standard way how to reverse certain conditionals. For instance in case all floating point conditions are non-trapping, compiler may ! freely convert unordered compares to ordered ones. Then definition may look like: @smallexample *************** same. If they are, it returns that mode *** 6144,6149 **** --- 6142,6151 ---- returns @code{VOIDmode}. @end deftypefn + @deftypevr {Target Hook} {unsigned int} TARGET_FLAGS_REGNUM + If the target has a dedicated flags register, and it needs to use the post-reload comparison elimination pass, then this value should be set appropriately. + @end deftypevr + @node Costs @section Describing Relative Costs of Operations @cindex costs of instructions diff -Nrcpad gcc-4.9.2/gcc/doc/tm.texi.in gcc-4.9.3/gcc/doc/tm.texi.in *** gcc-4.9.2/gcc/doc/tm.texi.in Wed Jun 11 23:49:49 2014 --- gcc-4.9.3/gcc/doc/tm.texi.in Sun Nov 16 15:50:33 2014 *************** stack. *** 3714,3721 **** @hook TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P - @hook TARGET_FLAGS_REGNUM - @node Scalar Return @subsection How Scalar Function Values Are Returned @cindex return values in registers --- 3714,3719 ---- *************** for comparisons whose argument is a @cod *** 4631,4640 **** @smallexample #define SELECT_CC_MODE(OP,X,Y) \ ! (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ ! ? ((OP == EQ || OP == NE) ? CCFPmode : CCFPEmode) \ ! : ((GET_CODE (X) == PLUS || GET_CODE (X) == MINUS \ ! || GET_CODE (X) == NEG) \ ? CC_NOOVmode : CCmode)) @end smallexample --- 4629,4639 ---- @smallexample #define SELECT_CC_MODE(OP,X,Y) \ ! (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ ! ? ((OP == LT || OP == LE || OP == GT || OP == GE) \ ! ? CCFPEmode : CCFPmode) \ ! : ((GET_CODE (X) == PLUS || GET_CODE (X) == MINUS \ ! || GET_CODE (X) == NEG || GET_CODE (x) == ASHIFT) \ ? CC_NOOVmode : CCmode)) @end smallexample *************** then @code{REVERSIBLE_CC_MODE (@var{mode *** 4657,4666 **** You need not define this macro if it would always returns zero or if the floating-point format is anything other than @code{IEEE_FLOAT_FORMAT}. For example, here is the definition used on the SPARC, where floating-point ! inequality comparisons are always given @code{CCFPEmode}: @smallexample ! #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode) @end smallexample @end defmac --- 4656,4666 ---- You need not define this macro if it would always returns zero or if the floating-point format is anything other than @code{IEEE_FLOAT_FORMAT}. For example, here is the definition used on the SPARC, where floating-point ! inequality comparisons are given either @code{CCFPEmode} or @code{CCFPmode}: @smallexample ! #define REVERSIBLE_CC_MODE(MODE) \ ! ((MODE) != CCFPEmode && (MODE) != CCFPmode) @end smallexample @end defmac *************** comparison done in CC_MODE @var{mode}. *** 4670,4676 **** @code{REVERSIBLE_CC_MODE (@var{mode})} is nonzero. Define this macro in case machine has some non-standard way how to reverse certain conditionals. For instance in case all floating point conditions are non-trapping, compiler may ! freely convert unordered compares to ordered one. Then definition may look like: @smallexample --- 4670,4676 ---- @code{REVERSIBLE_CC_MODE (@var{mode})} is nonzero. Define this macro in case machine has some non-standard way how to reverse certain conditionals. For instance in case all floating point conditions are non-trapping, compiler may ! freely convert unordered compares to ordered ones. Then definition may look like: @smallexample *************** like: *** 4684,4689 **** --- 4684,4691 ---- @hook TARGET_CC_MODES_COMPATIBLE + @hook TARGET_FLAGS_REGNUM + @node Costs @section Describing Relative Costs of Operations @cindex costs of instructions diff -Nrcpad gcc-4.9.2/gcc/dse.c gcc-4.9.3/gcc/dse.c *** gcc-4.9.2/gcc/dse.c Tue Mar 11 21:35:02 2014 --- gcc-4.9.3/gcc/dse.c Fri Jan 23 17:55:32 2015 *************** record_store (rtx body, bb_info_t bb_inf *** 1549,1554 **** --- 1549,1558 ---- = rtx_group_vec[group_id]; mem_addr = group->canon_base_addr; } + /* get_addr can only handle VALUE but cannot handle expr like: + VALUE + OFFSET, so call get_addr to get original addr for + mem_addr before plus_constant. */ + mem_addr = get_addr (mem_addr); if (offset) mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset); } *************** check_mem_read_rtx (rtx *loc, void *data *** 2166,2171 **** --- 2170,2179 ---- = rtx_group_vec[group_id]; mem_addr = group->canon_base_addr; } + /* get_addr can only handle VALUE but cannot handle expr like: + VALUE + OFFSET, so call get_addr to get original addr for + mem_addr before plus_constant. */ + mem_addr = get_addr (mem_addr); if (offset) mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset); } diff -Nrcpad gcc-4.9.2/gcc/dwarf2out.c gcc-4.9.3/gcc/dwarf2out.c *** gcc-4.9.2/gcc/dwarf2out.c Wed Oct 1 20:57:44 2014 --- gcc-4.9.3/gcc/dwarf2out.c Thu Jun 11 12:44:56 2015 *************** equate_decl_number_to_die (tree decl, dw *** 4930,4936 **** /* Return how many bits covers PIECE EXPR_LIST. */ ! static int decl_piece_bitsize (rtx piece) { int ret = (int) GET_MODE (piece); --- 4930,4936 ---- /* Return how many bits covers PIECE EXPR_LIST. */ ! static HOST_WIDE_INT decl_piece_bitsize (rtx piece) { int ret = (int) GET_MODE (piece); *************** decl_piece_varloc_ptr (rtx piece) *** 4958,4964 **** static rtx decl_piece_node (rtx loc_note, HOST_WIDE_INT bitsize, rtx next) { ! if (bitsize <= (int) MAX_MACHINE_MODE) return alloc_EXPR_LIST (bitsize, loc_note, next); else return alloc_EXPR_LIST (0, gen_rtx_CONCAT (VOIDmode, --- 4958,4964 ---- static rtx decl_piece_node (rtx loc_note, HOST_WIDE_INT bitsize, rtx next) { ! if (bitsize > 0 && bitsize <= (int) MAX_MACHINE_MODE) return alloc_EXPR_LIST (bitsize, loc_note, next); else return alloc_EXPR_LIST (0, gen_rtx_CONCAT (VOIDmode, *************** adjust_piece_list (rtx *dest, rtx *src, *** 4997,5003 **** HOST_WIDE_INT bitpos, HOST_WIDE_INT piece_bitpos, HOST_WIDE_INT bitsize, rtx loc_note) { ! int diff; bool copy = inner != NULL; if (copy) --- 4997,5003 ---- HOST_WIDE_INT bitpos, HOST_WIDE_INT piece_bitpos, HOST_WIDE_INT bitsize, rtx loc_note) { ! HOST_WIDE_INT diff; bool copy = inner != NULL; if (copy) *************** add_var_loc_to_decl (tree decl, rtx loc_ *** 5137,5143 **** { struct var_loc_node *last = temp->last, *unused = NULL; rtx *piece_loc = NULL, last_loc_note; ! int piece_bitpos = 0; if (last->next) { last = last->next; --- 5137,5143 ---- { struct var_loc_node *last = temp->last, *unused = NULL; rtx *piece_loc = NULL, last_loc_note; ! HOST_WIDE_INT piece_bitpos = 0; if (last->next) { last = last->next; *************** add_var_loc_to_decl (tree decl, rtx loc_ *** 5148,5154 **** piece_loc = &last->loc; do { ! int cur_bitsize = decl_piece_bitsize (*piece_loc); if (piece_bitpos + cur_bitsize > bitpos) break; piece_bitpos += cur_bitsize; --- 5148,5154 ---- piece_loc = &last->loc; do { ! HOST_WIDE_INT cur_bitsize = decl_piece_bitsize (*piece_loc); if (piece_bitpos + cur_bitsize > bitpos) break; piece_bitpos += cur_bitsize; *************** static dw_loc_descr_ref *** 13573,13579 **** dw_sra_loc_expr (tree decl, rtx loc) { rtx p; ! unsigned int padsize = 0; dw_loc_descr_ref descr, *descr_tail; unsigned HOST_WIDE_INT decl_size; rtx varloc; --- 13573,13579 ---- dw_sra_loc_expr (tree decl, rtx loc) { rtx p; ! unsigned HOST_WIDE_INT padsize = 0; dw_loc_descr_ref descr, *descr_tail; unsigned HOST_WIDE_INT decl_size; rtx varloc; *************** dw_sra_loc_expr (tree decl, rtx loc) *** 13589,13599 **** for (p = loc; p; p = XEXP (p, 1)) { ! unsigned int bitsize = decl_piece_bitsize (p); rtx loc_note = *decl_piece_varloc_ptr (p); dw_loc_descr_ref cur_descr; dw_loc_descr_ref *tail, last = NULL; ! unsigned int opsize = 0; if (loc_note == NULL_RTX || NOTE_VAR_LOCATION_LOC (loc_note) == NULL_RTX) --- 13589,13599 ---- for (p = loc; p; p = XEXP (p, 1)) { ! unsigned HOST_WIDE_INT bitsize = decl_piece_bitsize (p); rtx loc_note = *decl_piece_varloc_ptr (p); dw_loc_descr_ref cur_descr; dw_loc_descr_ref *tail, last = NULL; ! unsigned HOST_WIDE_INT opsize = 0; if (loc_note == NULL_RTX || NOTE_VAR_LOCATION_LOC (loc_note) == NULL_RTX) *************** gen_producer_string (void) *** 19196,19201 **** --- 19196,19204 ---- case OPT__sysroot_: case OPT_nostdinc: case OPT_nostdinc__: + case OPT_fpreprocessed: + case OPT_fltrans_output_list_: + case OPT_fresolution_: /* Ignore these. */ continue; default: *************** is_naming_typedef_decl (const_tree decl) *** 20096,20101 **** --- 20099,20126 ---- != TYPE_NAME (TREE_TYPE (decl)))); } + /* Looks up the DIE for a context. */ + + static inline dw_die_ref + lookup_context_die (tree context) + { + if (context) + { + /* Find die that represents this context. */ + if (TYPE_P (context)) + { + context = TYPE_MAIN_VARIANT (context); + dw_die_ref ctx = lookup_type_die (context); + if (!ctx) + return NULL; + return strip_naming_typedef (context, ctx); + } + else + return lookup_decl_die (context); + } + return comp_unit_die (); + } + /* Returns the DIE for a context. */ static inline dw_die_ref *************** resolve_addr (dw_die_ref die) *** 23405,23412 **** && DECL_EXTERNAL (tdecl) && DECL_ABSTRACT_ORIGIN (tdecl) == NULL_TREE) { ! force_decl_die (tdecl); ! tdie = lookup_decl_die (tdecl); } if (tdie) { --- 23430,23454 ---- && DECL_EXTERNAL (tdecl) && DECL_ABSTRACT_ORIGIN (tdecl) == NULL_TREE) { ! dw_die_ref cdie; ! if (!in_lto_p) ! { ! force_decl_die (tdecl); ! tdie = lookup_decl_die (tdecl); ! } ! else if ((cdie = lookup_context_die (DECL_CONTEXT (tdecl)))) ! { ! /* Creating a full DIE for tdecl is overly expensive and ! at this point even wrong when in the LTO phase ! as it can end up generating new type DIEs we didn't ! output and thus optimize_external_refs will crash. */ ! tdie = new_die (DW_TAG_subprogram, cdie, NULL_TREE); ! add_AT_flag (tdie, DW_AT_external, 1); ! add_AT_flag (tdie, DW_AT_declaration, 1); ! add_linkage_attr (tdie, tdecl); ! add_name_and_src_coords_attributes (tdie, tdecl); ! equate_decl_number_to_die (tdecl, tdie); ! } } if (tdie) { *************** dwarf2out_finish (const char *filename) *** 23984,23991 **** gen_remaining_tmpl_value_param_die_attribute (); /* Add the name for the main input file now. We delayed this from ! dwarf2out_init to avoid complications with PCH. */ ! add_name_attribute (comp_unit_die (), remap_debug_filename (filename)); if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir) add_comp_dir_attribute (comp_unit_die ()); else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL) --- 24026,24038 ---- gen_remaining_tmpl_value_param_die_attribute (); /* Add the name for the main input file now. We delayed this from ! dwarf2out_init to avoid complications with PCH. ! For LTO produced units use a fixed artificial name to avoid ! leaking tempfile names into the dwarf. */ ! if (!in_lto_p) ! add_name_attribute (comp_unit_die (), remap_debug_filename (filename)); ! else ! add_name_attribute (comp_unit_die (), ""); if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir) add_comp_dir_attribute (comp_unit_die ()); else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL) diff -Nrcpad gcc-4.9.2/gcc/dwarf2out.h gcc-4.9.3/gcc/dwarf2out.h *** gcc-4.9.2/gcc/dwarf2out.h Thu Jan 2 22:23:26 2014 --- gcc-4.9.3/gcc/dwarf2out.h Sun Feb 1 17:32:18 2015 *************** struct GTY(()) dw_val_node { *** 201,207 **** /* Locations in memory are described using a sequence of stack machine operations. */ ! struct GTY(()) dw_loc_descr_node { dw_loc_descr_ref dw_loc_next; ENUM_BITFIELD (dwarf_location_atom) dw_loc_opc : 8; /* Used to distinguish DW_OP_addr with a direct symbol relocation --- 201,207 ---- /* Locations in memory are described using a sequence of stack machine operations. */ ! struct GTY((chain_next ("%h.dw_loc_next"))) dw_loc_descr_node { dw_loc_descr_ref dw_loc_next; ENUM_BITFIELD (dwarf_location_atom) dw_loc_opc : 8; /* Used to distinguish DW_OP_addr with a direct symbol relocation diff -Nrcpad gcc-4.9.2/gcc/expmed.c gcc-4.9.3/gcc/expmed.c *** gcc-4.9.2/gcc/expmed.c Mon Jun 30 16:56:01 2014 --- gcc-4.9.3/gcc/expmed.c Wed Dec 3 20:38:44 2014 *************** strict_volatile_bitfield_p (rtx op0, uns *** 463,469 **** /* Check for cases where the C++ memory model applies. */ if (bitregion_end != 0 && (bitnum - bitnum % modesize < bitregion_start ! || bitnum - bitnum % modesize + modesize > bitregion_end)) return false; return true; --- 463,469 ---- /* Check for cases where the C++ memory model applies. */ if (bitregion_end != 0 && (bitnum - bitnum % modesize < bitregion_start ! || bitnum - bitnum % modesize + modesize - 1 > bitregion_end)) return false; return true; *************** expand_widening_mult (enum machine_mode *** 3321,3326 **** --- 3321,3329 ---- enum mult_variant variant; struct algorithm algorithm; + if (coeff == 0) + return CONST0_RTX (mode); + /* Special case powers of two. */ if (EXACT_POWER_OF_2_OR_ZERO_P (coeff)) { diff -Nrcpad gcc-4.9.2/gcc/expr.c gcc-4.9.3/gcc/expr.c *** gcc-4.9.2/gcc/expr.c Mon Sep 1 10:14:22 2014 --- gcc-4.9.3/gcc/expr.c Wed Jun 3 15:32:52 2015 *************** store_field (rtx target, HOST_WIDE_INT b *** 6576,6586 **** && mode != TYPE_MODE (TREE_TYPE (exp))) temp = convert_modes (mode, TYPE_MODE (TREE_TYPE (exp)), temp, 1); ! /* If the modes of TEMP and TARGET are both BLKmode, both ! must be in memory and BITPOS must be aligned on a byte ! boundary. If so, we simply do a block copy. Likewise ! for a BLKmode-like TARGET. */ ! if (GET_MODE (temp) == BLKmode && (GET_MODE (target) == BLKmode || (MEM_P (target) && GET_MODE_CLASS (GET_MODE (target)) == MODE_INT --- 6576,6587 ---- && mode != TYPE_MODE (TREE_TYPE (exp))) temp = convert_modes (mode, TYPE_MODE (TREE_TYPE (exp)), temp, 1); ! /* If TEMP is not a PARALLEL (see below) and its mode and that of TARGET ! are both BLKmode, both must be in memory and BITPOS must be aligned ! on a byte boundary. If so, we simply do a block copy. Likewise for ! a BLKmode-like TARGET. */ ! if (GET_CODE (temp) != PARALLEL ! && GET_MODE (temp) == BLKmode && (GET_MODE (target) == BLKmode || (MEM_P (target) && GET_MODE_CLASS (GET_MODE (target)) == MODE_INT *************** get_inner_reference (tree exp, HOST_WIDE *** 6872,6878 **** if (offset) { /* Avoid returning a negative bitpos as this may wreak havoc later. */ ! if (bit_offset.is_negative ()) { double_int mask = double_int::mask (BITS_PER_UNIT == 8 --- 6873,6879 ---- if (offset) { /* Avoid returning a negative bitpos as this may wreak havoc later. */ ! if (bit_offset.is_negative () || !bit_offset.fits_shwi ()) { double_int mask = double_int::mask (BITS_PER_UNIT == 8 *************** expand_expr_addr_expr_1 (tree exp, rtx t *** 7630,7640 **** break; case COMPOUND_LITERAL_EXPR: ! /* Allow COMPOUND_LITERAL_EXPR in initializers, if e.g. ! rtl_for_decl_init is called on DECL_INITIAL with ! COMPOUNT_LITERAL_EXPRs in it, they aren't gimplified. */ ! if (modifier == EXPAND_INITIALIZER ! && COMPOUND_LITERAL_EXPR_DECL (exp)) return expand_expr_addr_expr_1 (COMPOUND_LITERAL_EXPR_DECL (exp), target, tmode, modifier, as); /* FALLTHRU */ --- 7631,7643 ---- break; case COMPOUND_LITERAL_EXPR: ! /* Allow COMPOUND_LITERAL_EXPR in initializers or coming from ! initializers, if e.g. rtl_for_decl_init is called on DECL_INITIAL ! with COMPOUND_LITERAL_EXPRs in it, or ARRAY_REF on a const static ! array with address of COMPOUND_LITERAL_EXPR in DECL_INITIAL; ! the initializers aren't gimplified. */ ! if (COMPOUND_LITERAL_EXPR_DECL (exp) ! && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp))) return expand_expr_addr_expr_1 (COMPOUND_LITERAL_EXPR_DECL (exp), target, tmode, modifier, as); /* FALLTHRU */ *************** expand_expr_real_1 (tree exp, rtx target *** 9990,9996 **** tree tem = get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode1, &unsignedp, &volatilep, true); rtx orig_op0, memloc; ! bool mem_attrs_from_type = false; /* If we got back the original object, something is wrong. Perhaps we are evaluating an expression too early. In any event, don't --- 9993,9999 ---- tree tem = get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode1, &unsignedp, &volatilep, true); rtx orig_op0, memloc; ! bool clear_mem_expr = false; /* If we got back the original object, something is wrong. Perhaps we are evaluating an expression too early. In any event, don't *************** expand_expr_real_1 (tree exp, rtx target *** 10086,10092 **** memloc = assign_temp (TREE_TYPE (tem), 1, 1); emit_move_insn (memloc, op0); op0 = memloc; ! mem_attrs_from_type = true; } if (offset) --- 10089,10095 ---- memloc = assign_temp (TREE_TYPE (tem), 1, 1); emit_move_insn (memloc, op0); op0 = memloc; ! clear_mem_expr = true; } if (offset) *************** expand_expr_real_1 (tree exp, rtx target *** 10271,10287 **** if (op0 == orig_op0) op0 = copy_rtx (op0); ! /* If op0 is a temporary because of forcing to memory, pass only the ! type to set_mem_attributes so that the original expression is never ! marked as ADDRESSABLE through MEM_EXPR of the temporary. */ ! if (mem_attrs_from_type) ! set_mem_attributes (op0, type, 0); ! else ! set_mem_attributes (op0, exp, 0); if (REG_P (XEXP (op0, 0))) mark_reg_pointer (XEXP (op0, 0), MEM_ALIGN (op0)); MEM_VOLATILE_P (op0) |= volatilep; if (mode == mode1 || mode1 == BLKmode || mode1 == tmode || modifier == EXPAND_CONST_ADDRESS --- 10274,10290 ---- if (op0 == orig_op0) op0 = copy_rtx (op0); ! set_mem_attributes (op0, exp, 0); if (REG_P (XEXP (op0, 0))) mark_reg_pointer (XEXP (op0, 0), MEM_ALIGN (op0)); + /* If op0 is a temporary because the original expressions was forced + to memory, clear MEM_EXPR so that the original expression cannot + be marked as addressable through MEM_EXPR of the temporary. */ + if (clear_mem_expr) + set_mem_expr (op0, NULL_TREE); + MEM_VOLATILE_P (op0) |= volatilep; if (mode == mode1 || mode1 == BLKmode || mode1 == tmode || modifier == EXPAND_CONST_ADDRESS diff -Nrcpad gcc-4.9.2/gcc/fold-const.c gcc-4.9.3/gcc/fold-const.c *** gcc-4.9.2/gcc/fold-const.c Wed May 28 12:46:39 2014 --- gcc-4.9.3/gcc/fold-const.c Thu Jun 18 14:03:50 2015 *************** fold_unary_loc (location_t loc, enum tre *** 7941,7946 **** --- 7941,7951 ---- return fold_convert_loc (loc, type, op0); return NULL_TREE; + case NON_LVALUE_EXPR: + if (!maybe_lvalue_p (op0)) + return fold_convert_loc (loc, type, op0); + return NULL_TREE; + CASE_CONVERT: case FLOAT_EXPR: case FIX_TRUNC_EXPR: *************** fold_unary_loc (location_t loc, enum tre *** 8006,8021 **** (for integers). Avoid this if the final type is a pointer since then we sometimes need the middle conversion. Likewise if the final type has a precision not equal to the size of its mode. */ ! if (((inter_int && inside_int) ! || (inter_float && inside_float) ! || (inter_vec && inside_vec)) && inter_prec >= inside_prec ! && (inter_float || inter_vec ! || inter_unsignedp == inside_unsignedp) && ! (final_prec != GET_MODE_PRECISION (TYPE_MODE (type)) ! && TYPE_MODE (type) == TYPE_MODE (inter_type)) ! && ! final_ptr ! && (! final_vec || inter_prec == inside_prec)) return fold_build1_loc (loc, code, type, TREE_OPERAND (op0, 0)); /* If we have a sign-extension of a zero-extended value, we can --- 8011,8022 ---- (for integers). Avoid this if the final type is a pointer since then we sometimes need the middle conversion. Likewise if the final type has a precision not equal to the size of its mode. */ ! if (((inter_int && inside_int) || (inter_float && inside_float)) ! && (final_int || final_float) && inter_prec >= inside_prec ! && (inter_float || inter_unsignedp == inside_unsignedp) && ! (final_prec != GET_MODE_PRECISION (TYPE_MODE (type)) ! && TYPE_MODE (type) == TYPE_MODE (inter_type))) return fold_build1_loc (loc, code, type, TREE_OPERAND (op0, 0)); /* If we have a sign-extension of a zero-extended value, we can *************** fold_unary_loc (location_t loc, enum tre *** 8204,8210 **** } } ! tem = fold_convert_const (code, type, op0); return tem ? tem : NULL_TREE; case ADDR_SPACE_CONVERT_EXPR: --- 8205,8211 ---- } } ! tem = fold_convert_const (code, type, arg0); return tem ? tem : NULL_TREE; case ADDR_SPACE_CONVERT_EXPR: *************** fold_unary_loc (location_t loc, enum tre *** 8324,8332 **** && integer_onep (TREE_OPERAND (arg0, 1))) || (TREE_CODE (arg0) == PLUS_EXPR && integer_all_onesp (TREE_OPERAND (arg0, 1))))) ! return fold_build1_loc (loc, NEGATE_EXPR, type, ! fold_convert_loc (loc, type, ! TREE_OPERAND (arg0, 0))); /* Convert ~(X ^ Y) to ~X ^ Y or X ^ ~Y if ~X or ~Y simplify. */ else if (TREE_CODE (arg0) == BIT_XOR_EXPR && (tem = fold_unary_loc (loc, BIT_NOT_EXPR, type, --- 8325,8338 ---- && integer_onep (TREE_OPERAND (arg0, 1))) || (TREE_CODE (arg0) == PLUS_EXPR && integer_all_onesp (TREE_OPERAND (arg0, 1))))) ! { ! /* Perform the negation in ARG0's type and only then convert ! to TYPE as to avoid introducing undefined behavior. */ ! tree t = fold_build1_loc (loc, NEGATE_EXPR, ! TREE_TYPE (TREE_OPERAND (arg0, 0)), ! TREE_OPERAND (arg0, 0)); ! return fold_convert_loc (loc, type, t); ! } /* Convert ~(X ^ Y) to ~X ^ Y or X ^ ~Y if ~X or ~Y simplify. */ else if (TREE_CODE (arg0) == BIT_XOR_EXPR && (tem = fold_unary_loc (loc, BIT_NOT_EXPR, type, *************** fold_comparison (location_t loc, enum tr *** 9024,9030 **** /* If the constant operation overflowed this can be simplified as a comparison against INT_MAX/INT_MIN. */ if (TREE_CODE (lhs) == INTEGER_CST ! && TREE_OVERFLOW (lhs)) { int const1_sgn = tree_int_cst_sgn (const1); enum tree_code code2 = code; --- 9030,9037 ---- /* If the constant operation overflowed this can be simplified as a comparison against INT_MAX/INT_MIN. */ if (TREE_CODE (lhs) == INTEGER_CST ! && TREE_OVERFLOW (lhs) ! && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0))) { int const1_sgn = tree_int_cst_sgn (const1); enum tree_code code2 = code; *************** fold_binary_loc (location_t loc, *** 10810,10817 **** /* Don't introduce overflows through reassociation. */ if (!any_overflows ! && ((lit0 && TREE_OVERFLOW (lit0)) ! || (minus_lit0 && TREE_OVERFLOW (minus_lit0)))) return NULL_TREE; if (minus_lit0) --- 10817,10824 ---- /* Don't introduce overflows through reassociation. */ if (!any_overflows ! && ((lit0 && TREE_OVERFLOW_P (lit0)) ! || (minus_lit0 && TREE_OVERFLOW_P (minus_lit0)))) return NULL_TREE; if (minus_lit0) *************** fold_binary_loc (location_t loc, *** 13295,13301 **** tree itype = TREE_TYPE (arg00); if (TREE_INT_CST_HIGH (arg01) == 0 && TREE_INT_CST_LOW (arg01) ! == (unsigned HOST_WIDE_INT) (TYPE_PRECISION (itype) - 1)) { if (TYPE_UNSIGNED (itype)) { --- 13302,13308 ---- tree itype = TREE_TYPE (arg00); if (TREE_INT_CST_HIGH (arg01) == 0 && TREE_INT_CST_LOW (arg01) ! == (unsigned HOST_WIDE_INT) (element_precision (itype) - 1)) { if (TYPE_UNSIGNED (itype)) { diff -Nrcpad gcc-4.9.2/gcc/fortran/ChangeLog gcc-4.9.3/gcc/fortran/ChangeLog *** gcc-4.9.2/gcc/fortran/ChangeLog Thu Oct 30 08:26:30 2014 --- gcc-4.9.3/gcc/fortran/ChangeLog Fri Jun 26 17:56:40 2015 *************** *** 1,3 **** --- 1,190 ---- + 2015-06-26 Release Manager + + * GCC 4.9.3 released. + + 2015-06-26 Jakub Jelinek + + * gfortranspec.c: Update displayed copyright years. + + 2015-06-03 Jakub Jelinek + + Backported from mainline + 2015-03-30 Jakub Jelinek + + PR fortran/65597 + * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit + linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN. + For implcitly added !simple OMP_CLAUSE_LINEAR set it too. Use step 1 + instead of the original step on the new iterator - count. + + 2015-04-14 Mikael Morin + + PR fortran/56674 + PR fortran/58813 + PR fortran/59016 + PR fortran/59024 + * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the + former to the latter and make it non-static. Update callers. + * gfortran.h (gfc_save_symbol_data): New prototype. + * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data' + before modifying symbols 'sym' and 'dt_sym'. + + 2015-03-23 Andre Vehreschild + Janus Weil + + Backported from mainline + PR fortran/60255 + Initial patch version: Janus Weil + * class.c (gfc_get_len_component): New. + (gfc_build_class_symbol): Add _len component to unlimited + polymorphic entities. + (find_intrinsic_vtab): Removed emitting of error message. + * gfortran.h: Added prototype for gfc_get_len_component. + * simplify.c (gfc_simplify_len): Use _len component where + available. + * trans-expr.c (gfc_class_len_get): New. + (gfc_conv_intrinsic_to_class): Add handling for deferred + character arrays. + (gfc_conv_structure): Treat _len component correctly. + (gfc_conv_expr): Prevent bind_c handling when not required. + (gfc_trans_pointer_assignment): Propagate _len component. + * trans-stmt.c (class_has_len_component): New. + (trans_associate_var): _len component treatement for associate + context. + (gfc_trans_allocate): Same as for trans_associate_var() + * trans.h: Add prototype for gfc_class_len_get. + + 2015-03-21 Mikael Morin + + PR fortran/61138 + * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY + field before reusing LSE. + + 2015-03-19 Paul Thomas + + Backport from mainline + PR fortran/59198 + * trans-types.c (gfc_get_derived_type): If an abstract derived + type with procedure pointer components has no other type of + component, return the backend_decl. Otherwise build the + components if any of the non-procedure pointer components have + no backend_decl. + + 2015-03-12 Mikael Morin + + PR fortran/60898 + * resolve.c (resolve_symbol): Check that the symbol found by + name lookup really is the current symbol being resolved. + + 2015-03-10 Paul Thomas + + Backported from mainline + PR fortran/65024 + * trans-expr.c (gfc_conv_component_ref): If the component + backend declaration is missing and the derived type symbol is + available in the reference, call gfc_build_derived_type. + + 2015-02-13 Mikael Morin + + PR fortran/63744 + * module.c (check_for_ambiguous): Change argument type + from gfc_symbol to gfc_symtree. Check local (symtree) name + instead of original (symbol) name. + (read_module): Update caller. + + 2015-02-12 Paul Thomas + + Backported from mainline + 2015-02-12 Paul Thomas + + PR fortran/64932 + * trans-stmt.c (gfc_trans_deallocate): If a component array + expression is not a descriptor type and it is a derived type + that has allocatable components and is not finalizable, then + deallocate the allocatable components. + + 2015-02-03 Steven G. Kargl + + * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1. + + 2015-01-27 Paul Thomas + + Backport from mainline + PR fortran/62044 + * resolve.c (resolve_allocate_expr): If the default initializer + is NULL, keep the original MOLD expression so that the correct + typespec is available. + + 2015-01-27 Tobias Burnus + + PR fortran/64771 + * interface.c (check_dummy_characteristics): Fix coarray handling. + + 2015-01-26 Janus Weil + + Backport from mainline + PR fortran/64230 + * class.c (finalize_component): New argument 'sub_ns'. Insert code to + check if 'expr' is associated. + (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and + 'ptr2'. Pass 'sub_ns' to finalize_component. + + 2015-01-24 Thomas Koenig + + Backport from trunk + PR fortran/57023 + * dependency.c (callback_dummy_intent_not_int): New function. + (dummy_intent_not_in): New function. + (gfc_full_array_ref_p): Use dummy_intent_not_in. + + 2015-01-24 Janus Weil + + Backport from mainline + PR fortran/60922 + * class.c (finalize_component): Apply the check for 'fini_coarray' only + to coarray components. + + 2015-01-14 Jakub Jelinek + + Backported from mainline + 2015-01-13 Jakub Jelinek + + PR fortran/64528 + * trans-decl.c (create_function_arglist): Don't set TREE_READONLY + on dummy args with VALUE attribute. + + 2015-01-12 Janus Weil + + Backport from mainline + PR fortran/63733 + * interface.c (gfc_extend_expr): Look for type-bound operators before + non-typebound ones. + + 2015-01-08 Thomas Koenig + + Backport from trunk + PR fortran/56867 + * trans-array.c (gfc_conv_resolve_dependencies): Also check + dependencies when there may be substrings of character arrays. + + 2014-12-23 Janus Weil + + Backport from mainline + PR fortran/64244 + * resolve.c (resolve_typebound_call): New argument to pass out the + non-overridable attribute of the specific procedure. + (resolve_typebound_subroutine): Get overridable flag from + resolve_typebound_call. + + 2014-11-28 Jakub Jelinek + + Backported from mainline + 2014-11-24 Jakub Jelinek + + PR fortran/63938 + * trans-openmp.c (gfc_trans_omp_atomic): Make sure lhsaddr is + simple enough for goa_lhs_expr_p. + 2014-10-30 Release Manager * GCC 4.9.2 released. diff -Nrcpad gcc-4.9.2/gcc/fortran/class.c gcc-4.9.3/gcc/fortran/class.c *** gcc-4.9.2/gcc/fortran/class.c Thu Apr 10 14:40:25 2014 --- gcc-4.9.3/gcc/fortran/class.c Mon Mar 23 11:58:49 2015 *************** along with GCC; see the file COPYING3. *** 34,39 **** --- 34,45 ---- (pointer/allocatable/dimension/...). * _vptr: A pointer to the vtable entry (see below) of the dynamic type. + Only for unlimited polymorphic classes: + * _len: An integer(4) to store the string length when the unlimited + polymorphic pointer is used to point to a char array. The '_len' + component will be zero when no character array is stored in + '_data'. + For each derived type we set up a "vtable" entry, i.e. a structure with the following fields: * _hash: A hash value serving as a unique identifier for this type. *************** gfc_intrinsic_hash_value (gfc_typespec * *** 544,553 **** } /* Build a polymorphic CLASS entity, using the symbol that comes from build_sym. A CLASS entity is represented by an encapsulating type, which contains the declared type as '_data' component, plus a pointer ! component '_vptr' which determines the dynamic type. */ bool gfc_build_class_symbol (gfc_typespec *ts, symbol_attribute *attr, --- 550,597 ---- } + /* Get the _len component from a class/derived object storing a string. + For unlimited polymorphic entities a ref to the _data component is available + while a ref to the _len component is needed. This routine traverses the + ref-chain and strips the last ref to a _data from it replacing it with a + ref to the _len component. */ + + gfc_expr * + gfc_get_len_component (gfc_expr *e) + { + gfc_expr *ptr; + gfc_ref *ref, **last; + + ptr = gfc_copy_expr (e); + + /* We need to remove the last _data component ref from ptr. */ + last = &(ptr->ref); + ref = ptr->ref; + while (ref) + { + if (!ref->next + && ref->type == REF_COMPONENT + && strcmp ("_data", ref->u.c.component->name)== 0) + { + gfc_free_ref_list (ref); + *last = NULL; + break; + } + last = &(ref->next); + ref = ref->next; + } + /* And replace if with a ref to the _len component. */ + gfc_add_component_ref (ptr, "_len"); + return ptr; + } + + /* Build a polymorphic CLASS entity, using the symbol that comes from build_sym. A CLASS entity is represented by an encapsulating type, which contains the declared type as '_data' component, plus a pointer ! component '_vptr' which determines the dynamic type. When this CLASS ! entity is unlimited polymorphic, then also add a component '_len' to ! store the length of string when that is stored in it. */ bool gfc_build_class_symbol (gfc_typespec *ts, symbol_attribute *attr, *************** gfc_build_class_symbol (gfc_typespec *ts *** 645,663 **** if (!gfc_add_component (fclass, "_vptr", &c)) return false; c->ts.type = BT_DERIVED; if (ts->u.derived->attr.unlimited_polymorphic) { vtab = gfc_find_derived_vtab (ts->u.derived); gcc_assert (vtab); c->ts.u.derived = vtab->ts.u.derived; } else /* Build vtab later. */ c->ts.u.derived = NULL; - - c->attr.access = ACCESS_PRIVATE; - c->attr.pointer = 1; } if (!ts->u.derived->attr.unlimited_polymorphic) --- 689,716 ---- if (!gfc_add_component (fclass, "_vptr", &c)) return false; c->ts.type = BT_DERIVED; + c->attr.access = ACCESS_PRIVATE; + c->attr.pointer = 1; if (ts->u.derived->attr.unlimited_polymorphic) { vtab = gfc_find_derived_vtab (ts->u.derived); gcc_assert (vtab); c->ts.u.derived = vtab->ts.u.derived; + + /* Add component '_len'. Only unlimited polymorphic pointers may + have a string assigned to them, i.e., only those need the _len + component. */ + if (!gfc_add_component (fclass, "_len", &c)) + return false; + c->ts.type = BT_INTEGER; + c->ts.kind = 4; + c->attr.access = ACCESS_PRIVATE; + c->attr.artificial = 1; } else /* Build vtab later. */ c->ts.u.derived = NULL; } if (!ts->u.derived->attr.unlimited_polymorphic) *************** comp_is_finalizable (gfc_component *comp *** 828,834 **** static void finalize_component (gfc_expr *expr, gfc_symbol *derived, gfc_component *comp, ! gfc_symbol *stat, gfc_symbol *fini_coarray, gfc_code **code) { gfc_expr *e; gfc_ref *ref; --- 881,888 ---- static void finalize_component (gfc_expr *expr, gfc_symbol *derived, gfc_component *comp, ! gfc_symbol *stat, gfc_symbol *fini_coarray, gfc_code **code, ! gfc_namespace *sub_ns) { gfc_expr *e; gfc_ref *ref; *************** finalize_component (gfc_expr *expr, gfc_ *** 875,881 **** /* Add IF (fini_coarray). */ if (comp->attr.codimension || (comp->ts.type == BT_CLASS && CLASS_DATA (comp) ! && CLASS_DATA (comp)->attr.allocatable)) { block = gfc_get_code (EXEC_IF); if (*code) --- 929,935 ---- /* Add IF (fini_coarray). */ if (comp->attr.codimension || (comp->ts.type == BT_CLASS && CLASS_DATA (comp) ! && CLASS_DATA (comp)->attr.codimension)) { block = gfc_get_code (EXEC_IF); if (*code) *************** finalize_component (gfc_expr *expr, gfc_ *** 897,911 **** dealloc->ext.alloc.list->expr = e; dealloc->expr1 = gfc_lval_expr_from_sym (stat); if (block) ! block->next = dealloc; else if (*code) { ! (*code)->next = dealloc; (*code) = (*code)->next; } else ! (*code) = dealloc; } else if (comp->ts.type == BT_DERIVED && comp->ts.u.derived->f2k_derived --- 951,982 ---- dealloc->ext.alloc.list->expr = e; dealloc->expr1 = gfc_lval_expr_from_sym (stat); + gfc_code *cond = gfc_get_code (EXEC_IF); + cond->block = gfc_get_code (EXEC_IF); + cond->block->expr1 = gfc_get_expr (); + cond->block->expr1->expr_type = EXPR_FUNCTION; + gfc_get_sym_tree ("associated", sub_ns, &cond->block->expr1->symtree, false); + cond->block->expr1->symtree->n.sym->attr.flavor = FL_PROCEDURE; + cond->block->expr1->symtree->n.sym->attr.intrinsic = 1; + cond->block->expr1->symtree->n.sym->result = cond->block->expr1->symtree->n.sym; + gfc_commit_symbol (cond->block->expr1->symtree->n.sym); + cond->block->expr1->ts.type = BT_LOGICAL; + cond->block->expr1->ts.kind = gfc_default_logical_kind; + cond->block->expr1->value.function.isym = gfc_intrinsic_function_by_id (GFC_ISYM_ASSOCIATED); + cond->block->expr1->value.function.actual = gfc_get_actual_arglist (); + cond->block->expr1->value.function.actual->expr = gfc_copy_expr (expr); + cond->block->expr1->value.function.actual->next = gfc_get_actual_arglist (); + cond->block->next = dealloc; + if (block) ! block->next = cond; else if (*code) { ! (*code)->next = cond; (*code) = (*code)->next; } else ! (*code) = cond; } else if (comp->ts.type == BT_DERIVED && comp->ts.u.derived->f2k_derived *************** finalize_component (gfc_expr *expr, gfc_ *** 941,947 **** gfc_component *c; for (c = comp->ts.u.derived->components; c; c = c->next) ! finalize_component (e, comp->ts.u.derived, c, stat, fini_coarray, code); gfc_free_expr (e); } } --- 1012,1019 ---- gfc_component *c; for (c = comp->ts.u.derived->components; c; c = c->next) ! finalize_component (e, comp->ts.u.derived, c, stat, fini_coarray, code, ! sub_ns); gfc_free_expr (e); } } *************** generate_finalization_wrapper (gfc_symbo *** 1874,1880 **** { gfc_finalizer *fini, *fini_elem = NULL; ! gfc_get_symbol ("ptr", sub_ns, &ptr); ptr->ts.type = BT_DERIVED; ptr->ts.u.derived = derived; ptr->attr.flavor = FL_VARIABLE; --- 1946,1952 ---- { gfc_finalizer *fini, *fini_elem = NULL; ! gfc_get_symbol ("ptr1", sub_ns, &ptr); ptr->ts.type = BT_DERIVED; ptr->ts.u.derived = derived; ptr->attr.flavor = FL_VARIABLE; *************** generate_finalization_wrapper (gfc_symbo *** 1998,2004 **** if (!ptr) { ! gfc_get_symbol ("ptr", sub_ns, &ptr); ptr->ts.type = BT_DERIVED; ptr->ts.u.derived = derived; ptr->attr.flavor = FL_VARIABLE; --- 2070,2076 ---- if (!ptr) { ! gfc_get_symbol ("ptr2", sub_ns, &ptr); ptr->ts.type = BT_DERIVED; ptr->ts.u.derived = derived; ptr->attr.flavor = FL_VARIABLE; *************** generate_finalization_wrapper (gfc_symbo *** 2047,2053 **** continue; finalize_component (gfc_lval_expr_from_sym (ptr), derived, comp, ! stat, fini_coarray, &block); if (!last_code->block->next) last_code->block->next = block; } --- 2119,2125 ---- continue; finalize_component (gfc_lval_expr_from_sym (ptr), derived, comp, ! stat, fini_coarray, &block, sub_ns); if (!last_code->block->next) last_code->block->next = block; } *************** find_intrinsic_vtab (gfc_typespec *ts) *** 2415,2432 **** gfc_symbol *copy = NULL, *src = NULL, *dst = NULL; int charlen = 0; ! if (ts->type == BT_CHARACTER) ! { ! if (ts->deferred) ! { ! gfc_error ("TODO: Deferred character length variable at %C cannot " ! "yet be associated with unlimited polymorphic entities"); ! return NULL; ! } ! else if (ts->u.cl && ts->u.cl->length ! && ts->u.cl->length->expr_type == EXPR_CONSTANT) ! charlen = mpz_get_si (ts->u.cl->length->value.integer); ! } /* Find the top-level namespace. */ for (ns = gfc_current_ns; ns; ns = ns->parent) --- 2487,2495 ---- gfc_symbol *copy = NULL, *src = NULL, *dst = NULL; int charlen = 0; ! if (ts->type == BT_CHARACTER && !ts->deferred && ts->u.cl && ts->u.cl->length ! && ts->u.cl->length->expr_type == EXPR_CONSTANT) ! charlen = mpz_get_si (ts->u.cl->length->value.integer); /* Find the top-level namespace. */ for (ns = gfc_current_ns; ns; ns = ns->parent) diff -Nrcpad gcc-4.9.2/gcc/fortran/decl.c gcc-4.9.3/gcc/fortran/decl.c *** gcc-4.9.2/gcc/fortran/decl.c Wed Jul 2 09:44:03 2014 --- gcc-4.9.3/gcc/fortran/decl.c Tue Apr 14 09:18:15 2015 *************** gfc_match_decl_type_spec (gfc_typespec * *** 2851,2856 **** --- 2851,2857 ---- return MATCH_ERROR; } + gfc_save_symbol_data (sym); gfc_set_sym_referenced (sym); if (!sym->attr.generic && !gfc_add_generic (&sym->attr, sym->name, NULL)) *************** gfc_match_decl_type_spec (gfc_typespec * *** 2875,2880 **** --- 2876,2883 ---- sym->generic = intr; sym->attr.if_source = IFSRC_DECL; } + else + gfc_save_symbol_data (dt_sym); gfc_set_sym_referenced (dt_sym); diff -Nrcpad gcc-4.9.2/gcc/fortran/dependency.c gcc-4.9.3/gcc/fortran/dependency.c *** gcc-4.9.2/gcc/fortran/dependency.c Sat Jul 19 13:49:40 2014 --- gcc-4.9.3/gcc/fortran/dependency.c Sat Jan 24 12:50:51 2015 *************** gfc_check_element_vs_element (gfc_ref *l *** 1848,1858 **** return GFC_DEP_EQUAL; } /* Determine if an array ref, usually an array section specifies the entire array. In addition, if the second, pointer argument is provided, the function will return true if the reference is ! contiguous; eg. (:, 1) gives true but (1,:) gives false. */ bool gfc_full_array_ref_p (gfc_ref *ref, bool *contiguous) --- 1848,1887 ---- return GFC_DEP_EQUAL; } + /* Callback function for checking if an expression depends on a + dummy variable which is any other than INTENT(IN). */ + + static int + callback_dummy_intent_not_in (gfc_expr **ep, + int *walk_subtrees ATTRIBUTE_UNUSED, + void *data ATTRIBUTE_UNUSED) + { + gfc_expr *e = *ep; + + if (e->expr_type == EXPR_VARIABLE && e->symtree + && e->symtree->n.sym->attr.dummy) + return e->symtree->n.sym->attr.intent != INTENT_IN; + else + return 0; + } + + /* Auxiliary function to check if subexpressions have dummy variables which + are not intent(in). + */ + + static bool + dummy_intent_not_in (gfc_expr **ep) + { + return gfc_expr_walker (ep, callback_dummy_intent_not_in, NULL); + } /* Determine if an array ref, usually an array section specifies the entire array. In addition, if the second, pointer argument is provided, the function will return true if the reference is ! contiguous; eg. (:, 1) gives true but (1,:) gives false. ! If one of the bounds depends on a dummy variable which is ! not INTENT(IN), also return false, because the user may ! have changed the variable. */ bool gfc_full_array_ref_p (gfc_ref *ref, bool *contiguous) *************** gfc_full_array_ref_p (gfc_ref *ref, bool *** 1916,1929 **** && (!ref->u.ar.as || !ref->u.ar.as->lower[i] || gfc_dep_compare_expr (ref->u.ar.start[i], ! ref->u.ar.as->lower[i]))) lbound_OK = false; /* Check the upper bound. */ if (ref->u.ar.end[i] && (!ref->u.ar.as || !ref->u.ar.as->upper[i] || gfc_dep_compare_expr (ref->u.ar.end[i], ! ref->u.ar.as->upper[i]))) ubound_OK = false; /* Check the stride. */ if (ref->u.ar.stride[i] --- 1945,1960 ---- && (!ref->u.ar.as || !ref->u.ar.as->lower[i] || gfc_dep_compare_expr (ref->u.ar.start[i], ! ref->u.ar.as->lower[i]) ! || dummy_intent_not_in (&ref->u.ar.start[i]))) lbound_OK = false; /* Check the upper bound. */ if (ref->u.ar.end[i] && (!ref->u.ar.as || !ref->u.ar.as->upper[i] || gfc_dep_compare_expr (ref->u.ar.end[i], ! ref->u.ar.as->upper[i]) ! || dummy_intent_not_in (&ref->u.ar.end[i]))) ubound_OK = false; /* Check the stride. */ if (ref->u.ar.stride[i] diff -Nrcpad gcc-4.9.2/gcc/fortran/gfortran.h gcc-4.9.3/gcc/fortran/gfortran.h *** gcc-4.9.2/gcc/fortran/gfortran.h Fri Aug 15 20:47:30 2014 --- gcc-4.9.3/gcc/fortran/gfortran.h Tue Apr 14 09:18:15 2015 *************** bool verify_bind_c_derived_type (gfc_sym *** 2815,2820 **** --- 2815,2821 ---- bool verify_com_block_vars_c_interop (gfc_common_head *); gfc_symtree *generate_isocbinding_symbol (const char *, iso_c_binding_symbol, const char *, gfc_symtree *, bool); + void gfc_save_symbol_data (gfc_symbol *); int gfc_get_sym_tree (const char *, gfc_namespace *, gfc_symtree **, bool); int gfc_get_ha_symbol (const char *, gfc_symbol **); int gfc_get_ha_sym_tree (const char *, gfc_symtree **); *************** bool gfc_is_class_scalar_expr (gfc_expr *** 3173,3178 **** --- 3174,3180 ---- bool gfc_is_class_container_ref (gfc_expr *e); gfc_expr *gfc_class_initializer (gfc_typespec *, gfc_expr *); unsigned int gfc_hash_value (gfc_symbol *); + gfc_expr *gfc_get_len_component (gfc_expr *e); bool gfc_build_class_symbol (gfc_typespec *, symbol_attribute *, gfc_array_spec **); gfc_symbol *gfc_find_derived_vtab (gfc_symbol *); diff -Nrcpad gcc-4.9.2/gcc/fortran/gfortran.info gcc-4.9.3/gcc/fortran/gfortran.info *** gcc-4.9.2/gcc/fortran/gfortran.info Thu Oct 30 09:18:30 2014 --- gcc-4.9.3/gcc/fortran/gfortran.info Fri Jun 26 18:49:05 2015 *************** File: gfortran.info, Node: C_ASSOCIATED *** 5925,5931 **** ============================================ _Description_: ! 'C_ASSOCIATED(c_prt_1[, c_ptr_2])' determines the status of the C pointer C_PTR_1 or if C_PTR_1 is associated with the target C_PTR_2. --- 5925,5931 ---- ============================================ _Description_: ! 'C_ASSOCIATED(c_ptr_1[, c_ptr_2])' determines the status of the C pointer C_PTR_1 or if C_PTR_1 is associated with the target C_PTR_2. *************** _Class_: *** 5936,5942 **** Inquiry function _Syntax_: ! 'RESULT = C_ASSOCIATED(c_prt_1[, c_ptr_2])' _Arguments_: C_PTR_1 Scalar of the type 'C_PTR' or 'C_FUNPTR'. --- 5936,5942 ---- Inquiry function _Syntax_: ! 'RESULT = C_ASSOCIATED(c_ptr_1[, c_ptr_2])' _Arguments_: C_PTR_1 Scalar of the type 'C_PTR' or 'C_FUNPTR'. diff -Nrcpad gcc-4.9.2/gcc/fortran/gfortranspec.c gcc-4.9.3/gcc/fortran/gfortranspec.c *** gcc-4.9.2/gcc/fortran/gfortranspec.c Thu Jun 5 14:28:23 2014 --- gcc-4.9.3/gcc/fortran/gfortranspec.c Fri Jun 26 17:47:23 2015 *************** lang_specific_driver (struct cl_decoded_ *** 276,282 **** case OPT__version: printf ("GNU Fortran %s%s\n", pkgversion_string, version_string); ! printf ("Copyright %s 2014 Free Software Foundation, Inc.\n\n", _("(C)")); printf (_("GNU Fortran comes with NO WARRANTY, to the extent permitted by law.\n\ You may redistribute copies of GNU Fortran\n\ --- 276,282 ---- case OPT__version: printf ("GNU Fortran %s%s\n", pkgversion_string, version_string); ! printf ("Copyright %s 2015 Free Software Foundation, Inc.\n\n", _("(C)")); printf (_("GNU Fortran comes with NO WARRANTY, to the extent permitted by law.\n\ You may redistribute copies of GNU Fortran\n\ diff -Nrcpad gcc-4.9.2/gcc/fortran/interface.c gcc-4.9.3/gcc/fortran/interface.c *** gcc-4.9.2/gcc/fortran/interface.c Wed Sep 3 16:04:27 2014 --- gcc-4.9.3/gcc/fortran/interface.c Tue Jan 27 19:20:04 2015 *************** check_dummy_characteristics (gfc_symbol *** 1204,1211 **** return false; } if (s1->as->type == AS_EXPLICIT) ! for (i = 0; i < s1->as->rank + s1->as->corank; i++) { shape1 = gfc_subtract (gfc_copy_expr (s1->as->upper[i]), gfc_copy_expr (s1->as->lower[i])); --- 1204,1218 ---- return false; } + if (s1->as->corank != s2->as->corank) + { + snprintf (errmsg, err_len, "Corank mismatch in argument '%s' (%i/%i)", + s1->name, s1->as->corank, s2->as->corank); + return false; + } + if (s1->as->type == AS_EXPLICIT) ! for (i = 0; i < s1->as->rank + MAX (0, s1->as->corank-1); i++) { shape1 = gfc_subtract (gfc_copy_expr (s1->as->upper[i]), gfc_copy_expr (s1->as->lower[i])); *************** check_dummy_characteristics (gfc_symbol *** 1219,1226 **** case -1: case 1: case -3: ! snprintf (errmsg, err_len, "Shape mismatch in dimension %i of " ! "argument '%s'", i + 1, s1->name); return false; case -2: --- 1226,1237 ---- case -1: case 1: case -3: ! if (i < s1->as->rank) ! snprintf (errmsg, err_len, "Shape mismatch in dimension %i of" ! " argument '%s'", i + 1, s1->name); ! else ! snprintf (errmsg, err_len, "Shape mismatch in codimension %i " ! "of argument '%s'", i - s1->as->rank + 1, s1->name); return false; case -2: *************** gfc_extend_expr (gfc_expr *e) *** 3675,3680 **** --- 3686,3693 ---- gfc_user_op *uop; gfc_intrinsic_op i; const char *gname; + gfc_typebound_proc* tbo; + gfc_expr* tb_base; sym = NULL; *************** gfc_extend_expr (gfc_expr *e) *** 3691,3696 **** --- 3704,3751 ---- i = fold_unary_intrinsic (e->value.op.op); + /* See if we find a matching type-bound operator. */ + if (i == INTRINSIC_USER) + tbo = matching_typebound_op (&tb_base, actual, + i, e->value.op.uop->name, &gname); + else + switch (i) + { + #define CHECK_OS_COMPARISON(comp) \ + case INTRINSIC_##comp: \ + case INTRINSIC_##comp##_OS: \ + tbo = matching_typebound_op (&tb_base, actual, \ + INTRINSIC_##comp, NULL, &gname); \ + if (!tbo) \ + tbo = matching_typebound_op (&tb_base, actual, \ + INTRINSIC_##comp##_OS, NULL, &gname); \ + break; + CHECK_OS_COMPARISON(EQ) + CHECK_OS_COMPARISON(NE) + CHECK_OS_COMPARISON(GT) + CHECK_OS_COMPARISON(GE) + CHECK_OS_COMPARISON(LT) + CHECK_OS_COMPARISON(LE) + #undef CHECK_OS_COMPARISON + + default: + tbo = matching_typebound_op (&tb_base, actual, i, NULL, &gname); + break; + } + + /* If there is a matching typebound-operator, replace the expression with + a call to it and succeed. */ + if (tbo) + { + gcc_assert (tb_base); + build_compcall_for_operator (e, actual, tb_base, tbo, gname); + + if (!gfc_resolve_expr (e)) + return MATCH_ERROR; + else + return MATCH_YES; + } + if (i == INTRINSIC_USER) { for (ns = gfc_current_ns; ns; ns = ns->parent) *************** gfc_extend_expr (gfc_expr *e) *** 3741,3798 **** if (sym == NULL) { - gfc_typebound_proc* tbo; - gfc_expr* tb_base; - - /* See if we find a matching type-bound operator. */ - if (i == INTRINSIC_USER) - tbo = matching_typebound_op (&tb_base, actual, - i, e->value.op.uop->name, &gname); - else - switch (i) - { - #define CHECK_OS_COMPARISON(comp) \ - case INTRINSIC_##comp: \ - case INTRINSIC_##comp##_OS: \ - tbo = matching_typebound_op (&tb_base, actual, \ - INTRINSIC_##comp, NULL, &gname); \ - if (!tbo) \ - tbo = matching_typebound_op (&tb_base, actual, \ - INTRINSIC_##comp##_OS, NULL, &gname); \ - break; - CHECK_OS_COMPARISON(EQ) - CHECK_OS_COMPARISON(NE) - CHECK_OS_COMPARISON(GT) - CHECK_OS_COMPARISON(GE) - CHECK_OS_COMPARISON(LT) - CHECK_OS_COMPARISON(LE) - #undef CHECK_OS_COMPARISON - - default: - tbo = matching_typebound_op (&tb_base, actual, i, NULL, &gname); - break; - } - - /* If there is a matching typebound-operator, replace the expression with - a call to it and succeed. */ - if (tbo) - { - bool result; - - gcc_assert (tb_base); - build_compcall_for_operator (e, actual, tb_base, tbo, gname); - - result = gfc_resolve_expr (e); - if (!result) - return MATCH_ERROR; - - return MATCH_YES; - } - /* Don't use gfc_free_actual_arglist(). */ free (actual->next); free (actual); - return MATCH_NO; } --- 3796,3804 ---- diff -Nrcpad gcc-4.9.2/gcc/fortran/intrinsic.texi gcc-4.9.3/gcc/fortran/intrinsic.texi *** gcc-4.9.2/gcc/fortran/intrinsic.texi Mon Jun 30 16:35:48 2014 --- gcc-4.9.3/gcc/fortran/intrinsic.texi Tue Feb 3 21:56:02 2015 *************** end program test_btest *** 2231,2237 **** @table @asis @item @emph{Description}: ! @code{C_ASSOCIATED(c_prt_1[, c_ptr_2])} determines the status of the C pointer @var{c_ptr_1} or if @var{c_ptr_1} is associated with the target @var{c_ptr_2}. @item @emph{Standard}: --- 2231,2237 ---- @table @asis @item @emph{Description}: ! @code{C_ASSOCIATED(c_ptr_1[, c_ptr_2])} determines the status of the C pointer @var{c_ptr_1} or if @var{c_ptr_1} is associated with the target @var{c_ptr_2}. @item @emph{Standard}: *************** Fortran 2003 and later *** 2241,2247 **** Inquiry function @item @emph{Syntax}: ! @code{RESULT = C_ASSOCIATED(c_prt_1[, c_ptr_2])} @item @emph{Arguments}: @multitable @columnfractions .15 .70 --- 2241,2247 ---- Inquiry function @item @emph{Syntax}: ! @code{RESULT = C_ASSOCIATED(c_ptr_1[, c_ptr_2])} @item @emph{Arguments}: @multitable @columnfractions .15 .70 diff -Nrcpad gcc-4.9.2/gcc/fortran/module.c gcc-4.9.3/gcc/fortran/module.c *** gcc-4.9.2/gcc/fortran/module.c Fri Aug 29 20:49:16 2014 --- gcc-4.9.3/gcc/fortran/module.c Fri Feb 13 18:48:35 2015 *************** read_cleanup (pointer_info *p) *** 4849,4867 **** /* It is not quite enough to check for ambiguity in the symbols by the loaded symbol and the new symbol not being identical. */ static bool ! check_for_ambiguous (gfc_symbol *st_sym, pointer_info *info) { gfc_symbol *rsym; module_locus locus; symbol_attribute attr; ! if (gfc_current_ns->proc_name && st_sym->name == gfc_current_ns->proc_name->name) { gfc_error ("'%s' of module '%s', imported at %C, is also the name of the " ! "current program unit", st_sym->name, module_name); return true; } rsym = info->u.rsym.sym; if (st_sym == rsym) return false; --- 4849,4869 ---- /* It is not quite enough to check for ambiguity in the symbols by the loaded symbol and the new symbol not being identical. */ static bool ! check_for_ambiguous (gfc_symtree *st, pointer_info *info) { gfc_symbol *rsym; module_locus locus; symbol_attribute attr; + gfc_symbol *st_sym; ! if (gfc_current_ns->proc_name && st->name == gfc_current_ns->proc_name->name) { gfc_error ("'%s' of module '%s', imported at %C, is also the name of the " ! "current program unit", st->name, module_name); return true; } + st_sym = st->n.sym; rsym = info->u.rsym.sym; if (st_sym == rsym) return false; *************** read_module (void) *** 5093,5099 **** if (st != NULL) { /* Check for ambiguous symbols. */ ! if (check_for_ambiguous (st->n.sym, info)) st->ambiguous = 1; else info->u.rsym.symtree = st; --- 5095,5101 ---- if (st != NULL) { /* Check for ambiguous symbols. */ ! if (check_for_ambiguous (st, info)) st->ambiguous = 1; else info->u.rsym.symtree = st; diff -Nrcpad gcc-4.9.2/gcc/fortran/resolve.c gcc-4.9.3/gcc/fortran/resolve.c *** gcc-4.9.2/gcc/fortran/resolve.c Mon Jun 30 16:35:48 2014 --- gcc-4.9.3/gcc/fortran/resolve.c Thu Mar 12 16:08:48 2015 *************** resolve_actual_arglist (gfc_actual_argli *** 1815,1821 **** && sym->ns->proc_name->attr.flavor != FL_MODULE) { if (!gfc_notify_std (GFC_STD_F2008, "Internal procedure '%s' is" ! " used as actual argument at %L", sym->name, &e->where)) goto cleanup; } --- 1815,1821 ---- && sym->ns->proc_name->attr.flavor != FL_MODULE) { if (!gfc_notify_std (GFC_STD_F2008, "Internal procedure '%s' is" ! " used as actual argument at %L", sym->name, &e->where)) goto cleanup; } *************** resolve_global_procedure (gfc_symbol *sy *** 2435,2441 **** if (!gfc_compare_interfaces (sym, def_sym, sym->name, 0, 1, reason, sizeof(reason), NULL, NULL)) ! { gfc_error ("Interface mismatch in global procedure '%s' at %L: %s ", sym->name, &sym->declared_at, reason); goto done; --- 2435,2441 ---- if (!gfc_compare_interfaces (sym, def_sym, sym->name, 0, 1, reason, sizeof(reason), NULL, NULL)) ! { gfc_error ("Interface mismatch in global procedure '%s' at %L: %s ", sym->name, &sym->declared_at, reason); goto done; *************** resolve_global_procedure (gfc_symbol *sy *** 2449,2455 **** if (sym->attr.if_source != IFSRC_IFBODY) gfc_procedure_use (def_sym, actual, where); } ! done: gfc_errors_to_warnings (0); --- 2449,2455 ---- if (sym->attr.if_source != IFSRC_IFBODY) gfc_procedure_use (def_sym, actual, where); } ! done: gfc_errors_to_warnings (0); *************** generic: *** 2551,2557 **** if (intr) { ! if (!gfc_convert_to_structure_constructor (expr, intr->sym, NULL, NULL, false)) return false; return resolve_structure_cons (expr, 0); --- 2551,2557 ---- if (intr) { ! if (!gfc_convert_to_structure_constructor (expr, intr->sym, NULL, NULL, false)) return false; return resolve_structure_cons (expr, 0); *************** resolve_function (gfc_expr *expr) *** 2853,2859 **** no_formal_args = sym && is_external_proc (sym) && gfc_sym_get_dummy_args (sym) == NULL; ! if (!resolve_actual_arglist (expr->value.function.actual, p, no_formal_args)) { inquiry_argument = false; --- 2853,2859 ---- no_formal_args = sym && is_external_proc (sym) && gfc_sym_get_dummy_args (sym) == NULL; ! if (!resolve_actual_arglist (expr->value.function.actual, p, no_formal_args)) { inquiry_argument = false; *************** gfc_resolve_index_1 (gfc_expr *index, in *** 4122,4128 **** } if (index->ts.type == BT_REAL) ! if (!gfc_notify_std (GFC_STD_LEGACY, "REAL array index at %L", &index->where)) return false; --- 4122,4128 ---- } if (index->ts.type == BT_REAL) ! if (!gfc_notify_std (GFC_STD_LEGACY, "REAL array index at %L", &index->where)) return false; *************** success: *** 5590,5596 **** /* Resolve a call to a type-bound subroutine. */ static bool ! resolve_typebound_call (gfc_code* c, const char **name) { gfc_actual_arglist* newactual; gfc_symtree* target; --- 5590,5596 ---- /* Resolve a call to a type-bound subroutine. */ static bool ! resolve_typebound_call (gfc_code* c, const char **name, bool *overridable) { gfc_actual_arglist* newactual; gfc_symtree* target; *************** resolve_typebound_call (gfc_code* c, con *** 5614,5619 **** --- 5614,5623 ---- if (!resolve_typebound_generic_call (c->expr1, name)) return false; + /* Pass along the NON_OVERRIDABLE attribute of the specific TBP. */ + if (overridable) + *overridable = !c->expr1->value.compcall.tbp->non_overridable; + /* Transform into an ordinary EXEC_CALL for now. */ if (!resolve_typebound_static (c->expr1, &target, &newactual)) *************** resolve_typebound_function (gfc_expr* e) *** 5778,5784 **** /* Get the CLASS declared type. */ declared = get_declared_from_expr (&class_ref, &new_ref, e, true); ! if (!resolve_fl_derived (declared)) return false; --- 5782,5788 ---- /* Get the CLASS declared type. */ declared = get_declared_from_expr (&class_ref, &new_ref, e, true); ! if (!resolve_fl_derived (declared)) return false; *************** resolve_typebound_subroutine (gfc_code * *** 5873,5879 **** if (c->ts.u.derived == NULL) c->ts.u.derived = gfc_find_derived_vtab (declared); ! if (!resolve_typebound_call (code, &name)) return false; /* Use the generic name if it is there. */ --- 5877,5883 ---- if (c->ts.u.derived == NULL) c->ts.u.derived = gfc_find_derived_vtab (declared); ! if (!resolve_typebound_call (code, &name, NULL)) return false; /* Use the generic name if it is there. */ *************** resolve_typebound_subroutine (gfc_code * *** 5905,5911 **** } if (st == NULL) ! return resolve_typebound_call (code, NULL); if (!resolve_ref (code->expr1)) return false; --- 5909,5915 ---- } if (st == NULL) ! return resolve_typebound_call (code, NULL, NULL); if (!resolve_ref (code->expr1)) return false; *************** resolve_typebound_subroutine (gfc_code * *** 5918,5927 **** || (!class_ref && st->n.sym->ts.type != BT_CLASS)) { gfc_free_ref_list (new_ref); ! return resolve_typebound_call (code, NULL); } ! if (!resolve_typebound_call (code, &name)) { gfc_free_ref_list (new_ref); return false; --- 5922,5931 ---- || (!class_ref && st->n.sym->ts.type != BT_CLASS)) { gfc_free_ref_list (new_ref); ! return resolve_typebound_call (code, NULL, NULL); } ! if (!resolve_typebound_call (code, &name, &overridable)) { gfc_free_ref_list (new_ref); return false; *************** resolve_ppc_call (gfc_code* c) *** 5978,5985 **** c->ext.actual = c->expr1->value.compcall.actual; ! if (!resolve_actual_arglist (c->ext.actual, comp->attr.proc, ! !(comp->ts.interface && comp->ts.interface->formal))) return false; --- 5982,5989 ---- c->ext.actual = c->expr1->value.compcall.actual; ! if (!resolve_actual_arglist (c->ext.actual, comp->attr.proc, ! !(comp->ts.interface && comp->ts.interface->formal))) return false; *************** resolve_expr_ppc (gfc_expr* e) *** 6013,6020 **** if (!resolve_ref (e)) return false; ! if (!resolve_actual_arglist (e->value.function.actual, comp->attr.proc, ! !(comp->ts.interface && comp->ts.interface->formal))) return false; --- 6017,6024 ---- if (!resolve_ref (e)) return false; ! if (!resolve_actual_arglist (e->value.function.actual, comp->attr.proc, ! !(comp->ts.interface && comp->ts.interface->formal))) return false; *************** gfc_resolve_iterator (gfc_iterator *iter *** 6226,6244 **** if (!gfc_resolve_iterator_expr (iter->var, real_ok, "Loop variable")) return false; ! if (!gfc_check_vardef_context (iter->var, false, false, own_scope, _("iterator variable"))) return false; ! if (!gfc_resolve_iterator_expr (iter->start, real_ok, "Start expression in DO loop")) return false; ! if (!gfc_resolve_iterator_expr (iter->end, real_ok, "End expression in DO loop")) return false; ! if (!gfc_resolve_iterator_expr (iter->step, real_ok, "Step expression in DO loop")) return false; --- 6230,6248 ---- if (!gfc_resolve_iterator_expr (iter->var, real_ok, "Loop variable")) return false; ! if (!gfc_check_vardef_context (iter->var, false, false, own_scope, _("iterator variable"))) return false; ! if (!gfc_resolve_iterator_expr (iter->start, real_ok, "Start expression in DO loop")) return false; ! if (!gfc_resolve_iterator_expr (iter->end, real_ok, "End expression in DO loop")) return false; ! if (!gfc_resolve_iterator_expr (iter->step, real_ok, "Step expression in DO loop")) return false; *************** resolve_deallocate_expr (gfc_expr *e) *** 6496,6505 **** } if (pointer ! && !gfc_check_vardef_context (e, true, true, false, _("DEALLOCATE object"))) return false; ! if (!gfc_check_vardef_context (e, false, true, false, _("DEALLOCATE object"))) return false; --- 6500,6509 ---- } if (pointer ! && !gfc_check_vardef_context (e, true, true, false, _("DEALLOCATE object"))) return false; ! if (!gfc_check_vardef_context (e, false, true, false, _("DEALLOCATE object"))) return false; *************** resolve_allocate_expr (gfc_expr *e, gfc_ *** 6849,6858 **** e2 = remove_last_array_ref (e); t = true; if (t && pointer) ! t = gfc_check_vardef_context (e2, true, true, false, _("ALLOCATE object")); if (t) ! t = gfc_check_vardef_context (e2, false, true, false, _("ALLOCATE object")); gfc_free_expr (e2); if (!t) --- 6853,6862 ---- e2 = remove_last_array_ref (e); t = true; if (t && pointer) ! t = gfc_check_vardef_context (e2, true, true, false, _("ALLOCATE object")); if (t) ! t = gfc_check_vardef_context (e2, false, true, false, _("ALLOCATE object")); gfc_free_expr (e2); if (!t) *************** resolve_allocate_expr (gfc_expr *e, gfc_ *** 6895,6903 **** { /* Default initialization via MOLD (non-polymorphic). */ gfc_expr *rhs = gfc_default_initializer (&code->expr3->ts); ! gfc_resolve_expr (rhs); ! gfc_free_expr (code->expr3); ! code->expr3 = rhs; } if (e->ts.type == BT_CLASS && !unlimited && !UNLIMITED_POLY (code->expr3)) --- 6899,6910 ---- { /* Default initialization via MOLD (non-polymorphic). */ gfc_expr *rhs = gfc_default_initializer (&code->expr3->ts); ! if (rhs != NULL) ! { ! gfc_resolve_expr (rhs); ! gfc_free_expr (code->expr3); ! code->expr3 = rhs; ! } } if (e->ts.type == BT_CLASS && !unlimited && !UNLIMITED_POLY (code->expr3)) *************** resolve_allocate_deallocate (gfc_code *c *** 7051,7057 **** /* Check the stat variable. */ if (stat) { ! gfc_check_vardef_context (stat, false, false, false, _("STAT variable")); if ((stat->ts.type != BT_INTEGER --- 7058,7064 ---- /* Check the stat variable. */ if (stat) { ! gfc_check_vardef_context (stat, false, false, false, _("STAT variable")); if ((stat->ts.type != BT_INTEGER *************** resolve_transfer (gfc_code *code) *** 8264,8270 **** code->ext.dt may be NULL if the TRANSFER is related to an INQUIRE statement -- but in this case, we are not reading, either. */ if (code->ext.dt && code->ext.dt->dt_io_kind->value.iokind == M_READ ! && !gfc_check_vardef_context (exp, false, false, false, _("item in READ"))) return; --- 8271,8277 ---- code->ext.dt may be NULL if the TRANSFER is related to an INQUIRE statement -- but in this case, we are not reading, either. */ if (code->ext.dt && code->ext.dt->dt_io_kind->value.iokind == M_READ ! && !gfc_check_vardef_context (exp, false, false, false, _("item in READ"))) return; *************** resolve_lock_unlock (gfc_code *code) *** 8394,8400 **** &code->expr2->where); if (code->expr2 ! && !gfc_check_vardef_context (code->expr2, false, false, false, _("STAT variable"))) return; --- 8401,8407 ---- &code->expr2->where); if (code->expr2 ! && !gfc_check_vardef_context (code->expr2, false, false, false, _("STAT variable"))) return; *************** resolve_lock_unlock (gfc_code *code) *** 8406,8412 **** &code->expr3->where); if (code->expr3 ! && !gfc_check_vardef_context (code->expr3, false, false, false, _("ERRMSG variable"))) return; --- 8413,8419 ---- &code->expr3->where); if (code->expr3 ! && !gfc_check_vardef_context (code->expr3, false, false, false, _("ERRMSG variable"))) return; *************** resolve_lock_unlock (gfc_code *code) *** 8418,8424 **** "variable", &code->expr4->where); if (code->expr4 ! && !gfc_check_vardef_context (code->expr4, false, false, false, _("ACQUIRED_LOCK variable"))) return; } --- 8425,8431 ---- "variable", &code->expr4->where); if (code->expr4 ! && !gfc_check_vardef_context (code->expr4, false, false, false, _("ACQUIRED_LOCK variable"))) return; } *************** resolve_ordinary_assign (gfc_code *code, *** 9077,9083 **** if (rhs->is_boz && !gfc_notify_std (GFC_STD_GNU, "BOZ literal at %L outside " ! "a DATA statement and outside INT/REAL/DBLE/CMPLX", &code->loc)) return false; --- 9084,9090 ---- if (rhs->is_boz && !gfc_notify_std (GFC_STD_GNU, "BOZ literal at %L outside " ! "a DATA statement and outside INT/REAL/DBLE/CMPLX", &code->loc)) return false; *************** gfc_resolve_code (gfc_code *code, gfc_na *** 9878,9884 **** if (!t) break; ! if (!gfc_check_vardef_context (code->expr1, false, false, false, _("assignment"))) break; --- 9885,9891 ---- if (!t) break; ! if (!gfc_check_vardef_context (code->expr1, false, false, false, _("assignment"))) break; *************** resolve_fl_var_and_proc (gfc_symbol *sym *** 10686,10692 **** return false; } else if (!gfc_notify_std (GFC_STD_F2003, "Scalar object " ! "'%s' at %L may not be ALLOCATABLE", sym->name, &sym->declared_at)) return false; } --- 10693,10699 ---- return false; } else if (!gfc_notify_std (GFC_STD_F2003, "Scalar object " ! "'%s' at %L may not be ALLOCATABLE", sym->name, &sym->declared_at)) return false; } *************** resolve_fl_procedure (gfc_symbol *sym, i *** 11017,11024 **** && !gfc_check_symbol_access (arg->sym->ts.u.derived) && !gfc_notify_std (GFC_STD_F2003, "'%s' is of a PRIVATE type " "and cannot be a dummy argument" ! " of '%s', which is PUBLIC at %L", ! arg->sym->name, sym->name, &sym->declared_at)) { /* Stop this message from recurring. */ --- 11024,11031 ---- && !gfc_check_symbol_access (arg->sym->ts.u.derived) && !gfc_notify_std (GFC_STD_F2003, "'%s' is of a PRIVATE type " "and cannot be a dummy argument" ! " of '%s', which is PUBLIC at %L", ! arg->sym->name, sym->name, &sym->declared_at)) { /* Stop this message from recurring. */ *************** resolve_fl_procedure (gfc_symbol *sym, i *** 11040,11047 **** && !gfc_notify_std (GFC_STD_F2003, "Procedure '%s' in " "PUBLIC interface '%s' at %L " "takes dummy arguments of '%s' which " ! "is PRIVATE", iface->sym->name, ! sym->name, &iface->sym->declared_at, gfc_typename(&arg->sym->ts))) { /* Stop this message from recurring. */ --- 11047,11054 ---- && !gfc_notify_std (GFC_STD_F2003, "Procedure '%s' in " "PUBLIC interface '%s' at %L " "takes dummy arguments of '%s' which " ! "is PRIVATE", iface->sym->name, ! sym->name, &iface->sym->declared_at, gfc_typename(&arg->sym->ts))) { /* Stop this message from recurring. */ *************** resolve_fl_procedure (gfc_symbol *sym, i *** 11064,11071 **** && !gfc_notify_std (GFC_STD_F2003, "Procedure '%s' in " "PUBLIC interface '%s' at %L takes " "dummy arguments of '%s' which is " ! "PRIVATE", iface->sym->name, ! sym->name, &iface->sym->declared_at, gfc_typename(&arg->sym->ts))) { /* Stop this message from recurring. */ --- 11071,11078 ---- && !gfc_notify_std (GFC_STD_F2003, "Procedure '%s' in " "PUBLIC interface '%s' at %L takes " "dummy arguments of '%s' which is " ! "PRIVATE", iface->sym->name, ! sym->name, &iface->sym->declared_at, gfc_typename(&arg->sym->ts))) { /* Stop this message from recurring. */ *************** resolve_fl_procedure (gfc_symbol *sym, i *** 11176,11182 **** gfc_formal_arglist *curr_arg; int has_non_interop_arg = 0; ! if (!verify_bind_c_sym (sym, &(sym->ts), sym->attr.in_common, sym->common_block)) { /* Clear these to prevent looking at them again if there was an --- 11183,11189 ---- gfc_formal_arglist *curr_arg; int has_non_interop_arg = 0; ! if (!verify_bind_c_sym (sym, &(sym->ts), sym->attr.in_common, sym->common_block)) { /* Clear these to prevent looking at them again if there was an *************** resolve_typebound_procedures (gfc_symbol *** 12019,12025 **** for (op = 0; op != GFC_INTRINSIC_OPS; ++op) { gfc_typebound_proc* p = derived->f2k_derived->tb_op[op]; ! if (p && !resolve_typebound_intrinsic_op (derived, (gfc_intrinsic_op)op, p)) resolve_bindings_result = false; } --- 12026,12032 ---- for (op = 0; op != GFC_INTRINSIC_OPS; ++op) { gfc_typebound_proc* p = derived->f2k_derived->tb_op[op]; ! if (p && !resolve_typebound_intrinsic_op (derived, (gfc_intrinsic_op)op, p)) resolve_bindings_result = false; } *************** resolve_fl_derived0 (gfc_symbol *sym) *** 12471,12477 **** && !gfc_check_symbol_access (c->ts.u.derived) && !gfc_notify_std (GFC_STD_F2003, "the component '%s' is a " "PRIVATE type and cannot be a component of " ! "'%s', which is PUBLIC at %L", c->name, sym->name, &sym->declared_at)) return false; --- 12478,12484 ---- && !gfc_check_symbol_access (c->ts.u.derived) && !gfc_notify_std (GFC_STD_F2003, "the component '%s' is a " "PRIVATE type and cannot be a component of " ! "'%s', which is PUBLIC at %L", c->name, sym->name, &sym->declared_at)) return false; *************** resolve_fl_derived0 (gfc_symbol *sym) *** 12545,12552 **** && sym != c->ts.u.derived) add_dt_to_dt_list (c->ts.u.derived); ! if (!gfc_resolve_array_spec (c->as, ! !(c->attr.pointer || c->attr.proc_pointer || c->attr.allocatable))) return false; --- 12552,12559 ---- && sym != c->ts.u.derived) add_dt_to_dt_list (c->ts.u.derived); ! if (!gfc_resolve_array_spec (c->as, ! !(c->attr.pointer || c->attr.proc_pointer || c->attr.allocatable))) return false; *************** resolve_fl_derived (gfc_symbol *sym) *** 12595,12607 **** || gen_dt->generic->sym->module != gen_dt->generic->next->sym->module) && !gfc_notify_std (GFC_STD_F2003, "Generic name '%s' of function " "'%s' at %L being the same name as derived " ! "type at %L", sym->name, ! gen_dt->generic->sym == sym ! ? gen_dt->generic->next->sym->name ! : gen_dt->generic->sym->name, ! gen_dt->generic->sym == sym ! ? &gen_dt->generic->next->sym->declared_at ! : &gen_dt->generic->sym->declared_at, &sym->declared_at)) return false; --- 12602,12614 ---- || gen_dt->generic->sym->module != gen_dt->generic->next->sym->module) && !gfc_notify_std (GFC_STD_F2003, "Generic name '%s' of function " "'%s' at %L being the same name as derived " ! "type at %L", sym->name, ! gen_dt->generic->sym == sym ! ? gen_dt->generic->next->sym->name ! : gen_dt->generic->sym->name, ! gen_dt->generic->sym == sym ! ? &gen_dt->generic->next->sym->declared_at ! : &gen_dt->generic->sym->declared_at, &sym->declared_at)) return false; *************** resolve_fl_namelist (gfc_symbol *sym) *** 12656,12668 **** if (nl->sym->as && nl->sym->as->type == AS_ASSUMED_SHAPE && !gfc_notify_std (GFC_STD_F2003, "NAMELIST array object '%s' " ! "with assumed shape in namelist '%s' at %L", nl->sym->name, sym->name, &sym->declared_at)) return false; if (is_non_constant_shape_array (nl->sym) && !gfc_notify_std (GFC_STD_F2003, "NAMELIST array object '%s' " ! "with nonconstant shape in namelist '%s' at %L", nl->sym->name, sym->name, &sym->declared_at)) return false; --- 12663,12675 ---- if (nl->sym->as && nl->sym->as->type == AS_ASSUMED_SHAPE && !gfc_notify_std (GFC_STD_F2003, "NAMELIST array object '%s' " ! "with assumed shape in namelist '%s' at %L", nl->sym->name, sym->name, &sym->declared_at)) return false; if (is_non_constant_shape_array (nl->sym) && !gfc_notify_std (GFC_STD_F2003, "NAMELIST array object '%s' " ! "with nonconstant shape in namelist '%s' at %L", nl->sym->name, sym->name, &sym->declared_at)) return false; *************** resolve_fl_namelist (gfc_symbol *sym) *** 12671,12677 **** || !gfc_is_constant_expr (nl->sym->ts.u.cl->length)) && !gfc_notify_std (GFC_STD_F2003, "NAMELIST object '%s' with " "nonconstant character length in " ! "namelist '%s' at %L", nl->sym->name, sym->name, &sym->declared_at)) return false; --- 12678,12684 ---- || !gfc_is_constant_expr (nl->sym->ts.u.cl->length)) && !gfc_notify_std (GFC_STD_F2003, "NAMELIST object '%s' with " "nonconstant character length in " ! "namelist '%s' at %L", nl->sym->name, sym->name, &sym->declared_at)) return false; *************** resolve_fl_namelist (gfc_symbol *sym) *** 12691,12697 **** { if (!gfc_notify_std (GFC_STD_F2003, "NAMELIST object '%s' in " "namelist '%s' at %L with ALLOCATABLE " ! "or POINTER components", nl->sym->name, sym->name, &sym->declared_at)) return false; --- 12698,12704 ---- { if (!gfc_notify_std (GFC_STD_F2003, "NAMELIST object '%s' in " "namelist '%s' at %L with ALLOCATABLE " ! "or POINTER components", nl->sym->name, sym->name, &sym->declared_at)) return false; *************** resolve_symbol (gfc_symbol *sym) *** 12857,12866 **** { this_symtree = gfc_find_symtree (gfc_current_ns->sym_root, sym->name); ! gfc_release_symbol (sym); ! symtree->n.sym->refs++; ! this_symtree->n.sym = symtree->n.sym; ! return; } } --- 12864,12876 ---- { this_symtree = gfc_find_symtree (gfc_current_ns->sym_root, sym->name); ! if (this_symtree->n.sym == sym) ! { ! symtree->n.sym->refs++; ! gfc_release_symbol (sym); ! this_symtree->n.sym = symtree->n.sym; ! return; ! } } } *************** resolve_symbol (gfc_symbol *sym) *** 13261,13270 **** && gfc_check_symbol_access (sym) && !gfc_check_symbol_access (sym->ts.u.derived) && !gfc_notify_std (GFC_STD_F2003, "PUBLIC %s '%s' at %L of PRIVATE " ! "derived type '%s'", ! (sym->attr.flavor == FL_PARAMETER) ! ? "parameter" : "variable", ! sym->name, &sym->declared_at, sym->ts.u.derived->name)) return; --- 13271,13280 ---- && gfc_check_symbol_access (sym) && !gfc_check_symbol_access (sym->ts.u.derived) && !gfc_notify_std (GFC_STD_F2003, "PUBLIC %s '%s' at %L of PRIVATE " ! "derived type '%s'", ! (sym->attr.flavor == FL_PARAMETER) ! ? "parameter" : "variable", ! sym->name, &sym->declared_at, sym->ts.u.derived->name)) return; *************** resolve_symbol (gfc_symbol *sym) *** 13407,13421 **** if (!gfc_logical_kinds[i].c_bool && sym->attr.dummy && !gfc_notify_std (GFC_STD_GNU, "LOGICAL dummy argument '%s' at " "%L with non-C_Bool kind in BIND(C) procedure " ! "'%s'", sym->name, &sym->declared_at, sym->ns->proc_name->name)) return; else if (!gfc_logical_kinds[i].c_bool && !gfc_notify_std (GFC_STD_GNU, "LOGICAL result variable " "'%s' at %L with non-C_Bool kind in " ! "BIND(C) procedure '%s'", sym->name, ! &sym->declared_at, ! sym->attr.function ? sym->name : sym->ns->proc_name->name)) return; } --- 13417,13431 ---- if (!gfc_logical_kinds[i].c_bool && sym->attr.dummy && !gfc_notify_std (GFC_STD_GNU, "LOGICAL dummy argument '%s' at " "%L with non-C_Bool kind in BIND(C) procedure " ! "'%s'", sym->name, &sym->declared_at, sym->ns->proc_name->name)) return; else if (!gfc_logical_kinds[i].c_bool && !gfc_notify_std (GFC_STD_GNU, "LOGICAL result variable " "'%s' at %L with non-C_Bool kind in " ! "BIND(C) procedure '%s'", sym->name, ! &sym->declared_at, ! sym->attr.function ? sym->name : sym->ns->proc_name->name)) return; } *************** resolve_types (gfc_namespace *ns) *** 14618,14624 **** unsigned letter; for (letter = 0; letter != GFC_LETTERS; ++letter) if (ns->set_flag[letter] ! && !resolve_typespec_used (&ns->default_type[letter], &ns->implicit_loc[letter], NULL)) return; } --- 14628,14634 ---- unsigned letter; for (letter = 0; letter != GFC_LETTERS; ++letter) if (ns->set_flag[letter] ! && !resolve_typespec_used (&ns->default_type[letter], &ns->implicit_loc[letter], NULL)) return; } diff -Nrcpad gcc-4.9.2/gcc/fortran/simplify.c gcc-4.9.3/gcc/fortran/simplify.c *** gcc-4.9.2/gcc/fortran/simplify.c Sun Aug 10 11:25:24 2014 --- gcc-4.9.3/gcc/fortran/simplify.c Mon Mar 23 11:58:49 2015 *************** gfc_simplify_len (gfc_expr *e, gfc_expr *** 3690,3695 **** --- 3690,3703 ---- mpz_set (result->value.integer, e->ts.u.cl->length->value.integer); return range_check (result, "LEN"); } + else if (e->expr_type == EXPR_VARIABLE && e->ts.type == BT_CHARACTER + && e->symtree->n.sym + && e->symtree->n.sym->assoc && e->symtree->n.sym->assoc->target + && e->symtree->n.sym->assoc->target->ts.type == BT_DERIVED) + /* The expression in assoc->target points to a ref to the _data component + of the unlimited polymorphic entity. To get the _len component the last + _data ref needs to be stripped and a ref to the _len component added. */ + return gfc_get_len_component (e->symtree->n.sym->assoc->target); else return NULL; } diff -Nrcpad gcc-4.9.2/gcc/fortran/symbol.c gcc-4.9.3/gcc/fortran/symbol.c *** gcc-4.9.2/gcc/fortran/symbol.c Mon Jun 30 16:35:48 2014 --- gcc-4.9.3/gcc/fortran/symbol.c Tue Apr 14 09:18:15 2015 *************** single_undo_checkpoint_p (void) *** 2747,2754 **** /* Save symbol with the information necessary to back it out. */ ! static void ! save_symbol_data (gfc_symbol *sym) { gfc_symbol *s; unsigned i; --- 2747,2754 ---- /* Save symbol with the information necessary to back it out. */ ! void ! gfc_save_symbol_data (gfc_symbol *sym) { gfc_symbol *s; unsigned i; *************** gfc_get_sym_tree (const char *name, gfc_ *** 2849,2855 **** p->mark = 1; /* Copy in case this symbol is changed. */ ! save_symbol_data (p); } *result = st; --- 2849,2855 ---- p->mark = 1; /* Copy in case this symbol is changed. */ ! gfc_save_symbol_data (p); } *result = st; *************** gfc_get_ha_sym_tree (const char *name, g *** 2888,2894 **** if (st != NULL) { ! save_symbol_data (st->n.sym); *result = st; return i; } --- 2888,2894 ---- if (st != NULL) { ! gfc_save_symbol_data (st->n.sym); *result = st; return i; } diff -Nrcpad gcc-4.9.2/gcc/fortran/trans-array.c gcc-4.9.3/gcc/fortran/trans-array.c *** gcc-4.9.2/gcc/fortran/trans-array.c Mon Jun 30 16:35:48 2014 --- gcc-4.9.3/gcc/fortran/trans-array.c Wed Jan 7 22:31:54 2015 *************** gfc_conv_resolve_dependencies (gfc_loopi *** 4350,4355 **** --- 4350,4362 ---- && ss_expr->rank) nDepend = gfc_check_dependency (dest_expr, ss_expr, true); + /* Check for cases like c(:)(1:2) = c(2)(2:3) */ + if (!nDepend && dest_expr->rank > 0 + && dest_expr->ts.type == BT_CHARACTER + && ss_expr->expr_type == EXPR_VARIABLE) + + nDepend = gfc_check_dependency (dest_expr, ss_expr, false); + continue; } diff -Nrcpad gcc-4.9.2/gcc/fortran/trans-decl.c gcc-4.9.3/gcc/fortran/trans-decl.c *** gcc-4.9.2/gcc/fortran/trans-decl.c Mon Jun 30 16:35:48 2014 --- gcc-4.9.3/gcc/fortran/trans-decl.c Wed Jan 14 20:22:47 2015 *************** create_function_arglist (gfc_symbol * sy *** 2262,2269 **** /* Fill in arg stuff. */ DECL_CONTEXT (parm) = fndecl; DECL_ARG_TYPE (parm) = TREE_VALUE (typelist); ! /* All implementation args are read-only. */ ! TREE_READONLY (parm) = 1; if (POINTER_TYPE_P (type) && (!f->sym->attr.proc_pointer && f->sym->attr.flavor != FL_PROCEDURE)) --- 2262,2270 ---- /* Fill in arg stuff. */ DECL_CONTEXT (parm) = fndecl; DECL_ARG_TYPE (parm) = TREE_VALUE (typelist); ! /* All implementation args except for VALUE are read-only. */ ! if (!f->sym->attr.value) ! TREE_READONLY (parm) = 1; if (POINTER_TYPE_P (type) && (!f->sym->attr.proc_pointer && f->sym->attr.flavor != FL_PROCEDURE)) diff -Nrcpad gcc-4.9.2/gcc/fortran/trans-expr.c gcc-4.9.3/gcc/fortran/trans-expr.c *** gcc-4.9.2/gcc/fortran/trans-expr.c Wed Sep 3 16:04:27 2014 --- gcc-4.9.3/gcc/fortran/trans-expr.c Mon Mar 23 11:58:49 2015 *************** gfc_conv_scalar_to_descriptor (gfc_se *s *** 92,97 **** --- 92,98 ---- in future implementations. Use the corresponding APIs. */ #define CLASS_DATA_FIELD 0 #define CLASS_VPTR_FIELD 1 + #define CLASS_LEN_FIELD 2 #define VTABLE_HASH_FIELD 0 #define VTABLE_SIZE_FIELD 1 #define VTABLE_EXTENDS_FIELD 2 *************** gfc_class_vptr_get (tree decl) *** 146,151 **** --- 147,166 ---- } + tree + gfc_class_len_get (tree decl) + { + tree len; + if (POINTER_TYPE_P (TREE_TYPE (decl))) + decl = build_fold_indirect_ref_loc (input_location, decl); + len = gfc_advance_chain (TYPE_FIELDS (TREE_TYPE (decl)), + CLASS_LEN_FIELD); + return fold_build3_loc (input_location, COMPONENT_REF, + TREE_TYPE (len), decl, len, + NULL_TREE); + } + + static tree gfc_vtable_field_get (tree decl, int field) { *************** gfc_conv_intrinsic_to_class (gfc_se *par *** 599,604 **** --- 614,658 ---- } } + /* When the actual arg is a char array, then set the _len component of the + unlimited polymorphic entity, too. */ + if (e->ts.type == BT_CHARACTER) + { + ctree = gfc_class_len_get (var); + /* Start with parmse->string_length because this seems to be set to a + correct value more often. */ + if (parmse->string_length) + gfc_add_modify (&parmse->pre, ctree, parmse->string_length); + /* When the string_length is not yet set, then try the backend_decl of + the cl. */ + else if (e->ts.u.cl->backend_decl) + gfc_add_modify (&parmse->pre, ctree, e->ts.u.cl->backend_decl); + /* If both of the above approaches fail, then try to generate an + expression from the input, which is only feasible currently, when the + expression can be evaluated to a constant one. */ + else + { + /* Try to simplify the expression. */ + gfc_simplify_expr (e, 0); + if (e->expr_type == EXPR_CONSTANT && !e->ts.u.cl->resolved) + { + /* Amazingly all data is present to compute the length of a + constant string, but the expression is not yet there. */ + e->ts.u.cl->length = gfc_get_constant_expr (BT_INTEGER, 4, + &e->where); + mpz_set_ui (e->ts.u.cl->length->value.integer, + e->value.character.length); + gfc_conv_const_charlen (e->ts.u.cl); + e->ts.u.cl->resolved = 1; + gfc_add_modify (&parmse->pre, ctree, e->ts.u.cl->backend_decl); + } + else + { + gfc_error ("Can't compute the length of the char array at %L.", + &e->where); + } + } + } /* Pass the address of the class object. */ parmse->expr = gfc_build_addr_expr (NULL_TREE, var); } *************** gfc_conv_component_ref (gfc_se * se, gfc *** 1657,1666 **** c = ref->u.c.component; ! gcc_assert (c->backend_decl); field = c->backend_decl; ! gcc_assert (TREE_CODE (field) == FIELD_DECL); decl = se->expr; /* Components can correspond to fields of different containing --- 1711,1722 ---- c = ref->u.c.component; ! if (c->backend_decl == NULL_TREE ! && ref->u.c.sym != NULL) ! gfc_get_derived_type (ref->u.c.sym); field = c->backend_decl; ! gcc_assert (field && TREE_CODE (field) == FIELD_DECL); decl = se->expr; /* Components can correspond to fields of different containing *************** gfc_conv_structure (gfc_se * se, gfc_exp *** 6191,6197 **** of EXPR_NULL,... by default, the static nullify is not needed since this is done every time we come into scope. */ if (!c->expr || (cm->attr.allocatable && cm->attr.flavor != FL_PROCEDURE)) ! continue; if (cm->initializer && cm->initializer->expr_type != EXPR_NULL && strcmp (cm->name, "_extends") == 0 --- 6247,6253 ---- of EXPR_NULL,... by default, the static nullify is not needed since this is done every time we come into scope. */ if (!c->expr || (cm->attr.allocatable && cm->attr.flavor != FL_PROCEDURE)) ! continue; if (cm->initializer && cm->initializer->expr_type != EXPR_NULL && strcmp (cm->name, "_extends") == 0 *************** gfc_conv_structure (gfc_se * se, gfc_exp *** 6209,6214 **** --- 6265,6274 ---- val = TYPE_SIZE_UNIT (gfc_get_derived_type (cm->ts.u.derived)); CONSTRUCTOR_APPEND_ELT (v, cm->backend_decl, val); } + else if (cm->ts.type == BT_INTEGER && strcmp (cm->name, "_len") == 0) + CONSTRUCTOR_APPEND_ELT (v, cm->backend_decl, + fold_convert (TREE_TYPE (cm->backend_decl), + integer_zero_node)); else { val = gfc_conv_initializer (c->expr, &cm->ts, *************** gfc_conv_expr (gfc_se * se, gfc_expr * e *** 6285,6291 **** null_pointer_node. C_PTR and C_FUNPTR are converted to match the typespec for the C_PTR and C_FUNPTR symbols, which has already been updated to be an integer with a kind equal to the size of a (void *). */ ! if (expr->ts.type == BT_DERIVED && expr->ts.u.derived->ts.f90_type == BT_VOID) { if (expr->expr_type == EXPR_VARIABLE && (expr->symtree->n.sym->intmod_sym_id == ISOCBINDING_NULL_PTR --- 6345,6352 ---- null_pointer_node. C_PTR and C_FUNPTR are converted to match the typespec for the C_PTR and C_FUNPTR symbols, which has already been updated to be an integer with a kind equal to the size of a (void *). */ ! if (expr->ts.type == BT_DERIVED && expr->ts.u.derived->ts.f90_type == BT_VOID ! && expr->ts.u.derived->attr.is_bind_c) { if (expr->expr_type == EXPR_VARIABLE && (expr->symtree->n.sym->intmod_sym_id == ISOCBINDING_NULL_PTR *************** gfc_trans_pointer_assignment (gfc_expr * *** 6550,6555 **** --- 6611,6637 ---- rse.expr = build_fold_indirect_ref_loc (input_location, rse.expr); + /* For string assignments to unlimited polymorphic pointers add an + assignment of the string_length to the _len component of the + pointer. */ + if ((expr1->ts.type == BT_CLASS || expr1->ts.type == BT_DERIVED) + && expr1->ts.u.derived->attr.unlimited_polymorphic + && (expr2->ts.type == BT_CHARACTER || + ((expr2->ts.type == BT_DERIVED || expr2->ts.type == BT_CLASS) + && expr2->ts.u.derived->attr.unlimited_polymorphic))) + { + gfc_expr *len_comp; + gfc_se se; + len_comp = gfc_get_len_component (expr1); + gfc_init_se (&se, NULL); + gfc_conv_expr (&se, len_comp); + + /* ptr % _len = len (str) */ + gfc_add_modify (&block, se.expr, rse.string_length); + lse.string_length = se.expr; + gfc_free_expr (len_comp); + } + gfc_add_block_to_block (&block, &lse.pre); gfc_add_block_to_block (&block, &rse.pre); *************** gfc_trans_pointer_assignment (gfc_expr * *** 6661,6666 **** --- 6743,6749 ---- bound, bound, 0, GFC_ARRAY_POINTER_CONT, false); tmp = gfc_create_var (tmp, "ptrtemp"); + lse.descriptor_only = 0; lse.expr = tmp; lse.direct_byref = 1; gfc_conv_expr_descriptor (&lse, expr2); *************** gfc_trans_pointer_assignment (gfc_expr * *** 6676,6681 **** --- 6759,6765 ---- else if (expr2->expr_type == EXPR_VARIABLE) { /* Assign directly to the LHS's descriptor. */ + lse.descriptor_only = 0; lse.direct_byref = 1; gfc_conv_expr_descriptor (&lse, expr2); strlen_rhs = lse.string_length; *************** gfc_trans_pointer_assignment (gfc_expr * *** 6726,6731 **** --- 6810,6816 ---- /* Assign to a temporary descriptor and then copy that temporary to the pointer. */ tmp = gfc_create_var (TREE_TYPE (desc), "ptrtemp"); + lse.descriptor_only = 0; lse.expr = tmp; lse.direct_byref = 1; gfc_conv_expr_descriptor (&lse, expr2); diff -Nrcpad gcc-4.9.2/gcc/fortran/trans-openmp.c gcc-4.9.3/gcc/fortran/trans-openmp.c *** gcc-4.9.2/gcc/fortran/trans-openmp.c Fri Oct 10 11:09:32 2014 --- gcc-4.9.3/gcc/fortran/trans-openmp.c Wed Jun 3 15:31:46 2015 *************** gfc_trans_omp_atomic (gfc_code *code) *** 2683,2688 **** --- 2683,2700 ---- } lhsaddr = save_expr (lhsaddr); + if (TREE_CODE (lhsaddr) != SAVE_EXPR + && (TREE_CODE (lhsaddr) != ADDR_EXPR + || TREE_CODE (TREE_OPERAND (lhsaddr, 0)) != VAR_DECL)) + { + /* Make sure LHS is simple enough so that goa_lhs_expr_p can recognize + it even after unsharing function body. */ + tree var = create_tmp_var_raw (TREE_TYPE (lhsaddr), NULL); + DECL_CONTEXT (var) = current_function_decl; + lhsaddr = build4 (TARGET_EXPR, TREE_TYPE (lhsaddr), var, lhsaddr, + NULL_TREE, NULL_TREE); + } + rhs = gfc_evaluate_now (rse.expr, &block); if (((atomic_code->ext.omp_atomic & GFC_OMP_ATOMIC_MASK) *************** gfc_trans_omp_do (gfc_code *code, gfc_ex *** 2965,2970 **** --- 2977,2995 ---- inits.safe_push (e); } + if (dovar_found == 2 + && op == EXEC_OMP_SIMD + && collapse == 1 + && !simple) + { + for (tmp = omp_clauses; tmp; tmp = OMP_CLAUSE_CHAIN (tmp)) + if (OMP_CLAUSE_CODE (tmp) == OMP_CLAUSE_LINEAR + && OMP_CLAUSE_DECL (tmp) == dovar) + { + OMP_CLAUSE_LINEAR_NO_COPYIN (tmp) = 1; + break; + } + } if (!dovar_found) { if (op == EXEC_OMP_SIMD) *************** gfc_trans_omp_do (gfc_code *code, gfc_ex *** 2973,2978 **** --- 2998,3004 ---- { tmp = build_omp_clause (input_location, OMP_CLAUSE_LINEAR); OMP_CLAUSE_LINEAR_STEP (tmp) = step; + OMP_CLAUSE_LINEAR_NO_COPYIN (tmp) = 1; } else tmp = build_omp_clause (input_location, OMP_CLAUSE_LASTPRIVATE); *************** gfc_trans_omp_do (gfc_code *code, gfc_ex *** 3040,3046 **** else if (collapse == 1) { tmp = build_omp_clause (input_location, OMP_CLAUSE_LINEAR); ! OMP_CLAUSE_LINEAR_STEP (tmp) = step; OMP_CLAUSE_LINEAR_NO_COPYIN (tmp) = 1; OMP_CLAUSE_LINEAR_NO_COPYOUT (tmp) = 1; } --- 3066,3072 ---- else if (collapse == 1) { tmp = build_omp_clause (input_location, OMP_CLAUSE_LINEAR); ! OMP_CLAUSE_LINEAR_STEP (tmp) = build_int_cst (type, 1); OMP_CLAUSE_LINEAR_NO_COPYIN (tmp) = 1; OMP_CLAUSE_LINEAR_NO_COPYOUT (tmp) = 1; } diff -Nrcpad gcc-4.9.2/gcc/fortran/trans-stmt.c gcc-4.9.3/gcc/fortran/trans-stmt.c *** gcc-4.9.2/gcc/fortran/trans-stmt.c Mon Jun 9 14:45:32 2014 --- gcc-4.9.3/gcc/fortran/trans-stmt.c Mon Mar 23 11:58:49 2015 *************** gfc_trans_critical (gfc_code *code) *** 1133,1138 **** --- 1133,1154 ---- } + /* Return true, when the class has a _len component. */ + + static bool + class_has_len_component (gfc_symbol *sym) + { + gfc_component *comp = sym->ts.u.derived->components; + while (comp) + { + if (strcmp (comp->name, "_len") == 0) + return true; + comp = comp->next; + } + return false; + } + + /* Do proper initialization for ASSOCIATE names. */ static void *************** trans_associate_var (gfc_symbol *sym, gf *** 1146,1151 **** --- 1162,1169 ---- tree offset; tree dim; int n; + tree charlen; + bool need_len_assign; gcc_assert (sym->assoc); e = sym->assoc->target; *************** trans_associate_var (gfc_symbol *sym, gf *** 1156,1161 **** --- 1174,1193 ---- unlimited = UNLIMITED_POLY (e); + /* Assignments to the string length need to be generated, when + ( sym is a char array or + sym has a _len component) + and the associated expression is unlimited polymorphic, which is + not (yet) correctly in 'unlimited', because for an already associated + BT_DERIVED the u-poly flag is not set, i.e., + __tmp_CHARACTER_0_1 => w => arg + ^ generated temp ^ from code, the w does not have the u-poly + flag set, where UNLIMITED_POLY(e) expects it. */ + need_len_assign = ((unlimited || (e->ts.type == BT_DERIVED + && e->ts.u.derived->attr.unlimited_polymorphic)) + && (sym->ts.type == BT_CHARACTER + || ((sym->ts.type == BT_CLASS || sym->ts.type == BT_DERIVED) + && class_has_len_component (sym)))); /* Do a `pointer assignment' with updated descriptor (or assign descriptor to array temporary) for arrays with either unknown shape or if associating to a variable. */ *************** trans_associate_var (gfc_symbol *sym, gf *** 1255,1262 **** --- 1287,1297 ---- unconditionally associate pointers and the symbol is scalar. */ if (sym->ts.type == BT_CLASS && CLASS_DATA (sym)->attr.dimension) { + tree target_expr; /* For a class array we need a descriptor for the selector. */ gfc_conv_expr_descriptor (&se, e); + /* Needed to get/set the _len component below. */ + target_expr = se.expr; /* Obtain a temporary class container for the result. */ gfc_conv_class_to_class (&se, e, sym->ts, false, true, false, false); *************** trans_associate_var (gfc_symbol *sym, gf *** 1276,1281 **** --- 1311,1333 ---- gfc_array_index_type, offset, tmp); } + if (need_len_assign) + { + /* Get the _len comp from the target expr by stripping _data + from it and adding component-ref to _len. */ + tmp = gfc_class_len_get (TREE_OPERAND (target_expr, 0)); + /* Get the component-ref for the temp structure's _len comp. */ + charlen = gfc_class_len_get (se.expr); + /* Add the assign to the beginning of the the block... */ + gfc_add_modify (&se.pre, charlen, + fold_convert (TREE_TYPE (charlen), tmp)); + /* and the oposite way at the end of the block, to hand changes + on the string length back. */ + gfc_add_modify (&se.post, tmp, + fold_convert (TREE_TYPE (tmp), charlen)); + /* Length assignment done, prevent adding it again below. */ + need_len_assign = false; + } gfc_conv_descriptor_offset_set (&se.pre, desc, offset); } else if (sym->ts.type == BT_CLASS && e->ts.type == BT_CLASS *************** trans_associate_var (gfc_symbol *sym, gf *** 1290,1296 **** se.expr = build_fold_indirect_ref_loc (input_location, se.expr); } else ! gfc_conv_expr (&se, e); tmp = TREE_TYPE (sym->backend_decl); tmp = gfc_build_addr_expr (tmp, se.expr); --- 1342,1354 ---- se.expr = build_fold_indirect_ref_loc (input_location, se.expr); } else ! { ! /* For BT_CLASS and BT_DERIVED, this boils down to a pointer assign, ! which has the string length included. For CHARACTERS it is still ! needed and will be done at the end of this routine. */ ! gfc_conv_expr (&se, e); ! need_len_assign = need_len_assign && sym->ts.type == BT_CHARACTER; ! } tmp = TREE_TYPE (sym->backend_decl); tmp = gfc_build_addr_expr (tmp, se.expr); *************** trans_associate_var (gfc_symbol *sym, gf *** 1311,1331 **** gfc_add_init_cleanup (block, tmp, NULL_TREE); } ! /* Set the stringlength from the vtable size. */ ! if (sym->ts.type == BT_CHARACTER && sym->attr.select_type_temporary) { - tree charlen; gfc_se se; gfc_init_se (&se, NULL); ! gcc_assert (UNLIMITED_POLY (e->symtree->n.sym)); ! tmp = gfc_get_symbol_decl (e->symtree->n.sym); ! tmp = gfc_vtable_size_get (tmp); gfc_get_symbol_decl (sym); ! charlen = sym->ts.u.cl->backend_decl; ! gfc_add_modify (&se.pre, charlen, ! fold_convert (TREE_TYPE (charlen), tmp)); ! gfc_add_init_cleanup (block, gfc_finish_block( &se.pre), ! gfc_finish_block (&se.post)); } } --- 1369,1398 ---- gfc_add_init_cleanup (block, tmp, NULL_TREE); } ! /* Set the stringlength, when needed. */ ! if (need_len_assign) { gfc_se se; gfc_init_se (&se, NULL); ! if (e->symtree->n.sym->ts.type == BT_CHARACTER) ! { ! /* What about deferred strings? */ ! gcc_assert (!e->symtree->n.sym->ts.deferred); ! tmp = e->symtree->n.sym->ts.u.cl->backend_decl; ! } ! else ! tmp = gfc_class_len_get (gfc_get_symbol_decl (e->symtree->n.sym)); gfc_get_symbol_decl (sym); ! charlen = sym->ts.type == BT_CHARACTER ? sym->ts.u.cl->backend_decl ! : gfc_class_len_get (sym->backend_decl); ! /* Prevent adding a noop len= len. */ ! if (tmp != charlen) ! { ! gfc_add_modify (&se.pre, charlen, ! fold_convert (TREE_TYPE (charlen), tmp)); ! gfc_add_init_cleanup (block, gfc_finish_block (&se.pre), ! gfc_finish_block (&se.post)); ! } } } *************** gfc_trans_allocate (gfc_code * code) *** 5038,5043 **** --- 5105,5119 ---- gfc_add_modify (&se.pre, se.string_length, fold_convert (TREE_TYPE (se.string_length), memsz)); + else if ((al->expr->ts.type == BT_DERIVED + || al->expr->ts.type == BT_CLASS) + && expr->ts.u.derived->attr.unlimited_polymorphic) + { + tmp = gfc_class_len_get (al->expr->symtree->n.sym->backend_decl); + gfc_add_modify (&se.pre, tmp, + fold_convert (TREE_TYPE (tmp), + memsz)); + } /* Convert to size in bytes, using the character KIND. */ if (unlimited_char) *************** gfc_trans_deallocate (gfc_code *code) *** 5458,5468 **** if (expr->rank || gfc_is_coarray (expr)) { if (expr->ts.type == BT_DERIVED && expr->ts.u.derived->attr.alloc_comp && !gfc_is_finalizable (expr->ts.u.derived, NULL)) { - gfc_ref *ref; gfc_ref *last = NULL; for (ref = expr->ref; ref; ref = ref->next) if (ref->type == REF_COMPONENT) last = ref; --- 5534,5546 ---- if (expr->rank || gfc_is_coarray (expr)) { + gfc_ref *ref; + if (expr->ts.type == BT_DERIVED && expr->ts.u.derived->attr.alloc_comp && !gfc_is_finalizable (expr->ts.u.derived, NULL)) { gfc_ref *last = NULL; + for (ref = expr->ref; ref; ref = ref->next) if (ref->type == REF_COMPONENT) last = ref; *************** gfc_trans_deallocate (gfc_code *code) *** 5473,5485 **** && !(!last && expr->symtree->n.sym->attr.pointer)) { tmp = gfc_deallocate_alloc_comp (expr->ts.u.derived, se.expr, ! expr->rank); gfc_add_expr_to_block (&se.pre, tmp); } } ! tmp = gfc_array_deallocate (se.expr, pstat, errmsg, errlen, ! label_finish, expr); ! gfc_add_expr_to_block (&se.pre, tmp); if (al->expr->ts.type == BT_CLASS) gfc_reset_vptr (&se.pre, al->expr); } --- 5551,5595 ---- && !(!last && expr->symtree->n.sym->attr.pointer)) { tmp = gfc_deallocate_alloc_comp (expr->ts.u.derived, se.expr, ! expr->rank); gfc_add_expr_to_block (&se.pre, tmp); } } ! ! if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (se.expr))) ! { ! tmp = gfc_array_deallocate (se.expr, pstat, errmsg, errlen, ! label_finish, expr); ! gfc_add_expr_to_block (&se.pre, tmp); ! } ! else if (TREE_CODE (se.expr) == COMPONENT_REF ! && TREE_CODE (TREE_TYPE (se.expr)) == ARRAY_TYPE ! && TREE_CODE (TREE_TYPE (TREE_TYPE (se.expr))) ! == RECORD_TYPE) ! { ! /* class.c(finalize_component) generates these, when a ! finalizable entity has a non-allocatable derived type array ! component, which has allocatable components. Obtain the ! derived type of the array and deallocate the allocatable ! components. */ ! for (ref = expr->ref; ref; ref = ref->next) ! { ! if (ref->u.c.component->attr.dimension ! && ref->u.c.component->ts.type == BT_DERIVED) ! break; ! } ! ! if (ref && ref->u.c.component->ts.u.derived->attr.alloc_comp ! && !gfc_is_finalizable (ref->u.c.component->ts.u.derived, ! NULL)) ! { ! tmp = gfc_deallocate_alloc_comp ! (ref->u.c.component->ts.u.derived, ! se.expr, expr->rank); ! gfc_add_expr_to_block (&se.pre, tmp); ! } ! } ! if (al->expr->ts.type == BT_CLASS) gfc_reset_vptr (&se.pre, al->expr); } diff -Nrcpad gcc-4.9.2/gcc/fortran/trans-types.c gcc-4.9.3/gcc/fortran/trans-types.c *** gcc-4.9.2/gcc/fortran/trans-types.c Mon Jun 30 16:35:48 2014 --- gcc-4.9.3/gcc/fortran/trans-types.c Thu Mar 19 20:12:29 2015 *************** gfc_get_derived_type (gfc_symbol * deriv *** 2415,2423 **** /* Its components' backend_decl have been built or we are seeing recursion through the formal arglist of a procedure pointer component. */ ! if (TYPE_FIELDS (derived->backend_decl) ! || derived->attr.proc_pointer_comp) return derived->backend_decl; else typenode = derived->backend_decl; } --- 2415,2438 ---- /* Its components' backend_decl have been built or we are seeing recursion through the formal arglist of a procedure pointer component. */ ! if (TYPE_FIELDS (derived->backend_decl)) return derived->backend_decl; + else if (derived->attr.abstract + && derived->attr.proc_pointer_comp) + { + /* If an abstract derived type with procedure pointer + components has no other type of component, return the + backend_decl. Otherwise build the components if any of the + non-procedure pointer components have no backend_decl. */ + for (c = derived->components; c; c = c->next) + { + if (!c->attr.proc_pointer && c->backend_decl == NULL) + break; + else if (c->next == NULL) + return derived->backend_decl; + } + typenode = derived->backend_decl; + } else typenode = derived->backend_decl; } diff -Nrcpad gcc-4.9.2/gcc/fortran/trans.h gcc-4.9.3/gcc/fortran/trans.h *** gcc-4.9.2/gcc/fortran/trans.h Mon Jun 30 16:35:48 2014 --- gcc-4.9.3/gcc/fortran/trans.h Mon Mar 23 11:58:49 2015 *************** gfc_wrapped_block; *** 347,352 **** --- 347,353 ---- /* Class API functions. */ tree gfc_class_data_get (tree); tree gfc_class_vptr_get (tree); + tree gfc_class_len_get (tree); void gfc_reset_vptr (stmtblock_t *, gfc_expr *); tree gfc_class_set_static_fields (tree, tree, tree); tree gfc_vtable_hash_get (tree); diff -Nrcpad gcc-4.9.2/gcc/function.c gcc-4.9.3/gcc/function.c *** gcc-4.9.2/gcc/function.c Thu Jul 10 10:41:15 2014 --- gcc-4.9.3/gcc/function.c Mon Mar 23 09:50:33 2015 *************** match_asm_constraints_1 (rtx insn, rtx * *** 7193,7198 **** --- 7193,7207 ---- df_insn_rescan (insn); } + /* Add the decl D to the local_decls list of FUN. */ + + void + add_local_decl (struct function *fun, tree d) + { + gcc_assert (TREE_CODE (d) == VAR_DECL); + vec_safe_push (fun->local_decls, d); + } + static unsigned rest_of_match_asm_constraints (void) { diff -Nrcpad gcc-4.9.2/gcc/function.h gcc-4.9.3/gcc/function.h *** gcc-4.9.2/gcc/function.h Fri Feb 7 02:11:27 2014 --- gcc-4.9.3/gcc/function.h Mon Mar 23 09:50:33 2015 *************** struct GTY(()) function { *** 674,684 **** /* Add the decl D to the local_decls list of FUN. */ ! static inline void ! add_local_decl (struct function *fun, tree d) ! { ! vec_safe_push (fun->local_decls, d); ! } #define FOR_EACH_LOCAL_DECL(FUN, I, D) \ FOR_EACH_VEC_SAFE_ELT_REVERSE ((FUN)->local_decls, I, D) --- 674,680 ---- /* Add the decl D to the local_decls list of FUN. */ ! void add_local_decl (struct function *fun, tree d); #define FOR_EACH_LOCAL_DECL(FUN, I, D) \ FOR_EACH_VEC_SAFE_ELT_REVERSE ((FUN)->local_decls, I, D) diff -Nrcpad gcc-4.9.2/gcc/gcc.c gcc-4.9.3/gcc/gcc.c *** gcc-4.9.2/gcc/gcc.c Wed Oct 22 21:42:48 2014 --- gcc-4.9.3/gcc/gcc.c Fri Jun 26 17:47:23 2015 *************** main (int argc, char **argv) *** 6857,6863 **** { printf (_("%s %s%s\n"), progname, pkgversion_string, version_string); ! printf ("Copyright %s 2014 Free Software Foundation, Inc.\n", _("(C)")); fputs (_("This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"), --- 6857,6863 ---- { printf (_("%s %s%s\n"), progname, pkgversion_string, version_string); ! printf ("Copyright %s 2015 Free Software Foundation, Inc.\n", _("(C)")); fputs (_("This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"), diff -Nrcpad gcc-4.9.2/gcc/gcov-dump.c gcc-4.9.3/gcc/gcov-dump.c *** gcc-4.9.2/gcc/gcov-dump.c Thu Jan 2 21:25:41 2014 --- gcc-4.9.3/gcc/gcov-dump.c Fri Jun 26 17:47:23 2015 *************** static void *** 142,148 **** print_version (void) { printf ("gcov-dump %s%s\n", pkgversion_string, version_string); ! printf ("Copyright (C) 2014 Free Software Foundation, Inc.\n"); printf ("This is free software; see the source for copying conditions.\n" "There is NO warranty; not even for MERCHANTABILITY or \n" "FITNESS FOR A PARTICULAR PURPOSE.\n\n"); --- 142,148 ---- print_version (void) { printf ("gcov-dump %s%s\n", pkgversion_string, version_string); ! printf ("Copyright (C) 2015 Free Software Foundation, Inc.\n"); printf ("This is free software; see the source for copying conditions.\n" "There is NO warranty; not even for MERCHANTABILITY or \n" "FITNESS FOR A PARTICULAR PURPOSE.\n\n"); diff -Nrcpad gcc-4.9.2/gcc/gcov.c gcc-4.9.3/gcc/gcov.c *** gcc-4.9.2/gcc/gcov.c Thu Jan 2 21:25:41 2014 --- gcc-4.9.3/gcc/gcov.c Fri Jun 26 17:47:23 2015 *************** static void *** 500,506 **** print_version (void) { fnotice (stdout, "gcov %s%s\n", pkgversion_string, version_string); ! fprintf (stdout, "Copyright %s 2014 Free Software Foundation, Inc.\n", _("(C)")); fnotice (stdout, _("This is free software; see the source for copying conditions.\n" --- 500,506 ---- print_version (void) { fnotice (stdout, "gcov %s%s\n", pkgversion_string, version_string); ! fprintf (stdout, "Copyright %s 2015 Free Software Foundation, Inc.\n", _("(C)")); fnotice (stdout, _("This is free software; see the source for copying conditions.\n" diff -Nrcpad gcc-4.9.2/gcc/gengtype-lex.c gcc-4.9.3/gcc/gengtype-lex.c *** gcc-4.9.2/gcc/gengtype-lex.c Thu Oct 30 08:31:06 2014 --- gcc-4.9.3/gcc/gengtype-lex.c Fri Jun 26 18:01:27 2015 *************** int yy_flex_debug = 0; *** 1174,1180 **** #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; ! #line 1 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" /* -*- indented-text -*- */ /* Process source files and output type information. Copyright (C) 2002-2014 Free Software Foundation, Inc. --- 1174,1180 ---- #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; ! #line 1 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" /* -*- indented-text -*- */ /* Process source files and output type information. Copyright (C) 2002-2014 Free Software Foundation, Inc. *************** You should have received a copy of the G *** 1195,1201 **** along with GCC; see the file COPYING3. If not see . */ #define YY_NO_INPUT 1 ! #line 24 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" #ifdef GENERATOR_FILE #include "bconfig.h" #else --- 1195,1201 ---- along with GCC; see the file COPYING3. If not see . */ #define YY_NO_INPUT 1 ! #line 24 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" #ifdef GENERATOR_FILE #include "bconfig.h" #else *************** YY_DECL *** 1410,1416 **** register char *yy_cp, *yy_bp; register int yy_act; ! #line 65 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" /* Do this on entry to yylex(): */ *yylval = 0; --- 1410,1416 ---- register char *yy_cp, *yy_bp; register int yy_act; ! #line 65 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" /* Do this on entry to yylex(): */ *yylval = 0; *************** case 1: *** 1507,1513 **** (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 76 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { BEGIN(in_struct); return TYPEDEF; --- 1507,1513 ---- (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 76 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { BEGIN(in_struct); return TYPEDEF; *************** case 2: *** 1519,1525 **** (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 80 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { BEGIN(in_struct); return STRUCT; --- 1519,1525 ---- (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 80 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { BEGIN(in_struct); return STRUCT; *************** case 3: *** 1531,1537 **** (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 84 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { BEGIN(in_struct); return UNION; --- 1531,1537 ---- (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 84 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { BEGIN(in_struct); return UNION; *************** case 4: *** 1543,1549 **** (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 88 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { BEGIN(in_struct); return STRUCT; --- 1543,1549 ---- (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 88 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { BEGIN(in_struct); return STRUCT; *************** case 5: *** 1555,1561 **** (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 92 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { BEGIN(in_struct); return EXTERN; --- 1555,1561 ---- (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 92 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { BEGIN(in_struct); return EXTERN; *************** case 6: *** 1567,1573 **** (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 96 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { BEGIN(in_struct); return STATIC; --- 1567,1573 ---- (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 96 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { BEGIN(in_struct); return STATIC; *************** YY_RULE_SETUP *** 1578,1602 **** case 7: YY_RULE_SETUP ! #line 104 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { BEGIN(in_struct_comment); } YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP ! #line 105 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 9: /* rule 9 can match eol */ YY_RULE_SETUP ! #line 107 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { update_lineno (yytext, yyleng); } YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP ! #line 108 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 11: --- 1578,1602 ---- case 7: YY_RULE_SETUP ! #line 104 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { BEGIN(in_struct_comment); } YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP ! #line 105 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 9: /* rule 9 can match eol */ YY_RULE_SETUP ! #line 107 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { update_lineno (yytext, yyleng); } YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP ! #line 108 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 11: *************** case 11: *** 1605,1611 **** (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 110 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" /* don't care */ YY_BREAK case 12: --- 1605,1611 ---- (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 110 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" /* don't care */ YY_BREAK case 12: *************** case 12: *** 1613,1626 **** *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! #line 112 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" case 13: /* rule 13 can match eol */ ! #line 113 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" case 14: /* rule 14 can match eol */ YY_RULE_SETUP ! #line 113 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng + 1); return IGNORABLE_CXX_KEYWORD; --- 1613,1626 ---- *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! #line 112 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" case 13: /* rule 13 can match eol */ ! #line 113 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" case 14: /* rule 14 can match eol */ YY_RULE_SETUP ! #line 113 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng + 1); return IGNORABLE_CXX_KEYWORD; *************** case 15: *** 1632,1638 **** (yy_c_buf_p) = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 117 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return GTY_TOKEN; } YY_BREAK case 16: --- 1632,1638 ---- (yy_c_buf_p) = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 117 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return GTY_TOKEN; } YY_BREAK case 16: *************** case 16: *** 1641,1647 **** (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 118 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return UNION; } YY_BREAK case 17: --- 1641,1647 ---- (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 118 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return UNION; } YY_BREAK case 17: *************** case 17: *** 1650,1656 **** (yy_c_buf_p) = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 119 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return STRUCT; } YY_BREAK case 18: --- 1650,1656 ---- (yy_c_buf_p) = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 119 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return STRUCT; } YY_BREAK case 18: *************** case 18: *** 1659,1665 **** (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 120 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return STRUCT; } YY_BREAK case 19: --- 1659,1665 ---- (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 120 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return STRUCT; } YY_BREAK case 19: *************** case 19: *** 1668,1674 **** (yy_c_buf_p) = yy_cp = yy_bp + 7; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 121 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return TYPEDEF; } YY_BREAK case 20: --- 1668,1674 ---- (yy_c_buf_p) = yy_cp = yy_bp + 7; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 121 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return TYPEDEF; } YY_BREAK case 20: *************** case 20: *** 1677,1683 **** (yy_c_buf_p) = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 122 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return ENUM; } YY_BREAK case 21: --- 1677,1683 ---- (yy_c_buf_p) = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 122 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return ENUM; } YY_BREAK case 21: *************** case 21: *** 1686,1692 **** (yy_c_buf_p) = yy_cp = yy_bp + 9; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 123 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return PTR_ALIAS; } YY_BREAK case 22: --- 1686,1692 ---- (yy_c_buf_p) = yy_cp = yy_bp + 9; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 123 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return PTR_ALIAS; } YY_BREAK case 22: *************** case 22: *** 1695,1701 **** (yy_c_buf_p) = yy_cp = yy_bp + 10; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 124 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return NESTED_PTR; } YY_BREAK case 23: --- 1695,1701 ---- (yy_c_buf_p) = yy_cp = yy_bp + 10; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 124 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return NESTED_PTR; } YY_BREAK case 23: *************** case 23: *** 1704,1715 **** (yy_c_buf_p) = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 125 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return USER_GTY; } YY_BREAK case 24: YY_RULE_SETUP ! #line 126 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return NUM; } YY_BREAK case 25: --- 1704,1715 ---- (yy_c_buf_p) = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 125 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return USER_GTY; } YY_BREAK case 24: YY_RULE_SETUP ! #line 126 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return NUM; } YY_BREAK case 25: *************** case 25: *** 1718,1724 **** (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 127 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1); return PARAM_IS; --- 1718,1724 ---- (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 127 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1); return PARAM_IS; *************** case 26: *** 1729,1739 **** *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! #line 133 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" case 27: /* rule 27 can match eol */ YY_RULE_SETUP ! #line 133 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { size_t len; --- 1729,1739 ---- *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! #line 133 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" case 27: /* rule 27 can match eol */ YY_RULE_SETUP ! #line 133 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { size_t len; *************** case 28: *** 1751,1757 **** (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 144 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1); return ID; --- 1751,1757 ---- (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 144 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1); return ID; *************** YY_RULE_SETUP *** 1760,1766 **** case 29: /* rule 29 can match eol */ YY_RULE_SETUP ! #line 149 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return STRING; --- 1760,1766 ---- case 29: /* rule 29 can match eol */ YY_RULE_SETUP ! #line 149 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return STRING; *************** YY_RULE_SETUP *** 1770,1776 **** case 30: /* rule 30 can match eol */ YY_RULE_SETUP ! #line 154 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return ARRAY; --- 1770,1776 ---- case 30: /* rule 30 can match eol */ YY_RULE_SETUP ! #line 154 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return ARRAY; *************** YY_RULE_SETUP *** 1779,1785 **** case 31: /* rule 31 can match eol */ YY_RULE_SETUP ! #line 158 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng); return CHAR; --- 1779,1785 ---- case 31: /* rule 31 can match eol */ YY_RULE_SETUP ! #line 158 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng); return CHAR; *************** YY_RULE_SETUP *** 1787,1810 **** YY_BREAK case 32: YY_RULE_SETUP ! #line 163 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return ELLIPSIS; } YY_BREAK case 33: YY_RULE_SETUP ! #line 164 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { return yytext[0]; } YY_BREAK /* ignore pp-directives */ case 34: /* rule 34 can match eol */ YY_RULE_SETUP ! #line 167 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" {lexer_line.line++;} YY_BREAK case 35: YY_RULE_SETUP ! #line 169 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unexpected character `%s'", yytext); } --- 1787,1810 ---- YY_BREAK case 32: YY_RULE_SETUP ! #line 163 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return ELLIPSIS; } YY_BREAK case 33: YY_RULE_SETUP ! #line 164 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { return yytext[0]; } YY_BREAK /* ignore pp-directives */ case 34: /* rule 34 can match eol */ YY_RULE_SETUP ! #line 167 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" {lexer_line.line++;} YY_BREAK case 35: YY_RULE_SETUP ! #line 169 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unexpected character `%s'", yytext); } *************** YY_RULE_SETUP *** 1812,1847 **** case 36: YY_RULE_SETUP ! #line 174 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { BEGIN(in_comment); } YY_BREAK case 37: /* rule 37 can match eol */ YY_RULE_SETUP ! #line 175 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 38: /* rule 38 can match eol */ YY_RULE_SETUP ! #line 176 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 39: ! #line 178 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" case 40: /* rule 40 can match eol */ ! #line 179 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" case 41: /* rule 41 can match eol */ YY_RULE_SETUP ! #line 179 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 42: /* rule 42 can match eol */ YY_RULE_SETUP ! #line 180 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { update_lineno (yytext, yyleng); } YY_BREAK case 43: --- 1812,1847 ---- case 36: YY_RULE_SETUP ! #line 174 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { BEGIN(in_comment); } YY_BREAK case 37: /* rule 37 can match eol */ YY_RULE_SETUP ! #line 175 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 38: /* rule 38 can match eol */ YY_RULE_SETUP ! #line 176 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 39: ! #line 178 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" case 40: /* rule 40 can match eol */ ! #line 179 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" case 41: /* rule 41 can match eol */ YY_RULE_SETUP ! #line 179 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 42: /* rule 42 can match eol */ YY_RULE_SETUP ! #line 180 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { update_lineno (yytext, yyleng); } YY_BREAK case 43: *************** case 43: *** 1850,1870 **** (yy_c_buf_p) = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 181 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 44: /* rule 44 can match eol */ YY_RULE_SETUP ! #line 184 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 45: ! #line 186 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" case 46: YY_RULE_SETUP ! #line 186 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 47: --- 1850,1870 ---- (yy_c_buf_p) = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 181 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 44: /* rule 44 can match eol */ YY_RULE_SETUP ! #line 184 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 45: ! #line 186 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" case 46: YY_RULE_SETUP ! #line 186 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 47: *************** case 47: *** 1873,1897 **** (yy_c_buf_p) = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 187 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 48: YY_RULE_SETUP ! #line 190 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { BEGIN(INITIAL); } YY_BREAK case 49: YY_RULE_SETUP ! #line 191 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { BEGIN(in_struct); } YY_BREAK case 50: ! #line 194 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" case 51: YY_RULE_SETUP ! #line 194 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unterminated comment or string; unexpected EOF"); --- 1873,1897 ---- (yy_c_buf_p) = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP ! #line 187 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 48: YY_RULE_SETUP ! #line 190 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { BEGIN(INITIAL); } YY_BREAK case 49: YY_RULE_SETUP ! #line 191 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { BEGIN(in_struct); } YY_BREAK case 50: ! #line 194 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" case 51: YY_RULE_SETUP ! #line 194 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unterminated comment or string; unexpected EOF"); *************** YY_RULE_SETUP *** 1900,1911 **** case 52: /* rule 52 can match eol */ YY_RULE_SETUP ! #line 199 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 53: YY_RULE_SETUP ! #line 201 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK #line 1911 "gengtype-lex.c" --- 1900,1911 ---- case 52: /* rule 52 can match eol */ YY_RULE_SETUP ! #line 199 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 53: YY_RULE_SETUP ! #line 201 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK #line 1911 "gengtype-lex.c" *************** void yyfree (void * ptr ) *** 2872,2878 **** #define YYTABLES_NAME "yytables" ! #line 201 "/d/gcc-4.9.2/gcc-4.9.2/gcc/gengtype-lex.l" --- 2872,2878 ---- #define YYTABLES_NAME "yytables" ! #line 201 "/d/gcc-4.9.3/gcc-4.9.3/gcc/gengtype-lex.l" diff -Nrcpad gcc-4.9.2/gcc/go/ChangeLog gcc-4.9.3/gcc/go/ChangeLog *** gcc-4.9.2/gcc/go/ChangeLog Thu Oct 30 08:26:22 2014 --- gcc-4.9.3/gcc/go/ChangeLog Fri Jun 26 17:56:17 2015 *************** *** 1,3 **** --- 1,7 ---- + 2015-06-26 Release Manager + + * GCC 4.9.3 released. + 2014-10-30 Release Manager * GCC 4.9.2 released. diff -Nrcpad gcc-4.9.2/gcc/go/gofrontend/export.cc gcc-4.9.3/gcc/go/gofrontend/export.cc *** gcc-4.9.2/gcc/go/gofrontend/export.cc Wed May 9 21:17:23 2012 --- gcc-4.9.3/gcc/go/gofrontend/export.cc Fri Jan 30 00:36:14 2015 *************** should_export(Named_object* no) *** 91,96 **** --- 91,97 ---- void Export::export_globals(const std::string& package_name, + const std::string& prefix, const std::string& pkgpath, int package_priority, const std::map& imports, *************** Export::export_globals(const std::string *** 140,148 **** this->write_string(package_name); this->write_c_string(";\n"); ! // The package path, used for all global symbols. ! this->write_c_string("pkgpath "); ! this->write_string(pkgpath); this->write_c_string(";\n"); // The package priority. --- 141,158 ---- this->write_string(package_name); this->write_c_string(";\n"); ! // The prefix or package path, used for all global symbols. ! if (prefix.empty()) ! { ! go_assert(!pkgpath.empty()); ! this->write_c_string("pkgpath "); ! this->write_string(pkgpath); ! } ! else ! { ! this->write_c_string("prefix "); ! this->write_string(prefix); ! } this->write_c_string(";\n"); // The package priority. diff -Nrcpad gcc-4.9.2/gcc/go/gofrontend/export.h gcc-4.9.3/gcc/go/gofrontend/export.h *** gcc-4.9.2/gcc/go/gofrontend/export.h Wed May 9 21:17:23 2012 --- gcc-4.9.3/gcc/go/gofrontend/export.h Fri Jan 30 00:36:14 2015 *************** class Export : public String_dump *** 117,130 **** // Export the identifiers in BINDINGS which are marked for export. // The exporting is done via a series of calls to THIS->STREAM_. If // is nothing to export, this->stream_->write will not be called. ! // PKGPATH is the package path. // PACKAGE_PRIORITY is the priority to use for this package. // IMPORT_INIT_FN is the name of the import initialization function // for this package; it will be empty if none is needed. // IMPORTED_INIT_FNS is the list of initialization functions for // imported packages. void export_globals(const std::string& package_name, const std::string& pkgpath, int package_priority, const std::map& imports, --- 117,133 ---- // Export the identifiers in BINDINGS which are marked for export. // The exporting is done via a series of calls to THIS->STREAM_. If // is nothing to export, this->stream_->write will not be called. ! // PREFIX is the package prefix. PKGPATH is the package path. ! // Only one of PREFIX and PKGPATH will be non-empty. // PACKAGE_PRIORITY is the priority to use for this package. + // IMPORTS is the explicitly imported packages. // IMPORT_INIT_FN is the name of the import initialization function // for this package; it will be empty if none is needed. // IMPORTED_INIT_FNS is the list of initialization functions for // imported packages. void export_globals(const std::string& package_name, + const std::string& prefix, const std::string& pkgpath, int package_priority, const std::map& imports, diff -Nrcpad gcc-4.9.2/gcc/go/gofrontend/gogo.cc gcc-4.9.3/gcc/go/gofrontend/gogo.cc *** gcc-4.9.2/gcc/go/gofrontend/gogo.cc Thu Oct 2 18:00:01 2014 --- gcc-4.9.3/gcc/go/gofrontend/gogo.cc Fri Jan 30 00:36:14 2015 *************** Gogo::set_package_name(const std::string *** 338,359 **** // Now that we know the name of the package we are compiling, set // the package path to use for reflect.Type.PkgPath and global // symbol names. ! if (!this->pkgpath_set_) { if (!this->prefix_from_option_ && package_name == "main") ! this->pkgpath_ = package_name; else { if (!this->prefix_from_option_) this->prefix_ = "go"; this->pkgpath_ = this->prefix_ + '.' + package_name; } this->pkgpath_set_ = true; } ! this->pkgpath_symbol_ = Gogo::pkgpath_for_symbol(this->pkgpath_); ! ! this->package_ = this->register_package(this->pkgpath_, location); this->package_->set_package_name(package_name, location); if (this->is_main_package()) --- 338,365 ---- // Now that we know the name of the package we are compiling, set // the package path to use for reflect.Type.PkgPath and global // symbol names. ! if (this->pkgpath_set_) ! this->pkgpath_symbol_ = Gogo::pkgpath_for_symbol(this->pkgpath_); ! else { if (!this->prefix_from_option_ && package_name == "main") ! { ! this->pkgpath_ = package_name; ! this->pkgpath_symbol_ = Gogo::pkgpath_for_symbol(package_name); ! } else { if (!this->prefix_from_option_) this->prefix_ = "go"; this->pkgpath_ = this->prefix_ + '.' + package_name; + this->pkgpath_symbol_ = (Gogo::pkgpath_for_symbol(this->prefix_) + '.' + + Gogo::pkgpath_for_symbol(package_name)); } this->pkgpath_set_ = true; } ! this->package_ = this->register_package(this->pkgpath_, ! this->pkgpath_symbol_, location); this->package_->set_package_name(package_name, location); if (this->is_main_package()) *************** Gogo::add_imported_package(const std::st *** 656,665 **** const std::string& alias_arg, bool is_alias_exported, const std::string& pkgpath, Location location, bool* padd_to_globals) { ! Package* ret = this->register_package(pkgpath, location); ret->set_package_name(real_name, location); *padd_to_globals = false; --- 662,672 ---- const std::string& alias_arg, bool is_alias_exported, const std::string& pkgpath, + const std::string& pkgpath_symbol, Location location, bool* padd_to_globals) { ! Package* ret = this->register_package(pkgpath, pkgpath_symbol, location); ret->set_package_name(real_name, location); *padd_to_globals = false; *************** Gogo::add_imported_package(const std::st *** 688,697 **** // Register a package. This package may or may not be imported. This // returns the Package structure for the package, creating if it // necessary. LOCATION is the location of the import statement that ! // led us to see this package. Package* ! Gogo::register_package(const std::string& pkgpath, Location location) { Package* package = NULL; std::pair ins = --- 695,707 ---- // Register a package. This package may or may not be imported. This // returns the Package structure for the package, creating if it // necessary. LOCATION is the location of the import statement that ! // led us to see this package. PKGPATH_SYMBOL is the symbol to use ! // for names in the package; it may be the empty string, in which case ! // we either get it later or make a guess when we need it. Package* ! Gogo::register_package(const std::string& pkgpath, ! const std::string& pkgpath_symbol, Location location) { Package* package = NULL; std::pair ins = *************** Gogo::register_package(const std::string *** 701,713 **** // We have seen this package name before. package = ins.first->second; go_assert(package != NULL && package->pkgpath() == pkgpath); if (Linemap::is_unknown_location(package->location())) package->set_location(location); } else { // First time we have seen this package name. ! package = new Package(pkgpath, location); go_assert(ins.first->second == NULL); ins.first->second = package; } --- 711,725 ---- // We have seen this package name before. package = ins.first->second; go_assert(package != NULL && package->pkgpath() == pkgpath); + if (!pkgpath_symbol.empty()) + package->set_pkgpath_symbol(pkgpath_symbol); if (Linemap::is_unknown_location(package->location())) package->set_location(location); } else { // First time we have seen this package name. ! package = new Package(pkgpath, pkgpath_symbol, location); go_assert(ins.first->second == NULL); ins.first->second = package; } *************** Gogo::do_exports() *** 3424,3433 **** // support streaming to a separate file. Stream_to_section stream; Export exp(&stream); exp.register_builtin_types(this); exp.export_globals(this->package_name(), ! this->pkgpath(), this->package_priority(), this->imports_, (this->need_init_fn_ && !this->is_main_package() --- 3436,3459 ---- // support streaming to a separate file. Stream_to_section stream; + // Write out either the prefix or pkgpath depending on how we were + // invoked. + std::string prefix; + std::string pkgpath; + if (this->pkgpath_from_option_) + pkgpath = this->pkgpath_; + else if (this->prefix_from_option_) + prefix = this->prefix_; + else if (this->is_main_package()) + pkgpath = "main"; + else + prefix = "go"; + Export exp(&stream); exp.register_builtin_types(this); exp.export_globals(this->package_name(), ! prefix, ! pkgpath, this->package_priority(), this->imports_, (this->need_init_fn_ && !this->is_main_package() *************** Unnamed_label::get_goto(Translate_contex *** 6030,6037 **** // Class Package. ! Package::Package(const std::string& pkgpath, Location location) ! : pkgpath_(pkgpath), pkgpath_symbol_(Gogo::pkgpath_for_symbol(pkgpath)), package_name_(), bindings_(new Bindings(NULL)), priority_(0), location_(location), used_(false), is_imported_(false), uses_sink_alias_(false) --- 6056,6064 ---- // Class Package. ! Package::Package(const std::string& pkgpath, ! const std::string& pkgpath_symbol, Location location) ! : pkgpath_(pkgpath), pkgpath_symbol_(pkgpath_symbol), package_name_(), bindings_(new Bindings(NULL)), priority_(0), location_(location), used_(false), is_imported_(false), uses_sink_alias_(false) *************** Package::set_package_name(const std::str *** 6055,6060 **** --- 6082,6115 ---- package_name.c_str()); } + // Return the pkgpath symbol, which is a prefix for symbols defined in + // this package. + + std::string + Package::pkgpath_symbol() const + { + if (this->pkgpath_symbol_.empty()) + { + // In the general case, this is wrong, because the package might + // have been compiled with -fprefix. However, it is what we + // used to do, so it is no more wrong than we were before. + return Gogo::pkgpath_for_symbol(this->pkgpath_); + } + return this->pkgpath_symbol_; + } + + // Set the package path symbol. + + void + Package::set_pkgpath_symbol(const std::string& pkgpath_symbol) + { + go_assert(!pkgpath_symbol.empty()); + if (this->pkgpath_symbol_.empty()) + this->pkgpath_symbol_ = pkgpath_symbol; + else + go_assert(this->pkgpath_symbol_ == pkgpath_symbol); + } + // Set the priority. We may see multiple priorities for an imported // package; we want to use the largest one. diff -Nrcpad gcc-4.9.2/gcc/go/gofrontend/gogo.h gcc-4.9.3/gcc/go/gofrontend/gogo.h *** gcc-4.9.2/gcc/go/gofrontend/gogo.h Fri Jan 10 06:42:08 2014 --- gcc-4.9.3/gcc/go/gofrontend/gogo.h Fri Jan 30 00:36:14 2015 *************** class Gogo *** 255,260 **** --- 255,261 ---- add_imported_package(const std::string& real_name, const std::string& alias, bool is_alias_exported, const std::string& pkgpath, + const std::string& pkgpath_symbol, Location location, bool* padd_to_globals); *************** class Gogo *** 262,268 **** // This returns the Package structure for the package, creating if // it necessary. Package* ! register_package(const std::string& pkgpath, Location); // Start compiling a function. ADD_METHOD_TO_TYPE is true if a // method function should be added to the type of its receiver. --- 263,270 ---- // This returns the Package structure for the package, creating if // it necessary. Package* ! register_package(const std::string& pkgpath, ! const std::string& pkgpath_symbol, Location); // Start compiling a function. ADD_METHOD_TO_TYPE is true if a // method function should be added to the type of its receiver. *************** class Unnamed_label *** 2597,2603 **** class Package { public: ! Package(const std::string& pkgpath, Location location); // Get the package path used for all symbols exported from this // package. --- 2599,2606 ---- class Package { public: ! Package(const std::string& pkgpath, const std::string& pkgpath_symbol, ! Location location); // Get the package path used for all symbols exported from this // package. *************** class Package *** 2606,2614 **** { return this->pkgpath_; } // Return the package path to use for a symbol name. ! const std::string& ! pkgpath_symbol() const ! { return this->pkgpath_symbol_; } // Return the location of the import statement. Location --- 2609,2620 ---- { return this->pkgpath_; } // Return the package path to use for a symbol name. ! std::string ! pkgpath_symbol() const; ! ! // Set the package path symbol. ! void ! set_pkgpath_symbol(const std::string&); // Return the location of the import statement. Location diff -Nrcpad gcc-4.9.2/gcc/go/gofrontend/import-archive.cc gcc-4.9.3/gcc/go/gofrontend/import-archive.cc *** gcc-4.9.2/gcc/go/gofrontend/import-archive.cc Wed Apr 30 02:38:13 2014 --- gcc-4.9.3/gcc/go/gofrontend/import-archive.cc Mon Jan 5 20:28:51 2015 *************** Archive_file::interpret_header(const Arc *** 295,300 **** --- 295,309 ---- // This is the symbol table. pname->clear(); } + else if (hdr->ar_name[1] == 'S' && hdr->ar_name[2] == 'Y' + && hdr->ar_name[3] == 'M' && hdr->ar_name[4] == '6' + && hdr->ar_name[5] == '4' && hdr->ar_name[6] == '/' + && hdr->ar_name[7] == ' ' + ) + { + // 64-bit symbol table. + pname->clear(); + } else if (hdr->ar_name[1] == '/') { // This is the extended name table. diff -Nrcpad gcc-4.9.2/gcc/go/gofrontend/import.cc gcc-4.9.3/gcc/go/gofrontend/import.cc *** gcc-4.9.2/gcc/go/gofrontend/import.cc Wed Oct 31 00:38:49 2012 --- gcc-4.9.3/gcc/go/gofrontend/import.cc Fri Jan 30 00:36:14 2015 *************** Import::import(Gogo* gogo, const std::st *** 301,323 **** this->require_c_string(";\n"); std::string pkgpath; if (this->match_c_string("prefix ")) { this->advance(7); std::string unique_prefix = this->read_identifier(); this->require_c_string(";\n"); pkgpath = unique_prefix + '.' + package_name; } else { this->require_c_string("pkgpath "); pkgpath = this->read_identifier(); this->require_c_string(";\n"); } this->package_ = gogo->add_imported_package(package_name, local_name, is_local_name_exported, ! pkgpath, this->location_, &this->add_to_globals_); if (this->package_ == NULL) --- 301,327 ---- this->require_c_string(";\n"); std::string pkgpath; + std::string pkgpath_symbol; if (this->match_c_string("prefix ")) { this->advance(7); std::string unique_prefix = this->read_identifier(); this->require_c_string(";\n"); pkgpath = unique_prefix + '.' + package_name; + pkgpath_symbol = (Gogo::pkgpath_for_symbol(unique_prefix) + '.' + + Gogo::pkgpath_for_symbol(package_name)); } else { this->require_c_string("pkgpath "); pkgpath = this->read_identifier(); this->require_c_string(";\n"); + pkgpath_symbol = Gogo::pkgpath_for_symbol(pkgpath); } this->package_ = gogo->add_imported_package(package_name, local_name, is_local_name_exported, ! pkgpath, pkgpath_symbol, this->location_, &this->add_to_globals_); if (this->package_ == NULL) *************** Import::read_one_import() *** 392,398 **** stream->advance(1); this->require_c_string("\";\n"); ! Package* p = this->gogo_->register_package(pkgpath, Linemap::unknown_location()); p->set_package_name(package_name, this->location()); } --- 396,402 ---- stream->advance(1); this->require_c_string("\";\n"); ! Package* p = this->gogo_->register_package(pkgpath, "", Linemap::unknown_location()); p->set_package_name(package_name, this->location()); } *************** Import::read_type() *** 649,655 **** package = this->package_; else { ! package = this->gogo_->register_package(pkgpath, Linemap::unknown_location()); if (!package_name.empty()) package->set_package_name(package_name, this->location()); --- 653,659 ---- package = this->package_; else { ! package = this->gogo_->register_package(pkgpath, "", Linemap::unknown_location()); if (!package_name.empty()) package->set_package_name(package_name, this->location()); diff -Nrcpad gcc-4.9.2/gcc/go/gofrontend/unsafe.cc gcc-4.9.3/gcc/go/gofrontend/unsafe.cc *** gcc-4.9.2/gcc/go/gofrontend/unsafe.cc Mon May 14 22:08:42 2012 --- gcc-4.9.3/gcc/go/gofrontend/unsafe.cc Fri Jan 30 00:36:14 2015 *************** Gogo::import_unsafe(const std::string& l *** 22,28 **** bool add_to_globals; Package* package = this->add_imported_package("unsafe", local_name, is_local_name_exported, ! "unsafe", location, &add_to_globals); if (package == NULL) --- 22,28 ---- bool add_to_globals; Package* package = this->add_imported_package("unsafe", local_name, is_local_name_exported, ! "unsafe", "unsafe", location, &add_to_globals); if (package == NULL) diff -Nrcpad gcc-4.9.2/gcc/graphite-clast-to-gimple.c gcc-4.9.3/gcc/graphite-clast-to-gimple.c *** gcc-4.9.2/gcc/graphite-clast-to-gimple.c Mon Mar 3 11:39:22 2014 --- gcc-4.9.3/gcc/graphite-clast-to-gimple.c Thu Dec 4 18:25:37 2014 *************** along with GCC; see the file COPYING3. *** 30,35 **** --- 30,40 ---- #include #include #include + #ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE + #include + #include + #include + #endif #endif #include "system.h" diff -Nrcpad gcc-4.9.2/gcc/graphite-interchange.c gcc-4.9.3/gcc/graphite-interchange.c *** gcc-4.9.2/gcc/graphite-interchange.c Thu Jan 2 22:23:26 2014 --- gcc-4.9.3/gcc/graphite-interchange.c Thu Dec 4 18:25:37 2014 *************** along with GCC; see the file COPYING3. *** 31,36 **** --- 31,42 ---- #include #include #include + #ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE + #include + #include + #include + #include + #endif #endif #include "system.h" diff -Nrcpad gcc-4.9.2/gcc/graphite-optimize-isl.c gcc-4.9.3/gcc/graphite-optimize-isl.c *** gcc-4.9.2/gcc/graphite-optimize-isl.c Thu Jan 2 22:23:26 2014 --- gcc-4.9.3/gcc/graphite-optimize-isl.c Thu Dec 4 18:25:37 2014 *************** along with GCC; see the file COPYING3. *** 28,33 **** --- 28,37 ---- #include #include #include + #ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE + #include + #include + #endif #endif #include "system.h" *************** getScheduleForBandList (isl_band_list *B *** 373,379 **** --- 377,387 ---- { for (i = ScheduleDimensions - 1 ; i >= 0 ; i--) { + #ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE + if (isl_band_member_is_coincident (Band, i)) + #else if (isl_band_member_is_zero_distance (Band, i)) + #endif { isl_map *TileMap; isl_union_map *TileUMap; diff -Nrcpad gcc-4.9.2/gcc/graphite-poly.c gcc-4.9.3/gcc/graphite-poly.c *** gcc-4.9.2/gcc/graphite-poly.c Thu Jan 2 22:23:26 2014 --- gcc-4.9.3/gcc/graphite-poly.c Thu Dec 4 18:25:37 2014 *************** along with GCC; see the file COPYING3. *** 30,35 **** --- 30,39 ---- #include #include #include + #ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE + #include + #include + #endif #endif #include "system.h" diff -Nrcpad gcc-4.9.2/gcc/graphite-sese-to-poly.c gcc-4.9.3/gcc/graphite-sese-to-poly.c *** gcc-4.9.2/gcc/graphite-sese-to-poly.c Tue Apr 8 10:59:40 2014 --- gcc-4.9.3/gcc/graphite-sese-to-poly.c Thu Dec 4 18:25:37 2014 *************** along with GCC; see the file COPYING3. *** 29,34 **** --- 29,39 ---- #include #include #include + #ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE + #include + #include + #include + #endif #endif #include "system.h" diff -Nrcpad gcc-4.9.2/gcc/ipa-inline-analysis.c gcc-4.9.3/gcc/ipa-inline-analysis.c *** gcc-4.9.2/gcc/ipa-inline-analysis.c Fri Mar 28 19:50:28 2014 --- gcc-4.9.3/gcc/ipa-inline-analysis.c Wed Dec 3 15:17:37 2014 *************** evaluate_conditions_for_known_args (stru *** 861,869 **** } if (c->code == IS_NOT_CONSTANT || c->code == CHANGED) continue; ! res = fold_binary_to_constant (c->code, boolean_type_node, val, c->val); ! if (res && integer_zerop (res)) ! continue; clause |= 1 << (i + predicate_first_dynamic_condition); } return clause; --- 861,879 ---- } if (c->code == IS_NOT_CONSTANT || c->code == CHANGED) continue; ! ! if (operand_equal_p (TYPE_SIZE (TREE_TYPE (c->val)), ! TYPE_SIZE (TREE_TYPE (val)), 0)) ! { ! val = fold_unary (VIEW_CONVERT_EXPR, TREE_TYPE (c->val), val); ! ! res = val ! ? fold_binary_to_constant (c->code, boolean_type_node, val, c->val) ! : NULL; ! ! if (res && integer_zerop (res)) ! continue; ! } clause |= 1 << (i + predicate_first_dynamic_condition); } return clause; diff -Nrcpad gcc-4.9.2/gcc/ipa-inline-transform.c gcc-4.9.3/gcc/ipa-inline-transform.c *** gcc-4.9.2/gcc/ipa-inline-transform.c Wed May 21 05:40:09 2014 --- gcc-4.9.3/gcc/ipa-inline-transform.c Wed Jan 21 21:56:14 2015 *************** can_remove_node_now_p_1 (struct cgraph_n *** 87,93 **** the callgraph so references can point to it. */ return (!node->address_taken && !ipa_ref_has_aliases_p (&node->ref_list) - && !node->used_as_abstract_origin && cgraph_can_remove_if_no_direct_calls_p (node) /* Inlining might enable more devirtualizing, so we want to remove those only after all devirtualizable virtual calls are processed. --- 87,92 ---- *************** clone_inlined_nodes (struct cgraph_edge *** 185,190 **** --- 184,190 ---- n = cgraph_clone_node (e->callee, e->callee->decl, e->count, freq_scale, update_original, vNULL, true, inlining_into, NULL); + n->used_as_abstract_origin = e->callee->used_as_abstract_origin; cgraph_redirect_edge_callee (e, n); } } diff -Nrcpad gcc-4.9.2/gcc/ipa-pure-const.c gcc-4.9.3/gcc/ipa-pure-const.c *** gcc-4.9.2/gcc/ipa-pure-const.c Wed Mar 26 02:07:51 2014 --- gcc-4.9.3/gcc/ipa-pure-const.c Wed Nov 12 23:18:47 2014 *************** propagate_nothrow (void) *** 1434,1440 **** else if (e->can_throw_external && !TREE_NOTHROW (y->decl)) can_throw = true; } ! for (ie = node->indirect_calls; ie; ie = ie->next_callee) if (ie->can_throw_external) { can_throw = true; --- 1434,1440 ---- else if (e->can_throw_external && !TREE_NOTHROW (y->decl)) can_throw = true; } ! for (ie = w->indirect_calls; ie; ie = ie->next_callee) if (ie->can_throw_external) { can_throw = true; diff -Nrcpad gcc-4.9.2/gcc/ipa.c gcc-4.9.3/gcc/ipa.c *** gcc-4.9.2/gcc/ipa.c Mon May 19 02:47:31 2014 --- gcc-4.9.3/gcc/ipa.c Wed Feb 4 23:36:22 2015 *************** symtab_remove_unreachable_nodes (bool be *** 364,372 **** && DECL_ABSTRACT_ORIGIN (node->decl)) { struct cgraph_node *origin_node ! = cgraph_get_create_node (DECL_ABSTRACT_ORIGIN (node->decl)); ! origin_node->used_as_abstract_origin = true; ! enqueue_node (origin_node, &first, reachable); } /* If any symbol in a comdat group is reachable, force all externally visible symbols in the same comdat --- 364,380 ---- && DECL_ABSTRACT_ORIGIN (node->decl)) { struct cgraph_node *origin_node ! = cgraph_get_node (DECL_ABSTRACT_ORIGIN (node->decl)); ! if (origin_node && !origin_node->used_as_abstract_origin) ! { ! origin_node->used_as_abstract_origin = true; ! gcc_assert (!origin_node->prev_sibling_clone); ! gcc_assert (!origin_node->next_sibling_clone); ! for (cgraph_node *n = origin_node->clones; n; ! n = n->next_sibling_clone) ! if (n->decl == DECL_ABSTRACT_ORIGIN (node->decl)) ! n->used_as_abstract_origin = true; ! } } /* If any symbol in a comdat group is reachable, force all externally visible symbols in the same comdat diff -Nrcpad gcc-4.9.2/gcc/ira-build.c gcc-4.9.3/gcc/ira-build.c *** gcc-4.9.2/gcc/ira-build.c Thu Jan 2 22:23:26 2014 --- gcc-4.9.3/gcc/ira-build.c Fri Jun 19 14:41:32 2015 *************** ira_create_allocno (int regno, bool cap_ *** 523,528 **** --- 523,529 ---- ALLOCNO_BAD_SPILL_P (a) = false; ALLOCNO_ASSIGNED_P (a) = false; ALLOCNO_MODE (a) = (regno < 0 ? VOIDmode : PSEUDO_REGNO_MODE (regno)); + ALLOCNO_WMODE (a) = ALLOCNO_MODE (a); ALLOCNO_PREFS (a) = NULL; ALLOCNO_COPIES (a) = NULL; ALLOCNO_HARD_REG_COSTS (a) = NULL; *************** create_cap_allocno (ira_allocno_t a) *** 892,897 **** --- 893,899 ---- parent = ALLOCNO_LOOP_TREE_NODE (a)->parent; cap = ira_create_allocno (ALLOCNO_REGNO (a), true, parent); ALLOCNO_MODE (cap) = ALLOCNO_MODE (a); + ALLOCNO_WMODE (cap) = ALLOCNO_WMODE (a); aclass = ALLOCNO_CLASS (a); ira_set_allocno_class (cap, aclass); ira_create_allocno_objects (cap); *************** static basic_block curr_bb; *** 1856,1864 **** /* This recursive function creates allocnos corresponding to pseudo-registers containing in X. True OUTPUT_P means that X is ! a lvalue. */ static void ! create_insn_allocnos (rtx x, bool output_p) { int i, j; const char *fmt; --- 1858,1866 ---- /* This recursive function creates allocnos corresponding to pseudo-registers containing in X. True OUTPUT_P means that X is ! an lvalue. PARENT corresponds to the parent expression of X. */ static void ! create_insn_allocnos (rtx x, rtx outer, bool output_p) { int i, j; const char *fmt; *************** create_insn_allocnos (rtx x, bool output *** 1873,1879 **** ira_allocno_t a; if ((a = ira_curr_regno_allocno_map[regno]) == NULL) ! a = ira_create_allocno (regno, false, ira_curr_loop_tree_node); ALLOCNO_NREFS (a)++; ALLOCNO_FREQ (a) += REG_FREQ_FROM_BB (curr_bb); --- 1875,1889 ---- ira_allocno_t a; if ((a = ira_curr_regno_allocno_map[regno]) == NULL) ! { ! a = ira_create_allocno (regno, false, ira_curr_loop_tree_node); ! if (outer != NULL && GET_CODE (outer) == SUBREG) ! { ! enum machine_mode wmode = GET_MODE (outer); ! if (GET_MODE_SIZE (wmode) > GET_MODE_SIZE (ALLOCNO_WMODE (a))) ! ALLOCNO_WMODE (a) = wmode; ! } ! } ALLOCNO_NREFS (a)++; ALLOCNO_FREQ (a) += REG_FREQ_FROM_BB (curr_bb); *************** create_insn_allocnos (rtx x, bool output *** 1884,1908 **** } else if (code == SET) { ! create_insn_allocnos (SET_DEST (x), true); ! create_insn_allocnos (SET_SRC (x), false); return; } else if (code == CLOBBER) { ! create_insn_allocnos (XEXP (x, 0), true); return; } else if (code == MEM) { ! create_insn_allocnos (XEXP (x, 0), false); return; } else if (code == PRE_DEC || code == POST_DEC || code == PRE_INC || code == POST_INC || code == POST_MODIFY || code == PRE_MODIFY) { ! create_insn_allocnos (XEXP (x, 0), true); ! create_insn_allocnos (XEXP (x, 0), false); return; } --- 1894,1918 ---- } else if (code == SET) { ! create_insn_allocnos (SET_DEST (x), NULL, true); ! create_insn_allocnos (SET_SRC (x), NULL, false); return; } else if (code == CLOBBER) { ! create_insn_allocnos (XEXP (x, 0), NULL, true); return; } else if (code == MEM) { ! create_insn_allocnos (XEXP (x, 0), NULL, false); return; } else if (code == PRE_DEC || code == POST_DEC || code == PRE_INC || code == POST_INC || code == POST_MODIFY || code == PRE_MODIFY) { ! create_insn_allocnos (XEXP (x, 0), NULL, true); ! create_insn_allocnos (XEXP (x, 0), NULL, false); return; } *************** create_insn_allocnos (rtx x, bool output *** 1910,1919 **** for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) { if (fmt[i] == 'e') ! create_insn_allocnos (XEXP (x, i), output_p); else if (fmt[i] == 'E') for (j = 0; j < XVECLEN (x, i); j++) ! create_insn_allocnos (XVECEXP (x, i, j), output_p); } } --- 1920,1929 ---- for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) { if (fmt[i] == 'e') ! create_insn_allocnos (XEXP (x, i), x, output_p); else if (fmt[i] == 'E') for (j = 0; j < XVECLEN (x, i); j++) ! create_insn_allocnos (XVECEXP (x, i, j), x, output_p); } } *************** create_bb_allocnos (ira_loop_tree_node_t *** 1932,1938 **** ira_assert (bb != NULL); FOR_BB_INSNS_REVERSE (bb, insn) if (NONDEBUG_INSN_P (insn)) ! create_insn_allocnos (PATTERN (insn), false); /* It might be a allocno living through from one subloop to another. */ EXECUTE_IF_SET_IN_REG_SET (df_get_live_in (bb), FIRST_PSEUDO_REGISTER, i, bi) --- 1942,1948 ---- ira_assert (bb != NULL); FOR_BB_INSNS_REVERSE (bb, insn) if (NONDEBUG_INSN_P (insn)) ! create_insn_allocnos (PATTERN (insn), NULL, false); /* It might be a allocno living through from one subloop to another. */ EXECUTE_IF_SET_IN_REG_SET (df_get_live_in (bb), FIRST_PSEUDO_REGISTER, i, bi) diff -Nrcpad gcc-4.9.2/gcc/ira-conflicts.c gcc-4.9.3/gcc/ira-conflicts.c *** gcc-4.9.2/gcc/ira-conflicts.c Thu Jan 2 22:23:26 2014 --- gcc-4.9.3/gcc/ira-conflicts.c Fri Jun 19 14:41:32 2015 *************** ira_build_conflicts (void) *** 774,779 **** --- 774,800 ---- temp_hard_reg_set); } + /* Now we deal with paradoxical subreg cases where certain registers + cannot be accessed in the widest mode. */ + enum machine_mode outer_mode = ALLOCNO_WMODE (a); + enum machine_mode inner_mode = ALLOCNO_MODE (a); + if (GET_MODE_SIZE (outer_mode) > GET_MODE_SIZE (inner_mode)) + { + enum reg_class aclass = ALLOCNO_CLASS (a); + for (int j = ira_class_hard_regs_num[aclass] - 1; j >= 0; --j) + { + int inner_regno = ira_class_hard_regs[aclass][j]; + int outer_regno = simplify_subreg_regno (inner_regno, + inner_mode, 0, + outer_mode); + if (outer_regno < 0 + || !in_hard_reg_set_p (reg_class_contents[aclass], + outer_mode, outer_regno)) + SET_HARD_REG_BIT (OBJECT_CONFLICT_HARD_REGS (obj), + inner_regno); + } + } + if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0) { int regno; diff -Nrcpad gcc-4.9.2/gcc/ira-int.h gcc-4.9.3/gcc/ira-int.h *** gcc-4.9.2/gcc/ira-int.h Thu Jan 2 22:23:26 2014 --- gcc-4.9.3/gcc/ira-int.h Fri Jun 19 14:41:32 2015 *************** struct ira_allocno *** 281,286 **** --- 281,289 ---- /* Mode of the allocno which is the mode of the corresponding pseudo-register. */ ENUM_BITFIELD (machine_mode) mode : 8; + /* Widest mode of the allocno which in at least one case could be + for paradoxical subregs where wmode > mode. */ + ENUM_BITFIELD (machine_mode) wmode : 8; /* Register class which should be used for allocation for given allocno. NO_REGS means that we should use memory. */ ENUM_BITFIELD (reg_class) aclass : 16; *************** struct ira_allocno *** 313,319 **** number (0, ...) - 2. Value -1 is used for allocnos spilled by the reload (at this point pseudo-register has only one allocno) which did not get stack slot yet. */ ! short int hard_regno; /* Allocnos with the same regno are linked by the following member. Allocnos corresponding to inner loops are first in the list (it corresponds to depth-first traverse of the loops). */ --- 316,322 ---- number (0, ...) - 2. Value -1 is used for allocnos spilled by the reload (at this point pseudo-register has only one allocno) which did not get stack slot yet. */ ! int hard_regno : 16; /* Allocnos with the same regno are linked by the following member. Allocnos corresponding to inner loops are first in the list (it corresponds to depth-first traverse of the loops). */ *************** struct ira_allocno *** 430,435 **** --- 433,439 ---- #define ALLOCNO_BAD_SPILL_P(A) ((A)->bad_spill_p) #define ALLOCNO_ASSIGNED_P(A) ((A)->assigned_p) #define ALLOCNO_MODE(A) ((A)->mode) + #define ALLOCNO_WMODE(A) ((A)->wmode) #define ALLOCNO_PREFS(A) ((A)->allocno_prefs) #define ALLOCNO_COPIES(A) ((A)->allocno_copies) #define ALLOCNO_HARD_REG_COSTS(A) ((A)->hard_reg_costs) diff -Nrcpad gcc-4.9.2/gcc/ira.c gcc-4.9.3/gcc/ira.c *** gcc-4.9.2/gcc/ira.c Thu Mar 20 19:47:09 2014 --- gcc-4.9.3/gcc/ira.c Fri Jun 12 11:54:43 2015 *************** rtx_moveable_p (rtx *loc, enum op_type t *** 4434,4439 **** --- 4434,4445 ---- case CLOBBER: return rtx_moveable_p (&SET_DEST (x), OP_OUT); + case UNSPEC_VOLATILE: + /* It is a bad idea to consider insns with with such rtl + as moveable ones. The insn scheduler also considers them as barrier + for a reason. */ + return false; + default: break; } *************** ira (FILE *f) *** 5347,5353 **** ira_allocno_iterator ai; FOR_EACH_ALLOCNO (a, ai) ! ALLOCNO_REGNO (a) = REGNO (ALLOCNO_EMIT_DATA (a)->reg); } else { --- 5353,5370 ---- ira_allocno_iterator ai; FOR_EACH_ALLOCNO (a, ai) ! { ! int old_regno = ALLOCNO_REGNO (a); ! int new_regno = REGNO (ALLOCNO_EMIT_DATA (a)->reg); ! ! ALLOCNO_REGNO (a) = new_regno; ! ! if (old_regno != new_regno) ! setup_reg_classes (new_regno, reg_preferred_class (old_regno), ! reg_alternate_class (old_regno), ! reg_allocno_class (old_regno)); ! } ! } else { diff -Nrcpad gcc-4.9.2/gcc/java/ChangeLog gcc-4.9.3/gcc/java/ChangeLog *** gcc-4.9.2/gcc/java/ChangeLog Thu Oct 30 08:26:43 2014 --- gcc-4.9.3/gcc/java/ChangeLog Fri Jun 26 17:56:28 2015 *************** *** 1,3 **** --- 1,11 ---- + 2015-06-26 Release Manager + + * GCC 4.9.3 released. + + 2015-06-26 Jakub Jelinek + + * jcf-dump.c: Update displayed copyright years. + 2014-10-30 Release Manager * GCC 4.9.2 released. diff -Nrcpad gcc-4.9.2/gcc/java/jcf-dump.c gcc-4.9.3/gcc/java/jcf-dump.c *** gcc-4.9.2/gcc/java/jcf-dump.c Thu Jan 2 21:25:41 2014 --- gcc-4.9.3/gcc/java/jcf-dump.c Fri Jun 26 17:47:23 2015 *************** static void *** 1227,1233 **** version (void) { printf ("jcf-dump %s%s\n\n", pkgversion_string, version_string); ! printf ("Copyright %s 2014 Free Software Foundation, Inc.\n", _("(C)")); printf (_("This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n")); exit (0); --- 1227,1233 ---- version (void) { printf ("jcf-dump %s%s\n\n", pkgversion_string, version_string); ! printf ("Copyright %s 2015 Free Software Foundation, Inc.\n", _("(C)")); printf (_("This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n")); exit (0); diff -Nrcpad gcc-4.9.2/gcc/jump.c gcc-4.9.3/gcc/jump.c *** gcc-4.9.2/gcc/jump.c Sat Jan 18 10:12:22 2014 --- gcc-4.9.3/gcc/jump.c Sun Feb 1 17:37:06 2015 *************** cleanup_barriers (void) *** 133,139 **** if (BARRIER_P (prev)) delete_insn (insn); else if (prev != PREV_INSN (insn)) ! reorder_insns_nobb (insn, insn, prev); } } return 0; --- 133,162 ---- if (BARRIER_P (prev)) delete_insn (insn); else if (prev != PREV_INSN (insn)) ! { ! basic_block bb = BLOCK_FOR_INSN (prev); ! rtx end = PREV_INSN (insn); ! reorder_insns_nobb (insn, insn, prev); ! if (bb) ! { ! /* If the backend called in machine reorg compute_bb_for_insn ! and didn't free_bb_for_insn again, preserve basic block ! boundaries. Move the end of basic block to PREV since ! it is followed by a barrier now, and clear BLOCK_FOR_INSN ! on the following notes. ! ??? Maybe the proper solution for the targets that have ! cfg around after machine reorg is not to run cleanup_barriers ! pass at all. */ ! BB_END (bb) = prev; ! do ! { ! prev = NEXT_INSN (prev); ! if (prev != insn && BLOCK_FOR_INSN (prev) == bb) ! BLOCK_FOR_INSN (prev) = NULL; ! } ! while (prev != end); ! } ! } } } return 0; diff -Nrcpad gcc-4.9.2/gcc/lra-assigns.c gcc-4.9.3/gcc/lra-assigns.c *** gcc-4.9.2/gcc/lra-assigns.c Wed Oct 15 15:51:07 2014 --- gcc-4.9.3/gcc/lra-assigns.c Fri Apr 10 19:43:28 2015 *************** spill_for (int regno, bitmap spilled_pse *** 849,854 **** --- 849,855 ---- enum reg_class rclass; unsigned int spill_regno, reload_regno, uid; int insn_pseudos_num, best_insn_pseudos_num; + int bad_spills_num, smallest_bad_spills_num; lra_live_range_t r; bitmap_iterator bi; *************** spill_for (int regno, bitmap spilled_pse *** 867,872 **** --- 868,874 ---- best_hard_regno = -1; best_cost = INT_MAX; best_insn_pseudos_num = INT_MAX; + smallest_bad_spills_num = INT_MAX; rclass_size = ira_class_hard_regs_num[rclass]; mode = PSEUDO_REGNO_MODE (regno); /* Invalidate try_hard_reg_pseudos elements. */ *************** spill_for (int regno, bitmap spilled_pse *** 895,900 **** --- 897,903 ---- && ! bitmap_bit_p (&lra_optional_reload_pseudos, spill_regno)) goto fail; insn_pseudos_num = 0; + bad_spills_num = 0; if (lra_dump_file != NULL) fprintf (lra_dump_file, " Trying %d:", hard_regno); sparseset_clear (live_range_reload_inheritance_pseudos); *************** spill_for (int regno, bitmap spilled_pse *** 902,907 **** --- 905,912 ---- { if (bitmap_bit_p (&insn_conflict_pseudos, spill_regno)) insn_pseudos_num++; + if (spill_regno >= (unsigned int) lra_bad_spill_regno_start) + bad_spills_num++; for (r = lra_reg_info[spill_regno].live_ranges; r != NULL; r = r->next) *************** spill_for (int regno, bitmap spilled_pse *** 972,986 **** } if (best_insn_pseudos_num > insn_pseudos_num || (best_insn_pseudos_num == insn_pseudos_num ! && best_cost > cost)) { best_insn_pseudos_num = insn_pseudos_num; best_cost = cost; best_hard_regno = hard_regno; bitmap_copy (&best_spill_pseudos_bitmap, &spill_pseudos_bitmap); if (lra_dump_file != NULL) ! fprintf (lra_dump_file, " Now best %d(cost=%d)\n", ! hard_regno, cost); } assign_temporarily (regno, -1); for (j = 0; j < n; j++) --- 977,995 ---- } if (best_insn_pseudos_num > insn_pseudos_num || (best_insn_pseudos_num == insn_pseudos_num ! && (bad_spills_num < smallest_bad_spills_num ! || (bad_spills_num == smallest_bad_spills_num ! && best_cost > cost)))) { best_insn_pseudos_num = insn_pseudos_num; + smallest_bad_spills_num = bad_spills_num; best_cost = cost; best_hard_regno = hard_regno; bitmap_copy (&best_spill_pseudos_bitmap, &spill_pseudos_bitmap); if (lra_dump_file != NULL) ! fprintf (lra_dump_file, ! " Now best %d(cost=%d, bad_spills=%d, insn_pseudos=%d)\n", ! hard_regno, cost, bad_spills_num, insn_pseudos_num); } assign_temporarily (regno, -1); for (j = 0; j < n; j++) diff -Nrcpad gcc-4.9.2/gcc/lra-constraints.c gcc-4.9.3/gcc/lra-constraints.c *** gcc-4.9.2/gcc/lra-constraints.c Wed Oct 15 15:51:07 2014 --- gcc-4.9.3/gcc/lra-constraints.c Fri Mar 27 19:23:15 2015 *************** static basic_block curr_bb; *** 144,149 **** --- 144,153 ---- static lra_insn_recog_data_t curr_id; static struct lra_static_insn_data *curr_static_id; static enum machine_mode curr_operand_mode[MAX_RECOG_OPERANDS]; + /* Mode of the register substituted by its equivalence with VOIDmode + (e.g. constant) and whose subreg is given operand of the current + insn. VOIDmode in all other cases. */ + static machine_mode original_subreg_reg_mode[MAX_RECOG_OPERANDS]; *************** static int valid_address_p (enum machine *** 1235,1247 **** /* Make reloads for subreg in operand NOP with internal subreg mode REG_MODE, add new reloads for further processing. Return true if ! any reload was generated. */ static bool simplify_operand_subreg (int nop, enum machine_mode reg_mode) { int hard_regno; rtx before, after; ! enum machine_mode mode; rtx reg, new_reg; rtx operand = *curr_id->operand_loc[nop]; enum reg_class regclass; --- 1239,1251 ---- /* Make reloads for subreg in operand NOP with internal subreg mode REG_MODE, add new reloads for further processing. Return true if ! any change was done. */ static bool simplify_operand_subreg (int nop, enum machine_mode reg_mode) { int hard_regno; rtx before, after; ! enum machine_mode mode, innermode; rtx reg, new_reg; rtx operand = *curr_id->operand_loc[nop]; enum reg_class regclass; *************** simplify_operand_subreg (int nop, enum m *** 1254,1259 **** --- 1258,1264 ---- mode = GET_MODE (operand); reg = SUBREG_REG (operand); + innermode = GET_MODE (reg); type = curr_static_id->operand[nop].type; /* If we change address for paradoxical subreg of memory, the address might violate the necessary alignment or the access might *************** simplify_operand_subreg (int nop, enum m *** 1272,1278 **** alter_subreg (curr_id->operand_loc[nop], false); subst = *curr_id->operand_loc[nop]; lra_assert (MEM_P (subst)); ! if (! valid_address_p (GET_MODE (reg), XEXP (reg, 0), MEM_ADDR_SPACE (reg)) || valid_address_p (GET_MODE (subst), XEXP (subst, 0), MEM_ADDR_SPACE (subst))) --- 1277,1283 ---- alter_subreg (curr_id->operand_loc[nop], false); subst = *curr_id->operand_loc[nop]; lra_assert (MEM_P (subst)); ! if (! valid_address_p (innermode, XEXP (reg, 0), MEM_ADDR_SPACE (reg)) || valid_address_p (GET_MODE (subst), XEXP (subst, 0), MEM_ADDR_SPACE (subst))) *************** simplify_operand_subreg (int nop, enum m *** 1287,1292 **** --- 1292,1311 ---- alter_subreg (curr_id->operand_loc[nop], false); return true; } + else if (CONSTANT_P (reg)) + { + /* Try to simplify subreg of constant. It is usually result of + equivalence substitution. */ + if (innermode == VOIDmode + && (innermode = original_subreg_reg_mode[nop]) == VOIDmode) + innermode = curr_static_id->operand[nop].mode; + if ((new_reg = simplify_subreg (mode, reg, innermode, + SUBREG_BYTE (operand))) != NULL_RTX) + { + *curr_id->operand_loc[nop] = new_reg; + return true; + } + } /* Put constant into memory when we have mixed modes. It generates a better code in most cases as it does not need a secondary reload memory. It also prevents LRA looping when LRA is using *************** simplify_operand_subreg (int nop, enum m *** 1306,1314 **** && (hard_regno = lra_get_regno_hard_regno (REGNO (reg))) >= 0 /* Don't reload paradoxical subregs because we could be looping having repeatedly final regno out of hard regs range. */ ! && (hard_regno_nregs[hard_regno][GET_MODE (reg)] >= hard_regno_nregs[hard_regno][mode]) ! && simplify_subreg_regno (hard_regno, GET_MODE (reg), SUBREG_BYTE (operand), mode) < 0 /* Don't reload subreg for matching reload. It is actually valid subreg in LRA. */ --- 1325,1333 ---- && (hard_regno = lra_get_regno_hard_regno (REGNO (reg))) >= 0 /* Don't reload paradoxical subregs because we could be looping having repeatedly final regno out of hard regs range. */ ! && (hard_regno_nregs[hard_regno][innermode] >= hard_regno_nregs[hard_regno][mode]) ! && simplify_subreg_regno (hard_regno, innermode, SUBREG_BYTE (operand), mode) < 0 /* Don't reload subreg for matching reload. It is actually valid subreg in LRA. */ *************** simplify_operand_subreg (int nop, enum m *** 1334,1340 **** bitmap_set_bit (&lra_subreg_reload_pseudos, REGNO (new_reg)); insert_before = (type != OP_OUT ! || GET_MODE_SIZE (GET_MODE (reg)) > GET_MODE_SIZE (mode)); insert_after = (type != OP_IN); insert_move_for_subreg (insert_before ? &before : NULL, insert_after ? &after : NULL, --- 1353,1359 ---- bitmap_set_bit (&lra_subreg_reload_pseudos, REGNO (new_reg)); insert_before = (type != OP_OUT ! || GET_MODE_SIZE (innermode) > GET_MODE_SIZE (mode)); insert_after = (type != OP_IN); insert_move_for_subreg (insert_before ? &before : NULL, insert_after ? &after : NULL, *************** simplify_operand_subreg (int nop, enum m *** 1377,1383 **** else if (REG_P (reg) && REGNO (reg) >= FIRST_PSEUDO_REGISTER && (hard_regno = lra_get_regno_hard_regno (REGNO (reg))) >= 0 ! && (hard_regno_nregs[hard_regno][GET_MODE (reg)] < hard_regno_nregs[hard_regno][mode]) && (regclass = lra_get_allocno_class (REGNO (reg))) && (type != OP_IN --- 1396,1402 ---- else if (REG_P (reg) && REGNO (reg) >= FIRST_PSEUDO_REGISTER && (hard_regno = lra_get_regno_hard_regno (REGNO (reg))) >= 0 ! && (hard_regno_nregs[hard_regno][innermode] < hard_regno_nregs[hard_regno][mode]) && (regclass = lra_get_allocno_class (REGNO (reg))) && (type != OP_IN *************** simplify_operand_subreg (int nop, enum m *** 1395,1401 **** bool insert_before, insert_after; PUT_MODE (new_reg, mode); ! subreg = simplify_gen_subreg (GET_MODE (reg), new_reg, mode, 0); bitmap_set_bit (&lra_subreg_reload_pseudos, REGNO (new_reg)); insert_before = (type != OP_OUT); --- 1414,1420 ---- bool insert_before, insert_after; PUT_MODE (new_reg, mode); ! subreg = simplify_gen_subreg (innermode, new_reg, mode, 0); bitmap_set_bit (&lra_subreg_reload_pseudos, REGNO (new_reg)); insert_before = (type != OP_OUT); *************** swap_operands (int nop) *** 3184,3189 **** --- 3203,3211 ---- enum machine_mode mode = curr_operand_mode[nop]; curr_operand_mode[nop] = curr_operand_mode[nop + 1]; curr_operand_mode[nop + 1] = mode; + mode = original_subreg_reg_mode[nop]; + original_subreg_reg_mode[nop] = original_subreg_reg_mode[nop + 1]; + original_subreg_reg_mode[nop + 1] = mode; rtx x = *curr_id->operand_loc[nop]; *curr_id->operand_loc[nop] = *curr_id->operand_loc[nop + 1]; *curr_id->operand_loc[nop + 1] = x; *************** curr_insn_transform (void) *** 3280,3293 **** if (GET_CODE (old) == SUBREG) old = SUBREG_REG (old); subst = get_equiv_with_elimination (old, curr_insn); if (subst != old) { subst = copy_rtx (subst); lra_assert (REG_P (old)); ! if (GET_CODE (op) == SUBREG) ! SUBREG_REG (op) = subst; ! else *curr_id->operand_loc[i] = subst; if (lra_dump_file != NULL) { fprintf (lra_dump_file, --- 3302,3320 ---- if (GET_CODE (old) == SUBREG) old = SUBREG_REG (old); subst = get_equiv_with_elimination (old, curr_insn); + original_subreg_reg_mode[i] = VOIDmode; if (subst != old) { subst = copy_rtx (subst); lra_assert (REG_P (old)); ! if (GET_CODE (op) != SUBREG) *curr_id->operand_loc[i] = subst; + else + { + SUBREG_REG (op) = subst; + if (GET_MODE (subst) == VOIDmode) + original_subreg_reg_mode[i] = GET_MODE (old); + } if (lra_dump_file != NULL) { fprintf (lra_dump_file, diff -Nrcpad gcc-4.9.2/gcc/lra-int.h gcc-4.9.3/gcc/lra-int.h *** gcc-4.9.2/gcc/lra-int.h Wed Oct 15 15:51:07 2014 --- gcc-4.9.3/gcc/lra-int.h Thu Apr 9 19:42:24 2015 *************** extern bool lra_former_scratch_operand_p *** 312,317 **** --- 312,318 ---- extern int lra_new_regno_start; extern int lra_constraint_new_regno_start; + extern int lra_bad_spill_regno_start; extern bitmap_head lra_inheritance_pseudos; extern bitmap_head lra_split_regs; extern bitmap_head lra_subreg_reload_pseudos; diff -Nrcpad gcc-4.9.2/gcc/lra-lives.c gcc-4.9.3/gcc/lra-lives.c *** gcc-4.9.2/gcc/lra-lives.c Thu Jan 2 22:23:26 2014 --- gcc-4.9.3/gcc/lra-lives.c Mon Jun 22 18:17:28 2015 *************** process_bb_lives (basic_block bb, int &c *** 565,571 **** dst_regno = REGNO (SET_DEST (set)); if (dst_regno >= lra_constraint_new_regno_start && src_regno >= lra_constraint_new_regno_start) ! lra_create_copy (dst_regno, src_regno, freq); else if (dst_regno >= lra_constraint_new_regno_start) { if ((hard_regno = src_regno) >= FIRST_PSEUDO_REGISTER) --- 565,579 ---- dst_regno = REGNO (SET_DEST (set)); if (dst_regno >= lra_constraint_new_regno_start && src_regno >= lra_constraint_new_regno_start) ! { ! /* It might be still an original (non-reload) insn with ! one unused output and a constraint requiring to use ! the same reg for input/output operands. In this case ! dst_regno and src_regno have the same value, we don't ! need a misleading copy for this case. */ ! if (dst_regno != src_regno) ! lra_create_copy (dst_regno, src_regno, freq); ! } else if (dst_regno >= lra_constraint_new_regno_start) { if ((hard_regno = src_regno) >= FIRST_PSEUDO_REGISTER) diff -Nrcpad gcc-4.9.2/gcc/lra.c gcc-4.9.3/gcc/lra.c *** gcc-4.9.2/gcc/lra.c Wed Oct 15 15:51:07 2014 --- gcc-4.9.3/gcc/lra.c Thu Apr 9 19:42:24 2015 *************** int lra_new_regno_start; *** 2215,2220 **** --- 2215,2224 ---- /* Start of reload pseudo regnos before the new spill pass. */ int lra_constraint_new_regno_start; + /* Avoid spilling pseudos with regno more than the following value if + it is possible. */ + int lra_bad_spill_regno_start; + /* Inheritance pseudo regnos before the new spill pass. */ bitmap_head lra_inheritance_pseudos; *************** lra (FILE *f) *** 2306,2311 **** --- 2310,2316 ---- permit changing reg classes for pseudos created by this simplification. */ lra_constraint_new_regno_start = lra_new_regno_start = max_reg_num (); + lra_bad_spill_regno_start = INT_MAX; remove_scratches (); scratch_p = lra_constraint_new_regno_start != max_reg_num (); *************** lra (FILE *f) *** 2418,2423 **** --- 2423,2434 ---- some eliminations. So update the offsets here. */ lra_eliminate (false, false); lra_constraint_new_regno_start = max_reg_num (); + if (lra_bad_spill_regno_start == INT_MAX + && lra_inheritance_iter > LRA_MAX_INHERITANCE_PASSES) + /* After switching off inheritance and rematerialization + passes, avoid spilling reload pseudos will be created to + prevent LRA cycling in some complicated cases. */ + lra_bad_spill_regno_start = lra_constraint_new_regno_start; lra_constraint_new_insn_uid_start = get_max_uid (); lra_assignment_iter_after_spill = 0; } diff -Nrcpad gcc-4.9.2/gcc/lto/ChangeLog gcc-4.9.3/gcc/lto/ChangeLog *** gcc-4.9.2/gcc/lto/ChangeLog Thu Oct 30 08:26:48 2014 --- gcc-4.9.3/gcc/lto/ChangeLog Fri Jun 26 17:56:44 2015 *************** *** 1,3 **** --- 1,7 ---- + 2015-06-26 Release Manager + + * GCC 4.9.3 released. + 2014-10-30 Release Manager * GCC 4.9.2 released. diff -Nrcpad gcc-4.9.2/gcc/lto-cgraph.c gcc-4.9.3/gcc/lto-cgraph.c *** gcc-4.9.2/gcc/lto-cgraph.c Fri Apr 4 18:02:31 2014 --- gcc-4.9.3/gcc/lto-cgraph.c Wed Jan 21 21:56:14 2015 *************** compute_ltrans_boundary (lto_symtab_enco *** 793,799 **** if (DECL_ABSTRACT_ORIGIN (node->decl)) { struct cgraph_node *origin_node ! = cgraph_get_node (DECL_ABSTRACT_ORIGIN (node->decl)); add_node_to (encoder, origin_node, true); } } --- 793,800 ---- if (DECL_ABSTRACT_ORIGIN (node->decl)) { struct cgraph_node *origin_node ! = cgraph_get_create_node (DECL_ABSTRACT_ORIGIN (node->decl)); ! origin_node->used_as_abstract_origin = true; add_node_to (encoder, origin_node, true); } } diff -Nrcpad gcc-4.9.2/gcc/lto-streamer-out.c gcc-4.9.3/gcc/lto-streamer-out.c *** gcc-4.9.2/gcc/lto-streamer-out.c Sun Oct 5 02:37:31 2014 --- gcc-4.9.3/gcc/lto-streamer-out.c Fri Feb 27 08:41:26 2015 *************** tree_is_indexable (tree t) *** 135,142 **** /* Parameters and return values of functions of variably modified types must go to global stream, because they may be used in the type definition. */ ! if (TREE_CODE (t) == PARM_DECL || TREE_CODE (t) == RESULT_DECL) return variably_modified_type_p (TREE_TYPE (DECL_CONTEXT (t)), NULL_TREE); else if (((TREE_CODE (t) == VAR_DECL && !TREE_STATIC (t)) || TREE_CODE (t) == TYPE_DECL || TREE_CODE (t) == CONST_DECL --- 135,146 ---- /* Parameters and return values of functions of variably modified types must go to global stream, because they may be used in the type definition. */ ! if ((TREE_CODE (t) == PARM_DECL || TREE_CODE (t) == RESULT_DECL) ! && DECL_CONTEXT (t)) return variably_modified_type_p (TREE_TYPE (DECL_CONTEXT (t)), NULL_TREE); + /* IMPORTED_DECL is put into BLOCK and thus it never can be shared. */ + else if (TREE_CODE (t) == IMPORTED_DECL) + return false; else if (((TREE_CODE (t) == VAR_DECL && !TREE_STATIC (t)) || TREE_CODE (t) == TYPE_DECL || TREE_CODE (t) == CONST_DECL diff -Nrcpad gcc-4.9.2/gcc/objc/ChangeLog gcc-4.9.3/gcc/objc/ChangeLog *** gcc-4.9.2/gcc/objc/ChangeLog Thu Oct 30 08:27:01 2014 --- gcc-4.9.3/gcc/objc/ChangeLog Fri Jun 26 17:56:24 2015 *************** *** 1,3 **** --- 1,7 ---- + 2015-06-26 Release Manager + + * GCC 4.9.3 released. + 2014-10-30 Release Manager * GCC 4.9.2 released. diff -Nrcpad gcc-4.9.2/gcc/objcp/ChangeLog gcc-4.9.3/gcc/objcp/ChangeLog *** gcc-4.9.2/gcc/objcp/ChangeLog Thu Oct 30 08:27:14 2014 --- gcc-4.9.3/gcc/objcp/ChangeLog Fri Jun 26 17:56:36 2015 *************** *** 1,3 **** --- 1,7 ---- + 2015-06-26 Release Manager + + * GCC 4.9.3 released. + 2014-10-30 Release Manager * GCC 4.9.2 released. diff -Nrcpad gcc-4.9.2/gcc/omp-low.c gcc-4.9.3/gcc/omp-low.c *** gcc-4.9.2/gcc/omp-low.c Fri Oct 3 08:17:34 2014 --- gcc-4.9.3/gcc/omp-low.c Wed Jun 3 15:35:03 2015 *************** fixup_child_record_type (omp_context *ct *** 1483,1489 **** layout_type (type); } ! TREE_TYPE (ctx->receiver_decl) = build_pointer_type (type); } /* Instantiate decls as necessary in CTX to satisfy the data sharing --- 1483,1490 ---- layout_type (type); } ! TREE_TYPE (ctx->receiver_decl) ! = build_qualified_type (build_reference_type (type), TYPE_QUAL_RESTRICT); } /* Instantiate decls as necessary in CTX to satisfy the data sharing *************** scan_sharing_clauses (tree clauses, omp_ *** 1633,1639 **** #pragma omp target data, there is nothing to map for those. */ if (gimple_omp_target_kind (ctx->stmt) == GF_OMP_TARGET_KIND_DATA ! && !POINTER_TYPE_P (TREE_TYPE (decl))) break; } if (DECL_P (decl)) --- 1634,1641 ---- #pragma omp target data, there is nothing to map for those. */ if (gimple_omp_target_kind (ctx->stmt) == GF_OMP_TARGET_KIND_DATA ! && !POINTER_TYPE_P (TREE_TYPE (decl)) ! && !OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION (c)) break; } if (DECL_P (decl)) *************** expand_omp_taskreg (struct omp_region *r *** 4784,4790 **** child_cfun = DECL_STRUCT_FUNCTION (child_fn); entry_bb = region->entry; ! exit_bb = region->exit; if (is_combined_parallel (region)) ws_args = region->ws_args; --- 4786,4795 ---- child_cfun = DECL_STRUCT_FUNCTION (child_fn); entry_bb = region->entry; ! if (gimple_code (entry_stmt) == GIMPLE_OMP_TASK) ! exit_bb = region->cont; ! else ! exit_bb = region->exit; if (is_combined_parallel (region)) ws_args = region->ws_args; *************** expand_omp_taskreg (struct omp_region *r *** 4833,4839 **** variable. In which case, we need to keep the assignment. */ if (gimple_omp_taskreg_data_arg (entry_stmt)) { ! basic_block entry_succ_bb = single_succ (entry_bb); gimple_stmt_iterator gsi; tree arg, narg; gimple parcopy_stmt = NULL; --- 4838,4846 ---- variable. In which case, we need to keep the assignment. */ if (gimple_omp_taskreg_data_arg (entry_stmt)) { ! basic_block entry_succ_bb ! = single_succ_p (entry_bb) ? single_succ (entry_bb) ! : FALLTHRU_EDGE (entry_bb)->dest; gimple_stmt_iterator gsi; tree arg, narg; gimple parcopy_stmt = NULL; *************** expand_omp_taskreg (struct omp_region *r *** 4922,4935 **** gsi_remove (&gsi, true); e = split_block (entry_bb, stmt); entry_bb = e->dest; ! single_succ_edge (entry_bb)->flags = EDGE_FALLTHRU; ! /* Convert GIMPLE_OMP_RETURN into a RETURN_EXPR. */ if (exit_bb) { gsi = gsi_last_bb (exit_bb); gcc_assert (!gsi_end_p (gsi) ! && gimple_code (gsi_stmt (gsi)) == GIMPLE_OMP_RETURN); stmt = gimple_build_return (NULL); gsi_insert_after (&gsi, stmt, GSI_SAME_STMT); gsi_remove (&gsi, true); --- 4929,4956 ---- gsi_remove (&gsi, true); e = split_block (entry_bb, stmt); entry_bb = e->dest; ! edge e2 = NULL; ! if (gimple_code (entry_stmt) == GIMPLE_OMP_PARALLEL) ! single_succ_edge (entry_bb)->flags = EDGE_FALLTHRU; ! else ! { ! e2 = make_edge (e->src, BRANCH_EDGE (entry_bb)->dest, EDGE_ABNORMAL); ! gcc_assert (e2->dest == region->exit); ! remove_edge (BRANCH_EDGE (entry_bb)); ! set_immediate_dominator (CDI_DOMINATORS, e2->dest, e->src); ! gsi = gsi_last_bb (region->exit); ! gcc_assert (!gsi_end_p (gsi) ! && gimple_code (gsi_stmt (gsi)) == GIMPLE_OMP_RETURN); ! gsi_remove (&gsi, true); ! } ! /* Convert GIMPLE_OMP_{RETURN,CONTINUE} into a RETURN_EXPR. */ if (exit_bb) { gsi = gsi_last_bb (exit_bb); gcc_assert (!gsi_end_p (gsi) ! && (gimple_code (gsi_stmt (gsi)) ! == (e2 ? GIMPLE_OMP_CONTINUE : GIMPLE_OMP_RETURN))); stmt = gimple_build_return (NULL); gsi_insert_after (&gsi, stmt, GSI_SAME_STMT); gsi_remove (&gsi, true); *************** expand_omp_taskreg (struct omp_region *r *** 4950,4955 **** --- 4971,4984 ---- new_bb = move_sese_region_to_fn (child_cfun, entry_bb, exit_bb, block); if (exit_bb) single_succ_edge (new_bb)->flags = EDGE_FALLTHRU; + if (e2) + { + basic_block dest_bb = e2->dest; + if (!exit_bb) + make_edge (new_bb, dest_bb, EDGE_FALLTHRU); + remove_edge (e2); + set_immediate_dominator (CDI_DOMINATORS, dest_bb, new_bb); + } /* When the OMP expansion process cannot guarantee an up-to-date loop tree arrange for the child function to fixup loops. */ if (loops_state_satisfies_p (LOOPS_NEED_FIXUP)) *************** lower_omp_taskreg (gimple_stmt_iterator *** 9699,9704 **** --- 9728,9737 ---- gimple_seq_add_stmt (&new_body, gimple_build_label (ctx->cancel_label)); gimple_seq_add_seq (&new_body, par_olist); new_body = maybe_catch_exception (new_body); + if (gimple_code (stmt) == GIMPLE_OMP_TASK) + gimple_seq_add_stmt (&new_body, + gimple_build_omp_continue (integer_zero_node, + integer_zero_node)); gimple_seq_add_stmt (&new_body, gimple_build_omp_return (false)); gimple_omp_set_body (stmt, new_body); *************** make_gimple_omp_edges (basic_block bb, s *** 10699,10704 **** --- 10732,10741 ---- somewhere other than the next block. This will be created later. */ cur_region->exit = bb; + if (cur_region->type == GIMPLE_OMP_TASK) + /* Add an edge corresponding to not scheduling the task + immediately. */ + make_edge (cur_region->entry, bb, EDGE_ABNORMAL); fallthru = cur_region->type != GIMPLE_OMP_SECTION; cur_region = cur_region->outer; break; *************** make_gimple_omp_edges (basic_block bb, s *** 10747,10752 **** --- 10784,10793 ---- } break; + case GIMPLE_OMP_TASK: + fallthru = true; + break; + default: gcc_unreachable (); } *************** simd_clone_mangle (struct cgraph_node *n *** 11105,11113 **** } pp_underscore (&pp); ! pp_string (&pp, ! IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->decl))); ! const char *str = pp_formatted_text (&pp); /* If there already is a SIMD clone with the same mangled name, don't add another one. This can happen e.g. for --- 11146,11156 ---- } pp_underscore (&pp); ! const char *str = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->decl)); ! if (*str == '*') ! ++str; ! pp_string (&pp, str); ! str = pp_formatted_text (&pp); /* If there already is a SIMD clone with the same mangled name, don't add another one. This can happen e.g. for *************** simd_clone_adjust_return_type (struct cg *** 11181,11204 **** if (orig_rettype == void_type_node) return NULL_TREE; TREE_TYPE (fndecl) = build_distinct_type_copy (TREE_TYPE (fndecl)); ! if (INTEGRAL_TYPE_P (TREE_TYPE (TREE_TYPE (fndecl))) ! || POINTER_TYPE_P (TREE_TYPE (TREE_TYPE (fndecl)))) veclen = node->simdclone->vecsize_int; else veclen = node->simdclone->vecsize_float; ! veclen /= GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (TREE_TYPE (fndecl)))); if (veclen > node->simdclone->simdlen) veclen = node->simdclone->simdlen; if (veclen == node->simdclone->simdlen) ! TREE_TYPE (TREE_TYPE (fndecl)) ! = build_vector_type (TREE_TYPE (TREE_TYPE (fndecl)), ! node->simdclone->simdlen); else { ! t = build_vector_type (TREE_TYPE (TREE_TYPE (fndecl)), veclen); t = build_array_type_nelts (t, node->simdclone->simdlen / veclen); - TREE_TYPE (TREE_TYPE (fndecl)) = t; } if (!node->definition) return NULL_TREE; --- 11224,11247 ---- if (orig_rettype == void_type_node) return NULL_TREE; TREE_TYPE (fndecl) = build_distinct_type_copy (TREE_TYPE (fndecl)); ! t = TREE_TYPE (TREE_TYPE (fndecl)); ! if (INTEGRAL_TYPE_P (t) || POINTER_TYPE_P (t)) veclen = node->simdclone->vecsize_int; else veclen = node->simdclone->vecsize_float; ! veclen /= GET_MODE_BITSIZE (TYPE_MODE (t)); if (veclen > node->simdclone->simdlen) veclen = node->simdclone->simdlen; + if (POINTER_TYPE_P (t)) + t = pointer_sized_int_node; if (veclen == node->simdclone->simdlen) ! t = build_vector_type (t, node->simdclone->simdlen); else { ! t = build_vector_type (t, veclen); t = build_array_type_nelts (t, node->simdclone->simdlen / veclen); } + TREE_TYPE (TREE_TYPE (fndecl)) = t; if (!node->definition) return NULL_TREE; *************** simd_clone_adjust_argument_types (struct *** 11287,11293 **** if (veclen > node->simdclone->simdlen) veclen = node->simdclone->simdlen; adj.arg_prefix = "simd"; ! adj.type = build_vector_type (parm_type, veclen); node->simdclone->args[i].vector_type = adj.type; for (j = veclen; j < node->simdclone->simdlen; j += veclen) { --- 11330,11339 ---- if (veclen > node->simdclone->simdlen) veclen = node->simdclone->simdlen; adj.arg_prefix = "simd"; ! if (POINTER_TYPE_P (parm_type)) ! adj.type = build_vector_type (pointer_sized_int_node, veclen); ! else ! adj.type = build_vector_type (parm_type, veclen); node->simdclone->args[i].vector_type = adj.type; for (j = veclen; j < node->simdclone->simdlen; j += veclen) { *************** simd_clone_adjust_argument_types (struct *** 11328,11334 **** veclen /= GET_MODE_BITSIZE (TYPE_MODE (base_type)); if (veclen > node->simdclone->simdlen) veclen = node->simdclone->simdlen; ! adj.type = build_vector_type (base_type, veclen); adjustments.safe_push (adj); for (j = veclen; j < node->simdclone->simdlen; j += veclen) --- 11374,11383 ---- veclen /= GET_MODE_BITSIZE (TYPE_MODE (base_type)); if (veclen > node->simdclone->simdlen) veclen = node->simdclone->simdlen; ! if (POINTER_TYPE_P (base_type)) ! adj.type = build_vector_type (pointer_sized_int_node, veclen); ! else ! adj.type = build_vector_type (base_type, veclen); adjustments.safe_push (adj); for (j = veclen; j < node->simdclone->simdlen; j += veclen) diff -Nrcpad gcc-4.9.2/gcc/po/ChangeLog gcc-4.9.3/gcc/po/ChangeLog *** gcc-4.9.2/gcc/po/ChangeLog Thu Oct 30 08:27:09 2014 --- gcc-4.9.3/gcc/po/ChangeLog Fri Jun 26 17:56:01 2015 *************** *** 1,3 **** --- 1,7 ---- + 2015-06-26 Release Manager + + * GCC 4.9.3 released. + 2014-10-30 Release Manager * GCC 4.9.2 released. diff -Nrcpad gcc-4.9.2/gcc/recog.c gcc-4.9.3/gcc/recog.c *** gcc-4.9.2/gcc/recog.c Tue Sep 9 11:42:34 2014 --- gcc-4.9.3/gcc/recog.c Tue Mar 24 07:12:03 2015 *************** constrain_operands (int strict) *** 2627,2635 **** break; win = 1; } ! /* Before reload, accept what reload can turn into mem. */ else if (strict < 0 && CONSTANT_P (op)) win = 1; /* During reload, accept a pseudo */ else if (reload_in_progress && REG_P (op) && REGNO (op) >= FIRST_PSEUDO_REGISTER) --- 2627,2640 ---- break; win = 1; } ! /* Before reload, accept what reload can turn into a mem. */ else if (strict < 0 && CONSTANT_P (op)) win = 1; + /* Before reload, accept a pseudo, + since LRA can turn it into a mem. */ + else if (strict < 0 && targetm.lra_p () && REG_P (op) + && REGNO (op) >= FIRST_PSEUDO_REGISTER) + win = 1; /* During reload, accept a pseudo */ else if (reload_in_progress && REG_P (op) && REGNO (op) >= FIRST_PSEUDO_REGISTER) *************** constrain_operands (int strict) *** 2708,2713 **** --- 2713,2722 ---- /* Before reload, accept what reload can handle. */ || (strict < 0 && (CONSTANT_P (op) || MEM_P (op))) + /* Before reload, accept a pseudo, + since LRA can turn it into a mem. */ + || (strict < 0 && targetm.lra_p () && REG_P (op) + && REGNO (op) >= FIRST_PSEUDO_REGISTER) /* During reload, accept a pseudo */ || (reload_in_progress && REG_P (op) && REGNO (op) >= FIRST_PSEUDO_REGISTER)) *************** constrain_operands (int strict) *** 2739,2746 **** /* Every memory operand can be reloaded to fit. */ && ((strict < 0 && MEM_P (op)) /* Before reload, accept what reload can turn ! into mem. */ || (strict < 0 && CONSTANT_P (op)) /* During reload, accept a pseudo */ || (reload_in_progress && REG_P (op) && REGNO (op) >= FIRST_PSEUDO_REGISTER))) --- 2748,2759 ---- /* Every memory operand can be reloaded to fit. */ && ((strict < 0 && MEM_P (op)) /* Before reload, accept what reload can turn ! into a mem. */ || (strict < 0 && CONSTANT_P (op)) + /* Before reload, accept a pseudo, + since LRA can turn it into a mem. */ + || (strict < 0 && targetm.lra_p () && REG_P (op) + && REGNO (op) >= FIRST_PSEUDO_REGISTER) /* During reload, accept a pseudo */ || (reload_in_progress && REG_P (op) && REGNO (op) >= FIRST_PSEUDO_REGISTER))) diff -Nrcpad gcc-4.9.2/gcc/ree.c gcc-4.9.3/gcc/ree.c *** gcc-4.9.2/gcc/ree.c Fri Jun 13 16:50:10 2014 --- gcc-4.9.3/gcc/ree.c Wed Jan 14 20:24:05 2015 *************** typedef struct ext_cand *** 261,266 **** --- 261,310 ---- static int max_insn_uid; + /* Update or remove REG_EQUAL or REG_EQUIV notes for INSN. */ + + static bool + update_reg_equal_equiv_notes (rtx insn, enum machine_mode new_mode, + enum machine_mode old_mode, enum rtx_code code) + { + rtx *loc = ®_NOTES (insn); + while (*loc) + { + enum reg_note kind = REG_NOTE_KIND (*loc); + if (kind == REG_EQUAL || kind == REG_EQUIV) + { + rtx orig_src = XEXP (*loc, 0); + /* Update equivalency constants. Recall that RTL constants are + sign-extended. */ + if (GET_CODE (orig_src) == CONST_INT + && HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (new_mode)) + { + if (INTVAL (orig_src) >= 0 || code == SIGN_EXTEND) + /* Nothing needed. */; + else + { + /* Zero-extend the negative constant by masking out the + bits outside the source mode. */ + rtx new_const_int + = gen_int_mode (INTVAL (orig_src) + & GET_MODE_MASK (old_mode), + new_mode); + if (!validate_change (insn, &XEXP (*loc, 0), + new_const_int, true)) + return false; + } + loc = &XEXP (*loc, 1); + } + /* Drop all other notes, they assume a wrong mode. */ + else if (!validate_change (insn, loc, XEXP (*loc, 1), true)) + return false; + } + else + loc = &XEXP (*loc, 1); + } + return true; + } + /* Given a insn (CURR_INSN), an extension candidate for removal (CAND) and a pointer to the SET rtx (ORIG_SET) that needs to be modified, this code modifies the SET rtx to a new SET rtx that extends the *************** static bool *** 282,287 **** --- 326,332 ---- combine_set_extension (ext_cand *cand, rtx curr_insn, rtx *orig_set) { rtx orig_src = SET_SRC (*orig_set); + enum machine_mode orig_mode = GET_MODE (SET_DEST (*orig_set)); rtx new_set; rtx cand_pat = PATTERN (cand->insn); *************** combine_set_extension (ext_cand *cand, r *** 318,326 **** { /* Zero-extend the negative constant by masking out the bits outside the source mode. */ - enum machine_mode src_mode = GET_MODE (SET_DEST (*orig_set)); rtx new_const_int ! = gen_int_mode (INTVAL (orig_src) & GET_MODE_MASK (src_mode), GET_MODE (new_reg)); new_set = gen_rtx_SET (VOIDmode, new_reg, new_const_int); } --- 363,370 ---- { /* Zero-extend the negative constant by masking out the bits outside the source mode. */ rtx new_const_int ! = gen_int_mode (INTVAL (orig_src) & GET_MODE_MASK (orig_mode), GET_MODE (new_reg)); new_set = gen_rtx_SET (VOIDmode, new_reg, new_const_int); } *************** combine_set_extension (ext_cand *cand, r *** 359,365 **** /* This change is a part of a group of changes. Hence, validate_change will not try to commit the change. */ ! if (validate_change (curr_insn, orig_set, new_set, true)) { if (dump_file) { --- 403,411 ---- /* This change is a part of a group of changes. Hence, validate_change will not try to commit the change. */ ! if (validate_change (curr_insn, orig_set, new_set, true) ! && update_reg_equal_equiv_notes (curr_insn, cand->mode, orig_mode, ! cand->code)) { if (dump_file) { *************** transform_ifelse (ext_cand *cand, rtx de *** 409,415 **** ifexpr = gen_rtx_IF_THEN_ELSE (cand->mode, cond, map_srcreg, map_srcreg2); new_set = gen_rtx_SET (VOIDmode, map_dstreg, ifexpr); ! if (validate_change (def_insn, &PATTERN (def_insn), new_set, true)) { if (dump_file) { --- 455,463 ---- ifexpr = gen_rtx_IF_THEN_ELSE (cand->mode, cond, map_srcreg, map_srcreg2); new_set = gen_rtx_SET (VOIDmode, map_dstreg, ifexpr); ! if (validate_change (def_insn, &PATTERN (def_insn), new_set, true) ! && update_reg_equal_equiv_notes (def_insn, cand->mode, GET_MODE (dstreg), ! cand->code)) { if (dump_file) { *************** combine_reaching_defs (ext_cand *cand, c *** 719,724 **** --- 767,783 ---- != REGNO (get_extended_src_reg (SET_SRC (PATTERN (cand->insn))))); if (copy_needed) { + /* Considering transformation of + (set (reg1) (expression)) + ... + (set (reg2) (any_extend (reg1))) + + into + + (set (reg2) (any_extend (expression))) + (set (reg1) (reg2)) + ... */ + /* In theory we could handle more than one reaching def, it just makes the code to update the insn stream more complex. */ if (state->defs_list.length () != 1) *************** combine_reaching_defs (ext_cand *cand, c *** 734,751 **** if (state->modified[INSN_UID (cand->insn)].kind != EXT_MODIFIED_NONE) return false; - /* Transformation of - (set (reg1) (expression)) - (set (reg2) (any_extend (reg1))) - into - (set (reg2) (any_extend (expression))) - (set (reg1) (reg2)) - is only valid for scalar integral modes, as it relies on the low - subreg of reg1 to have the value of (expression), which is not true - e.g. for vector modes. */ - if (!SCALAR_INT_MODE_P (GET_MODE (SET_DEST (PATTERN (cand->insn))))) - return false; - /* There's only one reaching def. */ rtx def_insn = state->defs_list[0]; --- 793,798 ---- *************** add_removable_extension (const_rtx expr, *** 954,959 **** --- 1001,1007 ---- different extension. FIXME: this obviously can be improved. */ for (def = defs; def; def = def->next) if ((idx = def_map[INSN_UID (DF_REF_INSN (def->ref))]) + && idx != -1U && (cand = &(*insn_list)[idx - 1]) && cand->code != code) { *************** add_removable_extension (const_rtx expr, *** 965,970 **** --- 1013,1069 ---- } return; } + /* For vector mode extensions, ensure that all uses of the + XEXP (src, 0) register are the same extension (both code + and to which mode), as unlike integral extensions lowpart + subreg of the sign/zero extended register are not equal + to the original register, so we have to change all uses or + none. */ + else if (VECTOR_MODE_P (GET_MODE (XEXP (src, 0)))) + { + if (idx == 0) + { + struct df_link *ref_chain, *ref_link; + + ref_chain = DF_REF_CHAIN (def->ref); + for (ref_link = ref_chain; ref_link; ref_link = ref_link->next) + { + if (ref_link->ref == NULL + || DF_REF_INSN_INFO (ref_link->ref) == NULL) + { + idx = -1U; + break; + } + rtx use_insn = DF_REF_INSN (ref_link->ref); + const_rtx use_set; + if (use_insn == insn || DEBUG_INSN_P (use_insn)) + continue; + if (!(use_set = single_set (use_insn)) + || !REG_P (SET_DEST (use_set)) + || GET_MODE (SET_DEST (use_set)) != GET_MODE (dest) + || GET_CODE (SET_SRC (use_set)) != code + || !rtx_equal_p (XEXP (SET_SRC (use_set), 0), + XEXP (src, 0))) + { + idx = -1U; + break; + } + } + if (idx == -1U) + def_map[INSN_UID (DF_REF_INSN (def->ref))] = idx; + } + if (idx == -1U) + { + if (dump_file) + { + fprintf (dump_file, "Cannot eliminate extension:\n"); + print_rtl_single (dump_file, insn); + fprintf (dump_file, + " because some vector uses aren't extension\n"); + } + return; + } + } /* Then add the candidate to the list and insert the reaching definitions into the definition map. */ diff -Nrcpad gcc-4.9.2/gcc/reload.c gcc-4.9.3/gcc/reload.c *** gcc-4.9.2/gcc/reload.c Thu Jan 16 20:51:24 2014 --- gcc-4.9.3/gcc/reload.c Wed Dec 17 15:07:28 2014 *************** push_reload (rtx in, rtx out, rtx *inloc *** 1622,1627 **** --- 1622,1628 ---- end_hard_regno (rel_mode, regno), PATTERN (this_insn), inloc) + && ! find_reg_fusage (this_insn, USE, XEXP (note, 0)) /* If this is also an output reload, IN cannot be used as the reload register if it is set in this insn unless IN is also OUT. */ diff -Nrcpad gcc-4.9.2/gcc/rtlanal.c gcc-4.9.3/gcc/rtlanal.c *** gcc-4.9.2/gcc/rtlanal.c Wed Mar 26 07:38:30 2014 --- gcc-4.9.3/gcc/rtlanal.c Tue Jan 13 01:01:14 2015 *************** reg_set_between_p (const_rtx reg, const_ *** 873,878 **** --- 873,889 ---- int reg_set_p (const_rtx reg, const_rtx insn) { + /* After delay slot handling, call and branch insns might be in a + sequence. Check all the elements there. */ + if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE) + { + for (int i = 0; i < XVECLEN (PATTERN (insn), 0); ++i) + if (reg_set_p (reg, XVECEXP (PATTERN (insn), 0, i))) + return true; + + return false; + } + /* We can be passed an insn or part of one. If we are passed an insn, check if a side-effect of the insn clobbers REG. */ if (INSN_P (insn) *************** reg_set_p (const_rtx reg, const_rtx insn *** 884,890 **** GET_MODE (reg), REGNO (reg))) || MEM_P (reg) || find_reg_fusage (insn, CLOBBER, reg))))) ! return 1; return set_of (reg, insn) != NULL_RTX; } --- 895,901 ---- GET_MODE (reg), REGNO (reg))) || MEM_P (reg) || find_reg_fusage (insn, CLOBBER, reg))))) ! return true; return set_of (reg, insn) != NULL_RTX; } diff -Nrcpad gcc-4.9.2/gcc/simplify-rtx.c gcc-4.9.3/gcc/simplify-rtx.c *** gcc-4.9.2/gcc/simplify-rtx.c Thu Jan 2 22:23:26 2014 --- gcc-4.9.3/gcc/simplify-rtx.c Thu Mar 19 09:58:42 2015 *************** simplify_binary_operation_1 (enum rtx_co *** 3633,3639 **** while (GET_MODE (vec) != mode && GET_CODE (vec) == VEC_CONCAT) { ! HOST_WIDE_INT vec_size = GET_MODE_SIZE (GET_MODE (XEXP (vec, 0))); if (offset < vec_size) vec = XEXP (vec, 0); else --- 3633,3653 ---- while (GET_MODE (vec) != mode && GET_CODE (vec) == VEC_CONCAT) { ! HOST_WIDE_INT vec_size; ! ! if (CONST_INT_P (XEXP (vec, 0))) ! { ! /* vec_concat of two const_ints doesn't make sense with ! respect to modes. */ ! if (CONST_INT_P (XEXP (vec, 1))) ! return 0; ! ! vec_size = GET_MODE_SIZE (GET_MODE (trueop0)) ! - GET_MODE_SIZE (GET_MODE (XEXP (vec, 1))); ! } ! else ! vec_size = GET_MODE_SIZE (GET_MODE (XEXP (vec, 0))); ! if (offset < vec_size) vec = XEXP (vec, 0); else diff -Nrcpad gcc-4.9.2/gcc/symtab.c gcc-4.9.3/gcc/symtab.c *** gcc-4.9.2/gcc/symtab.c Mon May 19 02:47:31 2014 --- gcc-4.9.3/gcc/symtab.c Wed Feb 25 16:46:34 2015 *************** symtab_make_decl_local (tree decl) *** 969,974 **** --- 969,975 ---- DECL_VISIBILITY_SPECIFIED (decl) = 0; DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT; TREE_PUBLIC (decl) = 0; + DECL_DLLIMPORT_P (decl) = 0; if (!DECL_RTL_SET_P (decl)) return; *************** symtab_nonoverwritable_alias (symtab_nod *** 1222,1227 **** --- 1223,1229 ---- /* Otherwise create a new one. */ new_decl = copy_node (node->decl); + DECL_DLLIMPORT_P (new_decl) = 0; DECL_NAME (new_decl) = clone_function_name (node->decl, "localalias"); if (TREE_CODE (new_decl) == FUNCTION_DECL) DECL_STRUCT_FUNCTION (new_decl) = NULL; diff -Nrcpad gcc-4.9.2/gcc/testsuite/ChangeLog gcc-4.9.3/gcc/testsuite/ChangeLog *** gcc-4.9.2/gcc/testsuite/ChangeLog Thu Oct 30 08:26:57 2014 --- gcc-4.9.3/gcc/testsuite/ChangeLog Fri Jun 26 17:56:09 2015 *************** *** 1,3 **** --- 1,1425 ---- + 2015-06-26 Release Manager + + * GCC 4.9.3 released. + + 2015-06-19 Christophe Lyon + + Backport from mainline r224649. + 2015-06-19 Christophe Lyon + + * gcc.target/aarch64/pr62308.c: New test. + + 2015-06-18 Richard Biener + + * g++.dg/other/const4.C: New testcase. + + 2015-06-18 Jakub Jelinek + + PR tree-optimization/66233 + * gcc.c-torture/execute/pr66233.c: New test. + + 2015-06-16 Ramana Radhakrishnan + + PR target/66200 + * g++.dg/abi/aarch64_guard1.C: Adjust. + + 2015-06-12 Jakub Jelinek + + PR middle-end/63608 + * gcc.c-torture/compile/pr63608.c: New test. + + 2015-06-10 Jakub Jelinek + + PR target/66470 + * gcc.dg/tls/pr66470.c: New test. + * gcc.target/i386/pr66470.c: New test. + + 2015-06-08 Uros Bizjak + + Backport from mainline: + 2015-06-03 Uros Bizjak + + PR target/66275 + * gcc.target/i386/pr66275.c: New test. + + 2015-06-04 Richard Biener + + PR middle-end/66251 + * gcc.dg/vect/pr66251.c: Fix expected vectorization. + + 2015-06-03 Jakub Jelinek + + Backported from mainline + 2015-05-04 Jakub Jelinek + + PR tree-optimization/65984 + * c-c++-common/ubsan/pr65984.c: New test. + + 2015-04-07 Jakub Jelinek + + PR middle-end/65680 + * gcc.c-torture/compile/pr65680.c: New test. + + 2015-03-23 Jakub Jelinek + + PR target/65504 + * gfortran.dg/pr65504.f90: New test. + + 2015-03-18 Jakub Jelinek + + PR tree-optimization/65450 + * gfortran.dg/pr65450.f90: New test. + + 2015-03-16 Jakub Jelinek + + PR tree-optimization/65427 + * gcc.c-torture/execute/pr65427.c: New test. + + 2015-03-10 Jakub Jelinek + + PR target/65368 + * gcc.target/i386/bmi2-bzhi-2.c: New test. + + 2015-02-18 Jakub Jelinek + + PR gcov-profile/64634 + * g++.dg/gcov/gcov-15.C: New test. + + 2015-06-03 Richard Biener + + Backport from mainline + 2015-05-26 Michael Matz + + PR middle-end/66251 + * gcc.dg/vect/pr66251.c: New test. + + 2015-05-22 Richard Biener + + PR tree-optimization/66251 + * gfortran.fortran-torture/compile/pr66251.f90: New testcase. + + 2015-05-27 Richard Biener + + PR tree-optimization/66272 + * gcc.dg/torture/pr66272.c: New testcase. + + 2015-05-13 Richard Biener + + PR tree-optimization/66123 + * gcc.dg/torture/pr66123.c: New testcase. + + 2015-06-02 Richard Biener + + PR debug/65549 + * g++.dg/lto/pr65549_0.C: New testcase. + + 2015-03-23 Richard Biener + + PR tree-optimization/65518 + * gcc.dg/vect/pr65518.c: New testcase. + + 2015-06-01 Jakub Jelinek + + * gcc.target/s390/hotpatch-compile-15.c: Remove dg-prune-output + directives. + (hp3, hp4): Add inline keyword. + * gcc.target/s390/hotpatch-19.c: Remove dg-prune-output directive. + (hp2): Add inline keyword. + * gcc.target/s390/hotpatch-19.c: Remove dg-prune-output directives. + (hp2): Add inline keyword. + + 2015-06-01 Dominik Vogt + + Backport from mainline + 2015-05-29 Dominik Vogt + + PR target/66215 + * gcc.target/s390/hotpatch-1.c: Remove optimization options from + dg-options. + * gcc.target/s390/hotpatch-10.c: Likewise. + * gcc.target/s390/hotpatch-11.c: Likewise. + * gcc.target/s390/hotpatch-12.c: Likewise. + * gcc.target/s390/hotpatch-17.c: Likewise. + * gcc.target/s390/hotpatch-18.c: Likewise. + * gcc.target/s390/hotpatch-20.c: Likewise. + * gcc.target/s390/hotpatch-21.c: Likewise. + * gcc.target/s390/hotpatch-22.c: Likewise. + * gcc.target/s390/hotpatch-23.c: Likewise. + * gcc.target/s390/hotpatch-24.c: Likewise. + * gcc.target/s390/hotpatch-2.c: Likewise. Adjust scan-assembler + to check for the exact nops too. + * gcc.target/s390/hotpatch-3.c: Likewise. + * gcc.target/s390/hotpatch-4.c: Likewise. + * gcc.target/s390/hotpatch-5.c: Likewise. + * gcc.target/s390/hotpatch-6.c: Likewise. + * gcc.target/s390/hotpatch-7.c: Likewise. + * gcc.target/s390/hotpatch-8.c: Likewise. + * gcc.target/s390/hotpatch-9.c: Likewise. + * gcc.target/s390/hotpatch-14.c: Likewise. + * gcc.target/s390/hotpatch-15.c: Likewise. + * gcc.target/s390/hotpatch-16.c: Likewise. + * gcc.target/s390/hotpatch-19.c: Likewise. + * gcc.target/s390/hotpatch-25.c: Likewise. Remove + scan-assembler-times counting number of .align directives. + * gcc.target/s390/hotpatch-13.c: Remove optimization options from + dg-options. Remove scan-assembler-times counting number of .align + directives. + * gcc.target/s390/hotpatch-26.c: New file. + * gcc.target/s390/hotpatch-27.c: New file. + * gcc.target/s390/hotpatch-28.c: New file. + * gcc.target/s390/s390.exp: Run hotpatch-*.c tests as torture tests + using -Os -O0 -O1 -O2 -O3 options. + + 2015-05-29 Bill Schmidt + + Backported from mainline + 2015-03-23 Martin Sebor + + PR testsuite/63175 + * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a-pr63175.c: Scan + assembly for lvx in addition to lxv. + + 2015-05-26 Rohit Arul Raj + + Backported from mainline + 2015-05-14 Rohit Arul Raj + + * gcc.target/powerpc/pr60158.c: New test. + + 2015-05-16 Uros Bizjak + + PR target/66140 + * gcc.target/alpha/pr66140.c: New test. + + 2015-05-06 Uros Bizjak + + PR target/65990 + * gcc.target/i386/pr65990.c: New test. + + 2015-05-06 Uros Bizjak + + * g++.dg/cpp1y/auto-fn26.C (dg-do): Use c++1y target. + + 2015-05-05 Shanyao chen + + Backported from mainline + 2015-01-19 Jiong Wang + + * gcc.target/aarch64/pr64304.c: New testcase. + + 2015-05-05 Peter Bergner + + Backport from mainline. + 2015-04-27 Peter Bergner + + PR target/64579 + * gcc.target/powerpc/htm-1.c: New test. + * gcc.target/powerpc/htm-builtin-1.c (__builtin_tabortdc): Only test + on 64-bit compiles. + (__builtin_tabortdci): Likewise. + (__builtin_tcheck): Remove operand. + * lib/target-supports.exp (check_htm_hw_available): New function. + + 2015-04-30 Bill Schmidt + + Backport from mainline r222664 + 2015-04-30 Bill Schmidt + + * gcc.target/powerpc/crypto-builtin-2.c: Replace powerpc_vsx_ok + with powerpc_p8vector_ok. + + 2015-04-30 Marek Polacek + + PR tree-optimization/63551 + * g++.dg/ipa/pr63551.C: New test. + + 2015-04-29 Thomas Schwinge + + Backport from trunk r222564: + + 2015-04-29 Thomas Schwinge + + * g++.dg/gomp/tpl-target-update.C: New file. + + 2015-04-28 Tejas Belagod + + Backport from mainline + 2014-11-20 Tejas Belagod + + * gcc.target/aarch64/symbol-range.c: New. + * gcc.target/aarch64/symbol-range-tiny.c: New. + + 2015-04-24 Bill Schmidt + + Backport from mainline r222362 + 2015-04-23 Bill Schmidt + + * gcc.target/powerpc/crypto-builtin-2.c: New. + + 2015-04-24 Bill Schmidt + + Backport from mainline r222351 + 2015-04-22 Bill Schmidt + + * gcc.target/powerpc/swaps-p8-18.c: New test. + + 2015-04-24 Bill Schmidt + + Backport from mainline r222349 + 2015-04-22 Bill Schmidt + + PR target/65456 + * gcc.dg/vect/bb-slp-24.c: Exclude test for POWER8. + * gcc.dg/vect/bb-slp-25.c: Likewise. + * gcc.dg/vect/bb-slp-29.c: Likewise. + * gcc.dg/vect/bb-slp-32.c: Replace vect_no_align with + vect_no_align && { ! vect_hw_misalign }. + * gcc.dg/vect/bb-slp-9.c: Likewise. + * gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c: Exclude test for + vect_hw_misalign. + * gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c: Likewise. + * gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c: Adjust tests to + account for POWER8, where peeling for alignment is not needed. + * gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c: Replace + vect_no_align with vect_no_align && { ! vect_hw_misalign }. + * gcc.dg.vect.if-cvt-stores-vect-ifcvt-18.c: Likewise. + * gcc.dg/vect/no-scevccp-outer-6-global.c: Likewise. + * gcc.dg/vect/no-scevccp-outer-6.c: Likewise. + * gcc.dg/vect/no-vfa-vect-43.c: Likewise. + * gcc.dg/vect/no-vfa-vect-57.c: Likewise. + * gcc.dg/vect/no-vfa-vect-61.c: Likewise. + * gcc.dg/vect/no-vfa-vect-depend-1.c: Likewise. + * gcc.dg/vect/no-vfa-vect-depend-2.c: Likewise. + * gcc.dg/vect/no-vfa-vect-depend-3.c: Likewise. + * gcc.dg/vect/pr16105.c: Likewise. + * gcc.dg/vect/pr20122.c: Likewise. + * gcc.dg/vect/pr33804.c: Likewise. + * gcc.dg/vect/pr33953.c: Likewise. + * gcc.dg/vect/pr56787.c: Likewise. + * gcc.dg/vect/pr58508.c: Likewise. + * gcc.dg/vect/slp-25.c: Likewise. + * gcc.dg/vect/vect-105-bit-array.c: Likewise. + * gcc.dg/vect/vect-105.c: Likewise. + * gcc.dg/vect/vect-27.c: Likewise. + * gcc.dg/vect/vect-29.c: Likewise. + * gcc.dg/vect/vect-33.c: Exclude unaligned access test for + POWER8. + * gcc.dg/vect/vect-42.c: Replace vect_no_align with vect_no_align + && { ! vect_hw_misalign }. + * gcc.dg/vect/vect-44.c: Likewise. + * gcc.dg/vect/vect-48.c: Likewise. + * gcc.dg/vect/vect-50.c: Likewise. + * gcc.dg/vect/vect-52.c: Likewise. + * gcc.dg/vect/vect-56.c: Likewise. + * gcc.dg/vect/vect-60.c: Likewise. + * gcc.dg/vect/vect-72.c: Likewise. + * gcc.dg/vect/vect-75-big-array.c: Likewise. + * gcc.dg/vect/vect-75.c: Likewise. + * gcc.dg/vect/vect-77-alignchecks.c: Likewise. + * gcc.dg/vect/vect-77-global.c: Likewise. + * gcc.dg/vect/vect-78-alignchecks.c: Likewise. + * gcc.dg/vect/vect-78-global.c: Likewise. + * gcc.dg/vect/vect-93.c: Likewise. + * gcc.dg/vect/vect-95.c: Likewise. + * gcc.dg/vect/vect-96.c: Likewise. + * gcc.dg/vect/vect-cond-1.c: Likewise. + * gcc.dg/vect/vect-cond-3.c: Likewise. + * gcc.dg/vect/vect-cond-4.c: Likewise. + * gcc.dg/vect/vect-cselim-1.c: Likewise. + * gcc.dg/vect/vect-multitypes-1.c: Likewise. + * gcc.dg/vect/vect-multitypes-3.c: Likewise. + * gcc.dg/vect/vect-multitypes-4.c: Likewise. + * gcc.dg/vect/vect-multitypes-6.c: Likewise. + * gcc.dg/vect/vect-nest-cycle-1.c: Likewise. + * gcc.dg/vect/vect-nest-cycle-2.c: Likewise. + * gcc.dg/vect/vect-outer-3a-big-array.c: Likewise. + * gcc.dg/vect/vect-outer-3a.c: Likewise. + * gcc.dg/vect/vect-outer-5.c: Likewise. + * gcc.dg/vect/vect-outer-fir-big-array.c: Likewise. + * gcc.dg/vect/vect-outer-fir-lb-big-array.c: Likewise. + * gcc.dg/vect/vect-outer-fir-lb.c: Likewise. + * gcc.dg/vect/vect-outer-fir.c: Likewise. + * gcc.dg/vect/vect-peel-3.c: Likewise. + * gcc.dg/vect/vect-peel-4.c: Likewise. + * gcc.dg/vect/vect-pre-interact.c: Likewise. + * gcc.target/powerpc/pr65456.c: New test. + * gcc.target/powerpc/vsx-vectorize-2.c: Exclude test for POWER8. + * gcc.target/powerpc/vsx-vectorize-4.c: Likewise. + * gcc.target/powerpc/vsx-vectorize-6.c: Likewise. + * gcc.target/powerpc/vsx-vectorize-7.c: Likewise. + * gfortran.dg/vect/vect-2.f90: Replace vect_no_align with + vect_no_align && { ! vect_hw_misalign }. + * gfortran.dg/vect/vect-3.f90: Likewise. + * gfortran.dg/vect/vect-4.f90: Likewise. + * gfortran.dg/vect/vect-5.f90: Likewise. + * lib/target-supports.exp (check_effective_target_vect_no_align): + Return 1 for POWER8. + (check_effective_target_vect_hw_misalign): Return 1 for POWER8. + + Backport from mainline r222372 + 2015-04-23 Bill Schmidt + + * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c: Replace + vect_no_align with vect_no_align && { ! vect_hw_misalign }. + + 2015-04-18 Bill Schmidt + + Backport from mainline r222205 + 2015-04-17 Bill Schmidt + + PR target/65787 + * gcc.target/powerpc/pr65787.c: New. + + 2015-04-16 Kirill Yukhin + + PR target/65676 + * gcc.target/i386/sse-25.c: New. + + 2015-04-14 Mikael Morin + + PR fortran/56674 + PR fortran/58813 + PR fortran/59016 + PR fortran/59024 + * gfortran.dg/used_types_27.f90: New. + + 2015-04-07 Bin Cheng + + Backport from trunk r221889 + 2015-04-07 Bin Cheng + * gcc.target/arm/pr65647.c: Add option "-mfloat-abi=soft". + + 2015-04-05 Yvan Roux + + Backport from trunk r221867 + 2015-04-04 Vladimir Makarov + + PR target/65647 + * gcc.target/arm/pr65647.c: New. + * gcc.target/arm/pr65647-2.c: New. + + 2015-03-31 Dominik Vogt + + * gcc.target/s390/hotpatch-25.c: New test. + * gcc.target/s390/hotpatch-1.c: Update test. + * gcc.target/s390/hotpatch-10.c: Update test. + * gcc.target/s390/hotpatch-11.c: Update test. + * gcc.target/s390/hotpatch-12.c: Update test. + * gcc.target/s390/hotpatch-13.c: Update test. + * gcc.target/s390/hotpatch-14.c: Update test. + * gcc.target/s390/hotpatch-15.c: Update test. + * gcc.target/s390/hotpatch-16.c: Update test. + * gcc.target/s390/hotpatch-17.c: Update test. + * gcc.target/s390/hotpatch-18.c: Update test. + * gcc.target/s390/hotpatch-19.c: Update test. + * gcc.target/s390/hotpatch-2.c: Update test. + * gcc.target/s390/hotpatch-21.c: Update test. + * gcc.target/s390/hotpatch-22.c: Update test. + * gcc.target/s390/hotpatch-23.c: Update test. + * gcc.target/s390/hotpatch-24.c: Update test. + * gcc.target/s390/hotpatch-3.c: Update test. + * gcc.target/s390/hotpatch-4.c: Update test. + * gcc.target/s390/hotpatch-5.c: Update test. + * gcc.target/s390/hotpatch-6.c: Update test. + * gcc.target/s390/hotpatch-7.c: Update test. + * gcc.target/s390/hotpatch-8.c: Update test. + * gcc.target/s390/hotpatch-9.c: Update test. + * gcc.target/s390/hotpatch-compile-16.c: Update test. + + 2015-03-28 Jerry DeLisle + + PR libgfortran/65596 + * gfortran.dg/namelist_86.f90: New test. + + 2015-03-27 Vladimir Makarov + + Backport from mainline + 2015-01-30 Vladimir Makarov + + PR target/64688 + * g++.dg/pr64688-2.C: New. + + 2015-03-26 Bill Schmidt + + Backport r214254 and related tests from mainline + * gcc.target/powerpc/swaps-p8-1.c: New test. + * gcc.target/powerpc/swaps-p8-2.c: New test. + * gcc.target/powerpc/swaps-p8-3.c: New test. + * gcc.target/powerpc/swaps-p8-4.c: New test. + * gcc.target/powerpc/swaps-p8-5.c: New test. + * gcc.target/powerpc/swaps-p8-6.c: New test. + * gcc.target/powerpc/swaps-p8-7.c: New test. + * gcc.target/powerpc/swaps-p8-8.c: New test. + * gcc.target/powerpc/swaps-p8-9.c: New test. + * gcc.target/powerpc/swaps-p8-10.c: New test. + * gcc.target/powerpc/swaps-p8-11.c: New test. + * gcc.target/powerpc/swaps-p8-12.c: New test. + * gcc.target/powerpc/swaps-p8-13.c: New test. + * gcc.target/powerpc/swaps-p8-14.c: New test. + * gcc.target/powerpc/swaps-p8-15.c: New test. + * gcc.target/powerpc/swaps-p8-16.c: New test. + * gcc.target/powerpc/swaps-p8-17.c: New test. + + 2015-03-26 Alan Modra + + * gcc.target/powerpc/pr53199.c: Add extra functions. Revert + 2014-12-05 change. + + 2015-03-24 Maxim Kuvyrkov + + Backport from mainline: + + 2015-02-19 Maxim Kuvyrkov + PR testsuite/65116 + * lib/target-supports.exp (check_compile): Check whether + additional_sources is defined before using it. + + 2015-02-19 Maxim Kuvyrkov + * lib/target-supports.exp (check_compile): Save/restore + additional_sources that may belong to an actual test. + + 2015-03-24 Uros Bizjak + + PR rtl-optimization/60851 + * gcc.target/i386/pr60851.c: New test. + + 2015-03-23 Andre Vehreschild + + Backport from mainline + PR fortran/60255 + * gfortran.dg/unlimited_polymorphic_2.f03: Removed error. + Converted from dos to unix line endings. + * gfortran.dg/unlimited_polymorphic_20.f03: New test. + + 2015-03-23 Yvan Roux + + Backport from trunk r216841. + 2014-10-29 Martin Liska + + PR ipa/63587 + * g++.dg/ipa/pr63587-1.C: New test. + * g++.dg/ipa/pr63587-2.C: New test. + + 2015-03-21 Mikael Morin + + PR fortran/61138 + * gfortran.dg/pointer_remapping_9.f90: New. + + 2015-03-19 Paul Thomas + + Backport from mainline + PR fortran/59198 + * gfortran.dg/proc_ptr_comp_44.f90 : New test + * gfortran.dg/proc_ptr_comp_45.f90 : New test + + 2015-03-19 Kyrylo Tkachov + + Backport from mainline + 2015-03-12 Kyrylo Tkachov + + PR rtl-optimization/65235 + * gcc.target/aarch64/pr65235_1.c: New test. + + 2015-03-16 Eric Botcazou + + * testsuite/g++.dg/pr65049.C: New test. + + 2015-03-16 Eric Botcazou + + * gnat.dg/loop_optimization18.ad[sb]: New test. + * gnat.dg/loop_optimization18_pkg.ads: New helper. + + 2015-03-12 Mikael Morin + + PR fortran/60898 + * gfortran.dg/entry_20.f90: New. + + 2015-03-12 Dominik Vogt + + Backport from mainline + * gcc.target/s390/hotpatch-21.c: New test for hotpatch alignment. + * gcc.target/s390/hotpatch-22.c: Likewise. + * gcc.target/s390/hotpatch-23.c: Likewise. + * gcc.target/s390/hotpatch-24.c: Likewise. + * gcc.target/s390/hotpatch-2.c: Also check hotpatch alignment. + * gcc.target/s390/hotpatch-1.c: Update expected output. + * gcc.target/s390/hotpatch-2.c: Likewise. + * gcc.target/s390/hotpatch-3.c: Likewise. + * gcc.target/s390/hotpatch-4.c: Likewise. + * gcc.target/s390/hotpatch-5.c: Likewise. + * gcc.target/s390/hotpatch-6.c: Likewise. + * gcc.target/s390/hotpatch-7.c: Likewise. + * gcc.target/s390/hotpatch-8.c: Likewise. + * gcc.target/s390/hotpatch-9.c: Likewise. + * gcc.target/s390/hotpatch-10.c: Likewise. + * gcc.target/s390/hotpatch-11.c: Likewise. + * gcc.target/s390/hotpatch-12.c: Likewise. + * gcc.target/s390/hotpatch-13.c: Likewise. + * gcc.target/s390/hotpatch-14.c: Likewise. + * gcc.target/s390/hotpatch-15.c: Likewise. + * gcc.target/s390/hotpatch-16.c: Likewise. + * gcc.target/s390/hotpatch-17.c: Likewise. + * gcc.target/s390/hotpatch-18.c: Likewise. + * gcc.target/s390/hotpatch-19.c: Likewise. + + 2015-03-12 Andreas Krebbel + + Backport from mainline + 2015-02-27 Andreas Krebbel + + * gcc.target/s390/20140327-1.c: Remove -m31 and guard with ! lp64. + * gcc.target/s390/hotpatch-8.c: Likewise. + * gcc.target/s390/hotpatch-9.c: Likewise. + * gcc.target/s390/pr57960.c: Remove -m64. + * gcc.target/s390/pr57559.c: Likewise. + + 2015-03-11 Marek Polacek + + Backported from mainline + 2014-12-04 Marek Polacek + + PR middle-end/56917 + * c-c++-common/ubsan/pr56917.c: New test. + + 2015-03-10 Paul Thomas + + Backported from mainline + PR fortran/65024 + * gfortran.dg/unlimited_polymorphic_23.f90: New test + + 2015-03-10 Martin Sebor + + PR testsuite/63175 + * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c (main1): Move + checking of results into main to prevent it from getting optimized + away. + * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a-pr63175.c: New test. + + 2015-03-10 Yvan Roux + + Backport from trunk r220489. + 2015-02-06 Jakub Jelinek + + PR ipa/64896 + * g++.dg/ipa/pr64896.C: New test + + 2015-03-10 Oleg Endo + + PR target/53988 + * gcc.target/sh/pr53988.c: Mark tests as xfail. + + 2015-03-06 Eric Botcazou + + * g++.dg/other/dump-ada-spec-3.C: Remove include and adjust. + + 2015-03-05 Eric Botcazou + + * g++.dg/other/dump-ada-spec-3.C: New test. + + 2015-03-04 Thomas Preud'homme + + Backport from mainline + 2014-11-27 Thomas Preud'homme + + PR target/59593 + * gcc.target/arm/constant-pool.c: New test. + + 2015-03-03 Georg-Johann Lay + + PR target/64331 + * gcc.target/avr/torture/pr64331.c: New test. + + 2015-03-03 Thomas Preud'homme + + Backport from mainline + 2015-01-14 Thomas Preud'homme + + PR target/64453 + * gcc.target/arm/pr64453.c: New. + + 2015-02-27 Pat Haugen + + * gcc.dg/vect/pr59354.c: Move vector producing code to + separate function. + + 2015-02-27 Marek Polacek + + Backported from mainline + 2015-02-27 Marek Polacek + + PR c/65228 + * gcc.dg/pr65228.c: New test. + + 2015-02-27 Richard Biener + + PR lto/65193 + * g++.dg/lto/pr65193_0.C: New testcase. + + 2015-02-26 Peter Bergner + + Backport from mainline + 2015-02-25 Peter Bergner + + * gcc.target/powerpc/htm-builtin-1.c (dg-do) Change to assemble. + (dg-options): Add -save-temps. + (dg-final): Add cleanup-saved-temps. + + 2015-02-25 Adhemerval Zanella + + * gcc.target/powerpc/htm-builtin-1.c: Fix tcheck expect value. + + 2015-02-25 Kai Tietz + + Backported from mainline + PR tree-optimization/61917 + * gcc.dg/vect/vect-pr61917.c: New file. + + 2015-02-23 Oleg Endo + + Backport from mainline + 2015-02-23 Oleg Endo + + PR target/65163 + * gcc.c-torture/compile/pr65163.c: New. + + 2015-02-23 Richard Biener + + Backport from mainline + 2014-11-27 Richard Biener + + PR tree-optimization/61634 + * gcc.dg/vect/pr61634.c: New testcase. + + 2015-01-14 Richard Biener + + PR tree-optimization/59354 + * gcc.dg/vect/pr59354.c: New testcase. + + 2015-02-10 Richard Biener + + PR tree-optimization/64909 + * gcc.dg/vect/costmodel/x86_64/costmodel-pr64909.c: New testcase. + + 2015-02-23 Andreas Krebbel + + Backport from mainline + 2015-02-23 Andreas Krebbel + * gcc.target/s390/hotpatch-1.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-10.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-11.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-12.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-13.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-14.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-15.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-16.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-17.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-18.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-19.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-2.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-20.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-3.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-4.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-5.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-6.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-7.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-8.c: Remove --save-temps option. + * gcc.target/s390/hotpatch-9.c: Remove --save-temps option. + * gcc.target/s390/htm-nofloat-1.c: Cleanup --save-temps files. + + 2015-02-23 Andreas Krebbel + + Backport from mainline + 2015-02-23 Andreas Krebbel + * gcc.target/s390/hotpatch-8.c: Add -march=g5. + * gcc.target/s390/hotpatch-9.c: Add -march=g5. + * gcc.target/s390/hotpatch-compile-1.c: Fix error message. + * gcc.target/s390/hotpatch-compile-10.c: Likewise. + * gcc.target/s390/hotpatch-compile-11.c: Likewise. + * gcc.target/s390/hotpatch-compile-12.c: Likewise. + * gcc.target/s390/hotpatch-compile-13.c: Likewise. + * gcc.target/s390/hotpatch-compile-14.c: Likewise. + * gcc.target/s390/hotpatch-compile-2.c: Likewise. + * gcc.target/s390/hotpatch-compile-3.c: Likewise. + * gcc.target/s390/hotpatch-compile-4.c: Likewise. + * gcc.target/s390/hotpatch-compile-5.c: Likewise. + * gcc.target/s390/hotpatch-compile-6.c: Likewise. + * gcc.target/s390/hotpatch-compile-7.c: Likewise. + * gcc.target/s390/hotpatch-compile-8.c: Likewise. + * gcc.target/s390/hotpatch-compile-9.c: Likewise. + + 2015-02-20 Kyrylo Tkachov + + Backport from mainline + 2015-02-20 Kyrylo Tkachov + + * gcc.target/aarch64/sisd-shft-neg_1.c: New test. + + 2015-02-20 Georg-Johann Lay + + Backport from 2015-02-20 trunk r220847. + + PR target/64452 + * gcc.target/avr/torture/pr64452.c: New test. + + 2015-02-20 Richard Biener + + Backport from mainline + 2015-01-12 Richard Biener + + PR tree-optimization/64530 + * gfortran.dg/pr64530.f90: New testcase. + + 2015-02-13 Richard Biener + + PR lto/64373 + * gcc.dg/lto/pr64373_0.c: New testcase. + + 2015-02-16 Richard Biener + + PR tree-optimization/63593 + * gcc.dg/pr63593.c: New testcase. + + 2015-02-18 Richard Biener + + PR tree-optimization/65063 + * gcc.dg/pr65063.c: New testcase. + + 2015-02-19 Richard Biener + + Backport from mainline + 2014-12-09 Richard Biener + + PR middle-end/64199 + * gcc.dg/torture/pr64199.c: New testcase. + + 2015-01-14 Richard Biener + + PR tree-optimization/64493 + PR tree-optimization/64495 + * gcc.dg/vect/pr64493.c: New testcase. + * gcc.dg/vect/pr64495.c: Likewise. + + 2015-01-27 Richard Biener + + PR tree-optimization/56273 + PR tree-optimization/59124 + PR tree-optimization/64277 + * g++.dg/warn/Warray-bounds-6.C: New testcase. + * gcc.dg/Warray-bounds-12.c: Likewise. + * gcc.dg/Warray-bounds-13.c: Likewise. + + 2015-02-19 Richard Biener + + Backport from mainline + 2015-01-15 Richard Biener + + PR middle-end/64365 + * gcc.dg/torture/pr64365.c: New testcase. + + 2015-02-19 Maxim Kuvyrkov + + Revert: + + 2015-02-19 Maxim Kuvyrkov + Backport from mainline + 2015-02-19 Maxim Kuvyrkov + + * lib/target-supports.exp (check_compile): Save/restore + additional_sources that may belong to an actual test. + + 2015-02-19 Maxim Kuvyrkov + + Backport from mainline + 2015-02-19 Maxim Kuvyrkov + + * lib/target-supports.exp (check_compile): Save/restore + additional_sources that may belong to an actual test. + + 2015-02-17 Sandra Loosemore + + Backported from mainline + 2015-02-17 Sandra Loosemore + + * gcc.target/arm/divzero.c: New test case. + + 2015-02-17 Ilya Tocar + + Backport from mainline + 2015-01-14 Ilya Tocar + + PR target/64387 + * gcc.target/i386/pr64387.c: New test. + + 2015-02-13 Mikael Morin + + PR fortran/63744 + gfortran.dg/use_rename_8.f90: New. + + 2015-02-12 Paul Thomas + + Backported from mainline + 2015-02-12 Paul Thomas + + PR fortran/64932 + * gfortran.dg/finalize_28.f90: New test + + 2015-02-11 Jakub Jelinek + + Backported from mainline + 2015-02-09 Jakub Jelinek + + PR target/64979 + * gcc.dg/tree-ssa/stdarg-7.c: New test. + * gcc.c-torture/execute/pr64979.c: New test. + + 2015-02-11 Richard Biener + + Backport from mainline + 2014-07-24 Marek Polacek + + PR c/57653 + * c-c++-common/pr57653.c: New test. + * c-c++-common/pr57653.h: New file. + * c-c++-common/pr57653-2.c: New test. + * c-c++-common/pr57653-2.h: New file. + + 2015-02-09 Dominik Vogt + + * gcc/testsuite/gcc.target/s390/hotpatch-13.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-14.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-15.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-16.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-17.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-18.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-19.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-20.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-10.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-11.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-12.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-13.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-14.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-16.c: New testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-9.c: New + testcase. + * gcc/testsuite/gcc.target/s390/hotpatch-1.c: Testcase adjusted to + new -mhotpatch. + * gcc/testsuite/gcc.target/s390/hotpatch-10.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-11.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-12.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-2.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-3.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-4.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-5.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-6.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-7.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-8.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-9.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-2.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-3.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-4.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-5.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-6.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-7.c: Likewise. + * gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c: Likewise. + + 2015-02-04 Matthias Klose + + Backport from mainline + 2015-01-15 Martin Liska + + * g++.dg/ipa/pr64068.C: New test. + * gcc.dg/ipa/PR64559.c: New test. + + 2015-02-04 Uros Bizjak + + Backport from mainline + 2015-01-31 Uros Bizjak + + PR target/64882 + * gcc.dg/torture/pr64882.c: New test. + + 2015-02-01 H.J. Lu + + Backported from mainline + 2015-01-24 H.J. Lu + + * gcc.target/i386/builtin_target.c (check_intel_cpu_model): Add + Silvermont, Ivy Bridge, Haswell and Broadwell tests. Update Sandy + Bridge test. + + 2015-02-01 Jakub Jelinek + + Backported from mainline + 2015-01-27 Jakub Jelinek + + PR rtl-optimization/61058 + * gcc.dg/pr61058.c: New test. + + PR c/64766 + * gcc.dg/pr64766.c: New test. + + 2015-01-26 Jakub Jelinek + + PR c/64778 + * gcc.dg/pr64778.c: New test. + + PR middle-end/64421 + * gcc.dg/vect/pr64421.c: New test. + + 2015-01-23 Jakub Jelinek + + PR rtl-optimization/63637 + PR rtl-optimization/60663 + * gcc.dg/pr63637-1.c: New test. + * gcc.dg/pr63637-2.c: New test. + * gcc.dg/pr63637-3.c: New test. + * gcc.dg/pr63637-4.c: New test. + * gcc.dg/pr63637-5.c: New test. + * gcc.dg/pr63637-6.c: New test. + * gcc.target/i386/pr63637-1.c: New test. + * gcc.target/i386/pr63637-2.c: New test. + * gcc.target/i386/pr63637-3.c: New test. + * gcc.target/i386/pr63637-4.c: New test. + * gcc.target/i386/pr63637-5.c: New test. + * gcc.target/i386/pr63637-6.c: New test. + + 2015-01-20 Jakub Jelinek + + PR debug/64663 + * gcc.dg/pr64663.c: New test. + + 2015-01-29 Ilya Tocar + + * gcc.target/i386/sse-14.c: Test new intrinsic. + * gcc.target/i386/sse-22.c: Ditto. + + 2015-01-27 Paul Thomas + + Backport from mainline + PR fortran/62044 + * gfortran.dg/allocate_with_mold_1.f90: New test + + 2015-01-27 Janus Weil + + Backport from mainline + PR fortran/64230 + * gfortran.dg/class_allocate_18.f90: Remove -fsanitize option to + prevent linking errors. + + 2015-01-27 Tobias Burnus + + PR fortran/64771 + * gfortran.dg/coarray_36.f: New. + * gfortran.dg/coarray_37.f90: New. + + 2015-01-26 Janus Weil + + Backport from mainline + PR fortran/64230 + * gfortran.dg/class_allocate_18.f90: New. + + 2015-01-26 Eric Botcazou + + PR testsuite/64712 + * gnat.dg/unchecked_convert1.adb (Unchecked_Convert1): Initialize A. + + 2015-01-24 Thomas Koenig + + Backport from trunk + PR fortran/57023 + * gfortran.dg/internal_pack_15.f90: New test. + + 2015-01-24 Janus Weil + + Backport from mainline + PR fortran/60922 + * gfortran.dg/class_allocate_17.f90: New. + + 2015-01-20 Marek Polacek + + Backport from mainline + 2014-06-23 Marek Polacek + + PR c/61553 + * c-c++-common/pr61553.c: New test. + + 2015-01-16 Bernd Edlinger + + * c-c++-common/tsan/tsan_barrier.h: New. + * c-c++-common/tsan/atomic_stack.c: Reworked to not depend on sleep. + * c-c++-common/tsan/fd_pipe_race.c: Likewise. + * c-c++-common/tsan/mutexset1.c: Likewise. + * c-c++-common/tsan/race_on_barrier.c: Likewise. + * c-c++-common/tsan/race_on_mutex.c: Likewise. + * c-c++-common/tsan/race_on_mutex2.c: Likewise. + * c-c++-common/tsan/simple_race.c: Likewise. + * c-c++-common/tsan/simple_stack.c: Likewise. + * c-c++-common/tsan/sleep_sync.c: Likewise. + * c-c++-common/tsan/tiny_race.c: Likewise. + * c-c++-common/tsan/tls_race.c: Likewise. + * c-c++-common/tsan/write_in_reader_lock.c: Likewise. + * g++.dg/tsan/atomic_free.C: Likewise. + * g++.dg/tsan/atomic_free2.C: Likewise. + * g++.dg/tsan/cond_race.C: Likewise. + * g++.dg/tsan/tsan_barrier.h: Copied from c-c++-common/tsan. + + 2015-01-15 Eric Botcazou + + * gnat.dg/opt47.adb: New test. + + 2015-01-14 Jakub Jelinek + + Backported from mainline + 2015-01-12 Jakub Jelinek + + PR target/64513 + * gcc.target/i386/pr64513.c: New test. + + 2015-01-13 Jakub Jelinek + + PR rtl-optimization/64286 + * gcc.target/i386/avx2-pr64286.c: New test. + + PR fortran/64528 + * gfortran.dg/pr64528.f90: New test. + + 2015-01-12 Jakub Jelinek + + PR tree-optimization/64563 + * gcc.dg/pr64563.c: New test. + + 2015-01-14 Marek Polacek + + Backport from mainline + 2015-01-13 Marek Polacek + + PR middle-end/64391 + * gcc.dg/tm/pr64391.c: New test. + + 2015-01-13 Marc Glisse + + PR c++/54442 + * g++.dg/pr54442.C: New file. + + 2015-01-13 Renlin Li + + Backported from mainline + 2014-11-19 Renlin Li + + PR target/63424 + * gcc.target/aarch64/pr63424.c: New Test. + + 2015-01-12 Janus Weil + + Backport from mainline + PR fortran/63733 + * gfortran.dg/typebound_operator_20.f90: New. + + 2015-01-09 Jakub Jelinek + + PR rtl-optimization/64536 + * gcc.dg/pr64536.c: New test. + + 2015-01-09 Michael Meissner + + Backport from mainline: + 2015-01-06 Michael Meissner + + PR target/64505 + * gcc.target/powerpc/pr64505.c: New file to test -m32 -mpowerpc64 + fix is correct. + + 2014-01-08 Thomas Koenig + + PR fortran/56867 + * gfortran.dg/dependency_45.f90: New test. + + 2015-01-08 Christian Bruel + + PR target/64507 + * gcc.target/sh/pr64507.c: New test. + + 2015-01-05 Ian Lance Taylor + + Backport from mainline: + 2014-11-21 Lynn Boger + + * go.test/go-test.exp (go-set-goarch): Add case for ppc64le goarch + value for go testing. + + 2014-12-28 H.J. Lu + + Backport from mainline: + 2014-12-28 H.J. Lu + + * gcc.target/i386/pr57003.c: Skip on x32. + * gcc.target/i386/pr59927.c: Likewise. + * gcc.target/i386/pr60516.c: Likewise. + + 2014-12-27 H.J. Lu + + Backport from mainline: + 2014-12-26 H.J. Lu + + PR target/64409 + * gcc.target/i386/pr64409.c: New test. + + 2014-12-23 Janus Weil + + Backport from mainline + PR fortran/64244 + * gfortran.dg/typebound_call_26.f90: New. + + 2014-12-19 Paolo Carlini + + PR c++/60955 + * g++.dg/warn/register-parm-1.C: New. + + 2014-12-15 Jakub Jelinek + + PR tree-optimization/63551 + * gcc.dg/ipa/pr63551.c (fn2): Use 4294967286U instead of + 4294967286 to avoid warnings. + + 2014-12-14 H.J. Lu + + Backported from mainline + 2014-12-14 H.J. Lu + + PR rtl-optimization/64037 + * g++.dg/pr64037.C: New test. + + 2014-12-14 H.J. Lu + + Backported from mainline + 2014-12-06 H.J. Lu + + PR target/64200 + * gcc.target/i386/memcpy-strategy-4.c: New test. + + 2014-12-13 Jakub Jelinek + + Backported from mainline + 2014-12-12 Jakub Jelinek + + PR tree-optimization/64269 + * gcc.c-torture/compile/pr64269.c: New test. + + 2014-12-10 Bill Schmidt + + Backport from mainline + 2014-09-02 Bill Schmidt + + * gcc.target/powerpc/builtins-1.c: Add tests for vec_ctf, + vec_cts, and vec_ctu. + * gcc.target/powerpc/builtins-2.c: Likewise. + + Backport from mainline + 2014-08-28 Bill Schmidt + + * gcc.target/powerpc/builtins-1.c: Add tests for vec_xl, vec_xst, + vec_round, vec_splat, vec_div, and vec_mul. + * gcc.target/powerpc/builtins-2.c: New test. + + Backport from mainline + 2014-08-20 Bill Schmidt + + * testsuite/gcc.target/powerpc/builtins-1.c: New test. + + 2014-12-10 Jakub Jelinek + + PR tree-optimization/62021 + * gcc.dg/vect/pr62021.c: New test. + + 2014-12-09 Uros Bizjak + + PR bootstrap/64213 + Revert: + 2014-11-28 H.J. Lu + + PR rtl-optimization/64037 + * g++.dg/pr64037.C: New test. + + 2014-12-07 Oleg Endo + + Backport from mainline + 2014-12-07 Oleg Endo + + * gcc.target/h8300/h8300.exp: Fix duplicated text. + * gcc.target/h8300/pragma-isr.c: Likewise. + * gcc.target/h8300/pragma-isr2.c: Likewise. + + 2014-12-05 H.J. Lu + + Backport from mainline + 2014-12-02 H.J. Lu + + PR target/64108 + * gcc.target/i386/memset-strategy-2.c: New test. + + 2014-12-05 H.J. Lu + + Backport from mainline + 2014-11-28 H.J. Lu + + PR rtl-optimization/64037 + * g++.dg/pr64037.C: New test. + + 2014-12-04 Jakub Jelinek + + PR c++/56493 + * c-c++-common/pr56493.c: New test. + + 2014-12-03 Renlin Li + + Backported from mainline + 2014-12-03 Renlin Li + H.J. Lu + + PR middle-end/63762 + PR target/63661 + * gcc.dg/pr63762.c: New test. + * gcc.target/i386/pr63661.c: New test. + + 2014-12-01 Martin Jambor + + PR ipa/63551 + * gcc.dg/ipa/pr63551.c: New test. + * gcc.dg/ipa/pr64041.c: Likewise. + + 2014-12-01 Richard Biener + + PR tree-optimization/63738 + * gcc.dg/torture/pr63738.c: Fix call to setjmp. + + 2014-11-28 Jakub Jelinek + + Backported from mainline + 2014-11-27 Jakub Jelinek + + PR middle-end/64067 + * gcc.c-torture/compile/pr64067.c: New test. + + 2014-11-19 Jakub Jelinek + + PR tree-optimization/63915 + * c-c++-common/gomp/pr60823-4.c: New test. + + PR sanitizer/63913 + * g++.dg/ubsan/pr63913.C: New test. + + 2014-10-31 Jakub Jelinek + + PR rtl-optimization/63659 + * gcc.c-torture/execute/pr63659.c: New test. + + 2014-11-26 Richard Biener + + PR middle-end/63738 + * gcc.dg/torture/pr63738.c: New testcase. + + 2014-11-26 Richard Biener + + Backport from mainline + 2014-11-26 Richard Biener + + PR tree-optimization/62238 + * gcc.dg/torture/pr62238.c: New testcase. + + 2014-11-07 Richard Biener + + PR tree-optimization/63605 + * gcc.dg/vect/pr63605.c: New testcase. + + 2014-10-28 Richard Biener + + PR middle-end/63665 + * gcc.dg/pr63665.c: New testcase. + + 2014-11-24 Eric Botcazou + + * gnat.dg/opt45.adb: New test. + + 2014-11-22 Oleg Endo + + Backport from mainline + 2014-11-22 Oleg Endo + + PR target/63783 + PR target/51244 + * gcc.target/sh/torture/pr63783-1.c: New. + * gcc.target/sh/torture/pr63783-2.c: New. + * gcc.target/sh/pr51244-20.c: Adjust. + * gcc.target/sh/pr51244-20-sh2a.c: Adjust. + + 2014-11-19 Uros Bizjak + + PR target/63947 + * gcc.target/i386/pr63947.c: New test. + + 2014-11-19 Tom de Vries + + Backport from mainline + PR tree-optimization/62167 + * gcc.dg/pr51879-12.c: Add xfails. + * gcc.dg/pr62167-run.c: New test. + * gcc.dg/pr62167.c: New test. + + 2014-11-13 Teresa Johnson + + PR tree-optimization/63841 + * g++.dg/tree-ssa/pr63841.C: New test. + + 2014-11-12 Jakub Jelinek + + PR ipa/63838 + * g++.dg/ipa/pr63838.C: New test. + + 2014-11-11 Paolo Carlini + + PR c++/63265 + * g++.dg/cpp0x/constexpr-63265.C: New. + + 2014-11-09 H.J. Lu + + Backported from mainline + 2014-11-09 H.J. Lu + + PR testsuite/63305 + * gcc.target/i386/avx256-unaligned-load-7.c (avx_test): Fix + buffer overflow. + * gcc.target/i386/avx256-unaligned-store-7.c (avx_test): Likewise. + + 2014-11-07 Marek Polacek + + * c-c++-common/ubsan/undefined-2.c: New test. + + 2014-11-05 Uros Bizjak + + PR target/63538 + * gcc.target/i386/pr63538.c: New test. + + 2014-11-03 Marek Polacek + + PR c/52769 + * gcc.dg/pr52769.c: New test. + + 2014-10-31 DJ Delorie + + * gcc.dg/20141029-1.c: New. + + 2014-10-31 Jakub Jelinek + + PR sanitizer/63697 + * c-c++-common/ubsan/overflow-sub-3.c: New test. + + 2014-10-30 Georg-Johann Lay + + PR63633 + * gcc.target/avr/torture/pr63633-ice-mult.c: New test. + 2014-10-30 Release Manager * GCC 4.9.2 released. *************** *** 18,24 **** 2014-10-25 Yury Gribov PR sanitizer/63638 ! * c-c++-common/asan/pr63638.c: New test. 2014-10-24 Markus Trippelsdorf --- 1440,1446 ---- 2014-10-25 Yury Gribov PR sanitizer/63638 ! * c-c++-common/asan/pr63638.c: New test. 2014-10-24 Markus Trippelsdorf *************** *** 200,206 **** 2014-10-11 Christophe Lyon * lib/target-supports.exp (check_effective_target_shared): New function. ! * g++.dg/ipa/devirt-28a.C: Check if -shared is supported. 2014-10-10 Jakub Jelinek --- 1622,1628 ---- 2014-10-11 Christophe Lyon * lib/target-supports.exp (check_effective_target_shared): New function. ! * g++.dg/ipa/devirt-28a.C: Check if -shared is supported. 2014-10-10 Jakub Jelinek *************** *** 368,374 **** 2014-09-12 Martin Jambor PR ipa/61654 ! * g++.dg/ipa/pr61654.C: New test. 2014-09-11 Alan Lawrence --- 1790,1796 ---- 2014-09-12 Martin Jambor PR ipa/61654 ! * g++.dg/ipa/pr61654.C: New test. 2014-09-11 Alan Lawrence *************** *** 1629,1638 **** PR middle-end/60849 * g++.dg/opt/pr60849.C: New testcase. ! 2014-04-22 Richard Biener Backport from mainline ! 2014-04-17 Richard Biener PR tree-optimization/60841 * gcc.dg/vect/pr60841.c: New testcase. --- 3051,3060 ---- PR middle-end/60849 * g++.dg/opt/pr60849.C: New testcase. ! 2014-04-22 Richard Biener Backport from mainline ! 2014-04-17 Richard Biener PR tree-optimization/60841 * gcc.dg/vect/pr60841.c: New testcase. diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/gomp/pr60823-4.c gcc-4.9.3/gcc/testsuite/c-c++-common/gomp/pr60823-4.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/gomp/pr60823-4.c Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/gomp/pr60823-4.c Fri Nov 28 13:35:28 2014 *************** *** 0 **** --- 1,7 ---- + /* PR tree-optimization/63915 */ + /* { dg-do run } */ + /* { dg-require-effective-target vect_simd_clones } */ + /* { dg-options "-O2 -fopenmp-simd" } */ + /* { dg-additional-options "-fpic" { target fpic } } */ + + #include "pr60823-2.c" diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/pr56493.c gcc-4.9.3/gcc/testsuite/c-c++-common/pr56493.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/pr56493.c Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/pr56493.c Thu Dec 4 09:47:54 2014 *************** *** 0 **** --- 1,16 ---- + /* PR c++/56493 */ + /* { dg-do compile } */ + /* { dg-options "-O2 -fdump-tree-gimple" } */ + + unsigned long long bar (void); + int x; + + void + foo (void) + { + x += bar (); + } + + /* Verify we narrow the addition from unsigned long long to unsigned int type. */ + /* { dg-final { scan-tree-dump " (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.* (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.* = \\1 \\+ \\2;" "gimple" { target { ilp32 || lp64 } } } } */ + /* { dg-final { cleanup-tree-dump "gimple" } } */ diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/pr57653-2.c gcc-4.9.3/gcc/testsuite/c-c++-common/pr57653-2.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/pr57653-2.c Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/pr57653-2.c Wed Feb 11 12:14:07 2015 *************** *** 0 **** --- 1,4 ---- + /* { dg-do preprocess } */ + /* { dg-options "-imacros ${srcdir}/c-c++-common/pr57653-2.h" } */ + + /* Empty. */ diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/pr57653-2.h gcc-4.9.3/gcc/testsuite/c-c++-common/pr57653-2.h *** gcc-4.9.2/gcc/testsuite/c-c++-common/pr57653-2.h Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/pr57653-2.h Wed Feb 11 12:14:07 2015 *************** *** 0 **** --- 1 ---- + diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/pr57653.c gcc-4.9.3/gcc/testsuite/c-c++-common/pr57653.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/pr57653.c Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/pr57653.c Wed Feb 11 12:14:07 2015 *************** *** 0 **** --- 1,6 ---- + /* { dg-do compile } */ + /* { dg-options "-imacros ${srcdir}/c-c++-common/pr57653.h" } */ + + __attribute__((used)) static const char s[] = F; + + /* { dg-final { scan-assembler-not "command-line" } } */ diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/pr57653.h gcc-4.9.3/gcc/testsuite/c-c++-common/pr57653.h *** gcc-4.9.2/gcc/testsuite/c-c++-common/pr57653.h Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/pr57653.h Wed Feb 11 12:14:07 2015 *************** *** 0 **** --- 1 ---- + #define F __FILE__ diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/pr61553.c gcc-4.9.3/gcc/testsuite/c-c++-common/pr61553.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/pr61553.c Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/pr61553.c Tue Jan 20 14:17:51 2015 *************** *** 0 **** --- 1,8 ---- + /* PR c/61553 */ + /* { dg-do compile } */ + + void + foo (char *s) + { + __atomic_store (s, (void *) 0, __ATOMIC_SEQ_CST); /* { dg-error "size mismatch" } */ + } diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/atomic_stack.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/atomic_stack.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/atomic_stack.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/atomic_stack.c Fri Jan 16 05:36:22 2015 *************** *** 1,22 **** /* { dg-shouldfail "tsan" } */ #include ! #include int Global; void *Thread1(void *x) { ! sleep(1); __atomic_fetch_add(&Global, 1, __ATOMIC_RELAXED); return NULL; } void *Thread2(void *x) { Global++; return NULL; } int main() { pthread_t t[2]; pthread_create(&t[0], NULL, Thread1, NULL); pthread_create(&t[1], NULL, Thread2, NULL); --- 1,26 ---- /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include ! #include "tsan_barrier.h" + static pthread_barrier_t barrier; int Global; void *Thread1(void *x) { ! barrier_wait(&barrier); __atomic_fetch_add(&Global, 1, __ATOMIC_RELAXED); return NULL; } void *Thread2(void *x) { Global++; + barrier_wait(&barrier); return NULL; } int main() { + barrier_init(&barrier, 2); pthread_t t[2]; pthread_create(&t[0], NULL, Thread1, NULL); pthread_create(&t[1], NULL, Thread2, NULL); diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c Fri Jan 16 05:36:22 2015 *************** *** 1,30 **** /* { dg-shouldfail "tsan" } */ #include - #include #include int fds[2]; void *Thread1(void *x) { write(fds[1], "a", 1); return NULL; } void *Thread2(void *x) { ! sleep(1); close(fds[0]); close(fds[1]); return NULL; } int main() { pipe(fds); pthread_t t[2]; pthread_create(&t[0], NULL, Thread1, NULL); pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); } /* { dg-output "WARNING: ThreadSanitizer: data race.*\n" } */ --- 1,35 ---- /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include #include + #include "tsan_barrier.h" + static pthread_barrier_t barrier; int fds[2]; void *Thread1(void *x) { write(fds[1], "a", 1); + barrier_wait(&barrier); return NULL; } void *Thread2(void *x) { ! barrier_wait(&barrier); close(fds[0]); close(fds[1]); return NULL; } int main() { + barrier_init(&barrier, 2); pipe(fds); pthread_t t[2]; pthread_create(&t[0], NULL, Thread1, NULL); pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); + return 0; } /* { dg-output "WARNING: ThreadSanitizer: data race.*\n" } */ diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/mutexset1.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/mutexset1.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/mutexset1.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/mutexset1.c Fri Jan 16 05:36:22 2015 *************** *** 1,14 **** /* { dg-shouldfail "tsan" } */ #include ! #include ! #include int Global; pthread_mutex_t mtx; void *Thread1(void *x) { ! sleep(1); pthread_mutex_lock(&mtx); Global++; pthread_mutex_unlock(&mtx); --- 1,15 ---- /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include ! #include "tsan_barrier.h" + static pthread_barrier_t barrier; int Global; pthread_mutex_t mtx; void *Thread1(void *x) { ! barrier_wait(&barrier); pthread_mutex_lock(&mtx); Global++; pthread_mutex_unlock(&mtx); *************** void *Thread1(void *x) { *** 17,27 **** --- 18,30 ---- void *Thread2(void *x) { Global--; + barrier_wait(&barrier); return NULL;/* { dg-output ".*" } */ } int main() { + barrier_init(&barrier, 2); pthread_mutex_init(&mtx, 0); pthread_t t[2]; pthread_create(&t[0], NULL, Thread1, NULL); diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/race_on_barrier.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/race_on_barrier.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/race_on_barrier.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/race_on_barrier.c Fri Jan 16 05:36:22 2015 *************** *** 1,26 **** /* { dg-shouldfail "tsan" } */ #include ! #include ! #include ! #include pthread_barrier_t B; int Global; void *Thread1(void *x) { pthread_barrier_init(&B, 0, 2); pthread_barrier_wait(&B); return NULL; } void *Thread2(void *x) { ! sleep(1); pthread_barrier_wait(&B); return NULL; } int main() { pthread_t t; pthread_create(&t, NULL, Thread1, NULL); Thread2(0); --- 1,28 ---- /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include ! #include "tsan_barrier.h" + static pthread_barrier_t barrier; pthread_barrier_t B; int Global; void *Thread1(void *x) { pthread_barrier_init(&B, 0, 2); + barrier_wait(&barrier); pthread_barrier_wait(&B); return NULL; } void *Thread2(void *x) { ! barrier_wait(&barrier); pthread_barrier_wait(&B); return NULL; } int main() { + barrier_init(&barrier, 2); pthread_t t; pthread_create(&t, NULL, Thread1, NULL); Thread2(0); diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c Fri Jan 16 05:36:22 2015 *************** *** 1,10 **** /* { dg-shouldfail "tsan" } */ #include ! #include ! #include ! #include pthread_mutex_t Mtx; int Global; --- 1,10 ---- /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include ! #include "tsan_barrier.h" + static pthread_barrier_t barrier; pthread_mutex_t Mtx; int Global; *************** void *Thread1(void *x) { *** 13,23 **** pthread_mutex_lock(&Mtx); Global = 42; pthread_mutex_unlock(&Mtx); return NULL; } void *Thread2(void *x) { ! sleep(1); pthread_mutex_lock(&Mtx); Global = 43; pthread_mutex_unlock(&Mtx); --- 13,24 ---- pthread_mutex_lock(&Mtx); Global = 42; pthread_mutex_unlock(&Mtx); + barrier_wait(&barrier); return NULL; } void *Thread2(void *x) { ! barrier_wait(&barrier); pthread_mutex_lock(&Mtx); Global = 43; pthread_mutex_unlock(&Mtx); *************** void *Thread2(void *x) { *** 25,30 **** --- 26,32 ---- } int main() { + barrier_init(&barrier, 2); pthread_t t[2]; pthread_create(&t[0], NULL, Thread1, NULL); pthread_create(&t[1], NULL, Thread2, NULL); *************** int main() { *** 37,43 **** /* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */ /* { dg-output " Atomic read of size 1 at .* by thread T2:(\n|\r\n|\r)" } */ /* { dg-output " #0 pthread_mutex_lock.*" } */ ! /* { dg-output " #1 Thread2.* .*(race_on_mutex.c:21|\\?{2}:0) (.*)" } */ /* { dg-output " Previous write of size 1 at .* by thread T1:(\n|\r\n|\r)" } */ /* { dg-output " #0 pthread_mutex_init .* (.)*" } */ /* { dg-output " #1 Thread1.* .*(race_on_mutex.c:12|\\?{2}:0) .*" } */ --- 39,45 ---- /* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */ /* { dg-output " Atomic read of size 1 at .* by thread T2:(\n|\r\n|\r)" } */ /* { dg-output " #0 pthread_mutex_lock.*" } */ ! /* { dg-output " #1 Thread2.* .*(race_on_mutex.c:22|\\?{2}:0) (.*)" } */ /* { dg-output " Previous write of size 1 at .* by thread T1:(\n|\r\n|\r)" } */ /* { dg-output " #0 pthread_mutex_init .* (.)*" } */ /* { dg-output " #1 Thread1.* .*(race_on_mutex.c:12|\\?{2}:0) .*" } */ diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/race_on_mutex2.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/race_on_mutex2.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/race_on_mutex2.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/race_on_mutex2.c Fri Jan 16 05:36:22 2015 *************** *** 1,22 **** /* { dg-shouldfail "tsan" } */ #include ! #include ! #include ! #include void *Thread(void *x) { pthread_mutex_lock((pthread_mutex_t*)x); pthread_mutex_unlock((pthread_mutex_t*)x); return 0; } int main() { pthread_mutex_t Mtx; pthread_mutex_init(&Mtx, 0); pthread_t t; pthread_create(&t, 0, Thread, &Mtx); ! sleep(1); pthread_mutex_destroy(&Mtx); pthread_join(t, 0); return 0; --- 1,25 ---- /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include ! #include "tsan_barrier.h" ! ! static pthread_barrier_t barrier; void *Thread(void *x) { pthread_mutex_lock((pthread_mutex_t*)x); pthread_mutex_unlock((pthread_mutex_t*)x); + barrier_wait(&barrier); return 0; } int main() { + barrier_init(&barrier, 2); pthread_mutex_t Mtx; pthread_mutex_init(&Mtx, 0); pthread_t t; pthread_create(&t, 0, Thread, &Mtx); ! barrier_wait(&barrier); pthread_mutex_destroy(&Mtx); pthread_join(t, 0); return 0; diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/simple_race.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/simple_race.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/simple_race.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/simple_race.c Fri Jan 16 05:36:22 2015 *************** *** 1,13 **** /* { dg-set-target-env-var TSAN_OPTIONS "halt_on_error=1" } */ /* { dg-shouldfail "tsan" } */ #include - #include #include ! #define MAX_ITERATIONS_NUMBER 100 ! #define SLEEP_STEP 128000 unsigned int delay_time = 1000; static inline void delay () { --- 1,15 ---- /* { dg-set-target-env-var TSAN_OPTIONS "halt_on_error=1" } */ /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include #include + #include "tsan_barrier.h" ! #define MAX_ITERATIONS_NUMBER 1 ! #define SLEEP_STEP 128000 + static pthread_barrier_t barrier; unsigned int delay_time = 1000; static inline void delay () { *************** static inline void delay () { *** 17,22 **** --- 19,25 ---- extern int main_1(); int main() { + barrier_init(&barrier, 2); int i; for (i = 0; i < MAX_ITERATIONS_NUMBER; i++) { main_1(); *************** int main() { *** 28,33 **** --- 31,37 ---- int Global; void *Thread1(void *x) { + barrier_wait(&barrier); delay(); Global = 42; return NULL; *************** void *Thread1(void *x) { *** 35,40 **** --- 39,45 ---- void *Thread2(void *x) { Global = 43; + barrier_wait(&barrier); return NULL; } diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/simple_stack.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/simple_stack.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/simple_stack.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/simple_stack.c Fri Jan 16 05:36:22 2015 *************** *** 1,9 **** /* { dg-shouldfail "tsan" } */ #include ! #include ! #include int Global; void __attribute__((noinline)) foo1() { --- 1,10 ---- /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include ! #include "tsan_barrier.h" + static pthread_barrier_t barrier; int Global; void __attribute__((noinline)) foo1() { *************** void __attribute__((noinline)) bar2() { *** 25,37 **** } void *Thread1(void *x) { ! sleep(1); bar1(); return NULL; } void *Thread2(void *x) { bar2(); return NULL; } --- 26,39 ---- } void *Thread1(void *x) { ! barrier_wait(&barrier); bar1(); return NULL; } void *Thread2(void *x) { bar2(); + barrier_wait(&barrier); return NULL; } *************** void StartThread(pthread_t *t, void *(*f *** 40,45 **** --- 42,48 ---- } int main() { + barrier_init(&barrier, 2); pthread_t t[2]; StartThread(&t[0], Thread1); StartThread(&t[1], Thread2); *************** int main() { *** 50,65 **** /* { dg-output "WARNING: ThreadSanitizer: data race.*" } */ /* { dg-output " Write of size 4 at .* by thread T1:(\n|\r\n|\r)" } */ ! /* { dg-output " #0 foo1.* .*(simple_stack.c:10|\\?{2}:0) (.*)" } */ ! /* { dg-output " #1 bar1.* .*(simple_stack.c:15|\\?{2}:0) (.*)" } */ ! /* { dg-output " #2 Thread1.* .*(simple_stack.c:29|\\?{2}:0) (.*)" } */ /* { dg-output " Previous read of size 4 at .* by thread T2:(\n|\r\n|\r)" } */ ! /* { dg-output " #0 foo2.* .*(simple_stack.c:19|\\?{2}:0) (.*)" } */ ! /* { dg-output " #1 bar2.* .*(simple_stack.c:24|\\?{2}:0) (.*)" } */ ! /* { dg-output " #2 Thread2.* .*(simple_stack.c:34|\\?{2}:0) (.*)" } */ /* { dg-output " Thread T1 \\(tid=.*, running\\) created by main thread at:(\n|\r\n|\r)" } */ /* { dg-output " #0 pthread_create .* (.*)" } */ ! /* { dg-output " #1 StartThread.* .*(simple_stack.c:39|\\?{2}:0) (.*)" } */ /* { dg-output " Thread T2 (.*) created by main thread at:(\n|\r\n|\r)" } */ /* { dg-output " #0 pthread_create .* (.*)" } */ ! /* { dg-output " #1 StartThread.* .*(simple_stack.c:39|\\?{2}:0) (.*)" } */ --- 53,68 ---- /* { dg-output "WARNING: ThreadSanitizer: data race.*" } */ /* { dg-output " Write of size 4 at .* by thread T1:(\n|\r\n|\r)" } */ ! /* { dg-output " #0 foo1.* .*(simple_stack.c:11|\\?{2}:0) (.*)" } */ ! /* { dg-output " #1 bar1.* .*(simple_stack.c:16|\\?{2}:0) (.*)" } */ ! /* { dg-output " #2 Thread1.* .*(simple_stack.c:30|\\?{2}:0) (.*)" } */ /* { dg-output " Previous read of size 4 at .* by thread T2:(\n|\r\n|\r)" } */ ! /* { dg-output " #0 foo2.* .*(simple_stack.c:20|\\?{2}:0) (.*)" } */ ! /* { dg-output " #1 bar2.* .*(simple_stack.c:25|\\?{2}:0) (.*)" } */ ! /* { dg-output " #2 Thread2.* .*(simple_stack.c:35|\\?{2}:0) (.*)" } */ /* { dg-output " Thread T1 \\(tid=.*, running\\) created by main thread at:(\n|\r\n|\r)" } */ /* { dg-output " #0 pthread_create .* (.*)" } */ ! /* { dg-output " #1 StartThread.* .*(simple_stack.c:41|\\?{2}:0) (.*)" } */ /* { dg-output " Thread T2 (.*) created by main thread at:(\n|\r\n|\r)" } */ /* { dg-output " #0 pthread_create .* (.*)" } */ ! /* { dg-output " #1 StartThread.* .*(simple_stack.c:41|\\?{2}:0) (.*)" } */ diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/sleep_sync.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/sleep_sync.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/sleep_sync.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/sleep_sync.c Fri Jan 16 05:36:22 2015 *************** *** 1,8 **** --- 1,11 ---- /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include #include + #include "tsan_barrier.h" + static pthread_barrier_t barrier; int X = 0; void MySleep() { *************** void MySleep() { *** 10,24 **** --- 13,30 ---- } void *Thread(void *p) { + barrier_wait(&barrier); MySleep(); // Assume the main thread has done the write. X = 42; return 0; } int main() { + barrier_init(&barrier, 2); pthread_t t; pthread_create(&t, 0, Thread, 0); X = 43; + barrier_wait(&barrier); pthread_join(t, 0); return 0; } diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/tiny_race.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/tiny_race.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/tiny_race.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/tiny_race.c Fri Jan 16 05:36:22 2015 *************** *** 1,20 **** /* { dg-shouldfail "tsan" } */ #include ! #include int Global; void *Thread1(void *x) { ! sleep(1); Global = 42; return x; } int main() { pthread_t t; pthread_create(&t, 0, Thread1, 0); Global = 43; pthread_join(t, 0); return Global; } --- 1,24 ---- /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include ! #include "tsan_barrier.h" + static pthread_barrier_t barrier; int Global; void *Thread1(void *x) { ! barrier_wait(&barrier); Global = 42; return x; } int main() { + barrier_init(&barrier, 2); pthread_t t; pthread_create(&t, 0, Thread1, 0); Global = 43; + barrier_wait(&barrier); pthread_join(t, 0); return Global; } diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/tls_race.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/tls_race.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/tls_race.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/tls_race.c Fri Jan 16 05:36:22 2015 *************** *** 1,18 **** /* { dg-shouldfail "tsan" } */ #include ! #include void *Thread(void *a) { *(int*)a = 43; return 0; } int main() { static __thread int Var = 42; pthread_t t; pthread_create(&t, 0, Thread, &Var); Var = 43; pthread_join(t, 0); } --- 1,24 ---- /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include ! #include "tsan_barrier.h" ! ! static pthread_barrier_t barrier; void *Thread(void *a) { + barrier_wait(&barrier); *(int*)a = 43; return 0; } int main() { + barrier_init(&barrier, 2); static __thread int Var = 42; pthread_t t; pthread_create(&t, 0, Thread, &Var); Var = 43; + barrier_wait(&barrier); pthread_join(t, 0); } diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/tsan_barrier.h gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/tsan_barrier.h *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/tsan_barrier.h Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/tsan_barrier.h Fri Jan 16 05:36:22 2015 *************** *** 0 **** --- 1,14 ---- + /* TSAN-invisible barriers. Link with -ldl. */ + #include + #include + + static __typeof(pthread_barrier_wait) *barrier_wait; + + static + void barrier_init (pthread_barrier_t *barrier, unsigned count) + { + void *h = dlopen ("libpthread.so.0", RTLD_LAZY); + barrier_wait = (__typeof (pthread_barrier_wait) *) + dlsym (h, "pthread_barrier_wait"); + pthread_barrier_init (barrier, NULL, count); + } diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/write_in_reader_lock.c gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/write_in_reader_lock.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/tsan/write_in_reader_lock.c Fri Jan 31 21:25:23 2014 --- gcc-4.9.3/gcc/testsuite/c-c++-common/tsan/write_in_reader_lock.c Fri Jan 16 05:36:22 2015 *************** *** 1,8 **** /* { dg-shouldfail "tsan" } */ #include ! #include pthread_rwlock_t rwlock; int GLOB; --- 1,10 ---- /* { dg-shouldfail "tsan" } */ + /* { dg-additional-options "-ldl" } */ #include ! #include "tsan_barrier.h" + static pthread_barrier_t barrier; pthread_rwlock_t rwlock; int GLOB; *************** void *Thread1(void *p) { *** 10,22 **** (void)p; pthread_rwlock_rdlock(&rwlock); // Write under reader lock. ! sleep(1); GLOB++; pthread_rwlock_unlock(&rwlock); return 0; } int main(int argc, char *argv[]) { pthread_rwlock_init(&rwlock, NULL); pthread_rwlock_rdlock(&rwlock); pthread_t t; --- 12,25 ---- (void)p; pthread_rwlock_rdlock(&rwlock); // Write under reader lock. ! barrier_wait(&barrier); GLOB++; pthread_rwlock_unlock(&rwlock); return 0; } int main(int argc, char *argv[]) { + barrier_init(&barrier, 2); pthread_rwlock_init(&rwlock, NULL); pthread_rwlock_rdlock(&rwlock); pthread_t t; *************** int main(int argc, char *argv[]) { *** 24,29 **** --- 27,33 ---- volatile int x = GLOB; (void)x; pthread_rwlock_unlock(&rwlock); + barrier_wait(&barrier); pthread_join(t, 0); pthread_rwlock_destroy(&rwlock); return 0; diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/ubsan/overflow-sub-3.c gcc-4.9.3/gcc/testsuite/c-c++-common/ubsan/overflow-sub-3.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/ubsan/overflow-sub-3.c Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/ubsan/overflow-sub-3.c Fri Oct 31 11:33:13 2014 *************** *** 0 **** --- 1,34 ---- + /* { dg-do run } */ + /* { dg-options "-fsanitize=signed-integer-overflow" } */ + + __attribute__((noinline, noclone)) int + foo1 (int x, int y) + { + return x - y; + } + + __attribute__((noinline, noclone)) int + foo2 (int x, int y) + { + unsigned int xa = (unsigned int) x - (__INT_MAX__ - 3); + xa &= 3; + x = __INT_MAX__ - 3 + xa; + unsigned int ya = y + 1U; + ya &= 1; + y = ya - 1; + return x - y; + } + + int + main () + { + int xm1, y; + for (xm1 = __INT_MAX__ - 4; xm1 < __INT_MAX__; xm1++) + for (y = -1; y <= 0; y++) + if (foo1 (xm1 + 1, y) != (int) (xm1 + 1U - y) + || foo2 (xm1 + 1, y) != (int) (xm1 + 1U - y)) + __builtin_abort (); + return 0; + } + /* { dg-output ":7:\[0-9]\[^\n\r]*signed integer overflow: 2147483647 - -1 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */ + /* { dg-output "\[^\n\r]*:19:\[0-9]\[^\n\r]*signed integer overflow: 2147483647 - -1 cannot be represented in type 'int'" } */ diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/ubsan/pr56917.c gcc-4.9.3/gcc/testsuite/c-c++-common/ubsan/pr56917.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/ubsan/pr56917.c Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/ubsan/pr56917.c Wed Mar 11 10:37:38 2015 *************** *** 0 **** --- 1,43 ---- + /* PR middle-end/56917 */ + /* { dg-do run } */ + /* { dg-options "-fsanitize=undefined" } */ + + #include + + #define INT_MIN (-__INT_MAX__ - 1) + #define LONG_MIN (-__LONG_MAX__ - 1L) + #define LLONG_MIN (-__LONG_LONG_MAX__ - 1LL) + + int __attribute__ ((noinline,noclone)) + fn1 (unsigned int u) + { + return (-(int) (u - 1U)) - 1; + } + + long __attribute__ ((noinline,noclone)) + fn2 (unsigned long int ul) + { + return (-(long) (ul - 1UL)) - 1L; + } + + long long __attribute__ ((noinline,noclone)) + fn3 (unsigned long long int ull) + { + return (-(long long) (ull - 1ULL)) - 1LL; + } + + int + main (void) + { + fputs ("UBSAN TEST START\n", stderr); + + if (fn1 (__INT_MAX__ + 1U) != INT_MIN + || fn2 (__LONG_MAX__ + 1UL) != LONG_MIN + || fn3 (__LONG_LONG_MAX__ + 1ULL) != LLONG_MIN) + __builtin_abort (); + + fputs ("UBSAN TEST END\n", stderr); + return 0; + } + + /* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */ diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/ubsan/pr65984.c gcc-4.9.3/gcc/testsuite/c-c++-common/ubsan/pr65984.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/ubsan/pr65984.c Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/ubsan/pr65984.c Wed Jun 3 15:33:59 2015 *************** *** 0 **** --- 1,23 ---- + /* PR tree-optimization/65984 */ + /* { dg-do compile } */ + /* { dg-options "-fnon-call-exceptions -fsanitize=bool,enum" } */ + + #ifndef __cplusplus + #define bool _Bool + #endif + + enum E { E0, E1, E2 }; + enum E e[2]; + bool *b; + + int + foo (int i) + { + return e[i]; + } + + int + bar (int i) + { + return b[i]; + } diff -Nrcpad gcc-4.9.2/gcc/testsuite/c-c++-common/ubsan/undefined-2.c gcc-4.9.3/gcc/testsuite/c-c++-common/ubsan/undefined-2.c *** gcc-4.9.2/gcc/testsuite/c-c++-common/ubsan/undefined-2.c Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/c-c++-common/ubsan/undefined-2.c Fri Nov 7 12:03:38 2014 *************** *** 0 **** --- 1,26 ---- + /* { dg-do run } */ + /* { dg-options "-fsanitize=undefined" } */ + /* { dg-additional-options "-std=gnu11" { target c } } */ + /* { dg-additional-options "-std=c++11" { target c++ } } */ + + #include + + volatile int w, z; + + __attribute__ ((noinline, noclone)) int + foo (int x, int y) + { + z++; + return x << y; + } + + int + main () + { + fputs ("1st\n", stderr); + w = foo (0, -__INT_MAX__); + return 0; + } + + /* { dg-output "1st(\n|\r\n|\r)" } */ + /* { dg-output "\[^\n\r]*shift exponent -\[^\n\r]* is negative\[^\n\r]*(\n|\r\n|\r)" } */ diff -Nrcpad gcc-4.9.2/gcc/testsuite/g++.dg/abi/aarch64_guard1.C gcc-4.9.3/gcc/testsuite/g++.dg/abi/aarch64_guard1.C *** gcc-4.9.2/gcc/testsuite/g++.dg/abi/aarch64_guard1.C Tue Nov 6 22:06:19 2012 --- gcc-4.9.3/gcc/testsuite/g++.dg/abi/aarch64_guard1.C Tue Jun 16 15:26:41 2015 *************** int *foo () *** 13,17 **** } // { dg-final { scan-assembler _ZGVZ3foovE1x,8,8 } } - // { dg-final { scan-tree-dump "_ZGVZ3foovE1x & 1" "original" } } // { dg-final { cleanup-tree-dump "original" } } --- 13,16 ---- diff -Nrcpad gcc-4.9.2/gcc/testsuite/g++.dg/abi/anon4.C gcc-4.9.3/gcc/testsuite/g++.dg/abi/anon4.C *** gcc-4.9.2/gcc/testsuite/g++.dg/abi/anon4.C Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/g++.dg/abi/anon4.C Wed Mar 4 18:13:44 2015 *************** *** 0 **** --- 1,41 ---- + // PR c++/65209 + // { dg-final { scan-assembler-not "comdat" } } + + // Everything involving the anonymous namespace bits should be private, not + // COMDAT. + + struct Bar + { + static Bar *self(); + char pad[24]; + }; + + template + struct BarGlobalStatic + { + Bar *operator()() { return holderFunction(); } + }; + + namespace { + namespace Q_QGS_s_self { + inline Bar *innerFunction() { + static struct Holder { + Bar value; + ~Holder() {} + } holder; + return &holder.value; + } + } + } + static BarGlobalStatic s_self; + + Bar *Bar::self() + { + return s_self(); + } + + int main(int argc, char *argv[]) + { + Bar* bar = Bar::self(); + return 0; + } diff -Nrcpad gcc-4.9.2/gcc/testsuite/g++.dg/cpp0x/alias-decl-44.C gcc-4.9.3/gcc/testsuite/g++.dg/cpp0x/alias-decl-44.C *** gcc-4.9.2/gcc/testsuite/g++.dg/cpp0x/alias-decl-44.C Thu Jan 1 00:00:00 1970 --- gcc-4.9.3/gcc/testsuite/g++.dg/cpp0x/alias-decl-44.C Fri Nov 21 21:36:04 2014 *************** *** 0 **** --- 1,43 ---- + // PR c++/63849 + // { dg-do compile { target c++11 } } + + template + using First = _T; // we should not use this + // alias with only + // one pack parameter (?) + + template