Re: [libquadmath, patch] Add logbq() to libquadmath

2015-08-08 Thread FX
ping

In the apparent absence of the libquadmath maintainers, could a global reviewer 
approve this rather simple patch, please?
 


> The attached patch adds logbq() to libquadmath, with code lifted from glibc.
> It is made necessary by an upcoming patch for gfortran, adding full support 
> for the IEEE modules on __float128, and requires logbq().
> 
> Bootstrapped and regtested on x86_64-apple-darwin14.
> OK to commit to trunk?
> 
> FX



logbq.diff
Description: Binary data


logbq.ChangeLog
Description: Binary data


Re: [fortran,patch] Extend IEEE support to all real kinds

2015-08-08 Thread FX
> 2015-08-06  Uros Bizjak  
> 
>PR fortran/64022
>* gfortran.dg/ieee/large_4.f90: New test.
> 
> Tested on x86_64-linux-gnu {,-m32}  and alphaev68-linux-gnu.
> OK for mainline?

OK. Thanks for the patch!

FX


Re: [v3 patch] refactoring - pull out common data members as _Context

2015-08-08 Thread Tim Shen
On Thu, Aug 6, 2015 at 1:12 AM, Tim Shen  wrote:
> In next few weeks I'm gonna sending patches for refactoring .
>
> The goal is to make the gigantic _Executor class into several smaller
> ones and hopefully more readable. After that, there are several
> correctness/performance issues to be fixed. We may also need more
> documentation, but self-documenting code is even more important.
>
> I've almost finished my drafting (with a lot of off-history back and
> forth, but stablized finally):
> https://github.com/innocentim/gcc/commits/executer, but I don't want
> to commit this branch, since it's more like a mind experiment (and
> trust me, you won't follow the commit history of this branch ;).

https://github.com/innocentim/gcc/commits/master

But I spent some time making a readable history, which is intended for
reviewing. It isn't finished yet, but to me it's much better and
modular.


-- 
Regards,
Tim Shen


[fortran,committed] Adjust gfortran --version output

2015-08-08 Thread FX
Trivial patch below committed as rev. 226734 to bring the output of “gfortran 
--version” in line with “gcc --version”.

FX



Index: ChangeLog
===
--- ChangeLog   (revision 226733)
+++ ChangeLog   (working copy)
@@ -1,3 +1,8 @@
+2015-08-08  Francois-Xavier Coudert  
+
+   PR fortran/67059
+   * gfortranspec.c (lang_specific_driver): Adjust --version output.
+
 2015-08-08  Bud Davis  
Mikael Morin  
 
