[PATCH] verify_type_variant diagnostic tweak (PR tree-optimization/80021)
Hi! While it doesn't make much sense to translate these ICE messages (we unfortunately don't have variants of the diagnostic functions used for ICE reporting that wouldn't translate), changing the macro also results in smaller object, before: textdata bss dec hex filename 300332 4 25672 326008 4f978 tree.o after: textdata bss dec hex filename 299759 4 25672 325435 4f73b tree.o as we save (25-1)x the "type variant differs by " string. Ok for trunk? 2018-04-07 Jakub Jelinek PR tree-optimization/80021 * tree.c (verify_type_variant): Make error call in verify_variant_match translatable and remove final full stop. --- gcc/tree.c.jj 2018-03-14 17:34:23.693315228 +0100 +++ gcc/tree.c 2018-04-07 10:05:57.000901421 +0200 @@ -13035,7 +13035,7 @@ verify_type_variant (const_tree t, tree do { \ if (flag (tv) != flag (t)) \ { \ - error ("type variant differs by " #flag "."); \ + error ("type variant differs by %s", #flag);\ debug_tree (tv);\ return false; \ } \ Jakub
New Spanish PO file for 'gcc' (version 8.1-b20180401)
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Spanish team of translators. The file is available at: http://translationproject.org/latest/gcc/es.po (This file, 'gcc-8.1-b20180401.es.po', has just now been sent to you in a separate email.) All other PO files for your package are available in: http://translationproject.org/latest/gcc/ Please consider including all of these in your next release, whether official or a pretest. Whenever you have a new distribution with a new version number ready, containing a newer POT file, please send the URL of that distribution tarball to the address below. The tarball may be just a pretest or a snapshot, it does not even have to compile. It is just used by the translators when they need some extra translation context. The following HTML page has been updated: http://translationproject.org/domain/gcc.html If any question arises, please contact the translation coordinator. Thank you for all your work, The Translation Project robot, in the name of your translation coordinator.
Re: [PATCH] [ARC] Add/update combiner patterns.
* Claudiu Zissulescu [2018-03-07 13:59:03 +0200]: > From: claziss > > Hi Andrew, > > Please find the following patch which improves generating more instructions > with .f flag (i.e., compare with zero). > > Ok to apply? Looks good. Thanks. Andrew > Claudiu > > gcc/ > 2018-01-26 Claudiu Zissulescu > > * config/arc/arc.md (add_shift): New pattern. > (add_shift2): Likewise. > (sub_shift): Likewise. > (sub_shift_cmp0_noout): Likewise. > (compare_si_ashiftsi): Likewise. > (xbfu_cmp0_noout): New combine pattern. > (xbfu_cmp0"): Likewise. > (movsi_set_cc_insn): Place the predicable variant first. > (commutative_binary_cmp0_noout): Remove clobber. > (commutative_binary_cmp0): New pattern. > (noncommutative_binary_cmp0): Likewise. > (noncommutative_binary_cmp0_noout): Likewise. > (noncommutative_binary_comparison_result_used): Removed. > (rsub_cmp0): New pattern. > (rsub_cmp0_noout): Likewise. > (extzvsi): Changed, keep only meaningful variants. > (SQH, SEZ): New iterators. > (SQH_postfix): New mode attribute. > (SEZ_prefix): New code attribute. > (xt_cmp0_noout): New instruction pattern. > (xt_cmp0): Likewise. > * config/arc/predicates.md (cc_set_register): Use CC_REG instead > of numerical value. > (noncommutative_operator): Check the availability of barrel > shifter option. > --- > gcc/config/arc/arc.md| 274 > --- > gcc/config/arc/predicates.md | 6 +- > 2 files changed, 233 insertions(+), 47 deletions(-) > > diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md > index 7633d36b5a6..fb3432964ac 100644 > --- a/gcc/config/arc/arc.md > +++ b/gcc/config/arc/arc.md > @@ -810,20 +810,90 @@ archs4x, archs4xd, archs4xd_slow" >"st%U0 %1,%0\;st%U0.di %1,%0" >[(set_attr "type" "store")]) > > +;; Combiner patterns for compare with zero > +(define_mode_iterator SQH [QI HI]) > +(define_mode_attr SQH_postfix [(QI "b") (HI "%_")]) > + > +(define_code_iterator SEZ [sign_extend zero_extend]) > +(define_code_attr SEZ_prefix [(sign_extend "sex") (zero_extend "ext")]) > + > +(define_insn "*xt_cmp0_noout" > + [(set (match_operand 0 "cc_set_register" "") > + (compare:CC_ZN (SEZ:SI (match_operand:SQH 1 "register_operand" "r")) > +(const_int 0)))] > + "" > + ".f\\t0,%1" > + [(set_attr "type" "compare") > + (set_attr "cond" "set_zn")]) > + > +(define_insn "*xt_cmp0" > + [(set (match_operand 0 "cc_set_register" "") > + (compare:CC_ZN (SEZ:SI (match_operand:SQH 1 "register_operand" "r")) > +(const_int 0))) > + (set (match_operand:SI 2 "register_operand" "=r") > + (SEZ:SI (match_dup 1)))] > + "" > + ".f\\t%2,%1" > + [(set_attr "type" "compare") > + (set_attr "cond" "set_zn")]) > + > +(define_insn "*xbfu_cmp0_noout" > + [(set (match_operand 0 "cc_set_register" "") > + (compare:CC_Z > + (zero_extract:SI > + (match_operand:SI 1 "register_operand" " r,r") > + (match_operand:SI 2 "const_int_operand" "C3p,n") > + (match_operand:SI 3 "const_int_operand" " n,n")) > + (const_int 0)))] > + "TARGET_HS && TARGET_BARREL_SHIFTER" > + { > + int assemble_op2 = (((INTVAL (operands[2]) - 1) & 0x1f) << 5) | (INTVAL > (operands[3]) & 0x1f); > + operands[2] = GEN_INT (assemble_op2); > + return "xbfu%?.f\\t0,%1,%2"; > + } > + [(set_attr "type" "shift") > + (set_attr "iscompact" "false") > + (set_attr "length" "4,8") > + (set_attr "predicable" "no") > + (set_attr "cond" "set_zn")]) > + > +(define_insn "*xbfu_cmp0" > + [(set (match_operand 4 "cc_set_register" "") > + (compare:CC_Z > + (zero_extract:SI > + (match_operand:SI 1 "register_operand" "0 ,r,0") > + (match_operand:SI 2 "const_int_operand" "C3p,n,n") > + (match_operand:SI 3 "const_int_operand" "n ,n,n")) > + (const_int 0))) > + (set (match_operand:SI 0 "register_operand" "=r,r,r") > + (zero_extract:SI (match_dup 1) (match_dup 2) (match_dup 3)))] > + "TARGET_HS && TARGET_BARREL_SHIFTER" > + { > + int assemble_op2 = (((INTVAL (operands[2]) - 1) & 0x1f) << 5) | (INTVAL > (operands[3]) & 0x1f); > + operands[2] = GEN_INT (assemble_op2); > + return "xbfu%?.f\\t%0,%1,%2"; > + } > + [(set_attr "type" "shift") > + (set_attr "iscompact" "false") > + (set_attr "length" "4,8,8") > + (set_attr "predicable" "yes,no,yes") > + (set_attr "cond" "set_zn")]) > + > +; splitting to 'tst' allows short insns and combination into brcc. > (define_insn_and_split "*movsi_set_cc_insn" > - [(set (match_operand:CC_ZN 2 "cc_set_register" "") > - (match_operator:CC_ZN 3 "zn_compare_operator" > - [(match_operand:SI 1 "nonmemory_operand" "cI,cL,Cal") (const_int 0)])) > - (set (match_operand:SI 0 "register_operand" "=w,w,w") > + [(set (match_operand 2 "cc_set_register" "") > + (m
New Spanish PO file for 'gcc' (version 8.1-b20180401)
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Spanish team of translators. The file is available at: http://translationproject.org/latest/gcc/es.po (This file, 'gcc-8.1-b20180401.es.po', has just now been sent to you in a separate email.) All other PO files for your package are available in: http://translationproject.org/latest/gcc/ Please consider including all of these in your next release, whether official or a pretest. Whenever you have a new distribution with a new version number ready, containing a newer POT file, please send the URL of that distribution tarball to the address below. The tarball may be just a pretest or a snapshot, it does not even have to compile. It is just used by the translators when they need some extra translation context. The following HTML page has been updated: http://translationproject.org/domain/gcc.html If any question arises, please contact the translation coordinator. Thank you for all your work, The Translation Project robot, in the name of your translation coordinator.
Re: [PATCH] verify_type_variant diagnostic tweak (PR tree-optimization/80021)
On April 7, 2018 10:18:40 AM GMT+02:00, Jakub Jelinek wrote: >Hi! > >While it doesn't make much sense to translate these ICE messages (we >unfortunately don't have variants of the diagnostic functions used for >ICE >reporting that wouldn't translate), changing the macro also results in >smaller object, before: > text data bss dec hex filename > 300332 4 25672 326008 4f978 tree.o >after: > text data bss dec hex filename > 299759 4 25672 325435 4f73b tree.o >as we save (25-1)x the "type variant differs by " string. Ok for >trunk? OK. Richard. >2018-04-07 Jakub Jelinek > > PR tree-optimization/80021 > * tree.c (verify_type_variant): Make error call in >verify_variant_match > translatable and remove final full stop. > >--- gcc/tree.c.jj 2018-03-14 17:34:23.693315228 +0100 >+++ gcc/tree.c 2018-04-07 10:05:57.000901421 +0200 >@@ -13035,7 +13035,7 @@ verify_type_variant (const_tree t, tree > do { > \ > if (flag (tv) != flag (t)) > \ > { > \ >- error ("type variant differs by " #flag "."); \ >+ error ("type variant differs by %s", #flag);\ > debug_tree (tv);\ > return false; \ > } > \ > > Jakub
Re: Add workaround to std::variant for Clang bug 31852
On Mon, 26 Mar 2018, Jonathan Wakely wrote: > Now with 100% more patch. Technically infinitely more patch, not just 100%. :-) (The previous mail had 100% less patch, though.) SCNR, Gerald
[patch, middle-end] Fix PR 82976, non-trivial conversion at assignment
Hello world, the attached patch fixes a middle-end bug, which caused a Fortran regression. The solution was given by Andrew on IRC and in the PR, I did the testing. Regression-tested with "configure --enable-languages=all" and "make -k check" on x86_64-pc-linux-gnu. OK for trunk? Regards Thomas 2018-04-07 Thomas Koenig Andrew Pinski PR middle-end/82976 * match.pd: Use constant_boolean_node of correct type instead of boolean_true_node or boolean_false_node for simplifying pointer comparisons to zero. 2018-04-07 Thomas Koenig PR middle-end/82976 * gfortran.dg/realloc_on_assign_16a.f90: New test. ! { dg-do compile } ! { dg-options "-Ofast -fno-tree-forwprop" } ! Test that PR 82976 is fixed, this used to ICE. ! ! Contributed by Stefan Mauerberger ! PROGRAM main !USE MPI TYPE :: test_typ REAL, ALLOCATABLE :: a(:) END TYPE TYPE(test_typ) :: xx, yy TYPE(test_typ), ALLOCATABLE :: conc(:) !CALL MPI_INIT(i) xx = test_typ( [1.0,2.0] ) yy = test_typ( [4.0,4.9] ) conc = [ xx, yy ] if (any (int (10.0*conc(1)%a) .ne. [10,20])) STOP 1 if (any (int (10.0*conc(2)%a) .ne. [40,49])) STOP 2 !CALL MPI_FINALIZE(i) END PROGRAM main Index: match.pd === --- match.pd (Revision 259152) +++ match.pd (Arbeitskopie) @@ -3700,7 +3700,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (neeq @0 @1) (if (POINTER_TYPE_P (TREE_TYPE (@0)) && ptrs_compare_unequal (@0, @1)) - { neeq == EQ_EXPR ? boolean_false_node : boolean_true_node; }))) + { constant_boolean_node (neeq != EQ_EXPR, type); }))) /* PR70920: Transform (intptr_t)x eq/ne CST to x eq/ne (typeof x) CST. and (typeof ptr_cst) x eq/ne ptr_cst to x eq/ne (typeof x) CST.
Re: [patch, middle-end] Fix PR 82976, non-trivial conversion at assignment
On April 7, 2018 8:08:39 PM GMT+02:00, "Thomas König" wrote: >Hello world, > >the attached patch fixes a middle-end bug, which caused a Fortran >regression. The solution was given by Andrew on IRC and >in the PR, I did the testing. > >Regression-tested with "configure --enable-languages=all" and >"make -k check" on x86_64-pc-linux-gnu. > >OK for trunk? OK. Richard. >Regards > > Thomas > >2018-04-07 Thomas Koenig > Andrew Pinski > > PR middle-end/82976 > * match.pd: Use constant_boolean_node of correct type instead of > boolean_true_node or boolean_false_node for simplifying > pointer comparisons to zero. > >2018-04-07 Thomas Koenig > > PR middle-end/82976 > * gfortran.dg/realloc_on_assign_16a.f90: New test.
Re: [wwwdocs] GCC-7.3 changes: Add note about LEON3FT erratum workaround
On Thu, 1 Feb 2018, Daniel Hellstrom wrote: >>> I would like to commit the following comment about LEON3-FT errata now >>> available in GCC-7.3. > Thanks, I have now committed it. Apparently the ultimate URL is the one below (which I applied for now)? Gerald Index: changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-7/changes.html,v retrieving revision 1.101 diff -u -r1.101 changes.html --- changes.html2 Apr 2018 15:22:38 - 1.101 +++ changes.html7 Apr 2018 20:05:52 - @@ -1324,7 +1324,8 @@ SPARC -Work arounds for the four http://www.gaisler.com/notes";> +Work arounds for the four https://www.gaisler.com/index.php/information/app-tech-notes";> LEON3FT errata GRLIB-TN-0010..0013 have been added. Relevant errata are activated by the target specific -mfix-ut699, -mfix-ut700 and -mfix-gr712rc switches.
Re: [wwwdocs] gcc-8/changes.html additions
On Wed, 4 Apr 2018, Bernd Edlinger wrote: > Is it OK for wwwdocs? Yes, except... + -Wsizeof-pointer-div warns for suspicious divisions + of two sizeof expressions that divide the pointer size by + the element size, which is the usual way to compute the array size but + won't work out correctly with pointers. ...this is a bit misleading. Dividing the pointer size by the element size is _not_ the usual way; using the array size is. I am sure this is what you had in mind, just the wording is a bit unfortunate. Perhaps "...which looks like the usual way..." and "the size of a pointer" and "the size of elements it points to"? And the sizeof expressions do not actually divide anything.) I seem to have a writer's block right now, or I would have proposed a full alternative, but hope the above gives you an indication? Definitely okay to commit the other parts of this patch, and let's just work on this item a bit more. Thanks, Gerald
Re: [wwwdocs] Release notes for SVE
On Tue, 20 Mar 2018, Richard Sandiford wrote: > I thought I had to use the passive tense because all the other bullet > points in that section do, but I guess in some ways "GCC now supports..." > would avoid the shift in subject. It's a good point, actually. Many style guides actually recommend to avoid passive tense, and it may be worth going through the release notes and one point and seeing what we can adjust. In any case, it's definitely fine to use active tense. Gerald
Re: [wwwdocs] Update gcc-8/changes.html for some IPA and x86 canges
On Tue, 20 Mar 2018, Richard Biener wrote: > I have committed the following (will happily edit if necessary). Thanks, Richard! I struggled a bit parsing the item DWARF debug information improvements. Are you fine with the proposed change below? Gerald Index: changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,v retrieving revision 1.50 diff -u -r1.50 changes.html --- changes.html1 Apr 2018 22:19:57 - 1.50 +++ changes.html7 Apr 2018 21:09:53 - @@ -72,10 +72,11 @@ Link-time optimization improvements: -On ELF targets using DWARF debug information has been significantly -improved in quality by properly preserving language-specific - debug information. This allows for example the libstdc++ - pretty-printers to work with LTO optimized executables. +We have significantly improved debug information on ELF targets +using DWARF debug information by properly preserving +language-specific information. This allows for example the +libstdc++ pretty-printers to work with LTO optimized +executables. A new option -fcf-protection=[full|branch|return|none] is
Re: [wwwdocs] gcc-8/changes.html additions
On 04/07/18 23:00, Gerald Pfeifer wrote: > On Wed, 4 Apr 2018, Bernd Edlinger wrote: >> Is it OK for wwwdocs? > > Yes, except... > > + -Wsizeof-pointer-div warns for suspicious divisions > + of two sizeof expressions that divide the pointer size by > + the element size, which is the usual way to compute the array size but > > + won't work out correctly with pointers. > > ...this is a bit misleading. > > Dividing the pointer size by the element size is _not_ the usual way; Yes, it is of course the _wrong_ way. This happens usually with macros that are meant to be used with arrays. > using the array size is. I am sure this is what you had in mind, just > the wording is a bit unfortunate. Perhaps "...which looks like the > usual way..." and "the size of a pointer" and "the size of elements > it points to"? And the sizeof expressions do not actually divide > anything.) > > I seem to have a writer's block right now, or I would have proposed > a full alternative, but hope the above gives you an indication? > > > Definitely okay to commit the other parts of this patch, and let's > just work on this item a bit more. > Thanks for your review! I committed the other parts and rewrote this one along your suggested wording. See attached patch. Is it OK? Bernd. Index: htdocs/gcc-8/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,v retrieving revision 1.56 diff -u -r1.56 changes.html --- htdocs/gcc-8/changes.html 7 Apr 2018 21:15:39 - 1.56 +++ htdocs/gcc-8/changes.html 7 Apr 2018 21:24:14 - @@ -287,6 +287,13 @@ by -Wextra. + -Wsizeof-pointer-div warns for suspicious divisions + of the size of a pointer and the size of the element it points to, + which looks like the usual way to compute the array size but + won't work out correctly with pointers. + This warning is enabled by -Wall. + + -Wcast-align=strict warns whenever a pointer is cast such that the required alignment of the target is increased. For example, warn if a char * is cast to an int *
Re: [committed] fix a couple of typos in manual
On Mon, 2 Apr 2018, Martin Sebor wrote: > I committed r259020 to fix a couple of typos in the documentation > of the -Wrestrict option. The diff is below for reference. > -The @option{-Wrestrict} is included in @option{-Wall}. > +The @option{-Wrestrict} option detects some instances of simple overlap > +even without optimization but works best at @option{-O2}. It is included > +in @option{-Wall}. Shoulds this read "-O2 or higher"? (That's an interesting definition of typo, by the way. ;-) Not disputing the change as such, only the ChangeLog entry.) Gerald
Re: [wwwdocs] Update gcc-8/changes.html for some IPA and x86 canges
On April 7, 2018 11:11:05 PM GMT+02:00, Gerald Pfeifer wrote: >On Tue, 20 Mar 2018, Richard Biener wrote: >> I have committed the following (will happily edit if necessary). > >Thanks, Richard! > >I struggled a bit parsing the item DWARF debug information >improvements. >Are you fine with the proposed change below? Sure! Go ahead. Richard. >Gerald > >Index: changes.html >=== >RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,v >retrieving revision 1.50 >diff -u -r1.50 changes.html >--- changes.html 1 Apr 2018 22:19:57 - 1.50 >+++ changes.html 7 Apr 2018 21:09:53 - >@@ -72,10 +72,11 @@ > > Link-time optimization improvements: > >-On ELF targets using DWARF debug information has been >significantly >-improved in quality by properly preserving language-specific >- debug information. This allows for example the libstdc++ >- pretty-printers to work with LTO optimized executables. >+We have significantly improved debug information on ELF >targets >+using DWARF debug information by properly preserving >+language-specific information. This allows for example the >+libstdc++ pretty-printers to work with LTO optimized >+executables. > > > A new option -fcf-protection=[full|branch|return|none] is
Re: [committed] fix a couple of typos in manual
On April 8, 2018 1:43:00 AM GMT+02:00, Gerald Pfeifer wrote: >On Mon, 2 Apr 2018, Martin Sebor wrote: >> I committed r259020 to fix a couple of typos in the documentation >> of the -Wrestrict option. The diff is below for reference. > >> -The @option{-Wrestrict} is included in @option{-Wall}. >> +The @option{-Wrestrict} option detects some instances of simple >overlap >> +even without optimization but works best at @option{-O2}. It is >included >> +in @option{-Wall}. > >Shoulds this read "-O2 or higher"? Most certainly. >(That's an interesting definition of typo, by the way. ;-) Not >disputing the change as such, only the ChangeLog entry.) > >Gerald