[BUILDROBOT] arm-netbsdelf: Error during -fself-test (was: [PATCH] TS_OPTIMIZATION/TS_TARGET_OPTION need no chain/type)

2017-02-26 Thread Jan-Benedict Glaw
Hi Richard,

On Wed, 2017-01-11 16:28:33 +0100, Richard Biener  wrote:
> On Wed, 11 Jan 2017, Richard Biener wrote:
> > LTO bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
> > 
> > (most "gross" are still TS_LIST having a type and TS_VEC having type
> > and chain, but that's been hard to fix with the C++ FE in place)
> 
> Forgot the tree-core.h part.
> 
> Re-bootstrapping testing on x86_64-unknown-linux-gnu.
> 
> Richard.
> 
> 2017-01-11  Richard Biener  
> 
>   * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
>   and TS_TARGET_OPTION directly derive from TS_BASE.
>   * tree-core.h (tree_optimization_option): Derive from tree_base.
>   (tree_target_option): Likewise.

This caused (or uncovered) a self-test issue on arm-netbsdelf (as run
by config-list.mk), like in this build:
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=696565

/home/jbglaw/build-configlist_mk/arm-netbsdelf/build-gcc/mk/arm-netbsdelf/./gcc/xgcc
 
-B/home/jbglaw/build-configlist_mk/arm-netbsdelf/build-gcc/mk/arm-netbsdelf/./gcc/
 -nostdinc -x c /dev/null -S -o /dev/null 
-fself-test=/home/jbglaw/repos-configlist_mk/gcc/gcc/testsuite/selftests
cc1: internal compiler error: Segmentation fault
0xaf7fdf crash_signal
/home/jbglaw/repos-configlist_mk/gcc/gcc/toplev.c:333
0x6739b3 lookup_page_table_entry
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-page.c:635
0x6739b3 ggc_set_mark(void const*)
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-page.c:1532
0x571bff gt_ggc_mx_lang_tree_node(void*)
./gt-c-c-decl.h:49
0x57242a gt_ggc_mx_lang_tree_node(void*)
./gt-c-c-decl.h:401
0x572fae gt_ggc_mx_lang_tree_node(void*)
./gt-c-c-decl.h:382
0x571e61 gt_ggc_mx_lang_tree_node(void*)
./gt-c-c-decl.h:391
0x83ed15 ggc_mark_root_tab
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-common.c:77
0x83ef70 ggc_mark_roots()
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-common.c:94
0x674417 ggc_collect()
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-page.c:2202
0x842dff selftest::forcibly_ggc_collect()
/home/jbglaw/repos-configlist_mk/gcc/gcc/ggc-tests.c:36
0x11d0491 selftest::run_tests()
/home/jbglaw/repos-configlist_mk/gcc/gcc/selftest-run-tests.c:103
0xaf9742 toplev::run_self_tests()
/home/jbglaw/repos-configlist_mk/gcc/gcc/toplev.c:2046
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
Makefile:1932: recipe for target 's-selftest' failed


Reverting your patch from current HEAD lets the self-test pass. Do you
spot something obvious?

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: They that give up essential liberty to obtain temporary safety,
the second  : deserve neither liberty nor safety.  (Ben Franklin)


signature.asc
Description: Digital signature


Re: [www patch] sort branches

2017-02-26 Thread Gerald Pfeifer
On Sun, 26 Feb 2017, Michael Eager wrote:
> (I don't think that I have write permission for wwwdocs.)

If you can commit to GCC sources, you also should be able to
commit to wwwdocs. :-)

https://gcc.gnu.org/about.html has a brief summary how to go
about it; let me know if I can help.

Gerald


Obsolete 32-bit HP-UX in GCC

2017-02-26 Thread John David Anglin
Hi Helge,

There is a certain amount of pressure to deprecate the 32-bit hpux target in 
gcc.  That was
a sop to please various maintainers that wanted to remove the whole hpux target.
I said we needed the 64-bit target for linux.  So, I plan to do this after GCC 
7 is released as
there didn't seem any reason to do it this late in the development serious.  
This will give
about a year for people to object...

Dave
--
John David Anglin   dave.ang...@bell.net





Re: [PATCH, DOC] Enhance document of asan-use-after-return param.

2017-02-26 Thread Gerald Pfeifer
On Fri, 30 Sep 2016, Martin Liška wrote:
> Even though we enable by default asan-use-after-return parameter (when 
> -fsanitize=address is selected), the runtime does not check use after 
> return by default. I would consider it useful to document.

Yes, definitely, thank you.

I noticed a few changes that would make sense of top of this
(adding "the" and "option" as well as simplifying the language
a bit), and committed the follow-up patch below.

Committed.

Gerald


2017-02-26  Gerald Pfeifer  

* doc/invoke.texi (Optimize Options): Refine the description
of asan-use-after-return.

Index: doc/invoke.texi
===
--- doc/invoke.texi (revision 245741)
+++ doc/invoke.texi (working copy)
@@ -10468,13 +10468,12 @@
 
 @item asan-use-after-return
 Enable detection of use-after-return.  This kind of protection
-is enabled by default when using @option{-fsanitize=address} option.
-To disable use-after-return detection use 
-@option{--param asan-use-after-return=0}.
+is enabled by default when using the @option{-fsanitize=address} option.
+To disable it use @option{--param asan-use-after-return=0}.
 
-Note: The check is disabled by default at runtime.  To enable the check,
-you should set environment variable @env{ASAN_OPTIONS} to
-@code{detect_stack_use_after_return=1}.
+Note: By default the check is disabled at run time.  To enable it,
+add @code{detect_stack_use_after_return=1} to the environment variable
+@env{ASAN_OPTIONS}.
 
 @item asan-instrumentation-with-call-threshold
 If number of memory accesses in function being instrumented

Re: [patch] Add -static-libquadmath option

2017-02-26 Thread Gerald Pfeifer
On Wed, 15 Oct 2014, FX wrote:
> I sent my last “driver/options” patch to Neil Booth, listed as “option 
> handling” maintainer, but the email bounced back from his 
> daikokuya.co.uk address. Given that he did not commit to the tree since 
> January 2005 (almost 10 years), and that his last commit was to the 
> toplevel ChangeLog:
> 
> 2005-01-19  Neil Booth  
> 
> * MAINTAINERS: Remove self as cpplib maintainer.
> 
> I suppose it would make sense to remove it “option handling” maintainer.

I guess Neil not removing himself as option handling maintainer
back then was just an oversight, and I have now committed the
change below.

Gerald

2017-02-26  Gerald Pfeifer  

* MAINTAINERS: Remove Neil Booth as option handling maintainer.

Index: MAINTAINERS
===
--- MAINTAINERS (revision 245741)
+++ MAINTAINERS (working copy)
@@ -220,7 +220,6 @@
 predict.defJan Hubicka 
 gcov   Jan Hubicka 
 gcov   Nathan Sidwell  
-option handlingNeil Booth  
 option handlingJoseph Myers

 middle-end Jeff Law
 middle-end Ian Lance Taylor

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-02-26 Thread Prathamesh Kulkarni
On 26 February 2017 at 05:16, Martin Sebor  wrote:
> On 02/25/2017 11:54 AM, Prathamesh Kulkarni wrote:
>>
>> On 25 February 2017 at 14:43, Marc Glisse  wrote:
>>>
>>> On Sat, 25 Feb 2017, Prathamesh Kulkarni wrote:
>>>
 Hi,
 The attached patch deletes calls to strdup, strndup if it's
 return-value is unused,
 and same for realloc if the first arg is NULL.
 Bootstrap+tested on x86_64-unknown-linux-gnu.
 OK for GCC 8 ?
>>>
>>>
>>>
>>> Instead of specializing realloc(0,*) wherever we can perform the same
>>> optimization as with malloc, wouldn't it be better to optimize:
>>> realloc(0,n) -> malloc(n)
>>> and let the malloc optimizations happen?
>>
>> Thanks for the suggestions. In the attached patch, realloc (0, n) is
>> folded to malloc (n).
>> Bootstrap+test in progress on x86_64-unknown-linux-gnu.
>> Does the patch look OK ?
>
>
> Although it's not part of the bug report, I wonder if a complete
> patch should also extend the malloc/free DCE to str{,n}dup/free
> calls and eliminate pairs like these:
>
>   void f (const char *s)
>   {
> char *p = strdup (src);
> free (p);
>   }
>
> (That seems to be just a matter of adding a couple of conditionals
> for BUILT_IN_STR{,N}DUP in propagate_necessity).
Hi Martin,
Thanks for the suggestions, I have updated the patch accordingly.
Does it look OK ?
>
> Martin
>
> PS Another optimization, though one that's most likely outside
> the scope of this patch, is to eliminate all of the following:
>
>   void f (const char *s, char *s2)
>   {
> char *p = strdup (s);
> strcpy (p, s2);
> free (p);
>   }
>
> as is done in:
>
>   void f (unsigned n, const char *s)
>   {
> char *p = malloc (n);
> memcpy (p, s, n);
> free (p);
>   }
>
Hmm, dse1 detects that the store to p in memcpy() is dead and deletes the call.
cddce1 then removes calls to  malloc and free thus making the function empty.
It doesn't work if memcpy is replaced by strcpy:

void f (unsigned n, char *s2)
{
  char *p = __builtin_malloc (n);
  __builtin_strcpy (p, s2);
  __builtin_free (p);
}

I suppose strcpy should be special-cased too in dse similar to memcpy ?

Thanks,
Prathamesh
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index a75dd91..e6eceea 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -3251,6 +3251,28 @@ gimple_fold_builtin_acc_on_device (gimple_stmt_iterator 
*gsi, tree arg0)
   return true;
 }
 
