New Japanese PO file for 'gcc' (version 4.6.1)

2011-08-28 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 Japanese team of translators.  The file is available at:

http://translationproject.org/latest/gcc/ja.po

(This file, 'gcc-4.6.1.ja.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.
coordina...@translationproject.org



Re: [libcpp,lto,fortran PATCH] Fix linemap_add use and remove unnecessary kludge

2011-08-28 Thread Richard Guenther
On Sat, Aug 27, 2011 at 9:04 PM, Dodji Seketeli do...@redhat.com wrote:
 Hello Richard,

 Richard Guenther richard.guent...@gmail.com writes:

 In the LTO FE the two linemap_add calls were to advance the location
 counter to cover the builtin special locations.  You exchange these
 with only one - that doesn't look correct without more explanation.

 It seems to me that you don't need to worry about advancing the location
 counter to cover builtin special locations because the lowest possible
 location that could be handed out by the line map is set to
 RESERVED_LOCATION_COUNT.  You can see that by looking at linemap_init
 that sets the initial highest location to RESERVED_LOCATION_COUNT - 1,
 and at linemap_add that sets the starting location of the added map to
 the highest location + 1.  And RESERVED_LOCATION is set to 2 in
 line-map.h.

Hm, ok.  That must have changed since the introduction of LTO then.
The LTO bits are ok as well.

Thanks,
Richard.

 The PCH change is ok.

 Thank you.

 --
                Dodji



[PATCH] fix -Werror=maybe-uninitialized in tree-ssa-loop-ivopts.c (PR bootstrap/50218)

2011-08-28 Thread Mikael Pettersson
The recent r178104 change to tree-ssa-loop-ivopts.c broke bootstrap on 
i686-linux
because stage2 gcc considers the variable 'comp' used but possibly 
uninitialized,
see PR50218.  Initializing it to ERROR_MARK solves the problem, and is 
consistent
with how other parts of r178104 represent absent/impossible 'comp' values.

Ok for trunk?  (I don't have svn write access.)

/Mikael

gcc/

2011-08-20  Mikael Pettersson  mi...@it.uu.se

PR bootstrap/50218
* tree-ssa-loop-ivopts.c (determine_use_iv_cost_condition): Initialize 
comp.

--- gcc-4.7-20110827/gcc/tree-ssa-loop-ivopts.c.~1~ 2011-08-26 
15:36:28.0 +0200
+++ gcc-4.7-20110827/gcc/tree-ssa-loop-ivopts.c 2011-08-28 10:13:34.0 
+0200
@@ -4757,7 +4757,7 @@ determine_use_iv_cost_condition (struct 
   bool ok;
   int elim_inv_expr_id = -1, express_inv_expr_id = -1, inv_expr_id;
   tree *control_var, *bound_cst;
-  enum tree_code comp;
+  enum tree_code comp = ERROR_MARK;
 
   /* Only consider real candidates.  */
   if (!cand-iv)


[patch, fortran, committed] Regenerate (almost) all files in libgfortran/generated

2011-08-28 Thread Thomas Koenig

Hello world,

I have just regenerated all but one ofthe files in 
libgfortran/generated/ after regression-testing.


This completed the fix for PR 40866, where I had left out a few files
(possibly because of missing dependencies).  It also clears up a
minor inconsistency without any consequence (just a comment change).

I'll send a separate e-mail about the one inconsistency left in a
few minutes.

Thomas

2011-08-28  Thomas Koenig  tkoe...@gcc.gnu.org

PR fortran/40866
* generated/iall_i1.c: Regenerated.
* generated/iall_i16.c: Regenerated.
* generated/iall_i2.c: Regenerated.
* generated/iall_i4.c: Regenerated.
* generated/iall_i8.c: Regenerated.
* generated/iany_i1.c: Regenerated.
* generated/iany_i16.c: Regenerated.
* generated/iany_i2.c: Regenerated.
* generated/iany_i4.c: Regenerated.
* generated/iany_i8.c: Regenerated.
* generated/iparity_i1.c: Regenerated.
* generated/iparity_i16.c: Regenerated.
* generated/iparity_i2.c: Regenerated.
* generated/iparity_i4.c: Regenerated.
* generated/iparity_i8.c: Regenerated.
* generated/norm2_r10.c: Regenerated.
* generated/norm2_r16.c: Regenerated.
* generated/norm2_r4.c: Regenerated.
* generated/norm2_r8.c: Regenerated.
* generated/parity_l1.c: Regenerated.
* generated/parity_l16.c: Regenerated.
* generated/parity_l2.c: Regenerated.
* generated/parity_l4.c: Regenerated.
* generated/parity_l8.c: Regenerated.
* generated/misc_specifics.F90: Regenerated (comment change).
* generated/_abs_c10.F90: Regenerated (comment change).
* generated/_abs_c16.F90: Regenerated (comment change).
* generated/_abs_c4.F90: Regenerated (comment change).
* generated/_abs_c8.F90: Regenerated (comment change).
* generated/_abs_i16.F90: Regenerated (comment change).
* generated/_abs_i4.F90: Regenerated (comment change).
* generated/_abs_i8.F90: Regenerated (comment change).
* generated/_abs_r10.F90: Regenerated (comment change).
* generated/_abs_r16.F90: Regenerated (comment change).
* generated/_abs_r4.F90: Regenerated (comment change).
* generated/_abs_r8.F90: Regenerated (comment change).
* generated/_acosh_r10.F90: Regenerated (comment change).
* generated/_acosh_r16.F90: Regenerated (comment change).
* generated/_acosh_r4.F90: Regenerated (comment change).
* generated/_acosh_r8.F90: Regenerated (comment change).
* generated/_acos_r10.F90: Regenerated (comment change).
* generated/_acos_r16.F90: Regenerated (comment change).
* generated/_acos_r4.F90: Regenerated (comment change).
* generated/_acos_r8.F90: Regenerated (comment change).
* generated/_aimag_c10.F90: Regenerated (comment change).
* generated/_aimag_c16.F90: Regenerated (comment change).
* generated/_aimag_c4.F90: Regenerated (comment change).
* generated/_aimag_c8.F90: Regenerated (comment change).
* generated/_aint_r10.F90: Regenerated (comment change).
* generated/_aint_r16.F90: Regenerated (comment change).
* generated/_aint_r4.F90: Regenerated (comment change).
* generated/_aint_r8.F90: Regenerated (comment change).
* generated/_anint_r10.F90: Regenerated (comment change).
* generated/_anint_r16.F90: Regenerated (comment change).
* generated/_anint_r4.F90: Regenerated (comment change).
* generated/_anint_r8.F90: Regenerated (comment change).
* generated/_asinh_r10.F90: Regenerated (comment change).
* generated/_asinh_r16.F90: Regenerated (comment change).
* generated/_asinh_r4.F90: Regenerated (comment change).
* generated/_asinh_r8.F90: Regenerated (comment change).
* generated/_asin_r10.F90: Regenerated (comment change).
* generated/_asin_r16.F90: Regenerated (comment change).
* generated/_asin_r4.F90: Regenerated (comment change).
* generated/_asin_r8.F90: Regenerated (comment change).
* generated/_atan2_r10.F90: Regenerated (comment change).
* generated/_atan2_r16.F90: Regenerated (comment change).
* generated/_atan2_r4.F90: Regenerated (comment change).
* generated/_atan2_r8.F90: Regenerated (comment change).
* generated/_atanh_r10.F90: Regenerated (comment change).
* generated/_atanh_r16.F90: Regenerated (comment change).
* generated/_atanh_r4.F90: Regenerated (comment change).
* generated/_atanh_r8.F90: Regenerated (comment change).
* generated/_atan_r10.F90: Regenerated (comment change).
* generated/_atan_r16.F90: Regenerated (comment change).
* generated/_atan_r4.F90: Regenerated (comment change).
* generated/_atan_r8.F90: Regenerated (comment change).
* generated/_conjg_c10.F90: 

Re: [PATCH] fix -Werror=maybe-uninitialized in tree-ssa-loop-ivopts.c (PR bootstrap/50218)

2011-08-28 Thread Tom de Vries
Richard,
Zdenek,

On 08/28/2011 11:43 AM, Mikael Pettersson wrote:
 The recent r178104 change to tree-ssa-loop-ivopts.c broke bootstrap on 
 i686-linux
 because stage2 gcc considers the variable 'comp' used but possibly 
 uninitialized,
 see PR50218.  Initializing it to ERROR_MARK solves the problem, and is 
 consistent
 with how other parts of r178104 represent absent/impossible 'comp' values.
 
 Ok for trunk?  (I don't have svn write access.)
 
 /Mikael
 
 gcc/
 

If you can ok this, I'll check it in.

Thanks,
- Tom

 2011-08-20  Mikael Pettersson  mi...@it.uu.se
 
   PR bootstrap/50218
   * tree-ssa-loop-ivopts.c (determine_use_iv_cost_condition): Initialize 
 comp.
 
 --- gcc-4.7-20110827/gcc/tree-ssa-loop-ivopts.c.~1~   2011-08-26 
 15:36:28.0 +0200
 +++ gcc-4.7-20110827/gcc/tree-ssa-loop-ivopts.c   2011-08-28 
 10:13:34.0 +0200
 @@ -4757,7 +4757,7 @@ determine_use_iv_cost_condition (struct 
bool ok;
int elim_inv_expr_id = -1, express_inv_expr_id = -1, inv_expr_id;
tree *control_var, *bound_cst;
 -  enum tree_code comp;
 +  enum tree_code comp = ERROR_MARK;
  
/* Only consider real candidates.  */
if (!cand-iv)



Re: [patch, libfortran] Fix PR 50192 - fix wide-char comparison

2011-08-28 Thread Dominique Dhumieres
Regstrapped on  x86_64-apple-darwin10 and powerpc-apple-darwin9 (see
http://gcc.gnu.org/ml/gcc-testresults/2011-08/msg03125.html )
without regression.

Thanks,

Dominique


Re: [PATCH] fix -Werror=maybe-uninitialized in tree-ssa-loop-ivopts.c (PR bootstrap/50218)

2011-08-28 Thread Jakub Jelinek
On Sun, Aug 28, 2011 at 12:30:56PM +0200, Tom de Vries wrote:
  Ok for trunk?  (I don't have svn write access.)
  
  /Mikael
  
  gcc/
  
 
 If you can ok this, I'll check it in.

This is fine.

  2011-08-20  Mikael Pettersson  mi...@it.uu.se
  
  PR bootstrap/50218
  * tree-ssa-loop-ivopts.c (determine_use_iv_cost_condition): Initialize 
  comp.
  
  --- gcc-4.7-20110827/gcc/tree-ssa-loop-ivopts.c.~1~ 2011-08-26 
  15:36:28.0 +0200
  +++ gcc-4.7-20110827/gcc/tree-ssa-loop-ivopts.c 2011-08-28 
  10:13:34.0 +0200
  @@ -4757,7 +4757,7 @@ determine_use_iv_cost_condition (struct 
 bool ok;
 int elim_inv_expr_id = -1, express_inv_expr_id = -1, inv_expr_id;
 tree *control_var, *bound_cst;
  -  enum tree_code comp;
  +  enum tree_code comp = ERROR_MARK;
   
 /* Only consider real candidates.  */
 if (!cand-iv)

Jakub


C++ PATCH for c++/48582 (core 342: null pointer values as template non-type arguments)

2011-08-28 Thread Jason Merrill
DR 342 allows null pointer values as non-type arguments in C++11; this 
patch implements that.  We mangle such arguments as a cast from 0 like 
the EDG compiler does.


Tested x86_64-pc-linux-gnu, applying to trunk.
commit c51119b8511eb6988e59c7decdd4c3817b9074bb
Author: Jason Merrill ja...@redhat.com
Date:   Fri Aug 26 22:38:12 2011 -0400

	Core DR 342
	PR c++/48582
	* pt.c (check_valid_ptrmem_cst_expr): A null member pointer value
	is valid in C++11.
	(convert_nontype_argument): Likewise.  Implicitly convert nullptr
	and do constant folding.
	* mangle.c (write_template_arg_literal): Mangle null member
	pointer values as 0.
	* call.c (null_member_pointer_value_p): New.
	* cp-tree.h: Declare it.

diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index dc35824..8421260 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -553,6 +553,23 @@ null_ptr_cst_p (tree t)
   return false;
 }
 
+/* Returns true iff T is a null member pointer value (4.11).  */
+
+bool
+null_member_pointer_value_p (tree t)
+{
+  tree type = TREE_TYPE (t);
+  if (!type)
+return false;
+  else if (TYPE_PTRMEMFUNC_P (type))
+return (TREE_CODE (t) == CONSTRUCTOR
+	 integer_zerop (CONSTRUCTOR_ELT (t, 0)-value));
+  else if (TYPE_PTRMEM_P (type))
+return integer_all_onesp (t);
+  else
+return false;
+}
+
 /* Returns nonzero if PARMLIST consists of only default parms,
ellipsis, and/or undeduced parameter packs.  */
 
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 8595943..d125642 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4722,6 +4722,7 @@ extern tree build_addr_func			(tree);
 extern tree build_call_a			(tree, int, tree*);
 extern tree build_call_n			(tree, int, ...);
 extern bool null_ptr_cst_p			(tree);
+extern bool null_member_pointer_value_p		(tree);
 extern bool sufficient_parms_p			(const_tree);
 extern tree type_decays_to			(tree);
 extern tree build_user_type_conversion		(tree, tree, int);
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 4c7cc79..1fcd999 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -2762,29 +2762,34 @@ write_template_arg_literal (const tree value)
   write_char ('L');
   write_type (TREE_TYPE (value));
 
-  switch (TREE_CODE (value))
-{
-case CONST_DECL:
-  write_integer_cst (DECL_INITIAL (value));
-  break;
+  /* Write a null member pointer value as (type)0, regardless of its
+ real representation.  */
+  if (null_member_pointer_value_p (value))
+write_integer_cst (integer_zero_node);
+  else
+switch (TREE_CODE (value))
+  {
+  case CONST_DECL:
+	write_integer_cst (DECL_INITIAL (value));
+	break;
 
-case INTEGER_CST:
-  gcc_assert (!same_type_p (TREE_TYPE (value), boolean_type_node)
-		  || integer_zerop (value) || integer_onep (value));
-  write_integer_cst (value);
-  break;
+  case INTEGER_CST:
+	gcc_assert (!same_type_p (TREE_TYPE (value), boolean_type_node)
+		|| integer_zerop (value) || integer_onep (value));
+	write_integer_cst (value);
+	break;
 
-case REAL_CST:
-  write_real_cst (value);
-  break;
+  case REAL_CST:
+	write_real_cst (value);
+	break;
 
-case STRING_CST:
-  sorry (string literal in function template signature);
-  break;
+  case STRING_CST:
+	sorry (string literal in function template signature);
+	break;
 
-default:
-  gcc_unreachable ();
-}
+  default:
+	gcc_unreachable ();
+  }
 
   write_char ('E');
 }
@@ -2845,7 +2850,8 @@ write_template_arg (tree node)
 /* A template appearing as a template arg is a template template arg.  */
 write_template_template_arg (node);
   else if ((TREE_CODE_CLASS (code) == tcc_constant  code != PTRMEM_CST)
-	   || (abi_version_at_least (2)  code == CONST_DECL))
+	   || (abi_version_at_least (2)  code == CONST_DECL)
+	   || null_member_pointer_value_p (node))
 write_template_arg_literal (node);
   else if (DECL_P (node))
 {
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 3c6b2c5..1f43ff1 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5240,6 +5240,8 @@ check_valid_ptrmem_cst_expr (tree type, tree expr,
   STRIP_NOPS (expr);
   if (expr  (null_ptr_cst_p (expr) || TREE_CODE (expr) == PTRMEM_CST))
 return true;
+  if (cxx_dialect = cxx0x  null_member_pointer_value_p (expr))
+return true;
   if (complain  tf_error)
 {
   error (%qE is not a valid template argument for type %qT,
@@ -5550,6 +5552,17 @@ convert_nontype_argument (tree type, tree expr, tsubst_flags_t complain)
   else
 expr = mark_rvalue_use (expr);
 
+  /* 14.3.2/5: The null pointer{,-to-member} conversion is applied
+ to a non-type argument of nullptr.  */
+  if (expr == nullptr_node
+   (TYPE_PTR_P (type) || TYPE_PTR_TO_MEMBER_P (type)))
+expr = convert (type, expr);
+
+  /* In C++11, non-type template arguments can be arbitrary constant
+ expressions.  But don't fold a PTRMEM_CST to a CONSTRUCTOR yet.  */
+  if (cxx_dialect = cxx0x  TREE_CODE (expr) != 

[patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Kai Tietz
Hello,

this patch adds some errno values supported by newer runtime-version.
To keep backward compatibility
this patch checks for their definition before trying to use them.
Especially the EPERM error-number is required for having ISO-C++0x
std::thread support enabled with
winpthread libary for 32-bit and 64-bit Windows host.

ChangeLog

2011-08-28  Kai Tietz  kti...@redhat.com

* config/os/mingw32/error_constants.h (ECHILD): Add support,
if present.
(ENOSPC): Likewise.
(EPERM): Likewise.

Bootstrapped and regression tested for x86_64-w64-mingw32 and
i686-w64-mingw32.  Ok for apply?

Regards,
Kai

Index: error_constants.h
===
--- error_constants.h   (revision 178096)
+++ error_constants.h   (working copy)
@@ -79,13 +79,17 @@
 //network_reset =  ENETRESET,
 //network_unreachable =ENETUNREACH,
 //no_buffer_space =ENOBUFS,
-//no_child_process =   ECHILD,
+#ifdef ECHILD
+  no_child_process =   ECHILD,
+#endif
 //no_link =ENOLINK,
   no_lock_available =  ENOLCK,
 //no_message_available =   ENODATA,
 //no_message = ENOMSG,
 //no_protocol_option = ENOPROTOOPT,
-//no_space_on_device = ENOSPC,
+#ifdef ENOSPC
+  no_space_on_device = ENOSPC,
+#endif
 //no_stream_resources =ENOSR,
   no_such_device_or_address =  ENXIO,
   no_such_device = ENODEV,
@@ -99,7 +103,9 @@
 //not_supported =  ENOTSUP,
 //operation_canceled = ECANCELED,
 //operation_in_progress =  EINPROGRESS,
-//operation_not_permitted =EPERM,
+#ifdef EPERM
+  operation_not_permitted =EPERM,
+#endif
 //operation_not_supported =EOPNOTSUPP,
 //operation_would_block =  EWOULDBLOCK,
 //owner_dead = EOWNERDEAD,


Re: [4.7][google]Support for getting CPU type and feature information at run-time. (issue4893046)

2011-08-28 Thread Mike Stump
On Aug 25, 2011, at 6:02 PM, H.J. Lu wrote:
 On Thu, Aug 25, 2011 at 5:37 PM, Sriraman Tallam tmsri...@google.com wrote:
 
 1) Make __cpu_indicator_init a constructor in libgcc and guard to call
 it only once.
 
 This is unreliable and you don't need 3 symbols from libgcc.

I'll add that once you start adding ctors, it is hard to impossible to ever get 
rid of them, and some people actually care about start up time and have static 
warnings for any code that has _any_ global constructors.  By having it hidden 
behind an api, at least only that that want it, pay the price for it.


Re: [v3] Handle different versions of Solaris 8 iso/math_iso.h, iso/stdlib_iso.h

2011-08-28 Thread Paolo Carlini
Hi again,

 FAIL: abi/header_cxxabi.c (test for excess errors)
 Excess errors:
 /var/gcc/regression/trunk/11-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/i386-pc-solaris2.11/bits/c++config.h:167:1:
  error: unknown type name 'namespace'
 /var/gcc/regression/trunk/11-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/i386-pc-solaris2.11/bits/c++config.h:168:1:
  error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 
 which is pretty obvious given that this test is supposed to be compiled as C 
 :-)

In the meanwhile I had the time to catch up with the email and got your point 
(for the accidental reader: being a C testcase *any* defined __cplusplus is 
wrong)

Paolo


[PATCH] Fix ENTRY_VALUE parameter setup in var-tracking (PR debug/50215)

2011-08-28 Thread Jakub Jelinek
Hi!

Depending on the computed hash of the parameter register, corresponding
ENTRY_VALUE and the size of the hash table it can sometimes happen that
val2 = cselib_lookup_from_insn will actually find val, which means that
ENTRY_VALUEs in DEBUG_INSNs will be kept as ENTRY_VALUEs instead of
REGs or similar preferrable locations if the value is still live there.
Fixed by adding the ENTRY_VALUE to val-loc only after the
cselib_lookup_from_insn.

Bootstrapped/regtested on x86_64-linux and i686-linux, fixes
 PASS: gcc.dg/guality/pr45882.c  -O0  line 16 e == 142
 PASS: gcc.dg/guality/pr45882.c  -O1  (test for excess errors)
 PASS: gcc.dg/guality/pr45882.c  -O1  execution test
-UNSUPPORTED: gcc.dg/guality/pr45882.c  -O1  line 16 b == 7
+PASS: gcc.dg/guality/pr45882.c  -O1  line 16 b == 7
+PASS: gcc.dg/guality/pr45882.c  -O1  line 16 c == 11
+PASS: gcc.dg/guality/pr45882.c  -O1  line 16 d == 112
+PASS: gcc.dg/guality/pr45882.c  -O1  line 16 e == 142
 PASS: gcc.dg/guality/pr45882.c  -O2  (test for excess errors)
 PASS: gcc.dg/guality/pr45882.c  -O2  execution test
-UNSUPPORTED: gcc.dg/guality/pr45882.c  -O2  line 16 e == 142
+PASS: gcc.dg/guality/pr45882.c  -O2  line 16 b == 7
+PASS: gcc.dg/guality/pr45882.c  -O2  line 16 c == 11
+PASS: gcc.dg/guality/pr45882.c  -O2  line 16 d == 112
+PASS: gcc.dg/guality/pr45882.c  -O2  line 16 e == 142
 PASS: gcc.dg/guality/pr45882.c  -O3 -fomit-frame-pointer  (test for excess 
errors)
 PASS: gcc.dg/guality/pr45882.c  -O3 -fomit-frame-pointer  execution test
+PASS: gcc.dg/guality/pr45882.c  -O3 -fomit-frame-pointer  line 16 b == 7
+PASS: gcc.dg/guality/pr45882.c  -O3 -fomit-frame-pointer  line 16 c == 11
+PASS: gcc.dg/guality/pr45882.c  -O3 -fomit-frame-pointer  line 16 d == 112
+PASS: gcc.dg/guality/pr45882.c  -O3 -fomit-frame-pointer  line 16 e == 142
 PASS: gcc.dg/guality/pr45882.c  -O3 -g  (test for excess errors)
 PASS: gcc.dg/guality/pr45882.c  -O3 -g  execution test
+PASS: gcc.dg/guality/pr45882.c  -O3 -g  line 16 b == 7
+PASS: gcc.dg/guality/pr45882.c  -O3 -g  line 16 c == 11
+PASS: gcc.dg/guality/pr45882.c  -O3 -g  line 16 d == 112
+PASS: gcc.dg/guality/pr45882.c  -O3 -g  line 16 e == 142
 PASS: gcc.dg/guality/pr45882.c  -Os  (test for excess errors)
 PASS: gcc.dg/guality/pr45882.c  -Os  execution test
+PASS: gcc.dg/guality/pr45882.c  -Os  line 16 b == 7
+PASS: gcc.dg/guality/pr45882.c  -Os  line 16 c == 11
+PASS: gcc.dg/guality/pr45882.c  -Os  line 16 d == 112
+PASS: gcc.dg/guality/pr45882.c  -Os  line 16 e == 142
 PASS: gcc.dg/guality/pr45882.c  -O2 -flto -flto-partition=none  (test for 
excess errors)
 PASS: gcc.dg/guality/pr45882.c  -O2 -flto -flto-partition=none  execution test
+PASS: gcc.dg/guality/pr45882.c  -O2 -flto -flto-partition=none  line 16 b == 7
+PASS: gcc.dg/guality/pr45882.c  -O2 -flto -flto-partition=none  line 16 c == 11
+PASS: gcc.dg/guality/pr45882.c  -O2 -flto -flto-partition=none  line 16 d == 
112
+PASS: gcc.dg/guality/pr45882.c  -O2 -flto -flto-partition=none  line 16 e == 
142
 PASS: gcc.dg/guality/pr45882.c  -O2 -flto  (test for excess errors)
 PASS: gcc.dg/guality/pr45882.c  -O2 -flto  execution test
+PASS: gcc.dg/guality/pr45882.c  -O2 -flto  line 16 b == 7
+PASS: gcc.dg/guality/pr45882.c  -O2 -flto  line 16 c == 11
+PASS: gcc.dg/guality/pr45882.c  -O2 -flto  line 16 d == 112
+PASS: gcc.dg/guality/pr45882.c  -O2 -flto  line 16 e == 142
which broke when SIMPLE_RETURN has been added to rtl.def and thus rtx codes
of REG and ENTRY_VALUE changed and with that changed also the hashing of it.

Ok for trunk?

2011-08-28  Jakub Jelinek  ja...@redhat.com

PR debug/50215
* var-tracking.c (create_entry_value): Call cselib_lookup_from_insn
before adding ENTRY_VALUE to val-locs.

--- gcc/var-tracking.c.jj   2011-07-29 17:07:20.0 +0200
+++ gcc/var-tracking.c  2011-08-28 13:14:07.0 +0200
@@ -8488,13 +8488,13 @@ create_entry_value (rtx rtl, cselib_val 
   cselib_val *val2;
   struct elt_loc_list *el;
   el = (struct elt_loc_list *) ggc_alloc_cleared_atomic (sizeof (*el));
-  el-next = val-locs;
   el-loc = gen_rtx_ENTRY_VALUE (GET_MODE (rtl));
   ENTRY_VALUE_EXP (el-loc) = rtl;
-  el-setting_insn = get_insns ();
-  val-locs = el;
   val2 = cselib_lookup_from_insn (el-loc, GET_MODE (rtl), true,
  VOIDmode, get_insns ());
+  el-next = val-locs;
+  el-setting_insn = get_insns ();
+  val-locs = el;
   if (val2
val2 != val
val2-locs

Jakub


Re: [patch, libfortran] Fix PR 50192 - fix wide-char comparison

2011-08-28 Thread Jerry DeLisle

On 08/26/2011 05:40 AM, Thomas Koenig wrote:

Hello world,

the attached patch fixes the PR by doing comparisions for wide
characters as unsigned 4-byte ints.

I have put the comparison function into libgfortran.h because I will
need it for MINLOC and friends for characters.

OK for trunk? Which branches should this be backported to?

Thomas


OK, suggest if this problem produces wrong code, backport to at least 4.5, and 
4.6, if applicable 4.4


Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Paolo Carlini

Hi,

Hello,

this patch adds some errno values supported by newer runtime-version.
To keep backward compatibility
this patch checks for their definition before trying to use them.
Any particular reason for not using [GLIBCXX_CHECK_SYSTEM_ERROR] for 
mingw too (by extending the list of checked syserr appropriately)?


Paolo.


Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Kai Tietz
2011/8/28 Paolo Carlini paolo.carl...@oracle.com:
 Hi,

 Hello,

 this patch adds some errno values supported by newer runtime-version.
 To keep backward compatibility
 this patch checks for their definition before trying to use them.

 Any particular reason for not using [GLIBCXX_CHECK_SYSTEM_ERROR] for mingw
 too (by extending the list of checked syserr appropriately)?

 Paolo.

Well, I see here a possible clash for EOVERFLOW, which is defined for
Windows crt to E2BIG. So we would have in list a double enumerator
value for value_too_large and argument_list_too_long.  Additionally we
might want to include the socket-errors from WSA-equivalents.  Well,
not sure about the later, but at least I found this comment in header.

Kai


Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Paolo Carlini

On 08/28/2011 10:05 PM, Kai Tietz wrote:

2011/8/28 Paolo Carlinipaolo.carl...@oracle.com:

Hi,

Hello,

this patch adds some errno values supported by newer runtime-version.
To keep backward compatibility
this patch checks for their definition before trying to use them.

Any particular reason for not using [GLIBCXX_CHECK_SYSTEM_ERROR] for mingw
too (by extending the list of checked syserr appropriately)?

Paolo.

Well, I see here a possible clash for EOVERFLOW, which is defined for
Windows crt to E2BIG. So we would have in list a double enumerator
value for value_too_large and argument_list_too_long.  Additionally we
might want to include the socket-errors from WSA-equivalents.  Well,
not sure about the later, but at least I found this comment in header.
I don't understand: I only suggested using for mingw too the 
[GLIBCXX_CHECK_SYSTEM_ERROR] machinery (which is run *anyway* on mingw 
too), for the constants you are interested in, by adding those to the 
m4_foreach list.


Paolo.


Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Kai Tietz
2011/8/28 Paolo Carlini paolo.carl...@oracle.com:
 On 08/28/2011 10:05 PM, Kai Tietz wrote:

 2011/8/28 Paolo Carlinipaolo.carl...@oracle.com:

 Hi,

 Hello,

 this patch adds some errno values supported by newer runtime-version.
 To keep backward compatibility
 this patch checks for their definition before trying to use them.

 Any particular reason for not using [GLIBCXX_CHECK_SYSTEM_ERROR] for
 mingw
 too (by extending the list of checked syserr appropriately)?

 Paolo.

 Well, I see here a possible clash for EOVERFLOW, which is defined for
 Windows crt to E2BIG. So we would have in list a double enumerator
 value for value_too_large and argument_list_too_long.  Additionally we
 might want to include the socket-errors from WSA-equivalents.  Well,
 not sure about the later, but at least I found this comment in header.

 I don't understand: I only suggested using for mingw too the
 [GLIBCXX_CHECK_SYSTEM_ERROR] machinery (which is run *anyway* on mingw too),
 for the constants you are interested in, by adding those to the m4_foreach
 list.

 Paolo.

Ah, now I got you.  Hmm, well, I see here no advantage in adding
another macro to check for an macro.  As in code of libstdc++ there is
actual no use for those new ones.
But if you insist on that, I can add them and replace #if guards by
#if HAVE_ style.
Nevertheless, for some error-numbers (eg. EAFNOSUPPORT, EBADMSG, etc)
- which are socket API related - there is no constant define in
errno.h (and never will be).  So code to emulate this would be still a
manual thing in error_constants.h header AFAICS (if we plan to support
them for mingw targets).

Kai


Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Paolo Carlini

Hi,

Ah, now I got you.  Hmm, well, I see here no advantage in adding
another macro to check for an macro.  As in code of libstdc++ there is
actual no use for those new ones.
To be clear, I didn't personally invent those, but I'm still finding a 
bit strange doing only for mingw something completely different, 
considering in particular that the autoconf procedure is run *anyway* on 
mingw too...

Nevertheless, for some error-numbers (eg. EAFNOSUPPORT, EBADMSG, etc)
- which are socket API related - there is no constant define in
errno.h (and never will be).  So code to emulate this would be still a
manual thing in error_constants.h header AFAICS (if we plan to support
them for mingw targets).
Once more, I don't understand: didn't you suggest changing *only* ENOSPC 
and EPERM? Why are we now discussing other error-numbers like ECHILD, 
EAFNOSUPPORT and EBADMSG? Are the latter defined in errno.h? In that 
case, please use [GLIBCXX_CHECK_SYSTEM_ERROR] for now. We can always 
simplify things at a later time.


Paolo.


Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Paolo Carlini

Sorry,:
Once more, I don't understand: didn't you suggest changing *only* 
ENOSPC and EPERM? Why are we now discussing other error-numbers like 
ECHILD, EAFNOSUPPORT and EBADMSG? Are the latter defined in errno.h?

should have written:

Once more, I don't understand: didn't you suggest changing *only* 
ECHILD, ENOSPC and EPERM? Why are we now discussing other error-numbers 
like EAFNOSUPPORT and EBADMSG? Are the former defined in errno.h?


Paolo.




[v3] Remove wa for c++/49045 in std::swap

2011-08-28 Thread Paolo Carlini

Hi,

tested x86_64-linux, committed to mainline.

Paolo.

//
2011-08-28  Paolo Carlini  paolo.carl...@oracle.com

* include/bits/move.h (swap(_Tp()[_Nm], _Tp()[_Nm])): Remove
workaround for c++/49045.
* include/bits/algorithmfwd.h: Likewise.
Index: include/bits/move.h
===
--- include/bits/move.h (revision 178146)
+++ include/bits/move.h (working copy)
@@ -152,21 +152,13 @@
   __b = _GLIBCXX_MOVE(__tmp);
 }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  // To work around c++/49045.
-  templatetypename _Tp
-struct __is_nothrow_swappable
-{ static const bool value = noexcept(swap(std::declval_Tp(),
- std::declval_Tp())); };
-#endif
-
   // _GLIBCXX_RESOLVE_LIB_DEFECTS
   // DR 809. std::swap should be overloaded for array types.
   templatetypename _Tp, size_t _Nm
 inline void
 swap(_Tp (__a)[_Nm], _Tp (__b)[_Nm])
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-noexcept(__is_nothrow_swappable_Tp::value)
+noexcept(noexcept(swap(*__a, *__b)))
 #endif
 {
   for (size_t __n = 0; __n  _Nm; ++__n)
Index: include/bits/algorithmfwd.h
===
--- include/bits/algorithmfwd.h (revision 178146)
+++ include/bits/algorithmfwd.h (working copy)
@@ -558,9 +558,9 @@
 
   templatetypename _Tp, size_t _Nm
 void
-swap(_Tp ()[_Nm], _Tp ()[_Nm])
+swap(_Tp (__a)[_Nm], _Tp (__b)[_Nm])
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-noexcept(__is_nothrow_swappable_Tp::value)
+noexcept(noexcept(swap(*__a, *__b)))
 #endif
 ;
 


sh.opt typo fix.

2011-08-28 Thread Liu
Hi all

I found a typo in sh.opt and fix it.

--Liu
From 16010419db714eae298f8b7c4726eb75383bed78 Mon Sep 17 00:00:00 2001
From: Jia Liu pro...@gmail.com
Date: Mon, 29 Aug 2011 05:25:19 +0800
Subject: [PATCH] sh_dot_opt big endian typo fix

---
 gcc/ChangeLog|4 
 gcc/config/sh/sh.opt |2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 56397af..0996e08 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2011-08-29  Jia Liu  pro...@gmail.com
+
+	* config/sh/sh.opt (mb): Typo fix.
+
 2011-08-28  Mikael Pettersson  mi...@it.uu.se
 
 	PR bootstrap/50218
diff --git a/gcc/config/sh/sh.opt b/gcc/config/sh/sh.opt
index e94f53a..9471596 100644
--- a/gcc/config/sh/sh.opt
+++ b/gcc/config/sh/sh.opt
@@ -210,7 +210,7 @@ Target Report Mask(ADJUST_UNROLL) Condition(SUPPORT_ANY_SH5)
 Throttle unrolling to avoid thrashing target registers unless the unroll benefit outweighs this
 
 mb
-Target Report RejectNegative InverseMask(LITTLE_ENDIAN)
+Target Report RejectNegative InverseMask(BIG_ENDIAN)
 Generate code in big endian mode
 
 mbigtable
-- 
1.7.4.1



Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Kai Tietz
2011/8/28 Paolo Carlini paolo.carl...@oracle.com:
 Sorry,:

 Once more, I don't understand: didn't you suggest changing *only* ENOSPC
 and EPERM? Why are we now discussing other error-numbers like ECHILD,
 EAFNOSUPPORT and EBADMSG? Are the latter defined in errno.h?

 should have written:

 Once more, I don't understand: didn't you suggest changing *only* ECHILD,
 ENOSPC and EPERM? Why are we now discussing other error-numbers like
 EAFNOSUPPORT and EBADMSG? Are the former defined in errno.h?

 Paolo.

Hi,

So I altered the patch in the way you were suggesting. I verfied
values supported in more
detail and found that some other error-values should be handled for
mingw host, too.
The feared clash for E2BIG and EOVERFLOW doesn't happen, so I enabled
them, too.  Additionally
in combination with winpthread, there are error-values ETIMEDOUT,
ENOTSUP, and EWOULDBLOCK present.

ChangeLog

2011-08-28  Kai Tietz  kti...@redhat.com

* configure: Regenerated.
* config.h.in: Regenerated.
* acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR)  Add
checks for ECHILD, ENOSPC, EPERM, ETIMEDOUT, and
EWOULDBLOCK.
*  config/os/mingw32/error_constants.h (errc): Add
enumerator values no_child_process, no_space_on_device,
not_supported, operation_not_permitted, operation_would_block,
timed_out, and value_too_large,

Regression tested for x86_64-w64-mingw32 and i686-w64-mingw32.  Ok for apply?

Regards,
Kai

Index: configure
===
--- configure   (revision 178145)
+++ configure   (working copy)
@@ -17650,9 +17650,174 @@
 $as_echo #define HAVE_ETXTBSY 1 confdefs.h

 fi
+{ $as_echo $as_me:${as_lineno-$LINENO}: checking for ECHILD 5
+$as_echo_n checking for ECHILD...  6; }
+if test ${glibcxx_cv_system_error15+set} = set; then :
+  $as_echo_n (cached)  6
+else

+cat confdefs.h - _ACEOF conftest.$ac_ext
+/* end confdefs.h.  */
+#include errno.h
+int
+main ()
+{
+int i = ECHILD;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile $LINENO; then :
+  glibcxx_cv_system_error15=yes
+else
+  glibcxx_cv_system_error15=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

+fi

+{ $as_echo $as_me:${as_lineno-$LINENO}: result:
$glibcxx_cv_system_error15 5
+$as_echo $glibcxx_cv_system_error15 6; }
+if test x$glibcxx_cv_system_error15 = xyes; then
+
+$as_echo #define HAVE_ECHILD 1 confdefs.h
+
+fi
+{ $as_echo $as_me:${as_lineno-$LINENO}: checking for ENOSPC 5
+$as_echo_n checking for ENOSPC...  6; }
+if test ${glibcxx_cv_system_error16+set} = set; then :
+  $as_echo_n (cached)  6
+else
+
+cat confdefs.h - _ACEOF conftest.$ac_ext
+/* end confdefs.h.  */
+#include errno.h
+int
+main ()
+{
+int i = ENOSPC;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile $LINENO; then :
+  glibcxx_cv_system_error16=yes
+else
+  glibcxx_cv_system_error16=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+{ $as_echo $as_me:${as_lineno-$LINENO}: result:
$glibcxx_cv_system_error16 5
+$as_echo $glibcxx_cv_system_error16 6; }
+if test x$glibcxx_cv_system_error16 = xyes; then
+
+$as_echo #define HAVE_ENOSPC 1 confdefs.h
+
+fi
+{ $as_echo $as_me:${as_lineno-$LINENO}: checking for EPERM 5
+$as_echo_n checking for EPERM...  6; }
+if test ${glibcxx_cv_system_error17+set} = set; then :
+  $as_echo_n (cached)  6
+else
+
+cat confdefs.h - _ACEOF conftest.$ac_ext
+/* end confdefs.h.  */
+#include errno.h
+int
+main ()
+{
+int i = EPERM;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile $LINENO; then :
+  glibcxx_cv_system_error17=yes
+else
+  glibcxx_cv_system_error17=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+{ $as_echo $as_me:${as_lineno-$LINENO}: result:
$glibcxx_cv_system_error17 5
+$as_echo $glibcxx_cv_system_error17 6; }
+if test x$glibcxx_cv_system_error17 = xyes; then
+
+$as_echo #define HAVE_EPERM 1 confdefs.h
+
+fi
+{ $as_echo $as_me:${as_lineno-$LINENO}: checking for ETIMEDOUT 5
+$as_echo_n checking for ETIMEDOUT...  6; }
+if test ${glibcxx_cv_system_error18+set} = set; then :
+  $as_echo_n (cached)  6
+else
+
+cat confdefs.h - _ACEOF conftest.$ac_ext
+/* end confdefs.h.  */
+#include errno.h
+int
+main ()
+{
+int i = ETIMEDOUT;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile $LINENO; then :
+  glibcxx_cv_system_error18=yes
+else
+  glibcxx_cv_system_error18=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+{ $as_echo $as_me:${as_lineno-$LINENO}: result:
$glibcxx_cv_system_error18 5
+$as_echo $glibcxx_cv_system_error18 6; }
+if test x$glibcxx_cv_system_error18 = xyes; then
+
+$as_echo #define HAVE_ETIMEDOUT 1 confdefs.h
+
+fi
+{ $as_echo $as_me:${as_lineno-$LINENO}: checking for EWOULDBLOCK 5
+$as_echo_n checking for EWOULDBLOCK...  6; }
+if test ${glibcxx_cv_system_error19+set} = set; then :
+  $as_echo_n (cached)  6
+else
+
+cat confdefs.h - _ACEOF conftest.$ac_ext
+/* end confdefs.h.  */
+#include errno.h
+int
+main ()
+{
+int 

Re: [PATCH, PR fortran/45170] -- properly translates substring reference

2011-08-28 Thread Mikael Morin
On Saturday 27 August 2011 02:34:24 Steve Kargl wrote:
 The attached patch allows gfortran to compile the
 attached testcase.  The resulting executable runs
 as expected.
 
 Short story:
 
   character(len=20) :: string = 'some text here'
   character(len=:), allocatable :: s
   n = 5
   allocate(s, source=string(:n))
 
 The length of s is determined from the expression in
 the source= argument.  If this expression is a lonely
 substring reference as in the above, then gfortran
 does set the correct length.  This patch fixes this. 
... does *not* set the correct length, I suppose?

 OK for trunk?
It is OK. Rather obvious. Thanks

Mikael


Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Paolo Carlini

Hi,

Once more, I don't understand: didn't you suggest changing *only* ENOSPC
and EPERM? Why are we now discussing other error-numbers like ECHILD,
EAFNOSUPPORT and EBADMSG? Are the latter defined in errno.h?

should have written:

Once more, I don't understand: didn't you suggest changing *only* ECHILD,
ENOSPC and EPERM? Why are we now discussing other error-numbers like
EAFNOSUPPORT and EBADMSG? Are the former defined in errno.h?

Paolo.

Hi,

So I altered the patch in the way you were suggesting. I verfied
values supported in more
detail and found that some other error-values should be handled for
mingw host, too.
The feared clash for E2BIG and EOVERFLOW doesn't happen, so I enabled
them, too.  Additionally
in combination with winpthread, there are error-values ETIMEDOUT,
ENOTSUP, and EWOULDBLOCK present.

Good.

ChangeLog

2011-08-28  Kai Tietzkti...@redhat.com

* configure: Regenerated.
* config.h.in: Regenerated.
* acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR)  Add
checks for ECHILD, ENOSPC, EPERM, ETIMEDOUT, and
EWOULDBLOCK.
*  config/os/mingw32/error_constants.h (errc): Add
enumerator values no_child_process, no_space_on_device,
not_supported, operation_not_permitted, operation_would_block,
timed_out, and value_too_large,

Regression tested for x86_64-w64-mingw32 and i686-w64-mingw32.  Ok for apply?
Ok with the patch tweaked to prefer uglified _GLIBCXX_HAVE_* names in 
error_constants.h. Let's just be consistent with the generic 
error_constants.h about this normal library policy too.


Paolo.

PS: please don't post regenerated files as part of the patch, are simply 
a distraction.


Re: [Fortran, Patch] Coarray: libcaf patch for _gfortran_caf_deregister

2011-08-28 Thread Mikael Morin
On Friday 26 August 2011 08:51:37 Tobias Burnus wrote:
 Allocatable coarrays are freed and deregistered via the libcaf function
 _gfortran_caf_deregister. Currently, the front end does not generate
 calls to the that function, however, this patch already implements the
 function.
 
 See http://gcc.gnu.org/wiki/CoarrayLib and
 http://gcc.gnu.org/ml/fortran/2010-04/msg00168.html for details.
 
 The function is called with the coarray token as argument. The token
 identifies the coarray in a way defined by the library. In case of
 single.c, it just contains the address of the allocated memory of the
 coarray. In case of mpi.c, it is an array of memory addresses on all
 images such that token[this_image()-1] is the memory location of the
 current image.
 
 The patch also adds stat= and errmsg= diagnostic.
 
 TODO: Adding calls to the function in code generated by the compiler -
 and testing the function.
 
 
 Tested by compiling with mpicc and gcc with -Wall -Wextra -std=c99.
 OK for the trunk?
 
 Tobias

diff --git a/libgfortran/caf/mpi.c b/libgfortran/caf/mpi.c
index ea4c0f0..711c6ee 100644
--- a/libgfortran/caf/mpi.c
+++ b/libgfortran/caf/mpi.c
@@ -103,7 +103,7 @@ _gfortran_caf_finalize (void)
 {
   while (caf_static_list != NULL)
 {
-  free(caf_static_list-token[caf_this_image-1]);
+  free (caf_static_list-token[caf_this_image-1]);
   caf_static_list = caf_static_list-prev;
 }

Not something introduced by this patch, but I would like to point that 
caf_static_list should be freed too.



@@ -187,10 +187,36 @@ error:
 }
 
 
-int
-_gfortran_caf_deregister (void **token __attribute__ ((unused)))
+void
+_gfortran_caf_deregister (void **token, int *stat, char *errmsg, int 
errmsg_len)
 {
-  return 0;
+  if (unlikely (caf_is_finalized))
+{
+  const char msg[] = Failed to deallocate coarray - 
+ there are stopped images;
+  if (stat)
+   {
+ *stat = STAT_STOPPED_IMAGE;
+   
+ if (errmsg_len  0)
+   {
+ int len = ((int) sizeof (msg) - 1  errmsg_len)
+   ? errmsg_len : (int) sizeof (msg) - 1;
+ memcpy (errmsg, msg, len);
+ if (errmsg_len  len)
+   memset (errmsg[len], ' ', errmsg_len-len);
+   }
+ return;
+   }
+  caf_runtime_error (msg);
+}
+
+  _gfortran_caf_sync_all (NULL, NULL, 0);
+
+  if (stat)
+*stat = 0;
+
+  free (token[caf_this_image-1]);
 }
 

To be consistent with _gfortran_caf_register, I think you should be freeing 
token itself (the whole array).
OK with that change.

Mikael





Re: sh.opt typo fix.

2011-08-28 Thread Kaz Kojima
Liu pro...@gmail.com wrote:
  mb
 -Target Report RejectNegative InverseMask(LITTLE_ENDIAN)
^^^
You missed the Inverse prefix, didn't you?

Regards,
kaz


Re: sh.opt typo fix.

2011-08-28 Thread Liu
On Mon, Aug 29, 2011 at 7:42 AM, Kaz Kojima kkoj...@rr.iij4u.or.jp wrote:
 Liu pro...@gmail.com wrote:
  mb
 -Target Report RejectNegative InverseMask(LITTLE_ENDIAN)
                                ^^^
 You missed the Inverse prefix, didn't you?

 Regards,
        kaz


Thanks, It looks like I missed Inverse prefix.

Regards,
-Liu


Re: [4.7][google]Support for getting CPU type and feature information at run-time. (issue4893046)

2011-08-28 Thread Xinliang David Li
Sri, please add a new api to do cpu_indicator initialization on demand
to be used in IFUNC context. Perhaps also add some debug check to make
sure no conflicting cpu model is set.

Ok for google branches for now while the discussion continues.

thanks,

David

On Thu, Aug 25, 2011 at 5:37 PM, Sriraman Tallam tmsri...@google.com wrote:
 Hi,

  Thanks for all the comments. I am attaching a new patch
 incorporating all of the changes mentioned, mainly :

 1) Make __cpu_indicator_init a constructor in libgcc and guard to call
 it only once.
 2) Add symbol versions.
 3) Move all builtins to the i386 port.
 4) Add check for atom processor.
 5) No separate passes to fold the builtins.

 Please let me know what you think.
 Thanks,
 -Sri.

        * config/i386/i386.c (build_struct_with_one_bit_fields): New function.
        (make_var_decl): New function.
        (get_field_from_struct): New function.
        (fold_builtin_target): New function.
        (ix86_fold_builtin): New function.
        (ix86_expand_builtin): Expand new builtins by folding them.
        (TARGET_FOLD_BUILTIN): New macro.
        (IX86_BUILTIN_CPU_SUPPORTS_CMOV): New enum value.
        (IX86_BUILTIN_CPU_SUPPORTS_MMX): New enum value.
        (IX86_BUILTIN_CPU_SUPPORTS_POPCOUNT): New enum value.
        (IX86_BUILTIN_CPU_SUPPORTS_SSE): New enum value.
        (IX86_BUILTIN_CPU_SUPPORTS_SSE2): New enum value.
        (IX86_BUILTIN_CPU_SUPPORTS_SSE3): New enum value.
        (IX86_BUILTIN_CPU_SUPPORTS_SSSE3): New enum value.
        (IX86_BUILTIN_CPU_SUPPORTS_SSE4_1): New enum value.
        (IX86_BUILTIN_CPU_SUPPORTS_SSE4_2): New enum value.
        (IX86_BUILTIN_CPU_IS_AMD): New enum value.
        (IX86_BUILTIN_CPU_IS_INTEL): New enum value.
        (IX86_BUILTIN_CPU_IS_INTEL_ATOM): New enum value.
        (IX86_BUILTIN_CPU_IS_INTEL_CORE2): New enum value.
        (IX86_BUILTIN_CPU_IS_INTEL_COREI7_NEHALEM): New enum value.
        (IX86_BUILTIN_CPU_IS_INTEL_COREI7_WESTMERE): New enum value.
        (IX86_BUILTIN_CPU_IS_INTEL_COREI7_SANDYBRIDGE): New enum value.
        (IX86_BUILTIN_CPU_IS_AMDFAM10_BARCELONA): New enum value.
        (IX86_BUILTIN_CPU_IS_AMDFAM10_SHANGHAI): New enum value.
        (IX86_BUILTIN_CPU_IS_AMDFAM10_ISTANBUL): New enum value.
        * config/i386/libgcc-glibc.ver (__cpu_indicator_init): Export symbol.
        (__cpu_model): Export symbol.
        (__cpu_features): Export symbol.
        * config/i386/i386-builtin-types.def: New function type.

        * config/i386/i386-cpuinfo.c: New file.
        * config/i386/t-cpuinfo: New file.
        * config.host: Add t-cpuinfo to link i386-cpuinfo.o with libgcc

        * gcc.dg/builtin_target.c: New test.




 On Tue, Aug 23, 2011 at 4:35 AM, Michael Matz m...@suse.de wrote:
 Hi,

 On Mon, 22 Aug 2011, H.J. Lu wrote:

  void __attribute__((constructor)) bla(void)
  {
   __cpu_indicator_init ();
  }
 
  I don't see any complication.?
 

 Order of constructors.  A constructor may call functions
 which use __cpu_indicator.

 That's why I wrote also:

 The initializer function has to be callable from pre-.init contexts, e.g.
 ifunc dispatchers.

 It obviously has to be guarded against multiple calls.  The ctor in libgcc
 would be mere convenience because then non-ctor code can rely on the data
 being initialized, and only (potential) ctor code has to check and call
 the init function on demand.


 Ciao,
 Michael.



Re: [PATCH][ARM] -m{cpu,tune,arch}=native

2011-08-28 Thread Michael Hope
On Sat, Aug 27, 2011 at 3:19 AM, Andrew Stubbs a...@codesourcery.com wrote:
 Hi all,

 This patch adds support for -mcpu=native, -mtune=native, and -march=native
 for ARM Linux hosts.

 So far, it only recognises Cortex-A8 and Cortex-A9, so I really need to find
 out what the magic part numbers are for other cpus before this patch is
 complete. I couldn't just find this information listed anywhere. I think
 there are a lot of clues in the kernel code, but it's hard to mine and it
 mostly only goes as far the architecture version, not the individual cpu.

Could you send linaro-dev@ an email and ask them where this API is documented?

Hmm.  Should there be a -mfpu=native that picks between soft, VFP, and
NEON based on the host?

-- Michael