Index: gfortranspec.c
===
--- gfortranspec.c  (revision 226632)
+++ gfortranspec.c  (working copy)
@@ -276,12 +276,11 @@ lang_specific_driver (struct cl_decoded_
 
case OPT__version:
  printf ("GNU Fortran %s%s\n", pkgversion_string, version_string);
- printf ("Copyright %s 2015 Free Software Foundation, Inc.\n\n",
+ printf ("Copyright %s 2015 Free Software Foundation, Inc.\n",
  _("(C)"));
- printf (_("GNU Fortran comes with NO WARRANTY, to the extent 
permitted by law.\n\
-You may redistribute copies of GNU Fortran\n\
-under the terms of the GNU General Public License.\n\
-For more information about these matters, see the file named COPYING\n\n"));
+ 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"),
+   stdout);
  exit (0);
  break;
 



Re: [COMMITTED][AArch64] Improve TLS Descriptor pattern to release RTL loop IV opt

2015-08-08 Thread Andreas Schwab
Jiong Wang  writes:

> Index: gcc/ChangeLog
> ===
> --- gcc/ChangeLog (revision 226682)
> +++ gcc/ChangeLog (working copy)
> @@ -1,3 +1,16 @@
> +2015-08-06Ramana Radhakrishnan  
> +   Jiong Wang  
> +
> + * config/aarch64/aarch64.d (tlsdesc_small_pseudo_): New pattern.
> + * config/aarch64/aarch64.h (reg_class): New enumeration FIXED_REG0.
> + (REG_CLASS_NAMES): Likewise.
> + (REG_CLASS_CONTENTS): Likewise.
> + * config/aarch64/aarch64.c (aarch64_class_max_nregs): Likewise.
> + (aarch64_register_move_cost): Likewise.
> + (aarch64_load_symref_appropriately): Invoke the new added pattern if
> + possible.
> + * config/aarch64/constraints.md (Uc0): New constraint.

That breaks go, all tests are crashing now.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Re: [v3 PATCH] Implement make_array and to_array from the Fundamentals v2 TS draft

2015-08-08 Thread Jonathan Wakely

On 07/08/15 09:37 +0100, Jonathan Wakely wrote:

On 13/07/15 13:55 +0300, Ville Voutilainen wrote:

+template 
+struct __is_reference_wrapper : false_type
+{ };


Please indent the class-head and the body.


+template 
+struct __is_reference_wrapper> : true_type
+{ };


Likewise.


+template 
+constexpr auto make_array(_Types&&... __t)


Same here, everything after the 'template<...>' should be indented.

Maybe consider putting a newline after 'auto' too

And the single character name _D makes me nervous again :-)



+  -> array,
+ common_type_t<_Types...>,
+ _D>,
+   sizeof...(_Types)>
+{
+  static_assert(__or_<
+  __not_>,
+  __and_<__not_<__is_reference_wrapper>>...>>
+::value,
+"make_array cannot be used without an explicit target type "
+"if any of the types given is a reference_wrapper");


I wonder if that would be more efficient to instantiate written as:

__not_<__and_, __or_<__is_reference_wrapper>...>>>


+  return {{forward<_Types>(__t)...}};
+}
+
+template 


_N is a common macro in some C libs, please rename to something like _Nm.
(_D isn't listed in the docs as a name to avoid, so should be OK).


diff --git a/libstdc++-v3/testsuite/experimental/array/make_array.cc 
b/libstdc++-v3/testsuite/experimental/array/make_array.cc
new file mode 100644
index 000..8456c37
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/array/make_array.cc
@@ -0,0 +1,47 @@
+// { dg-options "-std=gnu++14" }
+// { dg-do run }


Does this need to be dg-do run? It doesn't seem to run anything
interesting so could be dg-do compile.



P.S. I should have said it's OK for trunk with those changes.

Up to you if you want to change the __or_<> condition or not, I didn't
do a proper analysis of which might perform better. Also up to you if
you want to change _D to stop me being nervous.





Re: [v3 PATCH] Implement N4279, Improved insertion interface for unique-key maps.

2015-08-08 Thread Jonathan Wakely

On 07/08/15 09:36 +0100, Jonathan Wakely wrote:

On 21/07/15 00:49 +0300, Ville Voutilainen wrote:
+  template 
+  pair

Indent everything after 'template<...>' please.

+  try_emplace(const key_type& __k, _Args&&... __args)
+  {
+   iterator __i = lower_bound(__k);
+   if (__i == end() || key_comp()(__k, (*__i).first))
+  {
+   __i = emplace_hint(__i, std::piecewise_construct,
+std::forward_as_tuple(__k),
+std::forward_as_tuple(std::forward<_Args>(__args)...));
+return {__i, true};
+  }
+return {__i, false};
+  }

Add a blank line between functions please.

+  // move-capable overload
+  template 
+  pair
+  try_emplace(key_type&& __k, _Args&&... __args)



+  template 

_M isn't documented as a BADNAME but single character names like that make me
nervous, would _Obj or _Up be OK?

+  pair
+  insert_or_assign(const key_type& __k, _M&& __obj)
+  {



P.S. I should have said it's OK for trunk with those changes.


[PATCH, PING*3] Track indirect calls for call site information in debug info.

2015-08-08 Thread Pierre-Marie de Rodat

On 07/20/2015 02:45 PM, Pierre-Marie de Rodat wrote:

On PowerPC targets with -mlongcall, most subprogram calls are turned
into indirect calls: the call target is read from a register even though
it is compile-time known. This makes it difficult for machine code
static analysis engines to recover the callee information. The attached
patch is an attempt to help such engines, generating
DW_AT_abstract_origin attributes for all DW_TAG_GNU_call_site we are
interested in.


Ping for the patch submitted in 
. Thanks!


--
Pierre-Marie de Rodat


[PATCH, PING*3] PR debug/53927: fix value for DW_AT_static_link

2015-08-08 Thread Pierre-Marie de Rodat

On 07/20/2015 09:39 AM, Pierre-Marie de Rodat wrote:

This patch fixes the static link description in DWARF to comply with the
specification. In order to do so, it appends a field to all FRAME
objects to hold the frame base address (DW_AT_frame_base) so that the
nested subrograms can directly reference this field.

See  for the context
(in particular why we need this additional field in FRAME objects).


Ping for the patch submitted in 
. Thanks!


--
Pierre-Marie de Rodat


[PATCH, PING*2] DWARF: materialize subprogram renamings in Ada as imported declarations

2015-08-08 Thread Pierre-Marie de Rodat

On 07/25/2015 09:44 PM, Pierre-Marie de Rodat wrote:

This change makes GCC materialize subprogram renamings in Ada as
imported declarations (DW_TAG_imported_declarations). For instance,

 procedure Foo renames Bar;

will output:

 DW_TAG_imported_declaration:
 DW_AT_name: foo
 DW_AT_import: 


Ping for the patch submitted in 
.


--
Pierre-Marie de Rodat


[PATCHES, PING*3] Enhance standard DWARF for Ada

2015-08-08 Thread Pierre-Marie de Rodat

Hi,

On 07/16/2015 10:34 AM, Pierre-Marie de Rodat wrote:

This patch series aims at enhancing GCC to emit standard DWARF in place
of the current GNAT encodings (non-standard DWARF) for a set of "basic"
types: dynamic arrays, variable-length records, variant parts, etc.


Ping for the patch series: 
. Thanks!


--
Pierre-Marie de Rodat


[PATCH opt*.awk/middle-end] Detect wrong arguments to EnabledBy

2015-08-08 Thread Manuel López-Ibáñez
The argument to EnabledBy() must be one or more options with the
Common flag, otherwise the setting is silently ignored. This patch
detects this case when generating the options.c file and gives an
appropriate error. There were two options suffering from this: -Wchkp
is fixed by using LangEnabledBy instead, but -Wnull-dereference cannot
be enabled by -Wall or -Wextra because it triggers false positives
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16351#c35)

Bootstrapped and regression tested on x86_64-linux-gnu.

OK?

gcc/ChangeLog:

2015-08-08  Manuel López-Ibáñez  

* doc/invoke.texi (Wnull-dereference): Move after Wnonnull.
Not enabled by -Wall.
* optc-gen.awk: Give nicer error messages. Detect if the argument
of EnabledBy is not a Common option.
* common.opt (Wnull-dereference): Not enabled by -Wall.
* opt-functions.awk (lang_enabled_by): Nicer error messages.

gcc/c-family/ChangeLog:

2015-08-08  Manuel López-Ibáñez  

* c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
Index: gcc/doc/invoke.texi
===
--- gcc/doc/invoke.texi (revision 226719)
+++ gcc/doc/invoke.texi (working copy)
@@ -3720,10 +3720,19 @@ Warn about passing a null pointer for ar
 requiring a non-null value by the @code{nonnull} function attribute.
 
 @option{-Wnonnull} is included in @option{-Wall} and @option{-Wformat}.  It
 can be disabled with the @option{-Wno-nonnull} option.
 
+@item -Wnull-dereference
+@opindex Wnull-dereference
+@opindex Wno-null-dereference
+Warn if the compiler detects paths that trigger erroneous or
+undefined behavior due to dereferencing a null pointer.  This option
+is only active when @option{-fdelete-null-pointer-checks} is active,
+which is enabled by optimizations in most targets.  The precision of
+the warnings depends on the optimization options used.
+
 @item -Winit-self @r{(C, C++, Objective-C and Objective-C++ only)}
 @opindex Winit-self
 @opindex Wno-init-self
 Warn about uninitialized variables that are initialized with themselves.
 Note this option can only be used with the @option{-Wuninitialized} option.
@@ -4156,20 +4165,10 @@ All the above @option{-Wunused} options 
 
 In order to get a warning about an unused function parameter, you must
 either specify @option{-Wextra -Wunused} (note that @option{-Wall} implies
 @option{-Wunused}), or separately specify @option{-Wunused-parameter}.
 
-@item -Wnull-dereference
-@opindex Wnull-dereference
-@opindex Wno-null-dereference
-Warn if the compiler detects paths that trigger erroneous or
-undefined behavior due to dereferencing a null pointer.  This option
-is only active when @option{-fdelete-null-pointer-checks} is active,
-which is enabled by optimizations in most targets.  The precision of
-the warnings depends on the optimization options used.  This option is
-enabled by @option{-Wall}.
-
 @item -Wuninitialized
 @opindex Wuninitialized
 @opindex Wno-uninitialized
 Warn if an automatic variable is used without first being initialized
 or if a variable may be clobbered by a @code{setjmp} call. In C++,
Index: gcc/c-family/c.opt
===
--- gcc/c-family/c.opt  (revision 226719)
+++ gcc/c-family/c.opt  (working copy)
@@ -333,11 +333,11 @@ Warn about casts which discard qualifier
 Wchar-subscripts
 C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning LangEnabledBy(C ObjC C++ 
ObjC++,Wall)
 Warn about subscripts whose type is \"char\"
 
 Wchkp
-C ObjC C++ ObjC++ Var(warn_chkp) Warning EnabledBy(Wall)
+C ObjC C++ ObjC++ Var(warn_chkp) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
 Warn about memory access errors found by Pointer Bounds Checker
 
 Wclobbered
 C ObjC C++ ObjC++ Var(warn_clobbered) Warning EnabledBy(Wextra)
 Warn about variables that might be changed by \"longjmp\" or \"vfork\"
Index: gcc/optc-gen.awk
===
--- gcc/optc-gen.awk(revision 226719)
+++ gcc/optc-gen.awk(working copy)
@@ -28,11 +28,25 @@
 #[-v header_name=header.h] < inputfile > options.c
 
 # Dump that array of options into a C file.
 END {
 
-# Record first EnabledBy and LangEnabledBy uses.
+
+# Combine the flags of identical switches.  Switches
+# appear many times if they are handled by many front
+# ends, for example.
+for (i = 0; i < n_opts; i++) {
+merged_flags[i] = flags[i]
+}
+for (i = 0; i < n_opts; i++) {
+while(i + 1 != n_opts && opts[i] == opts[i + 1] ) {
+   merged_flags[i + 1] = merged_flags[i] " " merged_flags[i + 1];
+   i++;
+}
+}
+
+# Record EnabledBy and LangEnabledBy uses.
 n_enabledby = 0;
 for (i = 0; i < n_langs; i++) {
 n_enabledby_lang[i] = 0;
 }
 for (i = 0; i < n_opts; i++) {
@@ -46,19 +60,23 @@ for (i = 0; i < n_opts; i++) {
 # EnabledBy(arg) or EnabledBy(arg1 || arg2 || arg3)
 split_sep = " \\|\\| ";
 }
 n_enabledby_names = split(enabledby_arg, enabl

[PATCH, PING*2] PR rtl-optimization/66790: uninitialized registers handling in REE

2015-08-08 Thread Pierre-Marie de Rodat

On 07/19/2015 12:14 AM, Pierre-Marie de Rodat wrote:

This patch is an attempt to fix PR rtl-optimization/66790: please see
 for the context.
This adds a new dataflow problem (MIR for Must-Initialized Registers)
and use it in the REE pass to remove oversights, fixing the original
issue.


Ping for the discussion on Bugzilla. Thanks in advance! :-)

--
Pierre-Marie de Rodat


Re: [PATCH] Treat model == 0x4f as Broadwell

2015-08-08 Thread Uros Bizjak
On Sat, Aug 8, 2015 at 12:57 AM, H.J. Lu  wrote:
> From Intel SDM Vol 3:
>
> Table 35-29 lists MSRs that are common to processors based on the
> Broadwell microarchitectures (including CPUID signatures 06_3DH, 06_47H,
> 06_4FH, and 06_56H).
>
> OK for trunk?

These kind of patches fall into trivial category. They don't need approval..

Uros.