+/* Fold realloc (0, n) -> malloc (n).  */
+
+static bool
+gimple_fold_builtin_realloc (gimple_stmt_iterator *gsi)
+{
+  gimple *stmt = gsi_stmt (*gsi);
+  tree arg = gimple_call_arg (stmt, 0);
+  tree size = gimple_call_arg (stmt, 1);
+
+  if (operand_equal_p (arg, null_pointer_node, 0))
+{
+  tree fn_malloc = builtin_decl_implicit (BUILT_IN_MALLOC);
+  if (fn_malloc)
+   {
+ gcall *repl = gimple_build_call (fn_malloc, 1, size);
+ replace_call_with_call_and_fold (gsi, repl);
+ return true;
+   }
+}
+  return false;
+}
+
 /* Fold the non-target builtin at *GSI and return whether any simplification
was made.  */
 
@@ -3409,6 +3431,9 @@ gimple_fold_builtin (gimple_stmt_iterator *gsi)
 case BUILT_IN_ACC_ON_DEVICE:
   return gimple_fold_builtin_acc_on_device (gsi,
gimple_call_arg (stmt, 0));
+case BUILT_IN_REALLOC:
+  return gimple_fold_builtin_realloc (gsi);
+
 default:;
 }
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr79697.c 
b/gcc/testsuite/gcc.dg/tree-ssa/pr79697.c
new file mode 100644
index 000..d4f6473
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr79697.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-gimple -fdump-tree-cddce-details 
-fdump-tree-optimized" } */
+
+void f(void)
+{
+  __builtin_strdup ("abc");
+}
+
+void g(void)
+{
+  __builtin_strndup ("abc", 3);
+}
+
+void h(void)
+{
+  __builtin_realloc (0, 10);
+}
+
+void k(void)
+{
+  char *p = __builtin_strdup ("abc");
+  __builtin_free (p);
+
+  char *q = __builtin_strndup ("abc", 3);
+  __builtin_free (q);
+}
+
+/* { dg-final { scan-tree-dump "Deleting : __builtin_strdup" "cddce1" } } */
+/* { dg-final { scan-tree-dump "Deleting : __builtin_strndup" "cddce1" } } */
+/* { dg-final { scan-tree-dump "__builtin_malloc" "gimple" } } */
+/* { dg-final { scan-tree-dump-not "__builtin_strdup" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "__builtin_strndup" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "__builtin_free" "optimized" } } */
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index 5ebe57b..e17659d 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -233,6 +233,8 @@ mark_stmt_if_obviously_necessary (gimple *stmt, bool 
aggressive)
case BUILT_IN_CALLOC:
case BUILT_IN_ALLOCA:
case BUILT_IN_ALLOCA_WITH_ALIGN:
+   case BUILT_IN_STRDUP:
+   case BUILT_IN_STRNDUP:
  return;
 

Re: [Patch, fortran] PR71838 - ICE with OpenCoarrays on submodule

2017-02-26 Thread Paul Richard Thomas
I also forgot the attachment
. ***duuuh***

On 26 February 2017 at 16:01, Paul Richard Thomas
 wrote:
> I forgot to switch on 'plain text' mode - apologies
>
> Paul
>
> On 26 February 2017 at 15:58, Paul Richard Thomas
>  wrote:
>>
>> Dear All,
>>
>> The title in this PR turned out to be a red herring. The problem is with a 
>> procedure being a dummy in a submodule module procedure declaration; most 
>> particularly the abreviated form.
>>
>> The comments in the fix render the patch self-explanatory.
>>
>> Bootstrapped and regtested on FC23/x86_64 - OK for trunk and a few weeks 
>> later 6-branch?
>>
>> Cheers
>>
>> Paul
>>
>> 2017-02-26  Paul Thomas  
>>
>> PR fortran/71838
>> * symbol.c (check_conflict): A dummy procedure in a submodule,
>> module procedure is not an error.
>> (gfc_add_flavor): Ditto.
>>
>> 2017-02-26  Paul Thomas  
>>
>> PR fortran/71838
>> * gfortran.dg/submodule_26.f08 : New test.
>> * gfortran.dg/submodule_27.f08 : New test.
>>



-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein
Index: gcc/fortran/symbol.c
===
*** gcc/fortran/symbol.c(revision 245602)
--- gcc/fortran/symbol.c(working copy)
*** check_conflict (symbol_attribute *attr,
*** 474,481 
}
  }
  
!   if (attr->dummy && ((attr->function || attr->subroutine) && 
!   gfc_current_state () == COMP_CONTAINS))
  gfc_error_now ("internal procedure %qs at %L conflicts with "
   "DUMMY argument", name, where);
  
--- 474,486 
}
  }
  
!   /* The copying of procedure dummy arguments for module procedures in
!  a submodule occur whilst the current state is COMP_CONTAINS. It
!  is necessary, therefore, to let this through.  */
!   if (attr->dummy
!   && (attr->function || attr->subroutine)
!   && gfc_current_state () == COMP_CONTAINS
!   && !(gfc_new_block && gfc_new_block->abr_modproc_decl))
  gfc_error_now ("internal procedure %qs at %L conflicts with "
   "DUMMY argument", name, where);
  
*** gfc_add_flavor (symbol_attribute *attr,
*** 1646,1651 
--- 1651,1663 
if (attr->flavor == f && f == FL_VARIABLE)
  return true;
  
+   /* Copying a procedure dummy argument for a module procedure in a
+  submodule results in the flavor being copied and would result in
+  an error without this.  */
+   if (gfc_new_block && gfc_new_block->abr_modproc_decl
+   && attr->flavor == f && f == FL_PROCEDURE)
+ return true;
+ 
if (attr->flavor != FL_UNKNOWN)
  {
if (where == NULL)
Index: gcc/testsuite/gfortran.dg/submodule_26.f08
===
*** gcc/testsuite/gfortran.dg/submodule_26.f08  (nonexistent)
--- gcc/testsuite/gfortran.dg/submodule_26.f08  (working copy)
***
*** 0 
--- 1,46 
+ ! { dg-do compile }
+ ! { dg-options "-fcoarray=single" }
+ !
+ ! Tests the fix for PR71838 in which the PROCEDURE dummy argument caused
+ ! an ICE in the submodule. This is the reduced test in comment #9.
+ !
+ ! Contributed by Anton Shterenlikht  
+ ! Test reduced by Dominique d'Humieres 
+ !
+ module cgca_m3clvg
+   abstract interface
+ subroutine cgca_clvgs_abstract( farr, marr, n, cstate, debug,  &
+ newstate )
+   integer, parameter :: iarr = 4, idef = 4, rdef = 4, ldef = 4
+   integer, parameter :: l=-1, centre=l+1, u=centre+1
+   integer( kind=iarr ), intent(in) :: farr(l:u,l:u,l:u),   &
+   marr(l:u,l:u,l:u), cstate
+   real( kind=rdef ), intent(in) :: n(3)
+   logical( kind=ldef ), intent(in) :: debug
+   integer( kind=iarr ), intent(out) :: newstate
+  end subroutine cgca_clvgs_abstract
+   end interface
+ 
+   interface
+ module subroutine cgca_clvgp( coarray, rt, t, scrit, sub, gcus,&
+  periodicbc, iter, heartbeat, debug )
+   integer, parameter :: iarr = 4, idef = 4, rdef = 4, ldef = 4
+   integer( kind=iarr ), allocatable, intent(inout) ::  &
+   coarray(:,:,:,:)[:,:,:]
+   real( kind=rdef ), allocatable, intent(inout) :: rt(:,:,:)[:,:,:]
+   real( kind=rdef ), intent(in) :: t(3,3), scrit(3)
+   procedure( cgca_clvgs_abstract ) :: sub
+   logical( kind=ldef ), intent(in) :: periodicbc
+   integer( kind=idef ), intent(in) :: iter, heartbeat
+   logical( kind=ldef ), intent(in) :: debug
+ end subroutine cgca_clvgp
+   end interface
+ end module cgca_m3clvg
+ 
+ 
+ submodule ( cgca_m3clvg ) m3clvg_sm3
+   implicit none
+ contains
+   module procedure cgca_clvgp
+   end procedure cgca_clvgp
+ end submodule m3clvg_sm3
Index: 

[Patch, fortran] PR71838 - ICE with OpenCoarrays on submodule

2017-02-26 Thread Paul Richard Thomas
I forgot to switch on 'plain text' mode - apologies

Paul

On 26 February 2017 at 15:58, Paul Richard Thomas
 wrote:
>
> Dear All,
>
> The title in this PR turned out to be a red herring. The problem is with a 
> procedure being a dummy in a submodule module procedure declaration; most 
> particularly the abreviated form.
>
> The comments in the fix render the patch self-explanatory.
>
> Bootstrapped and regtested on FC23/x86_64 - OK for trunk and a few weeks 
> later 6-branch?
>
> Cheers
>
> Paul
>
> 2017-02-26  Paul Thomas  
>
> PR fortran/71838
> * symbol.c (check_conflict): A dummy procedure in a submodule,
> module procedure is not an error.
> (gfc_add_flavor): Ditto.
>
> 2017-02-26  Paul Thomas  
>
> PR fortran/71838
> * gfortran.dg/submodule_26.f08 : New test.
> * gfortran.dg/submodule_27.f08 : New test.
>


Re: [www patch] sort branches

2017-02-26 Thread Michael Eager

On 02/26/2017 01:38 AM, Gerald Pfeifer wrote:

On Mon, 13 Feb 2017, Michael Eager wrote:

The microblaze branch has been merged into the gcc mainline.


Thanks for the patch, Michael.  I noticed you had not committed
it, so I just did that for you (with a little tweak in how we
refer to GCC 4.2.1 as opposed to gcc-4.2.1).


Thanks.

(I don't think that I have write permission for wwwdocs.)

--
Michael Eagerea...@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


[wwwdocs] readings.html - Andestech link update

2017-02-26 Thread Gerald Pfeifer
The old link redirected to the main page, which is neither useful
nor appropriate for us; let's hope this one works a little longer.

I applied the patch, but if you have a better link, please advise.

Gerald

Index: readings.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/readings.html,v
retrieving revision 1.267
diff -u -r1.267 readings.html
--- readings.html   26 Feb 2017 09:12:07 -  1.267
+++ readings.html   26 Feb 2017 14:33:01 -
@@ -69,7 +69,7 @@
  andes (nds32)
   Manufacturer: Various licenses of Andes Technology Corporation.
   CPUs include: AndesCore families N7, N8, SN8, N9, N10, N12 and N13.
-  http://www.andestech.com/en/products/documentation.htm;>Andes 
Documentation
+  http://www.andestech.com/product.php?cls=9;>Andes 
Documentation
   GDB includes a simulator for all CPUs.
  
 


Re: [wwwdocs] Document in changes.html -fcode-hoisting, -fipa-bit-cp, -fipa-vrp, -fsplit-loops, GCJ removal, x86 ISA additions, -fshrink-wrap-separate etc.

2017-02-26 Thread Gerald Pfeifer
On Sun, 19 Feb 2017, Gerald Pfeifer wrote:
> That was quite a bit; thanks for doing that, Jakub!
> 
> In the patch below I try to streamline language a bit, document options 
> being implied by -Os (in addition to -O2 or higher), fix grammar in a few 
> places, and change a textual link to being a real one.
> 
> I have _not_ applied this yet, and would appreciate your feedback.

I did another two passes through this, making a few more simplifications
and changes, and committed it.

If you see anything beyond it, or changes you disagree with, let me know!

Gerald

Index: gcc-7/changes.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-7/changes.html,v
retrieving revision 1.66
diff -u -r1.66 changes.html
--- gcc-7/changes.html  24 Feb 2017 05:19:19 -  1.66
+++ gcc-7/changes.html  26 Feb 2017 14:19:09 -
@@ -50,41 +50,40 @@
 -fprintf-return-value option.
   A new store merging pass has been added.  It merges constant stores to
   adjacent memory locations into fewer, wider, stores.
-  It can be enabled by using the -fstore-merging option and is
-  enabled by default at the -O2 optimization
-  level or higher (including -Os).
+  It is enabled by the -fstore-merging option and at the
+  -O2 optimization level or higher (and -Os).
 
   A new code hoisting optimization has been added to the partial
   redundancy elimination pass.  It attempts to move evaluation of
   expressions executed on all paths to the function exit as early as
   possible, which helps primarily for code size, but can be useful for
-  speed of generated code as well.  It can be enabled by using the
-  -fcode-hoisting option and is enabled by default at
-  the -O2 optimization level or higher.
+  speed of generated code as well.  It is enabled by the
+  -fcode-hoisting option and at the -O2
+  optimization level or higher (and -Os).
 
   A new interprocedural bitwise constant propagation optimization
   has been added, which propagates knowledge about which bits of variables
   are known to be zero (including pointer alignment information) across
-  the call graph.  It can be enabled by using the -fipa-bit-cp
-  option if -fipa-cp is enabled as well, and is enabled by
-  default at the -O2 optimization level and higher.
+  the call graph.  It is enabled by the -fipa-bit-cp
+  option if -fipa-cp is enabled as well, and is enabled
+  at the -O2 optimization level and higher (and
+  -Os).
 
   A new interprocedural value range propagation optimization has been
   added, which propagates integral ranges that variable values can be proven
-  to be within across the call graph.  It can be enabled by using the
-  -fipa-vrp option and is enabled by default at the
-  -O2 optimization level and higher.
+  to be within across the call graph.  It is enabled by the
+  -fipa-vrp option and at the -O2 optimization
+  level and higher (and -Os).
 
   A new loop splitting optimization pass has been added.  It splits
   certain loops if they contain a condition that is always true on one
   side of the iteration space and always false on the other into two
   loops where each of the new two loops iterates just on one of the sides
   of the iteration space and the condition does not need to be checked
-  inside of the loop.  It can be enabled by using the
-  -fsplit-loops option and is enabled by default at the
-  -O3 optimization level or higher.
+  inside of the loop.  It is enabled by the -fsplit-loops
+  option and at the -O3 optimization level or higher.
 
-  Shrink-wrapping optimization can now separate portions of
+  The shrink-wrapping optimization can now separate portions of
   prologues and epilogues to improve performance if some of the
   work done traditionally by prologues and epilogues is not needed
   on certain paths.  This is controlled by the
@@ -138,7 +137,7 @@
   
 
   The -fsanitize=signed-integer-overflow suboption of the
-  UndefinedBehavior Sanitizer now diagnose arithmetic overflows even on
+  UndefinedBehavior Sanitizer now diagnoses arithmetic overflows even on
   arithmetic operations with generic vectors.
 
   Version 5 of the New __builtin_add_overflow_p,
   __builtin_sub_overflow_p,
   __builtin_mul_overflow_p built-in functions have been added.
-  These work similarly to earlier added built-in functions without the
-  _p suffix, but don't actually store the result of the
+  These work similarly to their siblings without the
+  _p suffix, but do not actually store the result of the
   arithmetics anywhere, just return whether the operation would overflow.
   These builtins allow easy checking for overflows e.g. in C++
   constexpr contexts.
@@ -566,7 +565,7 @@
   (suffixed fN or fNx) for the
   new
   types: __builtin_copysign, __builtin_fabs, 
__builtin_huge_val, __builtin_inf, 
__builtin_nan, __builtin_nans.
-  Compilation with -fopenmp is now compatible with
+  Compilation with -fopenmp is now compatible with the
   C11 _Atomic keyword.
 
 
@@ -730,8 

[wwwdocs] remove last style= attribute (in projects/gupc.html)

2017-02-26 Thread Gerald Pfeifer
Per my mail yesterday, projects/gupc.html had the last style= attribute 
used in all of wwwdocs.  This patch, which I just applied, addresses this.

Also, by increasing the second value of the margin settings, this now
looks a lot nicer visually.

Gerald

Index: gcc.css
===
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc.css,v
retrieving revision 1.48
diff -u -r1.48 gcc.css
--- gcc.css 25 Feb 2017 11:46:22 -  1.48
+++ gcc.css 26 Feb 2017 13:30:12 -
@@ -17,6 +17,7 @@
 
 .no-margin-top { margin-top:0; }
 .twocolumns { column-counts:2; -moz-column-count:2; }
+.imgleft { margin: 5px 20px; float: left; }
 
 td.news  { width: 50%; padding-right: 8px; }
 td.news h2   { font-size: 1.2em; margin-top: 0; margin-bottom: 2%; }
Index: projects/gupc.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/projects/gupc.html,v
retrieving revision 1.12
diff -u -r1.12 gupc.html
--- projects/gupc.html  10 Feb 2017 22:13:41 -  1.12
+++ projects/gupc.html  26 Feb 2017 13:30:12 -
@@ -7,8 +7,8 @@
 
 GNU Unified Parallel C (GUPC)
 
-
+
 
 The GNU UPC project implements a compilation and execution environment for
 programs written in the
@@ -19,7 +19,7 @@
 implementation of the GNU Objective C compiler.
 
 
-Project Goal
+Project Goal
 
 To encourage the use and adoption of UPC, GUPC provides a free,
 generally available implementation of the UPC language dialect.


[wwwdocs] Rotate news

2017-02-26 Thread Gerald Pfeifer
...so that we show items from the last 12 months.

As a nice side effect this balances the columns on main page out 
more evenly.

Applied.

Gerald

Index: index.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/index.html,v
retrieving revision 1.1044
diff -u -r1.1044 index.html
--- index.html  8 Feb 2017 21:43:47 -   1.1044
+++ index.html  26 Feb 2017 13:23:54 -
@@ -89,17 +89,6 @@
 [2016-04-27]
 
 
- Heterogeneous Systems Architecture support
- [2016-01-27]
- http://www.hsafoundation.com/;> Heterogeneous Systems
- Architecture 1.0 https://gcc.gnu.org/gcc-6/changes.html#hsa;>
- support was added to GCC, contributed by Martin Jambor, Martin Liška
- and Michael Matz from SUSE.
-
-GCC 5.3 released
-[2015-12-04]
-
-
 
 
 
Index: news.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/news.html,v
retrieving revision 1.157
diff -u -r1.157 news.html
--- news.html   30 Jan 2017 21:24:21 -  1.157
+++ news.html   26 Feb 2017 13:23:54 -
@@ -14,6 +14,17 @@
 
 
 
+ Heterogeneous Systems Architecture support
+ [2016-01-27]
+ http://www.hsafoundation.com/;> Heterogeneous Systems
+ Architecture 1.0 https://gcc.gnu.org/gcc-6/changes.html#hsa;>
+ support was added to GCC, contributed by Martin Jambor, Martin Liška
+ and Michael Matz from SUSE.
+
+GCC 5.3 released
+[2015-12-04]
+
+
 GCC 5.2 released
 [2015-07-16]
 

Re: [PATCH] Some more translation related tweaks

2017-02-26 Thread Jakub Jelinek
On Sun, Feb 26, 2017 at 01:18:57PM +0100, Volker Reichelt wrote:
> 2017-02-26  Volker Reichelt  
> 
>   * init.c: Include intl.h

Missing .

> @@ -29,6 +29,7 @@
>  #include "varasm.h"
>  #include "gimplify.h"
>  #include "c-family/c-ubsan.h"
> +#include "intl.h"
>  
>  static bool begin_init_stmts (tree *, tree *);
>  static tree finish_init_stmts (bool, tree, tree);
> @@ -2805,11 +2806,11 @@
>   {
> const char *msg;
> if (typedef_variant_p (orig_type))
> - msg = ("non-constant array new length must be specified "
> -"directly, not by typedef");
> + msg = G_("non-constant array new length must be specified "
> +  "directly, not by typedef");
> else
> - msg = ("non-constant array new length must be specified "
> -"without parentheses around the type-id");
> + msg = G_("non-constant array new length must be specified "
> +  "without parentheses around the type-id");
> pedwarn (EXPR_LOC_OR_LOC (outer_nelts, input_location),
>  OPT_Wvla, msg);

This is not -Wformat-security friendly, perhaps better
  pedwarn (EXPR_LOC_OR_LOC (outer_nelts, input_location), OPT_Wvla,
   typedef_variant_p (orig_type)
   ? "non-constant array new length must be specified "
 "directly, not by typedef"
   : "non-constant array new length must be specified "
 "without parentheses around the type-id");
?
>   }
> Index: gcc/cp/pt.c
> ===
> --- gcc/cp/pt.c   (revision 245719)
> +++ gcc/cp/pt.c   (working copy)
> @@ -17190,10 +17190,11 @@
>  stricter.  */
>   bool in_lambda = (current_class_type
> && LAMBDA_TYPE_P (current_class_type));
> - char const *msg = "%qD was not declared in this scope, "
> -   "and no declarations were found by "
> -   "argument-dependent lookup at the point "
> -   "of instantiation";
> + char const *const msg =

= should go on the next line in this case, i.e.
  = G_("%qD was not declared in this scope, "

Jakub


[PATCH] Some more translation related tweaks

2017-02-26 Thread Volker Reichelt
After Jakub's and Marek's latest translation patches, I grepped for
other unmarked messages. Here's what I found in the C++ front-end.

Bootstrapped/regtested on x86_64-linux, ok for trunk?

Regards,
Volker


2017-02-26  Volker Reichelt  

* init.c: Include intl.h
(build_new_1): Mark strings for translation.
* pt.c (tsubst_copy_and_build): Mark string for translation.
Make the pointer const.
* semantics.c (finish_id_expression): Mark strings for translation.

Index: gcc/cp/init.c
===
--- gcc/cp/init.c   (revision 245719)
+++ gcc/cp/init.c   (working copy)
@@ -29,6 +29,7 @@
 #include "varasm.h"
 #include "gimplify.h"
 #include "c-family/c-ubsan.h"
+#include "intl.h"
 
 static bool begin_init_stmts (tree *, tree *);
 static tree finish_init_stmts (bool, tree, tree);
@@ -2805,11 +2806,11 @@
{
  const char *msg;
  if (typedef_variant_p (orig_type))
-   msg = ("non-constant array new length must be specified "
-  "directly, not by typedef");
+   msg = G_("non-constant array new length must be specified "
+"directly, not by typedef");
  else
-   msg = ("non-constant array new length must be specified "
-  "without parentheses around the type-id");
+   msg = G_("non-constant array new length must be specified "
+"without parentheses around the type-id");
  pedwarn (EXPR_LOC_OR_LOC (outer_nelts, input_location),
   OPT_Wvla, msg);
}
Index: gcc/cp/pt.c
===
--- gcc/cp/pt.c (revision 245719)
+++ gcc/cp/pt.c (working copy)
@@ -17190,10 +17190,11 @@
   stricter.  */
bool in_lambda = (current_class_type
  && LAMBDA_TYPE_P (current_class_type));
-   char const *msg = "%qD was not declared in this scope, "
- "and no declarations were found by "
- "argument-dependent lookup at the point "
- "of instantiation";
+   char const *const msg =
+ G_("%qD was not declared in this scope, "
+"and no declarations were found by "
+"argument-dependent lookup at the point "
+"of instantiation");
 
bool diag = true;
if (in_lambda)
Index: gcc/cp/semantics.c
===
--- gcc/cp/semantics.c  (revision 245719)
+++ gcc/cp/semantics.c  (working copy)
@@ -3510,7 +3510,7 @@
  && DECL_CONTEXT (decl) == NULL_TREE
  && !cp_unevaluated_operand)
{
- *error_msg = "use of parameter outside function body";
+ *error_msg = G_("use of parameter outside function body");
  return error_mark_node;
}
 }
@@ -3520,13 +3520,13 @@
   if (TREE_CODE (decl) == TEMPLATE_DECL
   && !DECL_FUNCTION_TEMPLATE_P (decl))
 {
-  *error_msg = "missing template arguments";
+  *error_msg = G_("missing template arguments");
   return error_mark_node;
 }
   else if (TREE_CODE (decl) == TYPE_DECL
   || TREE_CODE (decl) == NAMESPACE_DECL)
 {
-  *error_msg = "expected primary-expression";
+  *error_msg = G_("expected primary-expression");
   return error_mark_node;
 }
 
===



New Spanish PO file for 'gcc' (version 7.1-b20170101)

2017-02-26 Thread Translation Project Robot
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-7.1-b20170101.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: [www patch] sort branches

2017-02-26 Thread Gerald Pfeifer
On Mon, 13 Feb 2017, Nathan Sidwell wrote:
> I've applied this patch to sort the other branch lists in svn.html.  I 
> also added an index and split the inactive branch list into merged and 
> plain inactive.

I noticed the description of Merged Development Branches was a litte
incomplete (in terms of missing words, apparently) ;-), and tried to
address this with the patch below that I committed.

(And I also used GCC as opposed to gcc.)

Gerald

Index: svn.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/svn.html,v
retrieving revision 1.214
diff -u -r1.214 svn.html
--- svn.html26 Feb 2017 09:38:34 -  1.214
+++ svn.html26 Feb 2017 10:25:13 -
@@ -704,7 +704,8 @@
 
 Merged Development Branches
 
-These development have been merged to gcc mainline, and thus inactive.
+These branches have been merged to GCC mainline, and are thus
+inactive.
 
 
   ARM/aarch64-branch


Re: [www patch] sort branches

2017-02-26 Thread Gerald Pfeifer
On Mon, 13 Feb 2017, Michael Eager wrote:
> The microblaze branch has been merged into the gcc mainline.

Thanks for the patch, Michael.  I noticed you had not committed
it, so I just did that for you (with a little tweak in how we
refer to GCC 4.2.1 as opposed to gcc-4.2.1).

Gerald

Index: svn.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/svn.html,v
retrieving revision 1.213
diff -u -r1.213 svn.html
--- svn.html13 Feb 2017 14:51:20 -  1.213
+++ svn.html26 Feb 2017 09:08:57 -
@@ -455,12 +455,6 @@
   are Dwarakanath Rajagopal mailto:dwarak.rajago...@amd.com;>dwarak.rajago...@amd.com
   and H.J. Lu mailto:hjl.to...@gmail.com;>hjl.to...@gmail.com.
 
-  microblaze
-  This branch contains support for the Xilinx MicroBlaze architecture.
-  This branch will be used to update MicroBlaze support from gcc-4.1.2 to
-  to the head.  It is maintained by Michael Eager 
-  mailto:ea...@eagercon.com;>ea...@eagercon.com.
-
   mpx
   The goal of this branch is to support Intel MPX technology
   (https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf;>link).
@@ -801,6 +795,13 @@
   mailto:ulrich.weig...@de.ibm.com;>Ulrich Weigand.  All changes 
from
   this branch were merged into mainline.
 
+  microblaze
+  This branch contained support for updating the Xilinx MicroBlaze
+  architecture to GCC 4.1.2.
+  It was created by Michael Eager
+  mailto:ea...@eagercon.com;>ea...@eagercon.com.
+  All changes have been merged into mainline.
+
   pch-branch
   tree-ssa-20020619-branch
   https://gcc.gnu.org/wiki/Var_Tracking_Assignments;>var-tracking-assignments*-branch


Re: [PATCH doc] update -dM to mention excluded macros (PR 41540)

2017-02-26 Thread Gerald Pfeifer
On Mon, 13 Feb 2017, Martin Sebor wrote:
>> +The predefined macros @code{__FILE__}, @code{__LINE__}, @code{__DATE__},
>> +and @code{__TIME__} are excluded from this list because their replacements
>> +may change from one line of output to the next.
>> 
>> Is this ("their replacements may change") truefor __FILE__ as well?
>> 
>> In any case, this may be too nit-picking, and the patch looks fine
>> to me.
> Thanks.  __FILE__ too can change between different lines of output:
> by means of a #line directive.

Good point, I did not think of that.

> I actually think it would be preferable if GCC printed the value of
> __FILE__ and all the other macros, including the four mentioned here.
> But since in response to the bug report Andrew implied that not
> printing them is intentional I figured I'd just update the docs
> and resolve this old bug (raised in 2009).
> 
> That said, I find the argument that these four are special because
> their value can change from line to line a weak one given that the
> definition of any predefined macro can change (simply by undefining
> and redefining it something else).
> 
> Is there a better argument for not printing __FILE__ et al?  Do we
> want to document this or change GCC to print all macros?

My personal opinion is that -dM is a debugging option and so special-
casing the four macros does not seem necessary, or at least not very
important.

So either proceed with your patch that documents the status quo (and
my original "patch looks fine to me" stands as approval if you need
any), or follow your proposal to remove that special case.  

What do the C/C++/cpp maintainers think?

Gerald


[wwwdocs] Remove duplicate reference to Objective-C from readings.html

2017-02-26 Thread Gerald Pfeifer
This very link is also part of gcc/doc/standards.texi, no need to
duplicate this here.

Applied.

Gerald

Index: readings.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/readings.html,v
retrieving revision 1.266
diff -u -r1.266 readings.html
--- readings.html   25 Feb 2017 21:12:31 -  1.266
+++ readings.html   25 Feb 2017 23:17:47 -
@@ -394,13 +394,6 @@
 
 
 
-Objective-C Information
-
-
-https://developer.apple.com/library/mac/documentation/cocoa/conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html;>
-  Objective-C Language Description (Apple Computer)
-
-
 
 Fortran information