Re: [PATCH, i386] RTM support

2012-03-12 Thread Kirill Yukhin
I forgot to commit headers, but that was fixed in an hour. At the
moment trunk builds

K

On Mon, Mar 12, 2012 at 6:36 PM, H.J. Lu  wrote:
> On Sun, Mar 11, 2012 at 1:16 AM, Kirill Yukhin  
> wrote:
>>>
>>> The patch is OK for mainline, if there are no further comments in next 24h.
>>
>> Thank you!
>>
>> According to Tobias's input, I've added few lines about RTM to
>> doc/invoke.texi. If no objections - I'll commit the patch tomorrow.
>>
>
> I think it breaks GCC bootstrap.
>
> --
> H.J.


Re: [google] Use delete with size parameter in STL deallocate (issue5794070)

2012-03-12 Thread Xinliang David Li
ok. As Ollie said, it needs to be in google/gcc-4_7 as well.

David

On Mon, Mar 12, 2012 at 6:03 PM, Easwaran Raman  wrote:
> This patch makes -fsized-delete define a macro __GXX_DELETE_WITH_SIZE__. If
> this macro is defined, the deallocate function in new_allocator.h invokes
> the two parameter delete operator with the size of the object. Tested by
> bootstrapping the compiler and ensuring no tests are broken. Also verified
> that compiling a C++ program that uses std::vector with -fsized-delete invokes
> the two parameter version of operator delete.
>
> OK for google/main and google/4_6 branches?
>
> c-family/ChangeLog.google-main:
> 2012-03-12   Easwaran Raman  
>
>        * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_DELETE_WITH_SIZE__ for
>        C++ files compiled with -fsized-delete.
>
> libstdc++-v3/ChangeLog.google-main:
> 2012-03-12   Easwaran Raman  
>        * include/ext/new_allocator.h (deallocate): Call delete with size if
>        __GXX_DELETE_WITH_SIZE__ is defined.
>
>
> diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
> index ccf57fd..3c9a96b 100644
> --- a/gcc/c-family/c-cppbuiltin.c
> +++ b/gcc/c-family/c-cppbuiltin.c
> @@ -970,6 +970,8 @@ c_cpp_builtins (cpp_reader *pfile)
>      format.  */
>   if (ENABLE_DECIMAL_FLOAT && ENABLE_DECIMAL_BID_FORMAT)
>     cpp_define (pfile, "__DECIMAL_BID_FORMAT__");
> +  if (c_dialect_cxx () && flag_sized_delete)
> +    cpp_define (pfile, "__GXX_DELETE_WITH_SIZE__");
>  }
>
>  /* Pass an object-like macro.  If it doesn't lie in the user's
> diff --git a/libstdc++-v3/include/ext/new_allocator.h 
> b/libstdc++-v3/include/ext/new_allocator.h
> index 0c82bd0..c972c1e 100644
> --- a/libstdc++-v3/include/ext/new_allocator.h
> +++ b/libstdc++-v3/include/ext/new_allocator.h
> @@ -94,10 +94,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>        return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
>       }
>
> +#ifdef __GXX_DELETE_WITH_SIZE__
> +      // __p is not permitted to be a null pointer.
> +      void
> +      deallocate(pointer __p, size_type __t)
> +      { ::operator delete(__p, __t * sizeof(_Tp)); }
> +#else
>       // __p is not permitted to be a null pointer.
>       void
>       deallocate(pointer __p, size_type)
>       { ::operator delete(__p); }
> +#endif
>
>       size_type
>       max_size() const _GLIBCXX_USE_NOEXCEPT
>
> --
> This patch is available for review at http://codereview.appspot.com/5794070


Re: PATCH: Properly generate X32 IE sequence

2012-03-12 Thread H.J. Lu
On Mon, Mar 12, 2012 at 3:35 PM, H.J. Lu  wrote:
> On Mon, Mar 12, 2012 at 12:39 PM, Uros Bizjak  wrote:
>> On Sun, Mar 11, 2012 at 10:24 PM, H.J. Lu  wrote:
>>
>>> Here is the patch which is equivalent to clearing MASK_TLS_DIRECT_SEG_REFS
>>> when Pmode != word_mode.  We need to keep
>>>
>>>          else if (Pmode == SImode)
>>>            {
>>>              /* Always generate
>>>                        movl %fs:0, %reg32
>>>                        addl xgottpoff(%rip), %reg32
>>>                 to support linker IE->LE optimization and avoid
>>>                 fs:(%reg32) as memory operand.  */
>>>              dest = gen_reg_rtx (Pmode);
>>>              emit_insn (gen_tls_initial_exec_x32 (dest, x));
>>>              return dest;
>>>            }
>>>
>>> to support linker IE->LE optimization.  TARGET_TLS_DIRECT_SEG_REFS only 
>>> affects
>>> TLS LE access and fs:(%reg) is only generated by combine.
>>>
>>> So the main impact of disabling TARGET_TLS_DIRECT_SEG_REFS is to disable
>>> fs:immediate memory operand for TLS LE access, which doesn't have any 
>>> problems
>>> to begin with.
>>>
>>> I would prefer to keep TARGET_TLS_DIRECT_SEG_REFS and disable only
>>> fs:(%reg), which is generated by combine.
>>
>> Please try attached patch.  It introduces TARGET_TLS_INDIRECT_SEG_REFS
>> to block only indirect seg references.
>>
>> Uros.
>
> I am testing it.
>

There is no regression.

BTW, this x32 TLS IE optimization:

http://gcc.gnu.org/ml/gcc-patches/2012-03/msg00714.html

is still useful.  For

[hjl@gnu-6 tls]$ cat ie2.i
extern __thread long long int x;

extern long long int y;

void
ie2 (void)
{
  x = y;
}
[hjl@gnu-6 tls]$

my patch turns

ie2:
.LFB0:
.cfi_startproc
movqy(%rip), %rdx   # 6 *movdi_internal_rex64/2 [length = 7]
movl%fs:0, %eax # 5 tls_initial_exec_x32[length = 16]
addlx@gottpoff(%rip), %eax
movq%rdx, (%eax)# 7 *movdi_internal_rex64/4 [length = 3]
ret # 14simple_return_internal  [length = 1]
.cfi_endproc

into

ie2:
.LFB0:
.cfi_startproc
movqy(%rip), %rax   # 6 *movdi_internal_rex64/2 [length = 7]
movqx@gottpoff(%rip), %rdx  # 7 *tls_initial_exec_x32_store 
[length = 16]
movq%rax, %fs:(%rdx)
ret # 14simple_return_internal  [length = 1]
.cfi_endproc



-- 
H.J.


Re: [google] Use delete with size parameter in STL deallocate (issue5794070)

2012-03-12 Thread Ollie Wild
On Mon, Mar 12, 2012 at 8:03 PM, Easwaran Raman  wrote:
>
> OK for google/main and google/4_6 branches?

You will need to check this into google/gcc-4_7 as well.

Ollie


[google] Use delete with size parameter in STL deallocate (issue5794070)

2012-03-12 Thread Easwaran Raman
This patch makes -fsized-delete define a macro __GXX_DELETE_WITH_SIZE__. If
this macro is defined, the deallocate function in new_allocator.h invokes
the two parameter delete operator with the size of the object. Tested by
bootstrapping the compiler and ensuring no tests are broken. Also verified
that compiling a C++ program that uses std::vector with -fsized-delete invokes
the two parameter version of operator delete.

OK for google/main and google/4_6 branches?

c-family/ChangeLog.google-main:
2012-03-12   Easwaran Raman  

* c-cppbuiltin.c (c_cpp_builtins): Define __GXX_DELETE_WITH_SIZE__ for
C++ files compiled with -fsized-delete.

libstdc++-v3/ChangeLog.google-main:
2012-03-12   Easwaran Raman  
* include/ext/new_allocator.h (deallocate): Call delete with size if
__GXX_DELETE_WITH_SIZE__ is defined.


diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index ccf57fd..3c9a96b 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -970,6 +970,8 @@ c_cpp_builtins (cpp_reader *pfile)
  format.  */
   if (ENABLE_DECIMAL_FLOAT && ENABLE_DECIMAL_BID_FORMAT)
 cpp_define (pfile, "__DECIMAL_BID_FORMAT__");
+  if (c_dialect_cxx () && flag_sized_delete)
+cpp_define (pfile, "__GXX_DELETE_WITH_SIZE__");
 }
 
 /* Pass an object-like macro.  If it doesn't lie in the user's
diff --git a/libstdc++-v3/include/ext/new_allocator.h 
b/libstdc++-v3/include/ext/new_allocator.h
index 0c82bd0..c972c1e 100644
--- a/libstdc++-v3/include/ext/new_allocator.h
+++ b/libstdc++-v3/include/ext/new_allocator.h
@@ -94,10 +94,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
   }
 
+#ifdef __GXX_DELETE_WITH_SIZE__
+  // __p is not permitted to be a null pointer.
+  void
+  deallocate(pointer __p, size_type __t)
+  { ::operator delete(__p, __t * sizeof(_Tp)); }
+#else
   // __p is not permitted to be a null pointer.
   void
   deallocate(pointer __p, size_type)
   { ::operator delete(__p); }
+#endif
 
   size_type
   max_size() const _GLIBCXX_USE_NOEXCEPT

--
This patch is available for review at http://codereview.appspot.com/5794070


Re: [google/4.6] Add xfails for arm-grtev2-linux-gnueabi (issue5794063)

2012-03-12 Thread 關振德
Hi Ramana,

   We know the limit of the QEMU and already noticed failure due to
the simulator.  Like I said, this is used as the baseline.  We are
going to look at the failures carefully to categorize them.  We
noticed that some tests fail randomly on QEMU, these are marked as
flaky and the validator script ignores those.

Thanks

-Doug

On Mon, Mar 12, 2012 at 3:57 PM, Ramana Radhakrishnan
 wrote:
> On 12 March 2012 18:58, Doug Kwan  wrote:
>> Hi Diego
>>
>>        This patch adds arm-grtev2-linux-gnueabi.xfail for our 4.6 branch
>>        so that we can track regressions.  This just established the test
>>        baseline.  The failures need to be investigated.
>
> Just out of curiosity, were these when you ran them cross on qemu or
> when you ran these native. It's probably worth noting that as well.
> There are times when you'll see differences in test results especially
> on recent trunk ( atomic tests depend on the version of gdb installed
> , cross testing on qemu pretty much means threaded tests are well
> let's say flaky) .
>
> This is probably something that ought to be recorded along with the
> environment in which the tests were run to ease comparison.
>
> This failure here suggests that you are runing on qemu.
>
> +FAIL: gfortran.dg/vect/fast-math-pr38968.f90 execution test
>
> I've noticed that this is something that times out depending on the
> orientation of the sun , moon and earth and the performance of qemu on
> your machine but on a native device runs just fine.
>
> regards,
> Ramana


Re: [google/4.6] Add xfails for arm-grtev2-linux-gnueabi (issue5794063)

2012-03-12 Thread Ramana Radhakrishnan
On 12 March 2012 18:58, Doug Kwan  wrote:
> Hi Diego
>
>        This patch adds arm-grtev2-linux-gnueabi.xfail for our 4.6 branch
>        so that we can track regressions.  This just established the test
>        baseline.  The failures need to be investigated.

Just out of curiosity, were these when you ran them cross on qemu or
when you ran these native. It's probably worth noting that as well.
There are times when you'll see differences in test results especially
on recent trunk ( atomic tests depend on the version of gdb installed
, cross testing on qemu pretty much means threaded tests are well
let's say flaky) .

This is probably something that ought to be recorded along with the
environment in which the tests were run to ease comparison.

This failure here suggests that you are runing on qemu.

+FAIL: gfortran.dg/vect/fast-math-pr38968.f90 execution test

I've noticed that this is something that times out depending on the
orientation of the sun , moon and earth and the performance of qemu on
your machine but on a native device runs just fine.

regards,
Ramana


[Patch ARM] Fix definition of MALLOC_ABI_ALIGNMENT.

2012-03-12 Thread Ramana Radhakrishnan
Hi,

This sets MALLOC_ABI_ALIGNMENT to 64 bits on ARM which should be safe
on all AAPCS implementations given that this is a requirement on our
alignment specifiers. I would expect this to be true for most modern
malloc implementations on AAPCS targets -

Ok ?


Ramana

2012-03-12  Ramana Radhakrishnan  

* config/arm/arm.h (MALLOC_ABI_ALIGNMENT): Set to biggest
alignment.

Index: gcc/config/arm/arm.h
===
--- gcc/config/arm/arm.h(revision 185248)
+++ gcc/config/arm/arm.h(working copy)
@@ -534,6 +534,11 @@

 #define BIGGEST_ALIGNMENT (ARM_DOUBLEWORD_ALIGN ? DOUBLEWORD_ALIGNMENT : 32)

+#ifndef MALLOC_ABI_ALIGNMENT
+#define MALLOC_ABI_ALIGNMENT (ARM_DOUBLEWORD_ALIGN ? DOUBLEWORD_ALIGNMENT : \
+ BITS_PER_WORD)
+#endif
+


Re: PATCH: Properly generate X32 IE sequence

2012-03-12 Thread H.J. Lu
On Mon, Mar 12, 2012 at 12:39 PM, Uros Bizjak  wrote:
> On Sun, Mar 11, 2012 at 10:24 PM, H.J. Lu  wrote:
>
>> Here is the patch which is equivalent to clearing MASK_TLS_DIRECT_SEG_REFS
>> when Pmode != word_mode.  We need to keep
>>
>>          else if (Pmode == SImode)
>>            {
>>              /* Always generate
>>                        movl %fs:0, %reg32
>>                        addl xgottpoff(%rip), %reg32
>>                 to support linker IE->LE optimization and avoid
>>                 fs:(%reg32) as memory operand.  */
>>              dest = gen_reg_rtx (Pmode);
>>              emit_insn (gen_tls_initial_exec_x32 (dest, x));
>>              return dest;
>>            }
>>
>> to support linker IE->LE optimization.  TARGET_TLS_DIRECT_SEG_REFS only 
>> affects
>> TLS LE access and fs:(%reg) is only generated by combine.
>>
>> So the main impact of disabling TARGET_TLS_DIRECT_SEG_REFS is to disable
>> fs:immediate memory operand for TLS LE access, which doesn't have any 
>> problems
>> to begin with.
>>
>> I would prefer to keep TARGET_TLS_DIRECT_SEG_REFS and disable only
>> fs:(%reg), which is generated by combine.
>
> Please try attached patch.  It introduces TARGET_TLS_INDIRECT_SEG_REFS
> to block only indirect seg references.
>
> Uros.

I am testing it.

-- 
H.J.


Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Eric Botcazou
> * Although libgcc/config/sparc/sol2-unwind.h could be simplified quite a
>   bit, perhaps we could go further: I wonder if the remaining nframes = 2
>   case really applies to Solaris 9.  If not, one could massivly simplify
>   this code.

Please no, let's keep being very conservative with this stuff.

-- 
Eric Botcazou


Re: [Patch, libfortran] Reduce default precision for list-directed and G0 real output

2012-03-12 Thread FX
> Thus, I suggest that the choice of d should be based on readability
> and usefulness for the common case rather than guaranteeing an exact
> roundtrip.

I'm not sure I see the value in this choice. In addition to standard 
requirements, quality of implementation issues shouldn't be neglected. At 
least, I'd suggest surveying how other compilers handle the issue (Sun, which I 
have at hand, does precise round-trip).

FX


Re: [google] Add -gfission support to GCC (issue 5754090)

2012-03-12 Thread saugustine

On 2012/03/12 21:32:46, Cary wrote:

[Revised patch to fix problem with ASM_FINAL_SPEC in the case where
neither -c nor -o are specified.]



Add GCC support for -gfission option.  Debug info is partitioned
into skeleton sections that will remain in the .o file, and "dwo"
sections that will be moved to a .dwo file.  After compilation,
the gcc driver calls objcopy twice: once to extract the "dwo"
sections into the .dwo file, and a second time to remove the
sections from the .o file.



For google/gcc-4_6 branch. (To be submitted for trunk soon.)


I approve for google/gcc-4_6.

Sterling

http://codereview.appspot.com/5754090/


Re: PATCH: Call gen_tls_global_dynamic_64_ and en_tls_local_dynamic_base_64_

2012-03-12 Thread H.J. Lu
On Mon, Mar 12, 2012 at 12:58 PM, Uros Bizjak  wrote:
> On Mon, Mar 12, 2012 at 7:42 PM, H.J. Lu  wrote:
>
>>> 2012-03-12  H.J. Lu  
>>>
>>>        * config/i386/i386.c (ix86_gen_tls_global_dynamic_64): New.
>>>        (ix86_gen_tls_local_dynamic_base_64): Likewise.
>>>        (ix86_option_override_internal): Set ix86_gen_tls_global_dynamic_64
>>>        and ix86_gen_tls_local_dynamic_base_64.
>>>        (legitimize_tls_address): Use ix86_gen_tls_global_dynamic_64 and
>>>        ix86_gen_tls_local_dynamic_base_64.
>>>
>>>        * config/i386/i386.md (*tls_global_dynamic_64): Renamed to ...
>>>        (*tls_global_dynamic_64_): This.
>>>        (tls_global_dynamic_64): Renamed to ...
>>>        (tls_global_dynamic_64_): This.
>>>        (*tls_local_dynamic_base_64): Renamed to ...
>>>        (*tls_local_dynamic_base_64_): This.
>>>        (tls_local_dynamic_base_64): Renamed to ...
>>>        (tls_local_dynamic_base_64_): This.
>>
>> This patch caused x32 libgcc build failure:
>>
>> ../../../../src-trunk/libgcc/generic-morestack-thread.c: In function
>> 'stack_split_initialize_thread':
>> ../../../../src-trunk/libgcc/generic-morestack-thread.c:128:1: error:
>> unrecognizable insn:
>> (call_insn/u 8 7 9 3 (parallel [
>>            (set (reg:DI 0 ax)
>>                (call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1 A8])
>>                    (const_int 0 [0])))
>>            (unspec:DI [
>>                    (symbol_ref:SI ("__morestack_segments") [flags
>> 0x50] )
>>                ] UNSPEC_TLS_GD)
>>        ]) ../../../../src-trunk/libgcc/generic-morestack-thread.c:117 -1
>>     (expr_list:REG_EH_REGION (const_int -2147483648 [0x8000])
>>        (nil))
>>    (nil))
>> ../../../../src-trunk/libgcc/generic-morestack-thread.c:128:1:
>> internal compiler error: in extract_insn, at recog.c:2123
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> See  for instructions.
>> make[8]: *** [generic-morestack-thread.o] Error 1
>> make[8]: *** Waiting for unfinished jobs
>>
>> __morestack_segments is always in SImode for x32.  Adding
>> :P to
>>
>>  (unspec:P [(match_operand 1 "tls_symbolic_operand" "")]
>>
>> causes it to fail when Pmode == DImode  I checked in this patch
>> to revert the part of that change.
>
> Please better declare tls_symbolic_operand as special predicate, as in
> attached patch.
>

That is a good idea.

Thanks.

-- 
H.J.


[google] Add -gfission support to GCC (issue5754090)

2012-03-12 Thread Cary Coutant
[Revised patch to fix problem with ASM_FINAL_SPEC in the case where
neither -c nor -o are specified.]

Add GCC support for -gfission option.  Debug info is partitioned
into skeleton sections that will remain in the .o file, and "dwo"
sections that will be moved to a .dwo file.  After compilation,
the gcc driver calls objcopy twice: once to extract the "dwo"
sections into the .dwo file, and a second time to remove the
sections from the .o file.

For google/gcc-4_6 branch. (To be submitted for trunk soon.)

Tested: bootstrap,core,mantle,crust

2012-03-09  Sterling Augustine  
Cary Coutant  

* gcc.c (ASM_FINAL_SPEC): For -gfission, call objcopy.
(static_spec_functions): Add replace-extension.
(replace_extension_spec_func): New function.
* dwarf2out.c (debug_skeleton_info_section)
(debug_skeleton_abbrev_section, debug_ref_section, debug_addr_section)
(debug_skeleton_line_section, debug_str_offsets_section): New
variables.
(struct indirect_string_node): Add index field.
(DEBUG_DWO_INFO_SECTION, DEBUG_DWO_ABBREV_SECTION, DEBUG_REF_SECTION)
(DEBUG_ADDR_SECTION, DEBUG_DWO_LINE_SECTION)
(DEBUG_NORM_STR_OFFSETS_SECTION, DEBUG_DWO_STR_OFFSETS_SECTION)
(DEBUG_STR_OFFSETS_SECTION, DEBUG_DWO_STR_SECTION)
(DEBUG_NORM_STR_SECTION): New debug section macros.
(DEBUG_STR_SECTION): Change definition for -gfission.
(DEBUG_STR_SECTION_FLAGS): Don't set SECTION_MERGE for -gfission.
(DEBUG_SKELETON_LINE_SECTION_LABEL, DEBUG_SKELETON_INFO_SECTION_LABEL)
(DEBUG_SKELETON_ABBREV_SECTION_LABEL, DEBUG_REF_SECTION_LABEL)
(DEBUG_ADDR_SECTION_LABEL): New section label macros.
(SKELETON_COMP_DIE_ABBREV, SKELETON_TYPE_DIE_ABBREV): New macros.
(debug_skeleton_info_section_label, debug_skeleton_abbrev_section_label)
(debug_ref_section_label, debug_addr_section_label)
(debug_skeleton_line_section_label): New section label variables.
(dwarf_attr_name): Add new attribute names.
(dwarf_form_name): Add new form names.
(AT_index): New function.
(set_AT_index): New function.
(index_string_table): New variable.
(AT_string_form): Use DW_FORM_GNU_str_index for -gfission.
(add_addr_table_entry): New function.
(add_AT_addr): Record index for indirect references with -gfission.
(add_AT_lbl_id): Likewise.
(add_ref_table_entry): New function.
(add_AT_range_list): Use indirect reference for -gfission.
(break_out_comdat_types): Don't add DW_AT_GNU_pubnames/pubtypes
attributes here.
(size_of_die): Account for indirect forms with -gfission.
(value_format): Use indirect forms for -gfission.
(output_die_abbrevs): New function.
(output_abbrev_section): Refactor code into output_die_abbrevs.
(output_range_list_offset): New function.
(output_loc_list_offset): New function.
(output_attr_index_or_value): New function.
(output_die): Call output_attr_index_or_value to output possibly
indirect forms.  Output indirect strings for -gfission.
(add_AT_pubnames): New function.
(add_top_level_skeleton_die_attrs): New function.
(skeleton_type_unit): New variable.
(output_skeleton_debug_sections): New function.
(output_comdat_type_unit): Write to .debug_types.dwo for -gfission.
(output_pubnames): Add assembly label to beginning of section; use
label for skeleton info section with -gfission.
(output_aranges): Use label for skeleton info section with -gfission.
(output_line_info ): Add prologue_only parameter.
(dwarf2out_init): Create new sections for -gfission.
(output_index_strings): New function.
(output_ref_table): New function.
(output_addr_table): New function.
(index_location_lists): New function.
(dwarf2out_finish): For -gfission, write skeleton debug sections,
write pubnames tables unconditionally, and write indirect sections.
* opts.c (common_handle_option): Add OPT_gfission.
* common.opt: Add -gfission option.

Index: gcc.c
===
--- gcc.c   (revision 185159)
+++ gcc.c   (working copy)
@@ -265,6 +265,7 @@ static const char *compare_debug_dump_op
 static const char *compare_debug_self_opt_spec_function (int, const char **);
 static const char *compare_debug_auxbase_opt_spec_function (int, const char 
**);
 static const char *pass_through_libs_spec_func (int, const char **);
+static const char *replace_extension_spec_func (int, const char **);
 
 /* The Specs Language
 
@@ -478,7 +479,14 @@ proper position among the other output f
 /* config.h can define ASM_FINAL_SPEC to run a post processor after
the assembler has run.  */
 #ifndef ASM_FINAL_SPEC
-#define ASM_FINAL_SPEC ""
+#define ASM_FINAL_SPEC 

[Patch, libfortran] Reduce default precision for list-directed and G0 real output

2012-03-12 Thread Janne Blomqvist
Hi,

currently when writing a value of type real or complex using
list-directed output, the G0 edit descriptor, or namelist output,
gfortran chooses the number of significant digits such that a
binary->ascii->binary roundtrip recovers the original value exactly,
per IEEE 754-2008. Assuming, of course, that the target snprintf() and
strto{f,d,ld,q} functions are up to the task. However, I think this
choice is not a good idea:

- The standard doesn't require this behavior, it merely says something
along "reasonable processor-dependent values for w, d, and e shall be
chosen". Thus, a user who requires an exact roundtrip must specify the
number of digits (d) himself anyway.

- If an exact roundtrip is required, the standard provides the B, O,
and Z edit descriptors which do guarantee this.

- G formatting doesn't work very well when d is large (in libgfortran,
list-directed and namelist real output uses G formatting, so this
applies in these cases as well). Somewhat simplified, G formatting
works such that when the exponent is in the range [-1, d], F editing
is used, otherwise E editing. Thus, with a large d, F editing is used
for numbers with a large magnitude, making the result more or less
unreadable. For instance, what is the magnitude of
"-333.33350"? This output is for quad
precision, but the same problem exists to a lesser extent for smaller
real kinds as well.

- In many if not most uses, printing out the result in full precision
is not needed or just pointless if precision loss has already occured
during the calculation.

Thus, I suggest that the choice of d should be based on readability
and usefulness for the common case rather than guaranteeing an exact
roundtrip. The attached patch does this. Based on my own unscientific
tests, the patch chooses d=6 significant digits, as with 6 digits it's
still relatively easy to eyeball the magnitude of a number when F
editing is used without having to explicitly count digits. At the same
time, 6 significant digits is usually more than enough when reading
the output of a program.  Incidentally, 6 significant digits is also
what is used with the printf() "%g" specifier if the precision is not
explicitly specified, presumably for roughly similar reasons as stated
above.

Regtested on x86_64-unknown-linux-gnu, Ok for trunk?


libgfortran ChangeLog:

2012-03-12  Janne Blomqvist  

* io/write.c (set_fnode_default): Set precision to 6 significant
digits.
(write_real): Fix comment.

testsuite ChangeLog:

2012-03-12  Janne Blomqvist  

* gfortran.dg/char4_iunit_1.f03: Fix test of result.
* gfortran.dg/char4_iunit_2.f03: Likewise.
* gfortran.dg/coarray_15.f90: Likewise.
* gfortran.dg/default_format_1.inc: Likewise.
* gfortran.dg/default_format_2.inc: Likewise.
* gfortran.dg/f2003_io_5.f03: Likewise.
* gfortran.dg/fmt_g0_1.f08: Likewise.
* gfortran.dg/large_real_kind_form_io_2.f90: Likewise.
* gfortran.dg/namelist_65.f90: Likewise.
* gfortran.dg/namelist_print_1.f: Likewise.
* gfortran.dg/quad_2.f90: Likewise.
* gfortran.dg/real_const_3.f90: Likewise.


-- 
Janne Blomqvist
diff --git a/gcc/testsuite/gfortran.dg/char4_iunit_1.f03 b/gcc/testsuite/gfortran.dg/char4_iunit_1.f03
index f02cc1a..f326523 100644
--- a/gcc/testsuite/gfortran.dg/char4_iunit_1.f03
+++ b/gcc/testsuite/gfortran.dg/char4_iunit_1.f03
@@ -24,11 +24,11 @@ program char4_iunit_1
   write(string, *) .true., .false. , .true.
   if (string .ne. 4_" T F T") call abort
   write(string, *) 1.2345e-06, 4.2846e+10_8
-  if (string .ne. 4_"   1.23450002E-06   4284600.00  ") call abort
+  if (string .ne. 4_"   1.23450E-06   4.28460E+010  ") print *, string !call abort
   write(string, *) nan, inf
-  if (string .ne. 4_"  NaN Infinity") call abort
+  if (string .ne. 4_"   NaN  Infinity") call abort
   write(string, '(10x,f3.1,3x,f9.1)') nan, inf
   if (string .ne. 4_"  NaNInfinity ") call abort
   write(string, *) (1.2, 3.4 )
-  if (string .ne. 4_" (  1.2005,  3.4010)  ") call abort
+  if (string .ne. 4_" (  1.2,  3.4)  ") call abort
 end program char4_iunit_1
diff --git a/gcc/testsuite/gfortran.dg/char4_iunit_2.f03 b/gcc/testsuite/gfortran.dg/char4_iunit_2.f03
index cbf0f7f..2c59205 100644
--- a/gcc/testsuite/gfortran.dg/char4_iunit_2.f03
+++ b/gcc/testsuite/gfortran.dg/char4_iunit_2.f03
@@ -43,5 +43,5 @@ program char4_iunit_2
   write(widestring,*)"test",i, x, str_default,&
trim(str_char4)
   if (widestring .ne. &
-k_" test 345   52.5429993 0 hijklmnp qwertyuiopasd") call abort
+k_" test 345   52.5430 0 hijklmnp qwertyuiopasd") call abort
 end program char4_iunit_2
diff --git a/gcc/testsuite/gfortran.dg/coarray_15.f90 b/gcc/testsuite/gfortran.dg/coarray_15.f90
index 0aecb2f..6198c88 100644
--

Re: [doc] GCC 4.7 Solaris updates to install.texi

2012-03-12 Thread Gerald Pfeifer
On Mon, 12 Mar 2012, Rainer Orth wrote:
> Tested with make doc/gccinstall.info doc/gccinstall.pdf, ok for mainline
> and 4.7 branch?

+Sun does not ship a C compiler with Solaris 2 before Solaris 10, though
+you can download the Sun Studio compilers for free.  In Solaris 10 and
+11, GCC 3.4.3 is available in @command{/usr/sfw/bin/gcc}.  Solaris 11
+also provides GCC 4.5.2 in @command{/usr/gcc/4.5/bin/gcc}.  Alternatively,

I see Richi has approved, just wonder whether "as @command" would
be more appropriate than "in @command", twice?

Gerald


Re: [google/4.6] Add xfails for arm-grtev2-linux-gnueabi (issue5794063)

2012-03-12 Thread Mike Stump
On Mar 12, 2012, at 12:37 PM, Diego Novillo wrote:
> Ideally, though, we would not even need this hack.  'make check' should 
> return 0 when every test is nominal.  Period.

Yeah, that pig has yet to achieve lift-off.  :-)


Re: [PATCH 2/3] Move MEM_REF expansion to a new function

2012-03-12 Thread Martin Jambor
Hi,

On Mon, Mar 12, 2012 at 04:26:21PM +0100, Michael Matz wrote:
> Hi,
> 
> On Mon, 12 Mar 2012, Martin Jambor wrote:
> 
> > when we expand a misaligned MEM_REF on the LHS, we must not call the
> > code in expand_expr_real_1 if the subsequent patch is applied, because
> > the code generates code extracting the contents of the memory to a
> > register, which is of course bad if the intent is to write into that
> > memory.
> 
> Then expand_expr_real_1 should be called with EXPAND_WRITE modifier, 
> instead of any of the others.  Then it will (or should) return an lvalue.  
> That might still be wrong for alignment reasons, but writing into the so 
> returned rtx will change the original object.

OK, the following patch changes the places where I previously called
the new function to call expand_expr with EXPAND_WRITE modifier and
then makes sure we do not perform reads into rvalues in
expand_expr_real_1 in the contexts where I need to avoid that.

So far it has passed bootstrap and testing on x86_64-linux, bootstraps
and testsuite runs on the other platforms are still underway.  What do
you think?

Thanks,

Martin


2012-03-12  Martin Jambor  

* expr.c (expand_assignment): Use expand_expr with EXPAND_WRITE
when expanding MEM_REFs, MEM_TARGET_REFs and handled_component
bases.
(expand_expr_real_1): Do not handle misalignment if modifier is
EXPAND_WRITE.

Index: src/gcc/expr.c
===
--- src.orig/gcc/expr.c
+++ src/gcc/expr.c
@@ -4600,49 +4600,16 @@ expand_assignment (tree to, tree from, b
   != CODE_FOR_nothing)
  || SLOW_UNALIGNED_ACCESS (mode, align)))
 {
-  addr_space_t as
-   = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (to, 0;
-  struct expand_operand ops[2];
-  enum machine_mode address_mode;
-  rtx reg, op0, mem;
+  rtx reg, mem;
 
   reg = expand_expr (from, NULL_RTX, VOIDmode, EXPAND_NORMAL);
   reg = force_not_mem (reg);
-
-  if (TREE_CODE (to) == MEM_REF)
-   {
- tree base = TREE_OPERAND (to, 0);
- address_mode = targetm.addr_space.address_mode (as);
- op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_NORMAL);
- op0 = convert_memory_address_addr_space (address_mode, op0, as);
- if (!integer_zerop (TREE_OPERAND (to, 1)))
-   {
- rtx off
-   = immed_double_int_const (mem_ref_offset (to), address_mode);
- op0 = simplify_gen_binary (PLUS, address_mode, op0, off);
-   }
- op0 = memory_address_addr_space (mode, op0, as);
- mem = gen_rtx_MEM (mode, op0);
- set_mem_attributes (mem, to, 0);
- set_mem_addr_space (mem, as);
-   }
-  else if (TREE_CODE (to) == TARGET_MEM_REF)
-   {
- struct mem_address addr;
- get_address_description (to, &addr);
- op0 = addr_for_mem_ref (&addr, as, true);
- op0 = memory_address_addr_space (mode, op0, as);
- mem = gen_rtx_MEM (mode, op0);
- set_mem_attributes (mem, to, 0);
- set_mem_addr_space (mem, as);
-   }
-  else
-   gcc_unreachable ();
-  if (TREE_THIS_VOLATILE (to))
-   MEM_VOLATILE_P (mem) = 1;
+  mem = expand_expr (to, NULL_RTX, VOIDmode, EXPAND_WRITE);
 
   if (icode != CODE_FOR_nothing)
{
+ struct expand_operand ops[2];
+
  create_fixed_operand (&ops[0], mem);
  create_input_operand (&ops[1], reg, mode);
  /* The movmisalign pattern cannot fail, else the assignment
@@ -4695,31 +4662,11 @@ expand_assignment (tree to, tree from, b
  && ((icode = optab_handler (movmisalign_optab, mode))
  != CODE_FOR_nothing))
{
- enum machine_mode address_mode;
- rtx op0;
  struct expand_operand ops[2];
- addr_space_t as = TYPE_ADDR_SPACE
- (TREE_TYPE (TREE_TYPE (TREE_OPERAND (tem, 0;
- tree base = TREE_OPERAND (tem, 0);
 
  misalignp = true;
  to_rtx = gen_reg_rtx (mode);
-
- address_mode = targetm.addr_space.address_mode (as);
- op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_NORMAL);
- op0 = convert_memory_address_addr_space (address_mode, op0, as);
- if (!integer_zerop (TREE_OPERAND (tem, 1)))
-   {
- rtx off = immed_double_int_const (mem_ref_offset (tem),
-   address_mode);
- op0 = simplify_gen_binary (PLUS, address_mode, op0, off);
-   }
- op0 = memory_address_addr_space (mode, op0, as);
- mem = gen_rtx_MEM (mode, op0);
- set_mem_attributes (mem, tem, 0);
- set_mem_addr_space (mem, as);
- if (TREE_THIS_VOLATILE (tem))
-   MEM_VOLATILE_P (mem) = 1;
+ mem = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE);
 
  /* If the misaligned store doesn't overwrite all bits, perfo

[google] Add -gfission support to GCC (issue5754090)

2012-03-12 Thread Cary Coutant
Add GCC support for -gfission option.  Debug info is partitioned
into skeleton sections that will remain in the .o file, and "dwo"
sections that will be moved to a .dwo file.  After compilation,
the gcc driver calls objcopy twice: once to extract the "dwo"
sections into the .dwo file, and a second time to remove the
sections from the .o file.

For google/gcc-4_6 branch. (To be submitted for trunk soon.)

Tested: bootstrap,core,mantle,crust

2012-03-09  Sterling Augustine  
Cary Coutant  

* gcc.c (ASM_FINAL_SPEC): For -gfission, call objcopy.
(static_spec_functions): Add replace-extension.
(replace_extension_spec_func): New function.
* dwarf2out.c (debug_skeleton_info_section)
(debug_skeleton_abbrev_section, debug_ref_section, debug_addr_section)
(debug_skeleton_line_section, debug_str_offsets_section): New
variables.
(struct indirect_string_node): Add index field.
(DEBUG_DWO_INFO_SECTION, DEBUG_DWO_ABBREV_SECTION, DEBUG_REF_SECTION)
(DEBUG_ADDR_SECTION, DEBUG_DWO_LINE_SECTION)
(DEBUG_NORM_STR_OFFSETS_SECTION, DEBUG_DWO_STR_OFFSETS_SECTION)
(DEBUG_STR_OFFSETS_SECTION, DEBUG_DWO_STR_SECTION)
(DEBUG_NORM_STR_SECTION): New debug section macros.
(DEBUG_STR_SECTION): Change definition for -gfission.
(DEBUG_STR_SECTION_FLAGS): Don't set SECTION_MERGE for -gfission.
(DEBUG_SKELETON_LINE_SECTION_LABEL, DEBUG_SKELETON_INFO_SECTION_LABEL)
(DEBUG_SKELETON_ABBREV_SECTION_LABEL, DEBUG_REF_SECTION_LABEL)
(DEBUG_ADDR_SECTION_LABEL): New section label macros.
(SKELETON_COMP_DIE_ABBREV, SKELETON_TYPE_DIE_ABBREV): New macros.
(debug_skeleton_info_section_label, debug_skeleton_abbrev_section_label)
(debug_ref_section_label, debug_addr_section_label)
(debug_skeleton_line_section_label): New section label variables.
(dwarf_attr_name): Add new attribute names.
(dwarf_form_name): Add new form names.
(AT_index): New function.
(set_AT_index): New function.
(index_string_table): New variable.
(AT_string_form): Use DW_FORM_GNU_str_index for -gfission.
(add_addr_table_entry): New function.
(add_AT_addr): Record index for indirect references with -gfission.
(add_AT_lbl_id): Likewise.
(add_ref_table_entry): New function.
(add_AT_range_list): Use indirect reference for -gfission.
(break_out_comdat_types): Don't add DW_AT_GNU_pubnames/pubtypes
attributes here.
(size_of_die): Account for indirect forms with -gfission.
(value_format): Use indirect forms for -gfission.
(output_die_abbrevs): New function.
(output_abbrev_section): Refactor code into output_die_abbrevs.
(output_range_list_offset): New function.
(output_loc_list_offset): New function.
(output_attr_index_or_value): New function.
(output_die): Call output_attr_index_or_value to output possibly
indirect forms.  Output indirect strings for -gfission.
(add_AT_pubnames): New function.
(add_top_level_skeleton_die_attrs): New function.
(skeleton_type_unit): New variable.
(output_skeleton_debug_sections): New function.
(output_comdat_type_unit): Write to .debug_types.dwo for -gfission.
(output_pubnames): Add assembly label to beginning of section; use
label for skeleton info section with -gfission.
(output_aranges): Use label for skeleton info section with -gfission.
(output_line_info ): Add prologue_only parameter.
(dwarf2out_init): Create new sections for -gfission.
(output_index_strings): New function.
(output_ref_table): New function.
(output_addr_table): New function.
(index_location_lists): New function.
(dwarf2out_finish): For -gfission, write skeleton debug sections,
write pubnames tables unconditionally, and write indirect sections.
* opts.c (common_handle_option): Add OPT_gfission.
* common.opt: Add -gfission option.

Index: gcc.c
===
--- gcc.c   (revision 185159)
+++ gcc.c   (working copy)
@@ -265,6 +265,7 @@ static const char *compare_debug_dump_op
 static const char *compare_debug_self_opt_spec_function (int, const char **);
 static const char *compare_debug_auxbase_opt_spec_function (int, const char 
**);
 static const char *pass_through_libs_spec_func (int, const char **);
+static const char *replace_extension_spec_func (int, const char **);
 
 /* The Specs Language
 
@@ -478,7 +479,14 @@ proper position among the other output f
 /* config.h can define ASM_FINAL_SPEC to run a post processor after
the assembler has run.  */
 #ifndef ASM_FINAL_SPEC
-#define ASM_FINAL_SPEC ""
+#define ASM_FINAL_SPEC \
+  "%{gfission: \n\
+   objcopy --extract-dwo \
+%{c:%{o*:%*}%{!o*:%b%O}}%{!c:%g%O} \
+  

Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Tom Tromey
> "Rainer" == Rainer Orth  writes:

Rainer> libcpp:
Rainer> * lex.c: Remove Solaris 8 reference.

Also ok.

Tom


Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Tom Tromey
> "Rainer" == Rainer Orth  writes:

Rainer> libjava:
Rainer> * configure.ac (THREADLIBS): Remove *-*-solaris2.8 handling.
Rainer> * configure: Regenerate.

This part is ok.  Thanks.

Tom


Re: [PATCH][1/n] No longer sign-extend sizetype constants, remove TYPE_IS_SIZETYPE

2012-03-12 Thread Eric Botcazou
> Thanks.  That seems to get me into Ada bootstrap land together with
> the following two patches applied (but not when I apply only the
> first patch due to the stale TREE_OVERFLOW bits on type/decl sizes).

You're welcome.  Let me give them a whirl...

-- 
Eric Botcazou


Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Jonathan Wakely
On 12 March 2012 17:44, Rainer Orth wrote:
> Since even extended support for Solaris 8 ends by March 31st, this patch
> removes Solaris 8 support from mainline.  Given that extended support
> for Solaris 9 lasts until October 2014, I guess that will remain in GCC
> for at least one major release.

The libstdc++ parts of the patch are OK.


Re: Remove obsolete IRIX 6.5 support

2012-03-12 Thread Jonathan Wakely
On 12 March 2012 17:03, Rainer Orth wrote:
> Continuing with the patches to remove obsolete ports, here's the IRIX
> 6.5 removal patch.
...
> * libstdc++-v3/doc/xml/manual/internals.xml still uses IRIX as an
>  example.  I've kept that part since I guess it's up the libstdc++
>  maintainers to decide what to do about this.

Thanks for pointing it out.

The libstdc++ parts of the patch are OK.


Re: PATCH: Call gen_tls_global_dynamic_64_ and en_tls_local_dynamic_base_64_

2012-03-12 Thread Uros Bizjak
On Mon, Mar 12, 2012 at 7:42 PM, H.J. Lu  wrote:

>> 2012-03-12  H.J. Lu  
>>
>>        * config/i386/i386.c (ix86_gen_tls_global_dynamic_64): New.
>>        (ix86_gen_tls_local_dynamic_base_64): Likewise.
>>        (ix86_option_override_internal): Set ix86_gen_tls_global_dynamic_64
>>        and ix86_gen_tls_local_dynamic_base_64.
>>        (legitimize_tls_address): Use ix86_gen_tls_global_dynamic_64 and
>>        ix86_gen_tls_local_dynamic_base_64.
>>
>>        * config/i386/i386.md (*tls_global_dynamic_64): Renamed to ...
>>        (*tls_global_dynamic_64_): This.
>>        (tls_global_dynamic_64): Renamed to ...
>>        (tls_global_dynamic_64_): This.
>>        (*tls_local_dynamic_base_64): Renamed to ...
>>        (*tls_local_dynamic_base_64_): This.
>>        (tls_local_dynamic_base_64): Renamed to ...
>>        (tls_local_dynamic_base_64_): This.
>
> This patch caused x32 libgcc build failure:
>
> ../../../../src-trunk/libgcc/generic-morestack-thread.c: In function
> 'stack_split_initialize_thread':
> ../../../../src-trunk/libgcc/generic-morestack-thread.c:128:1: error:
> unrecognizable insn:
> (call_insn/u 8 7 9 3 (parallel [
>            (set (reg:DI 0 ax)
>                (call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1 A8])
>                    (const_int 0 [0])))
>            (unspec:DI [
>                    (symbol_ref:SI ("__morestack_segments") [flags
> 0x50] )
>                ] UNSPEC_TLS_GD)
>        ]) ../../../../src-trunk/libgcc/generic-morestack-thread.c:117 -1
>     (expr_list:REG_EH_REGION (const_int -2147483648 [0x8000])
>        (nil))
>    (nil))
> ../../../../src-trunk/libgcc/generic-morestack-thread.c:128:1:
> internal compiler error: in extract_insn, at recog.c:2123
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See  for instructions.
> make[8]: *** [generic-morestack-thread.o] Error 1
> make[8]: *** Waiting for unfinished jobs
>
> __morestack_segments is always in SImode for x32.  Adding
> :P to
>
>  (unspec:P [(match_operand 1 "tls_symbolic_operand" "")]
>
> causes it to fail when Pmode == DImode  I checked in this patch
> to revert the part of that change.

Please better declare tls_symbolic_operand as special predicate, as in
attached patch.

Uros.
Index: predicates.md
===
--- predicates.md   (revision 185250)
+++ predicates.md   (working copy)
@@ -491,11 +491,11 @@
(match_operand 0 "local_symbolic_operand")))
 
 ;; Test for various thread-local symbols.
-(define_predicate "tls_symbolic_operand"
+(define_special_predicate "tls_symbolic_operand"
   (and (match_code "symbol_ref")
(match_test "SYMBOL_REF_TLS_MODEL (op)")))
 
-(define_predicate "tls_modbase_operand"
+(define_special_predicate "tls_modbase_operand"
   (and (match_code "symbol_ref")
(match_test "op == ix86_tls_module_base ()")))
 


Re: PATCH: Properly generate X32 IE sequence

2012-03-12 Thread Uros Bizjak
On Sun, Mar 11, 2012 at 10:24 PM, H.J. Lu  wrote:

> Here is the patch which is equivalent to clearing MASK_TLS_DIRECT_SEG_REFS
> when Pmode != word_mode.  We need to keep
>
>          else if (Pmode == SImode)
>            {
>              /* Always generate
>                        movl %fs:0, %reg32
>                        addl xgottpoff(%rip), %reg32
>                 to support linker IE->LE optimization and avoid
>                 fs:(%reg32) as memory operand.  */
>              dest = gen_reg_rtx (Pmode);
>              emit_insn (gen_tls_initial_exec_x32 (dest, x));
>              return dest;
>            }
>
> to support linker IE->LE optimization.  TARGET_TLS_DIRECT_SEG_REFS only 
> affects
> TLS LE access and fs:(%reg) is only generated by combine.
>
> So the main impact of disabling TARGET_TLS_DIRECT_SEG_REFS is to disable
> fs:immediate memory operand for TLS LE access, which doesn't have any problems
> to begin with.
>
> I would prefer to keep TARGET_TLS_DIRECT_SEG_REFS and disable only
> fs:(%reg), which is generated by combine.

Please try attached patch.  It introduces TARGET_TLS_INDIRECT_SEG_REFS
to block only indirect seg references.

Uros.
Index: i386.c
===
--- i386.c  (revision 185250)
+++ i386.c  (working copy)
@@ -11552,11 +11552,6 @@ ix86_decompose_address (rtx addr, struct ix86_addr
   else
 disp = addr;   /* displacement */
 
-  /* Since address override works only on the (reg32) part in fs:(reg32),
- we can't use it as memory operand.  */
-  if (Pmode != word_mode && seg == SEG_FS && (base || index))
-return 0;
-
   if (index)
 {
   if (REG_P (index))
@@ -11568,6 +11563,10 @@ ix86_decompose_address (rtx addr, struct ix86_addr
return 0;
 }
 
+  if (seg != SEG_DEFAULT && (base || index)
+  && !TARGET_TLS_INDIRECT_SEG_REFS)
+return 0;
+
   /* Extract the integral value of scale.  */
   if (scale_rtx)
 {
@@ -12696,7 +12695,9 @@ legitimize_tls_address (rtx x, enum tls_model mode
 
   if (TARGET_64BIT || TARGET_ANY_GNU_TLS)
{
-  base = get_thread_pointer (for_mov || !TARGET_TLS_DIRECT_SEG_REFS);
+  base = get_thread_pointer (for_mov
+|| !(TARGET_TLS_DIRECT_SEG_REFS
+ && TARGET_TLS_INDIRECT_SEG_REFS));
  off = force_reg (Pmode, off);
  return gen_rtx_PLUS (Pmode, base, off);
}
@@ -12716,7 +12717,9 @@ legitimize_tls_address (rtx x, enum tls_model mode
 
   if (TARGET_64BIT || TARGET_ANY_GNU_TLS)
{
- base = get_thread_pointer (for_mov || !TARGET_TLS_DIRECT_SEG_REFS);
+ base = get_thread_pointer (for_mov
+|| !(TARGET_TLS_DIRECT_SEG_REFS
+ && TARGET_TLS_INDIRECT_SEG_REFS));
  return gen_rtx_PLUS (Pmode, base, off);
}
   else
@@ -13249,7 +13252,8 @@ ix86_delegitimize_tls_address (rtx orig_x)
   rtx x = orig_x, unspec;
   struct ix86_address addr;
 
-  if (!TARGET_TLS_DIRECT_SEG_REFS)
+  if (!(TARGET_TLS_DIRECT_SEG_REFS
+   && TARGET_TLS_INDIRECT_SEG_REFS))
 return orig_x;
   if (MEM_P (x))
 x = XEXP (x, 0);
Index: i386.h
===
--- i386.h  (revision 185250)
+++ i386.h  (working copy)
@@ -467,6 +467,9 @@ extern int x86_prefetch_sse;
 #define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT 0
 #endif
 
+/* Address override works only on the (%reg) part in %fs:(%reg).  */
+#define TARGET_TLS_INDIRECT_SEG_REFS (Pmode == word_mode)
+
 /* Fence to use after loop using storent.  */
 
 extern tree x86_mfence;


Re: [google/4.6] Add xfails for arm-grtev2-linux-gnueabi (issue5794063)

2012-03-12 Thread Diego Novillo

On 12/03/12 15:27 , Mike Stump wrote:


So, I guess the question is, is there a down side to doing that?  I can imagine 
a

if [ -r "$srcdir/contrib/testsuite-management/$target.xfail ]; then
$srcdir/contrib/testsuite-management/validate_failures.py bla 
bla
fi


Yeah.  I had something like this in mind originally, but never followed 
through (we use the validator from within our own build harness).


Ideally, though, we would not even need this hack.  'make check' should 
return 0 when every test is nominal.  Period.


Our own guidelines are the culprit here: '... , this means comparing 
post-patch test results to pre-patch results by testing twice or 
comparing with recent posts to the gcc-testresults list.' 
(http://gcc.gnu.org/contribute.html#testing).


I have argued before that we should change this, but I am yet to do 
anything concrete about it.



Diego.


Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Bruce Korb

On 03/12/12 10:44, Rainer Orth wrote:

fixincludes:
* inclhack.def (math_exception): Remove duplicate.
(solaris_cond_init): Remove.
(solaris_sys_va_list): Remove Solaris 8 support.


I think I probably hate those COND initializers more than any other
thing that gets patched up.  Glad to see it go!!  Thanks.


Re: [PATCH,testsuite,committed] Skip some tests for powerpc*-*-darwin*

2012-03-12 Thread Mike Stump
On Mar 12, 2012, at 12:29 PM, William J. Schmidt wrote:
> Thanks, Rainer.  Here's a revised patch.  OK to commit?

Ok.  Thanks.


Re: [PATCH,testsuite,committed] Skip some tests for powerpc*-*-darwin*

2012-03-12 Thread William J. Schmidt
On Mon, 2012-03-12 at 20:15 +0100, Rainer Orth wrote:
> "William J. Schmidt"  writes:
> 
> > OK, will do.  I just copied the style of some other test cases that
> > skipped darwin, assuming that was the preferred syntax.
> 
> No problem, I'll probably make a pass over the whole testsuite to remove
> that cruft to avoid misleading others.
> 
>   Rainer
> 

Thanks, Rainer.  Here's a revised patch.  OK to commit?

Thanks,
Bill


2012-03-12  Bill Schmidt  

PR tree-optimization/46728
* gcc.target/powerpc/pr46728-4.c: Use preferred syntax.
* gcc.target/powerpc/pr46728-5.c: Likewise.
* gcc.target/powerpc/pr46728-8.c: Likewise.
* gcc.target/powerpc/pr46728-10.c: Likewise.
* gcc.target/powerpc/pr46728-11.c: Likewise.
* gcc.target/powerpc/pr46728-13.c: Likewise.
* gcc.target/powerpc/pr46728-14.c: Likewise.
* gcc.target/powerpc/pr46728-15.c: Likewise.


Index: gcc/testsuite/gcc.target/powerpc/pr46728-13.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-13.c   (revision 185262)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-13.c   (working copy)
@@ -1,5 +1,5 @@
-/* { dg-do run { target { powerpc*-*-* } } } */
-/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-do run } */
+/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-14.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-14.c   (revision 185262)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-14.c   (working copy)
@@ -1,5 +1,5 @@
-/* { dg-do run { target { powerpc*-*-* } } } */
-/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-do run } */
+/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-4.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-4.c(revision 185262)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-4.c(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-do compile } */
+/* { dg-skip-if "No __builtin_cbrt" { powerpc*-*-darwin* } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-15.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-15.c   (revision 185262)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-15.c   (working copy)
@@ -1,5 +1,5 @@
-/* { dg-do run { target { powerpc*-*-* } } } */
-/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-do run } */
+/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-5.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-5.c(revision 185262)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-5.c(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-do compile } */
+/* { dg-skip-if "No __builtin_cbrt" { powerpc*-*-darwin* } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-10.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-10.c   (revision 185262)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-10.c   (working copy)
@@ -1,5 +1,5 @@
-/* { dg-do run { target { powerpc*-*-* } } } */
-/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-do run } */
+/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-8.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-8.c(revision 185262)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-8.c(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-do compile } */
+/* { dg-skip-if "No __builtin_cbrt" { powerpc*-*-darwin* } } */
 /* { dg-optio

Re: [google/4.6] Add xfails for arm-grtev2-linux-gnueabi (issue5794063)

2012-03-12 Thread Mike Stump
On Mar 12, 2012, at 11:59 AM, Diego Novillo wrote:
> On 12/03/12 14:58 , Doug Kwan wrote:
> 
>> 2012-03-12   Doug Kwan
>> 
>>  * contrib/testsuite-management/arm-grtev2-linux-gnueabi.xfail:
>>  New file.
> 
> OK.

Hum, kinda makes be wish we had all the xfail files for the release branches 
and trunk for all primary and secondary platforms and that make check did 
something more intelligent.  :-)  One advantage, people doing day to day work, 
would rarely have to do two make check runs, as they could do just one and do 
the analysis against the checked in file.  They would only have to do two, if 
the file isn't up-to-date.

So, I guess the question is, is there a down side to doing that?  I can imagine 
a

if [ -r "$srcdir/contrib/testsuite-management/$target.xfail ]; then
$srcdir/contrib/testsuite-management/validate_failures.py bla 
bla
fi

added into make check somewhere.


Re: [PATCH,testsuite,committed] Skip some tests for

2012-03-12 Thread Rainer Orth
"William J. Schmidt"  writes:

> OK, will do.  I just copied the style of some other test cases that
> skipped darwin, assuming that was the preferred syntax.

No problem, I'll probably make a pass over the whole testsuite to remove
that cruft to avoid misleading others.

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: [PATCH,testsuite,committed] Skip some tests for

2012-03-12 Thread William J. Schmidt
OK, will do.  I just copied the style of some other test cases that
skipped darwin, assuming that was the preferred syntax.

Thanks,
Bill

On Mon, 2012-03-12 at 19:40 +0100, Rainer Orth wrote:
> Rainer Orth  writes:
> 
> >> +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
> >
> > Please omit defaults to dg-skip-if: { "*" } { "" } are unnecessary and
> > make the directive harder to read.
> 
> Oh, I forgot: please indicate why you are skipping the test in the
> comment field, like:
> 
> /* { dg-skip-if "PR tree-optimization/46728" { powerpc*-*-darwin* } } */
> 
> Thanks.
> Rainer
> 



Re: [PATCH,testsuite,committed] Skip some tests for powerpc*-*-darwin*

2012-03-12 Thread Mike Stump
On Mar 12, 2012, at 11:40 AM, Rainer Orth wrote:
> Oh, I forgot: please indicate why you are skipping the test in the
> comment field, like:
> 
> /* { dg-skip-if "PR tree-optimization/46728" { powerpc*-*-darwin* } } */

"-mpowerpc-gpopt unsupported" is arguably a better comment, as one can see 
this, and know that any testcase for darwin that tries to use that option is 
likely to not work for the same reasons.  The PR can be had from the svn log 
(blame) for the line.


Re: [google/4.6] Add xfails for arm-grtev2-linux-gnueabi (issue5794063)

2012-03-12 Thread Diego Novillo

On 12/03/12 14:58 , Doug Kwan wrote:


2012-03-12   Doug Kwan

* contrib/testsuite-management/arm-grtev2-linux-gnueabi.xfail:
New file.


OK.

Diego.



Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Mike Stump
On Mar 12, 2012, at 11:48 AM, Rainer Orth wrote:
> But both for those and Solaris 8, the time has come where maintaining them is 
> more
> trouble than it's worth,

The nice thing is, anyone that disagrees with you, will step forward.  :-)  
Notice, I didn't disagree with you...  I was only railing against the idea that 
we remove support, simply because a vendor did.  In this case, we're removing 
support, because it is more trouble than it is worth, which makes for a fine 
reason to remove support.


[google/4.6] Add xfails for arm-grtev2-linux-gnueabi (issue5794063)

2012-03-12 Thread Doug Kwan
Hi Diego

This patch adds arm-grtev2-linux-gnueabi.xfail for our 4.6 branch
so that we can track regressions.  This just established the test
baseline.  The failures need to be investigated.

-Doug

2012-03-12   Doug Kwan  

* contrib/testsuite-management/arm-grtev2-linux-gnueabi.xfail:
New file.

Index: contrib/testsuite-management/arm-grtev2-linux-gnueabi.xfail
===
--- contrib/testsuite-management/arm-grtev2-linux-gnueabi.xfail (revision 0)
+++ contrib/testsuite-management/arm-grtev2-linux-gnueabi.xfail (revision 0)
@@ -0,0 +1,74 @@
+# Failures in ./gcc/testsuite/gcc/gcc.sum:
+# *** gcc:
+FAIL: gcc.dg/automversn_1.c (test for excess errors)
+UNRESOLVED: gcc.dg/automversn_1.c compilation failed to produce executable
+UNRESOLVED: gcc.dg/automversn_1.c scan-tree-dump auto_clone 
"foo.autoclone.original"
+UNRESOLVED: gcc.dg/automversn_1.c scan-tree-dump auto_clone "foo.autoclone.0"
+FAIL: gcc.dg/builtin-apply2.c execution test
+FAIL: gcc.dg/tls/pr42894.c (test for excess errors)
+FAIL: gcc.dg/torture/stackalign/builtin-apply-2.c  -O0  execution test
+FAIL: gcc.dg/torture/stackalign/builtin-apply-2.c  -O0  execution test
+FAIL: gcc.dg/torture/stackalign/builtin-apply-2.c  -O1  execution test
+FAIL: gcc.dg/torture/stackalign/builtin-apply-2.c  -Os  execution test
+FAIL: gcc.dg/torture/tls/tls-test.c  -O0  execution test
+FAIL: gcc.dg/torture/tls/tls-test.c  -O1  execution test
+FAIL: gcc.dg/torture/tls/tls-test.c  -O2  execution test
+FAIL: gcc.dg/torture/tls/tls-test.c  -O3 -fomit-frame-pointer  execution test
+FAIL: gcc.dg/torture/tls/tls-test.c  -O3 -g  execution test
+FAIL: gcc.dg/torture/tls/tls-test.c  -Os  execution test
+FAIL: gcc.dg/torture/tls/tls-test.c  -O2 -flto -flto-partition=none  execution 
test
+FAIL: gcc.dg/torture/tls/tls-test.c  -O2 -flto  execution test
+FAIL: gcc.dg/tree-prof/switch-case-1.c scan-rtl-dump-times expand "Succ 
edge[^\n]*count:2000" 1
+FAIL: gcc.dg/vect/vect-multitypes-11.c scan-tree-dump-times vect "vectorized 1 
loops" 1
+FAIL: gcc.dg/vect/vect-multitypes-12.c scan-tree-dump-times vect "vectorized 1 
loops" 1
+FAIL: gcc.dg/vect/vect-reduc-dot-s16b.c scan-tree-dump-times vect "vectorized 
1 loops" 0
+FAIL: gcc.dg/vect/vect-reduc-pattern-1a.c scan-tree-dump-times vect 
"vectorized 1 loops" 0
+FAIL: gcc.dg/vect/vect-reduc-pattern-1b.c scan-tree-dump-times vect 
"vectorized 1 loops" 0
+FAIL: gcc.dg/vect/vect-reduc-pattern-1c.c scan-tree-dump-times vect 
"vectorized 1 loops" 0
+FAIL: gcc.dg/vect/vect-reduc-pattern-2a.c scan-tree-dump-times vect 
"vectorized 1 loops" 0
+FAIL: gcc.dg/vect/vect-reduc-pattern-2b.c scan-tree-dump-times vect 
"vectorized 1 loops" 0
+XPASS: gcc.dg/vect/slp-reduc-3.c scan-tree-dump-times vect "vectorizing stmts 
using SLP" 1
+FAIL: gcc.dg/vect/wrapv-vect-reduc-pattern-2c.c scan-tree-dump-times vect 
"vectorized 1 loops" 0
+XPASS: gcc.dg/vect/no-scevccp-outer-16.c scan-tree-dump-times vect "OUTER LOOP 
VECTORIZED." 1
+XPASS: gcc.dg/vect/no-scevccp-outer-17.c scan-tree-dump-times vect "OUTER LOOP 
VECTORIZED." 1
+XPASS: gcc.dg/vect/no-scevccp-outer-19.c scan-tree-dump-times vect "OUTER LOOP 
VECTORIZED." 1
+XPASS: gcc.dg/vect/no-scevccp-outer-21.c scan-tree-dump-times vect "OUTER LOOP 
VECTORIZED." 1
+FAIL: gcc.target/arm/pr42575.c scan-assembler-not mov
+FAIL: gcc.target/arm/thumb-ltu.c (test for excess errors)
+UNRESOLVED: gcc.target/arm/thumb-ltu.c scan-assembler-not uxtb
+
+# Failures in ./gcc/testsuite/gfortran/gfortran.sum:
+# *** gfortran:
+FAIL: gfortran.dg/pr45636.f90  -O  scan-tree-dump-times forwprop2 "memset" 0
+FAIL: gfortran.dg/vect/fast-math-pr38968.f90 execution test
+FAIL: gfortran.dg/vect/fast-math-pr38968.f90 scan-tree-dump vect "vectorized 1 
loops"
+
+# Failures in ./gcc/testsuite/g++/g++.sum:
+# *** g++:
+FAIL: g++.dg/abi/forced.C execution test
+FAIL: g++.dg/abi/local1.C execution test
+FAIL: g++.dg/thread-ann/thread_annot_lock-82.C  (test for warnings, line 47)
+XPASS: g++.dg/uninit-pred-3_b.C (test for excess errors)
+FAIL: g++.dg/tree-prof/mversn13.C execution,-g  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/mversn13.C compilation,  -g  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/mversn13.C execution,-g  -fprofile-use
+FAIL: g++.dg/tree-prof/mversn13.C execution,-O0  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/mversn13.C compilation,  -O0  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/mversn13.C execution,-O0  -fprofile-use
+FAIL: g++.dg/tree-prof/mversn13.C execution,-O1  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/mversn13.C compilation,  -O1  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/mversn13.C execution,-O1  -fprofile-use
+FAIL: g++.dg/tree-prof/mversn13.C execution,-O2  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/mversn13.C compilation,  -O2  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/mversn13.C execution,-O2  -fprofile-use
+FAIL: g++.dg/tree-prof/mversn13.C execution, 

Re: Remove DWARF_OFFSET_SIZE, DWARF_INITIAL_LENGTH_SIZE

2012-03-12 Thread Jason Merrill

On 03/12/2012 02:45 PM, Rainer Orth wrote:

What about DWARF_INITIAL_LENGTH_SIZE?  Keep it as a macro inside
dwarf2out.c, too?


Please.

Jason



Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Steven Bosscher
On Mon, Mar 12, 2012 at 7:37 PM, Mike Stump  wrote:
> On Mar 12, 2012, at 10:44 AM, Rainer Orth wrote:
>> Since even extended support for Solaris 8 ends by March 31st, this patch
>> removes Solaris 8 support from mainline.
>
> One of the nice things about gcc is that gcc usually still works, long after 
> a vendor has abandoned a machine.  I rather like that gcc will just work, 
> unlike vendor software, which often says, please buy a new machine.  One 
> doesn't have to remove support in gcc for something, just because a vendor 
> doesn't support it.  That said, truly crufty things, should go.

Personally, I'd be in favor of removing any target for which no test
results have been posted for the last, say, 2 GCC release series.
Otherwise there isn't any measure for the quality for such a target.
There've been GCC release series where a complete port failed to
build...

Ciao!
Steven


Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Rainer Orth
ken...@vlsi1.ultra.nyu.edu (Richard Kenner) writes:

>> One of the nice things about gcc is that gcc usually still works,
>> long after a vendor has abandoned a machine.  I rather like that gcc
>> will just work, unlike vendor software, which often says, please buy
>> a new machine.  One doesn't have to remove support in gcc for
>> something, just because a vendor doesn't support it.  That said,
>> truly crufty things, should go.
>
> I agree.  If it's not causing a serious maintenance issue, I see no
> reason to remove it.

It does, unfortunately: Solaris 8 is even worse wrt. to C99 and POSIX.1
conformance than Solaris 9, especially in the areas of TLS and thread
support, as I've found the hard way during the GCC 4.7 cycle.  There are
all sorts of quirks, and the OS is now 12 years old.  I see better ways
to spend my (volunteer) time.

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: [Ping][PATCH, libstdc++-v3] Enable to cross-test libstdc++ on simulator

2012-03-12 Thread Mike Stump
On Mar 10, 2012, at 3:25 PM, Jonathan Wakely wrote:
> On 7 March 2012 05:22, Terry Guo wrote:
>> Hello,
>> 
>> Can anybody please review and approve the following simple patch? Thanks
>> very much.
>> 
>> http://gcc.gnu.org/ml/libstdc++/2011-08/msg00063.html

Ok.  Ok for the release branches as relevant, if they are open for changes, 
after testing.  If you backport it, let it brew for at least a week on trunk 
before any backports.  Thanks.


Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Rainer Orth
Mike Stump  writes:

> On Mar 12, 2012, at 10:44 AM, Rainer Orth wrote:
>> Since even extended support for Solaris 8 ends by March 31st, this patch
>> removes Solaris 8 support from mainline.
>
> One of the nice things about gcc is that gcc usually still works, long
> after a vendor has abandoned a machine.  I rather like that gcc will
> just work, unlike vendor software, which often says, please buy a new
> machine.  One doesn't have to remove support in gcc for something,
> just because a vendor doesn't support it.  That said, truly crufty
> things, should go.

No need to tell me, that's why I've been keeping the IRIX and OSF ports
going for so long, sort of like an OS archaeologist :-)  But both for
those and Solaris 8, the time has come where maintaining them is more
trouble than it's worth, as can be seen by the contortions I had to go
through to even find a machine still capable of running Solaris 8/x86.

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Richard Kenner
> One of the nice things about gcc is that gcc usually still works,
> long after a vendor has abandoned a machine.  I rather like that gcc
> will just work, unlike vendor software, which often says, please buy
> a new machine.  One doesn't have to remove support in gcc for
> something, just because a vendor doesn't support it.  That said,
> truly crufty things, should go.

I agree.  If it's not causing a serious maintenance issue, I see no
reason to remove it.



Re: Remove DWARF_OFFSET_SIZE, DWARF_INITIAL_LENGTH_SIZE

2012-03-12 Thread Rainer Orth
Jason Merrill  writes:

> On 03/12/2012 01:41 PM, Joseph S. Myers wrote:
>> As a *target macro* it makes sense to remove it - reomve it from
>> defaults.h, make it purely internal to dwarf2out.c.  But I think it makes
>> sense to have it inside dwarf2out.c
>
> Agreed.

Fine with me.  I've just been following the lead of several other places
in dwarf2out.c where hardcoded numbers were used.

What about DWARF_INITIAL_LENGTH_SIZE?  Keep it as a macro inside
dwarf2out.c, too?

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: PATCH: Call gen_tls_global_dynamic_64_ and en_tls_local_dynamic_base_64_

2012-03-12 Thread H.J. Lu
On Mon, Mar 12, 2012 at 9:50 AM, H.J. Lu  wrote:
> On Mon, Mar 12, 2012 at 12:46 AM, Uros Bizjak  wrote:
>> On Mon, Mar 12, 2012 at 12:26 AM, H.J. Lu  wrote:
>>
>>> Pmode may be DImode for x32.  This patch calls
>>> gen_tls_global_dynamic_64_ and gen_tls_local_dynamic_base_64_,
>>> depending on Pmode.  Tested on Linux/x86-64.  OK for trunk?
>>>
>>> 2012-03-11  H.J. Lu  
>>>
>>>        * config/i386/i386.c (legitimize_tls_address): Call
>>>        gen_tls_global_dynamic_64_ and
>>>        gen_tls_local_dynamic_base_64_, depending on Pmode.
>>>
>>>        * config/i386/i386.md (*tls_global_dynamic_64): Renamed to ...
>>>        (*tls_global_dynamic_64_): This.
>>>        (tls_global_dynamic_64): Renamed to ...
>>>        (tls_global_dynamic_64_): This.
>>>        (*tls_local_dynamic_base_64): Renamed to ...
>>>        (*tls_local_dynamic_base_64): This.
>>>        (tls_local_dynamic_base_64): Renamed to ...
>>>        (tls_local_dynamic_base_64): This.
>>>
>>> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
>>> index d673101..fc8fa12 100644
>>> --- a/gcc/config/i386/i386.c
>>> +++ b/gcc/config/i386/i386.c
>>> @@ -12533,7 +12543,12 @@ legitimize_tls_address (rtx x, enum tls_model 
>>> model, bool for_mov)
>>>              rtx rax = gen_rtx_REG (Pmode, AX_REG), insns;
>>>
>>>              start_sequence ();
>>> -             emit_call_insn (gen_tls_global_dynamic_64 (rax, x, caddr));
>>> +             if (Pmode == DImode)
>>> +               emit_call_insn (gen_tls_global_dynamic_64_di (rax, x,
>>> +                                                             caddr));
>>> +             else
>>> +               emit_call_insn (gen_tls_global_dynamic_64_si (rax, x,
>>> +                                                             caddr));
>>>              insns = get_insns ();
>>>              end_sequence ();
>>>
>>> @@ -12581,7 +12596,12 @@ legitimize_tls_address (rtx x, enum tls_model 
>>> model, bool for_mov)
>>>              rtx rax = gen_rtx_REG (Pmode, AX_REG), insns, eqv;
>>>
>>>              start_sequence ();
>>> -             emit_call_insn (gen_tls_local_dynamic_base_64 (rax, caddr));
>>> +             if (Pmode == DImode)
>>> +               emit_call_insn (gen_tls_local_dynamic_base_64_di (rax,
>>> +                                                                 caddr));
>>> +             else
>>> +               emit_call_insn (gen_tls_local_dynamic_base_64_si (rax,
>>> +                                                                 caddr));
>>>              insns = get_insns ();
>>>              end_sequence ();
>>
>> Please use indirect functions here, see many examples in the code.
>>
>> OK with this change.
>>
>> Thanks,
>> Uros.
>
> This is the patch I checked in.
>
> Thanks.
>
>
> --
> H.J.
> ---
> 2012-03-12  H.J. Lu  
>
>        * config/i386/i386.c (ix86_gen_tls_global_dynamic_64): New.
>        (ix86_gen_tls_local_dynamic_base_64): Likewise.
>        (ix86_option_override_internal): Set ix86_gen_tls_global_dynamic_64
>        and ix86_gen_tls_local_dynamic_base_64.
>        (legitimize_tls_address): Use ix86_gen_tls_global_dynamic_64 and
>        ix86_gen_tls_local_dynamic_base_64.
>
>        * config/i386/i386.md (*tls_global_dynamic_64): Renamed to ...
>        (*tls_global_dynamic_64_): This.
>        (tls_global_dynamic_64): Renamed to ...
>        (tls_global_dynamic_64_): This.
>        (*tls_local_dynamic_base_64): Renamed to ...
>        (*tls_local_dynamic_base_64_): This.
>        (tls_local_dynamic_base_64): Renamed to ...
>        (tls_local_dynamic_base_64_): This.

This patch caused x32 libgcc build failure:

../../../../src-trunk/libgcc/generic-morestack-thread.c: In function
'stack_split_initialize_thread':
../../../../src-trunk/libgcc/generic-morestack-thread.c:128:1: error:
unrecognizable insn:
(call_insn/u 8 7 9 3 (parallel [
(set (reg:DI 0 ax)
(call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1 A8])
(const_int 0 [0])))
(unspec:DI [
(symbol_ref:SI ("__morestack_segments") [flags
0x50] )
] UNSPEC_TLS_GD)
]) ../../../../src-trunk/libgcc/generic-morestack-thread.c:117 -1
 (expr_list:REG_EH_REGION (const_int -2147483648 [0x8000])
(nil))
(nil))
../../../../src-trunk/libgcc/generic-morestack-thread.c:128:1:
internal compiler error: in extract_insn, at recog.c:2123
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[8]: *** [generic-morestack-thread.o] Error 1
make[8]: *** Waiting for unfinished jobs

__morestack_segments is always in SImode for x32.  Adding
:P to

 (unspec:P [(match_operand 1 "tls_symbolic_operand" "")]

causes it to fail when Pmode == DImode  I checked in this patch
to revert the part of that change.

Sorry for that.


-- 
H.J.
---
Index: ChangeLog
===
--- Chan

Re: [PATCH,testsuite,committed] Skip some tests for powerpc*-*-darwin*

2012-03-12 Thread Rainer Orth
Rainer Orth  writes:

>> +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
>
> Please omit defaults to dg-skip-if: { "*" } { "" } are unnecessary and
> make the directive harder to read.

Oh, I forgot: please indicate why you are skipping the test in the
comment field, like:

/* { dg-skip-if "PR tree-optimization/46728" { powerpc*-*-darwin* } } */

Thanks.
Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: Remove obsolete IRIX 6.5 support

2012-03-12 Thread Richard Sandiford
OK from my point of view, except...

Rainer Orth  writes:
>   * config/mips/mips.h (TARGET_GPWORD): Remove IRIX 6 N64 handling.
>   (TARGET_IRIX6): Remove.
>   (TARGET_CPU_CPP_BUILTINS): Remove IRIX 6 handling.
>   Don't define LANGUAGE_C, _LANGUAGE_C for Objective-C.

...looking at SVN history, defining _LANGUAGE_C* for Objective-C
predates the Irix comment, so I think we'd better keep it.  How about
changing the comment to:

 /* Bizarre, but retained for backwards compatibility.  */

Thanks for all your work on this port, and for putting up with those
long bootstrap times :-)

Richard


Re: Remove DWARF_OFFSET_SIZE, DWARF_INITIAL_LENGTH_SIZE

2012-03-12 Thread Jason Merrill

On 03/12/2012 01:41 PM, Joseph S. Myers wrote:

As a *target macro* it makes sense to remove it - reomve it from
defaults.h, make it purely internal to dwarf2out.c.  But I think it makes
sense to have it inside dwarf2out.c


Agreed.

Jason



Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Mike Stump
On Mar 12, 2012, at 10:44 AM, Rainer Orth wrote:
> Since even extended support for Solaris 8 ends by March 31st, this patch
> removes Solaris 8 support from mainline.

One of the nice things about gcc is that gcc usually still works, long after a 
vendor has abandoned a machine.  I rather like that gcc will just work, unlike 
vendor software, which often says, please buy a new machine.  One doesn't have 
to remove support in gcc for something, just because a vendor doesn't support 
it.  That said, truly crufty things, should go.


Re: [C++ Patch] PR 52299, bogus div by zero warning

2012-03-12 Thread Jason Merrill

OK.

Jason


Re: [PATCH,testsuite,committed] Skip some tests for powerpc*-*-darwin*

2012-03-12 Thread Rainer Orth
"William J. Schmidt"  writes:

> Index: gcc/testsuite/gcc.target/powerpc/pr46728-13.c
> ===
> --- gcc/testsuite/gcc.target/powerpc/pr46728-13.c (revision 185247)
> +++ gcc/testsuite/gcc.target/powerpc/pr46728-13.c (working copy)
> @@ -1,4 +1,5 @@
> -/* { dg-do run } */
> +/* { dg-do run { target { powerpc*-*-* } } } */

Why is the target necessary?  gcc.target/powerpc is only run on
powerpc*-*-* or rs6000-*-*-* anyway (cf. powerpc.exp).

> +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */

Please omit defaults to dg-skip-if: { "*" } { "" } are unnecessary and
make the directive harder to read.

Thanks.
Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


[C++ Patch] PR 52299, bogus div by zero warning

2012-03-12 Thread Paolo Carlini

Hi,

I handled this issue as outlined by Jakub in the audit trail. For the 
purpose of the bogus div by zero warning just using 
c_inhibit_evaluation_warnings appears to work fine.


Tested x86_64-linux.

Thanks,
Paolo.

///
/cp
2012-03-12  Paolo Carlini  

PR c++/52299
* pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
division by zero warnings.

/testsuite
2012-03-12  Paolo Carlini  

PR c++/52299
* g++.dg/warn/Wdiv-by-zero-bogus.C: New.

Index: testsuite/g++.dg/warn/Wdiv-by-zero-bogus.C
===
--- testsuite/g++.dg/warn/Wdiv-by-zero-bogus.C  (revision 0)
+++ testsuite/g++.dg/warn/Wdiv-by-zero-bogus.C  (revision 0)
@@ -0,0 +1,30 @@
+// PR c++/52299
+
+template
+struct test0 {
+  static const unsigned a_
+  = x ? 10 / x : 10;
+};
+
+template
+struct test1 {
+  static const unsigned a_
+  = !x ? 10 : 10 / x;
+};
+
+template
+struct test2 {
+  static const unsigned a_
+  = x ? 10 / x : 10;
+};
+
+template
+struct test3 {
+  static const unsigned a_
+  = !x ? 10 : 10 / x;
+};
+
+unsigned i0 = test0<0>::a_;
+unsigned i1 = test1<0>::a_;
+unsigned i2 = test2::a_;
+unsigned i3 = test3::a_;
Index: cp/pt.c
===
--- cp/pt.c (revision 185247)
+++ cp/pt.c (working copy)
@@ -13943,12 +13943,36 @@ tsubst_copy_and_build (tree t,
   }
 
 case COND_EXPR:
-  return build_x_conditional_expr
-   (RECUR (TREE_OPERAND (t, 0)),
-RECUR (TREE_OPERAND (t, 1)),
-RECUR (TREE_OPERAND (t, 2)),
- complain);
+  {
+   tree cond = RECUR (TREE_OPERAND (t, 0));
+   tree op1, op2;
 
+   if (TREE_CODE (cond) == INTEGER_CST)
+ {
+   if (integer_zerop (cond))
+ {
+   ++c_inhibit_evaluation_warnings;
+   op1 = RECUR (TREE_OPERAND (t, 1));
+   --c_inhibit_evaluation_warnings;
+   op2 = RECUR (TREE_OPERAND (t, 2));
+ }
+   else
+ {
+   op1 = RECUR (TREE_OPERAND (t, 1));
+   ++c_inhibit_evaluation_warnings;
+   op2 = RECUR (TREE_OPERAND (t, 2));
+   --c_inhibit_evaluation_warnings;
+ }
+ }
+   else
+ {
+   op1 = RECUR (TREE_OPERAND (t, 1));
+   op2 = RECUR (TREE_OPERAND (t, 2));
+ }
+
+   return build_x_conditional_expr (cond, op1, op2, complain);
+  }
+
 case PSEUDO_DTOR_EXPR:
   return finish_pseudo_destructor_expr
(RECUR (TREE_OPERAND (t, 0)),


Re: Remove obsolete Solaris 8 support

2012-03-12 Thread Ian Lance Taylor
Rainer Orth  writes:

>   libgo:
>   * configure.ac (OSCFLAGS): Remove *-*-solaris2.8 handling.
>   (libgo_cv_lib_makecontext_stack_top): Remove
>   sparc*-*-solaris2.8* handling.
>   * configure: Regenerate.

As with the Irix 5 changes, just send the libgo patches to me rather
than committing them directly to the repository.  Thanks.

Ian


[PATCH,testsuite,committed] Skip some tests for powerpc*-*-darwin*

2012-03-12 Thread William J. Schmidt
Following in response to a report on PR46728.  Committed as obvious.


2012-03-12  Bill Schmidt  

PR tree-optimization/46728
* gcc.target/powerpc/pr46728-4.c: Skip for powerpc*-*-darwin*.
* gcc.target/powerpc/pr46728-5.c: Likewise.
* gcc.target/powerpc/pr46728-8.c: Likewise.
* gcc.target/powerpc/pr46728-10.c: Likewise.
* gcc.target/powerpc/pr46728-11.c: Likewise.
* gcc.target/powerpc/pr46728-13.c: Likewise.
* gcc.target/powerpc/pr46728-14.c: Likewise.
* gcc.target/powerpc/pr46728-15.c: Likewise.


Index: gcc/testsuite/gcc.target/powerpc/pr46728-13.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-13.c   (revision 185247)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-13.c   (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do run { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-14.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-14.c   (revision 185247)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-14.c   (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do run { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-4.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-4.c(revision 185247)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-4.c(working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-15.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-15.c   (revision 185247)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-15.c   (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do run { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-5.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-5.c(revision 185247)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-5.c(working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-10.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-10.c   (revision 185247)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-10.c   (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do run { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-8.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-8.c(revision 185247)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-8.c(working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 
Index: gcc/testsuite/gcc.target/powerpc/pr46728-11.c
===
--- gcc/testsuite/gcc.target/powerpc/pr46728-11.c   (revision 185247)
+++ gcc/testsuite/gcc.target/powerpc/pr46728-11.c   (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do run { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm 
-mpowerpc-gpopt" } */
 
 #include 




Re: Swap SECTION_EXCLUDE and SECTION_MACH_DEP

2012-03-12 Thread Sriraman Tallam
 Already submitted by gjl in rev. 185259.

-Sri.

On Mon, Mar 12, 2012 at 10:27 AM, Richard Henderson  wrote:
> On 03/12/12 10:26, Sriraman Tallam wrote:
>> Hi Richard,
>>
>>   Is this ok for trunk? Asking you because you approved the patch the
>> first time around.
>>
>> Thanks,
>> -Sri.
>>
>> On Fri, Mar 9, 2012 at 3:10 PM, Sriraman Tallam  wrote:
>>> Please see:
>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52545
>>>
>>> SECTION_EXCLUDE should not take up bits reserved for SECTION_MACH_DEP
>>>
>>> Patch:
>>>
>>>        PR 52545
>>>        * output.h (SECTION_MACH_DEP)
>>>        (SECTION_EXCLUDE):  Swap values.
>
>
> Yes, this patch is ok
>
>
> r~


Re: Remove obsolete IRIX 6.5 support

2012-03-12 Thread Ian Lance Taylor
Rainer Orth  writes:

> * I'm removing IRIX-specific parts of libgo.  Given that libgo is
>   imported from upstream (and supposed to work or made work on the 4.7
>   branch), I don't know if this a good idea.

Yeah, it's not.  Just send me the mainline patches to libgo rather than
applying them yourself, I'll apply them to the upstream repository and
commit to mainline.

Thanks for working on this!

Ian


[PATCH][Cilkplus] Elemental Function Mangling

2012-03-12 Thread Iyer, Balaji V
Hello Everyone,
  This patch is for the Cilkplus branch mainly affecting the C compiler. 
This patch will do the vector function mangling correctly for elemental 
functions.

Thanking You,

Yours Sincerely,

Balaji V. Iyer.diff --git a/gcc/ChangeLog.cilk b/gcc/ChangeLog.cilk
index 1398870..c1b1d71 100644
--- a/gcc/ChangeLog.cilk
+++ b/gcc/ChangeLog.cilk
@@ -1,3 +1,20 @@
+2012-03-11  Balaji V. Iyer  
+
+   * attribs.c (decl_attributes): Concatinated existing attributes with
+   vector attributes.
+   * c-decl.c (bind): Added a check if scope is not null.
+   * elem-function.c (rename_elm_fn): New function.
+   (is_elem_fn): Likewise.
+   (find_processor_code): Likewise.
+   (find_vlength_code): Likewise.
+   (create_processor_attribute): Likewise.
+   (create_optimize_attribute): Likewise.
+   (find_suffix): Likewise.
+   (create_elem_fn_nodes): Likewise.
+   (extract_elem_fn_values): Likewise.
+   (create_elem_vec_fn): Likewise.
+   * passes.c (init_optimization_passes): Added elemental function pass.
+
 2012-03-09  Balaji V. Iyer  
 
* attribs.c (decl_attributes): Added a check for elemental function
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 0da06b3..ada4090 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1453,6 +1453,7 @@ OBJS = \
 cilk.o \
 cilk-low.o \
array-notation-common.o \
+   elem-function.o \
$(out_object_file) \
$(EXTRA_OBJS) \
$(host_hook_obj)
@@ -3436,7 +3437,8 @@ lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) 
coretypes.h \
insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) $(OBSTACK_H) $(BITMAP_H) \
$(EXPR_H) $(EXCEPT_H) $(REGS_H) $(TREE_PASS_H) $(DF_H) dce.h
 
-
+elem-function.o: elem-function.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) 
\
+  $(OPTABS_H) $(RECOG_H)
 
 array-notation-common.o: array-notation-common.c $(CONFIG_H) $(SYSTEM_H) \
 $(TREE_H) $(RTL_H) $(OPTABS_H) $(GIMPLE_H) $(RECOG_H) 
diff --git a/gcc/attribs.c b/gcc/attribs.c
index 2ececc4..13c1417 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -327,6 +327,12 @@ decl_attributes (tree *node, tree attributes, int flags)
  if (!is_elem_fn_attribute_p (name))
warning (OPT_Wattributes, "%qE attribute directive ignored",
 name);
+ else
+   {
+ returned_attrs = tree_cons (name, args, returned_attrs);
+ DECL_ATTRIBUTES (*anode) = tree_cons (name, args,
+   DECL_ATTRIBUTES (*anode));
+   }
  continue;
}
   else if (list_length (args) < spec->min_length
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 4abf738..6251bee 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -620,7 +620,8 @@ bind (tree name, tree decl, struct c_scope *scope, bool 
invisible,
   b->shadowed = 0;
   b->decl = decl;
   b->id = name;
-  b->depth = scope->depth;
+  if (scope)
+b->depth = scope->depth;
   b->invisible = invisible;
   b->nested = nested;
   b->inner_comp = 0;
@@ -629,8 +630,11 @@ bind (tree name, tree decl, struct c_scope *scope, bool 
invisible,
 
   b->u.type = NULL;
 
-  b->prev = scope->bindings;
-  scope->bindings = b;
+  if (scope)
+{
+  b->prev = scope->bindings;
+  scope->bindings = b;
+}
 
   if (decl_jump_unsafe (decl))
 scope->has_jump_unsafe_decl = 1;
@@ -658,9 +662,11 @@ bind (tree name, tree decl, struct c_scope *scope, bool 
invisible,
   /* Locate the appropriate place in the chain of shadowed decls
  to insert this binding.  Normally, scope == current_scope and
  this does nothing.  */
-  while (*here && (*here)->depth > scope->depth)
-here = &(*here)->shadowed;
-
+  if (scope)
+{
+  while (*here && (*here)->depth > scope->depth)
+   here = &(*here)->shadowed;
+}
   b->shadowed = *here;
   *here = b;
 }
diff --git a/gcc/c-family/ChangeLog.cilk b/gcc/c-family/ChangeLog.cilk
index a4049d0..08d4c2d 100644
--- a/gcc/c-family/ChangeLog.cilk
+++ b/gcc/c-family/ChangeLog.cilk
@@ -1,3 +1,7 @@
+2012-03-11  Balaji V. Iyer  
+
+   * c-common.c (handle_vector_attribute): New function.
+
 2012-01-20  Balaji V. Iyer  
 
* c-common.c (c_define_builtins): Added a call to
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index f84ccb9..47b5c54 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -381,6 +381,7 @@ static tree handle_type_generic_attribute (tree *, tree, 
tree, int, bool *);
 static tree handle_alloc_size_attribute (tree *, tree, tree, int, bool *);
 static tree handle_target_attribute (tree *, tree, tree, int, bool *);
 static tree handle_optimize_attribute (tree *, tree, tree, int, bool *);
+static tree handle_vector_attribute (tree *, tree, tree, int, bool *);
 static tree ignore_attribute (tree *, tree, tree, int, bool *);
 static tree handle_no_split_stack_attribute (tree *, tree, tree, int, bool *);
 static tree handle_fnspec_attribute 

Re: [Patch ARM/ configury] Add fall-back check for gnu_unique_object

2012-03-12 Thread DJ Delorie

Looks OK to me.


[Patch,AVR.testsuite,committed]: More test for address spaces (PR49868)

2012-03-12 Thread Georg-Johann Lay
http://gcc.gnu.org/viewcvs?view=revision&revision=185255

This adds some test cases for the address space support.

Some tests fail because of PR other/52545.

Moreover, you will have to update the avrtest simulator because the test case
for __flash1 needs its own linker script in order to locate .progmem1.data* at
0x1.

Johann


Re: [Fortran-dev, patch, committed] Minor fixes

2012-03-12 Thread Tobias Burnus

On 03/12/2012 01:50 PM, Tobias Burnus wrote:
Additionally, I modified some tree-dump patterns for the extent and 
for the base_addr change.


Three more changes: The libgfortran change should have been just a 
cleanup, but it seems to also fix a failure. Plus two dump changes. The 
number of failures is now down to 160 FAIL lines - or to the following 
18 test cases (plus three which fail also on the trunk):


gfortran.dg/c_f_pointer_complex.f03
gfortran.dg/c_f_pointer_shape_tests_2.f03
gfortran.dg/c_f_pointer_shape_tests_4.f03
gfortran.dg/c_f_pointer_tests.f90
gfortran.dg/c_f_pointer_tests_4.f90
gfortran.dg/optional_dim_3.f90
gfortran.dg/associated_2.f90
gfortran.dg/auto_char_dummy_array_1.f90
gfortran.dg/class_array_1.f03
gfortran.dg/auto_char_len_3.f90
gfortran.dg/class_array_1.f03
gfortran.dg/class_array_2.f03
gfortran.dg/class_array_3.f03
gfortran.dg/class_to_type_1.f03
gfortran.dg/proc_decl_23.f90
gfortran.dg/read_eof_all.f90
gfortran.dg/transfer_intrinsic_3.f90
gfortran.dg/subref_array_pointer_2.f90

The array c_f_pointer function fails because the fptr's size is not set 
(it is needed to set the sm). Solution: Handle everything in the FE.


Tobias
Index: libgfortran/ChangeLog.fortran-dev
===
--- libgfortran/ChangeLog.fortran-dev	(revision 185216)
+++ libgfortran/ChangeLog.fortran-dev	(working copy)
@@ -1,5 +1,9 @@
 2012-03-12  Tobias Burnus  
 
+	* intrinsics/spread_generic.c (spread_internal): Properly use "sm".
+
+2012-03-12  Tobias Burnus  
+
 	* intrinsics/iso_c_binding.c (c_f_pointer_u0): Use
 	GFC_DESCRIPTOR_SM instead of GFC_DESCRIPTOR_STRIDE_BYTES.
 
Index: libgfortran/intrinsics/spread_generic.c
===
--- libgfortran/intrinsics/spread_generic.c	(revision 185199)
+++ libgfortran/intrinsics/spread_generic.c	(working copy)
@@ -71,18 +71,18 @@ spread_internal (gfc_array_char *ret, const gfc_ar
   /* The front end has signalled that we need to populate the
 	 return array descriptor.  */
 
-  size_t ub, stride;
+  size_t ext, sm;
 
   ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rrank;
   dim = 0;
-  rs = 1;
+  rs = size;
   for (n = 0; n < rrank; n++)
 	{
-	  stride = rs;
+	  sm = rs;
 	  if (n == *along - 1)
 	{
-	  ub = ncopies - 1;
-	  rdelta = rs * size;
+	  ext = ncopies;
+	  rdelta = rs;
 	  rs *= ncopies;
 	}
 	  else
@@ -90,17 +90,17 @@ spread_internal (gfc_array_char *ret, const gfc_ar
 	  count[dim] = 0;
 	  extent[dim] = GFC_DESCRIPTOR_EXTENT(source,dim);
 	  sstride[dim] = GFC_DESCRIPTOR_SM(source,dim);
-	  rstride[dim] = rs * size;
+	  rstride[dim] = rs;
 
-	  ub = extent[dim]-1;
+	  ext = extent[dim];
 	  rs *= extent[dim];
 	  dim++;
 	}
 
-	  GFC_DIMENSION_SET (ret->dim[n], 0, ub, stride*size);
+	  GFC_DIMENSION_SET (ret->dim[n], 0, ext, sm);
 	}
   ret->offset = 0;
-  ret->base_addr = internal_malloc_size (rs * size);
+  ret->base_addr = internal_malloc_size (rs);
 
   if (rs <= 0)
 	return;
Index: gcc/testsuite/gfortran.dg/internal_pack_4.f90
===
--- gcc/testsuite/gfortran.dg/internal_pack_4.f90	(revision 185197)
+++ gcc/testsuite/gfortran.dg/internal_pack_4.f90	(working copy)
@@ -26,7 +26,7 @@ USE M1
 CALL S2()
 END
 
-! { dg-final { scan-tree-dump-times "a != 0B \\? \\\(.*\\\) _gfortran_internal_pack" 1 "original" } }
-! { dg-final { scan-tree-dump-times "if \\(a != 0B &&" 1 "original" } }
+! { dg-final { scan-tree-dump-times " a != 0B && \\(real\\(kind=.\\).0:. . restrict\\) a->base_addr != 0B \\? \\\(.*\\\) _gfortran_internal_pack" 1 "original" } }
+! { dg-final { scan-tree-dump-times "if \\(\\(a != 0B && \\(real\\(kind=.\\).0:. . restrict\\) a->base_addr != 0B\\) &&" 1 "original" } }
 ! { dg-final { cleanup-tree-dump "original" } }
 ! { dg-final { cleanup-modules "m1" } }
Index: gcc/testsuite/gfortran.dg/assign_10.f90
===
--- gcc/testsuite/gfortran.dg/assign_10.f90	(revision 185197)
+++ gcc/testsuite/gfortran.dg/assign_10.f90	(working copy)
@@ -23,6 +23,6 @@ end
 ! cases will all yield a temporary, so that atmp appears 18 times.
 ! Note that it is the kind conversion that generates the temp.
 !
-! { dg-final { scan-tree-dump-times "parm" 18 "original" } }
-! { dg-final { scan-tree-dump-times "atmp" 18 "original" } }
+! { dg-final { scan-tree-dump-times "parm" 20 "original" } }
+! { dg-final { scan-tree-dump-times "atmp" 20 "original" } }
 ! { dg-final { cleanup-tree-dump "original" } }
Index: gcc/testsuite/ChangeLog.fortran-dev
===
--- gcc/testsuite/ChangeLog.fortran-dev	(revision 185225)
+++ gcc/testsuite/ChangeLog.fortran-dev	(working copy)
@@ -1,5 +1,10 @@
 2012-03-12  Tobias Burnus  
 
+	* gfortran.dg/assign_10.f90: Update scan-tre

RFC: PATCH: Add -maddress-mode=short|long for x86

2012-03-12 Thread H.J. Lu
Hi,

Trunk can now use SImode or DImode for Pmode with -mx32.  Pmode == SImode
will avoid many conversions from SImode to DImode:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50797

It will use 0x67 address size prefix instead.  This patch adds a new
command line option, -maddress-mode=short|long, for x86.  Any comments?

Thanks.


H.J.

2012-03-12  H.J. Lu  

* config/i386/i386-opts.h (pmode): New.

* config/i386/i386.c (ix86_option_override_internal): Properly
check and set ix86_pmode.

* config/i386/i386.h (Pmode): Check ix86_pmode instead of
TARGET_64BIT.

* config/i386/i386.opt (maddress-mode=): New.

* doc/invoke.texi: Document -maddress-mode=short|long for x86.

diff --git a/gcc/config/i386/i386-opts.h b/gcc/config/i386/i386-opts.h
index 3cc2253..eea85fd 100644
--- a/gcc/config/i386/i386-opts.h
+++ b/gcc/config/i386/i386-opts.h
@@ -71,6 +71,11 @@ enum cmodel {
   CM_LARGE_PIC /* No assumptions.  */
 };
 
+enum pmode {
+  PMODE_SI,/* Pmode == SImode. */
+  PMODE_DI /* Pmode == DImode. */
+};
+
 enum asm_dialect {
   ASM_ATT,
   ASM_INTEL
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index dbcf5a9..8d9c801 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3172,6 +3172,17 @@ ix86_option_override_internal (bool main_args_p)
   else
 ix86_arch_specified = 1;
 
+  if (global_options_set.x_ix86_pmode)
+{
+  if ((TARGET_LP64 && ix86_pmode == PMODE_SI)
+  || (!TARGET_64BIT && ix86_pmode == PMODE_DI))
+   error ("address mode %qs not supported in the %s bit mode",
+  TARGET_64BIT ? "short" : "long",
+  TARGET_64BIT ? "64" : "32");
+}
+  else
+ix86_pmode = TARGET_LP64 ? PMODE_DI : PMODE_SI;
+
   if (!global_options_set.x_ix86_abi)
 ix86_abi = DEFAULT_ABI;
 
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index c77070b..3fcd209 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1745,7 +1745,7 @@ do {  
\
 /* Specify the machine mode that pointers have.
After generation of rtl, the compiler makes no further distinction
between pointers and any other objects of this machine mode.  */
-#define Pmode (TARGET_64BIT ? DImode : SImode)
+#define Pmode (ix86_pmode == PMODE_DI ? DImode : SImode)
 
 /* A C expression whose value is zero if pointers that need to be extended
from being `POINTER_SIZE' bits wide to `Pmode' are sign-extended and
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index 1d8dc44..29f1082 100644
--- a/gcc/config/i386/i386.opt
+++ b/gcc/config/i386/i386.opt
@@ -159,6 +159,20 @@ Enum(cmodel) String(32) Value(CM_32)
 EnumValue
 Enum(cmodel) String(kernel) Value(CM_KERNEL)
 
+maddress-mode=
+Target RejectNegative Joined Enum(pmode) Var(ix86_pmode) Init(PMODE_SI)
+Use given address mode
+
+Enum
+Name(pmode) Type(enum pmode)
+Known address mode (for use with the -maddress-mode= option):
+
+EnumValue
+Enum(pmode) String(short) Value(PMODE_SI)
+
+EnumValue
+Enum(pmode) String(long) Value(PMODE_DI)
+
 mcpu=
 Target RejectNegative Joined Undocumented Alias(mtune=) Warn(%<-mcpu=%> is 
deprecated; use %<-mtune=%> or %<-march=%> instead)
 
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 5f5397b..e9188db 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -634,7 +634,7 @@ Objective-C and Objective-C++ Dialects}.
 -mveclibabi=@var{type} -mvect8-ret-in-mem @gol
 -mpc32 -mpc64 -mpc80 -mstackrealign @gol
 -momit-leaf-frame-pointer  -mno-red-zone -mno-tls-direct-seg-refs @gol
--mcmodel=@var{code-model} -mabi=@var{name} @gol
+-mcmodel=@var{code-model} -mabi=@var{name} -maddress-mode=@var{mode} @gol
 -m32 -m64 -mx32 -mlarge-data-threshold=@var{num} @gol
 -msse2avx -mfentry -m8bit-idiv @gol
 -mavx256-split-unaligned-load -mavx256-split-unaligned-store}
@@ -13938,6 +13938,18 @@ be statically or dynamically linked.
 @opindex mcmodel=large
 Generate code for the large model.  This model makes no assumptions
 about addresses and sizes of sections.
+
+@item -maddress-mode=long
+@opindex maddress-mode=long
+Generate code for long address mode.  It is only supported for 64-bit
+and x32 environments.  This is the default address mode for 64-bit
+environment.
+
+@item -maddress-mode=short
+@opindex maddress-mode=short
+Generate code for short address mode.  It is only supported for 32-bit
+and x32 environments.  This is the default address mode for 32-bit and
+x32 environments.
 @end table
 
 @node i386 and x86-64 Windows Options


Remove obsolete Solaris 8 support

2012-03-12 Thread Rainer Orth
Since even extended support for Solaris 8 ends by March 31st, this patch
removes Solaris 8 support from mainline.  Given that extended support
for Solaris 9 lasts until October 2014, I guess that will remain in GCC
for at least one major release.

Again, I don't expect the patch to be controversial, but a few issues
bear mention:

* Although libgcc/config/sparc/sol2-unwind.h could be simplified quite a
  bit, perhaps we could go further: I wonder if the remaining nframes = 2
  case really applies to Solaris 9.  If not, one could massivly simplify
  this code.

* As in the IRIX case, I wonder if removing Solaris 8 support from libgo
  is a good idea while it still is supported on the 4.7 branch.

* In libstdc++, all checks for the presence of overloads can be replaced
  by hardcoded values.  This also allows __CORRECT_ISO_CPP_MATH_H_PROTO2
  to be removed and to drop the `1' in __CORRECT_ISO_CPP_MATH_H_PROTO1.

* I haven't yet checked if the Solaris references in
  libstdc++-v3/config/io/basic_file_stdio.cc are correct or also apply
  to newer versions.  This can probably wait for a later time.

* libstdc++-v3/doc/xml/manual/internals.xml still has various references
  to older Solaris versions.  I haven't touched those.

Bootstrapped without regressions on {i386-pc, sparc-sun}-solaris2.{9, 10, 11}
(Solaris 9/SPARC still running).  Ok for mainline if that passes (though
I guess I don't need approval for most of these changes)?

Thanks.
Rainer


2012-03-11  Rainer Orth  

libstdc++-v3:
* config/os/solaris/solaris2.8: Rename to ...
* config/os/solaris/solaris2.9: ... this.
* config/abi/post/solaris2.8: Rename to ...
* config/abi/post/solaris2.9: ... this.
* configure.host (os_include_dir): Remove solaris2.8.
Reflect renaming.
(abi_baseline_pair): Remove *-*-solaris2.8.
Reflect renaming.

* configure.ac (GLIBCXX_CHECK_MATH_PROTO): Remove
(GLIBCXX_CHECK_STDLIB_PROTO): Remove.
* acinclude.m4 (GLIBCXX_CHECK_MATH_PROTO): Remove
(GLIBCXX_CHECK_STDLIB_PROTO): Remove.
(GLIBCXX_CHECK_GTHREADS): Remove Solaris 8 handling.
* crossconfig.m4 (GLIBCXX_CROSSCONFIG): Remove *-solaris2.8
handling.
* configure: Regenerate.
* config.h.in: Regenerate.

* config/os/solaris/solaris2.9/os_defines.h
(__CORRECT_ISO_CPP_MATH_H_PROTO): Define.
(__CORRECT_ISO_CPP_STDLIB_H_PROTO): Define.
* include/c_global/cmath: Rename __CORRECT_ISO_CPP_MATH_H_PROTO1
to __CORRECT_ISO_CPP_MATH_H_PROTO.
[!__CORRECT_ISO_CPP_MATH_H_PROTO2]: Remove.
* include/tr1/cmath: Rename __CORRECT_ISO_CPP_MATH_H_PROTO1 to
__CORRECT_ISO_CPP_MATH_H_PROTO.

* doc/xml/manual/configure.xml (Configure, --enable-libstdcxx-threads):
Remove Solaris 8 reference.

* testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
Don't xfail on *-*-solaris2.8.
* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/12.cc:
Likewise.
* testsuite/ext/enc_filebuf/char/13598.cc: Don't xfail on
*-*-solaris2.8.

libjava:
* configure.ac (THREADLIBS): Remove *-*-solaris2.8 handling.
* configure: Regenerate.

libgo:
* configure.ac (OSCFLAGS): Remove *-*-solaris2.8 handling.
(libgo_cv_lib_makecontext_stack_top): Remove
sparc*-*-solaris2.8* handling.
* configure: Regenerate.

libgcc:
* config/i386/sol2-unwind.h (x86_fallback_frame_state): Remove
Solaris 8 handling.
* config/sparc/sol2-unwind.h (sparc64_is_sighandler): Remove
Solaris 8 handling.
(sparc_is_sighandler): Likewise.

libcpp:
* lex.c: Remove Solaris 8 reference.

gcc/testsuite:
* g++.dg/warn/miss-format-1.C: Remove *-*-solaris2.8 handling.
* gcc.dg/c99-stdint-6.c: Likewise.
* gcc.dg/lto/20090210_0.c: Likewise.
* gcc.dg/pr28796-2.c: Don't skip on sparc*-sun-solaris2.8.
* gcc.dg/pragma-init-fini.c: Don't skip on i?86-*-solaris2.8.
* gcc.dg/pragma-init-fini-2.c: Likewise.
* gcc.dg/torture/pr47917.c: Remove *-*-solaris2.8 handling.
* gcc.target/i386/pr22076.c: Remove i?86-*-solaris2.8 handling.
* gcc.target/i386/pr22152.c: Likewise.
* gcc.target/i386/vect8-ret.c: Likewise.
* lib/target-supports.exp (add_options_for_tls): Remove Solaris 8
handling.

gcc:
* config.gcc (enable_obsolete): Remove *-*-solaris2.8*.
(*-*-solaris2.[0-8], *-*-solaris2.[0-8].*): Mark unsupported.
(i[34567]86-*-solaris2*, x86_64-*-solaris2.1[0-9]*): Remove
Solaris 8 support.
* configure.ac (gcc_cv_ld_hidden): Remove *-*-solaris2.8*.
(ld_tls_support): Remove Solaris 8 references.
(lwp_dir, lwp_spec): Remove support for alternate thread library.
* acinclude.m4 (gcc_cv_initfini_array): Re

RE: [Patch,AVR]; PR52499 fix MODE_CODE_BASE_REG_CLASS type

2012-03-12 Thread Weddington, Eric


> -Original Message-
> From: Georg-Johann Lay 
> Sent: Monday, March 12, 2012 11:08 AM
> To: gcc-patches@gcc.gnu.org
> Cc: Denis Chertykov; Weddington, Eric
> Subject: [Patch,AVR]; PR52499 fix MODE_CODE_BASE_REG_CLASS type
> 
> This fixes a problem if avr-gcc is built with C++
> 
> Lightly tested.
> 
> Ok for trunk?
> 

Please commit.


Re: [PATCH] Fix PR49484, gthr requirements update (target maintainers have a looksee)

2012-03-12 Thread Gerald Pfeifer
On Mon, 12 Mar 2012, Richard Guenther wrote:
>>> 2012-01-18  Richard Guenther  
>>>
>>>        * gthr.h (__GTHREAD_MUTEX_INIT_FUNCTION): Adjust specification.
>>>        * gthr-posix.h (__GTHREAD_MUTEX_INIT_FUNCTION): Define.
>>>        (__gthread_mutex_init_function): New function.
>>>        * gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Define.
>>>
>>>        PR gcov/49484
>>>        * libgcov.c: Include gthr.h.
>>>        (__gcov_flush_mx): New global variable.
>>>        (init_mx, init_mx_once): New functions.
>>>        (__gcov_flush): Protect self with a mutex.
>>>        (__gcov_fork): Re-initialize mutex after forking.
>>>        * unwind-dw2-fde.c: Change condition under which to use
>>>        __GTHREAD_MUTEX_INIT_FUNCTION.

Richi, I'm afraid this caused the following on i386-unknown-freebsd10?

/scratch2/tmp/gerald/gcc-HEAD/libgcc/libgcov.c:710:54: error: 'NULL' undeclared 
here (not in a function)
gmake[3]: *** [_gcov.o] Error 1
gmake[3]: *** Waiting for unfinished jobs
gmake[3]: Leaving directory 
`/scratch2/tmp/gerald/OBJ-0312-1454/i386-unknown-freebsd10.0/libgcc'
gmake[2]: *** [all-stage1-target-libgcc] Error 2

Gerald

Re: Remove DWARF_OFFSET_SIZE, DWARF_INITIAL_LENGTH_SIZE

2012-03-12 Thread Joseph S. Myers
On Mon, 12 Mar 2012, Rainer Orth wrote:

> With the IRIX port gone (shortly), there are no targets that define a
> non-default DWARF_OFFSET_SIZE or DWARF_INITIAL_LENGTH_SIZE any longer.
> I therefore propose to remove the code handling this.

As a *target macro* it makes sense to remove it - reomve it from 
defaults.h, make it purely internal to dwarf2out.c.  But I think it makes 
sense to have it inside dwarf2out.c - to indicate that a particular "4" is 
actually the size of an offset (which could be 8 if 64-bit DWARF were 
generated) rather than some other source of the magic number "4" (in 
general I think using meaningful names is better than such magic numbers, 
especially given that in the DWARF specification this is not a constant 
4).

-- 
Joseph S. Myers
jos...@codesourcery.com


Re: [google/4.6] Add powerpc64-grtev2-linux-gnu.xfail (issue5794044)

2012-03-12 Thread 關振德
Don't know.  I am establishing the base line so that we can notice
regressions.  We will look at them closely one we started tracking the
tests.

-Doug

On Mon, Mar 12, 2012 at 10:23 AM, Diego Novillo  wrote:
> On Fri, Mar 9, 2012 at 16:54, Doug Kwan  wrote:
>> Hi Diego,
>>
>>    This patch adds the XFAIL file for powerpc64-grtev2-linux-gnu in 4.6.
>>
>> -Doug
>>
>> 2012-03-09   Doug Kwan  
>>
>>        * contrib/testsuite-management/powerpc64-grtev2-linux-gnu.xfail:
>>        New file.
>
> OK.  BTW, these failures are present in vanilla ppc64 builds as well?
>
>
> Diego.


Re: Remove obsolete IRIX 6.5 support

2012-03-12 Thread Joseph S. Myers
On Mon, 12 Mar 2012, Rainer Orth wrote:

>   * config/mips/mips-modes.def: Remove IRIX 6 reference.
>   * config/mips/gnu-user64.h (MIPS_TFMODE_FORMAT): Remove.
>   * config/mips/mips.c (mips_option_override) [MIPS_TFMODE_FORMAT]:
>   Remove.

I think this means that mips_extended_format in real.[ch] - the MIPS 
variant of IBM long double - is also obsolete, and with it all the support 
in fp-bit.[ch] for that format (__LDBL_MANT_DIG__ == 106 conditional, 
HALFFRACBITS, HALFSHIFT and associated conditional code).

-- 
Joseph S. Myers
jos...@codesourcery.com


libgcc gcov_fork failure on AIX

2012-03-12 Thread David Edelsohn
Richi,

Your patch for PR gcov/49484 now causes a bootstrap failure on AIX:

/farm/dje/src/src/libgcc/libgcov.c: In function '__gcov_fork':
/farm/dje/src/src/libgcc/libgcov.c:1008:5: error: 'mx' undeclared
(first use in this function)
/farm/dje/src/src/libgcc/libgcov.c:1008:5: note: each undeclared
identifier is reported only once for each function it appears in
make: *** [_gcov_fork.o] Error 1

# 1000 "/farm/dje/src/src/libgcc/libgcov.c"
pid_t
__gcov_fork (void)
{
  pid_t pid;
  extern __gthread_mutex_t __gcov_flush_mx;
  __gcov_flush ();
  pid = fork ();
  if (pid == 0)
(mx) (&__gcov_flush_mx);
  return pid;
}


Re: Swap SECTION_EXCLUDE and SECTION_MACH_DEP

2012-03-12 Thread Richard Henderson
On 03/12/12 10:26, Sriraman Tallam wrote:
> Hi Richard,
> 
>   Is this ok for trunk? Asking you because you approved the patch the
> first time around.
> 
> Thanks,
> -Sri.
> 
> On Fri, Mar 9, 2012 at 3:10 PM, Sriraman Tallam  wrote:
>> Please see:
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52545
>>
>> SECTION_EXCLUDE should not take up bits reserved for SECTION_MACH_DEP
>>
>> Patch:
>>
>>PR 52545
>>* output.h (SECTION_MACH_DEP)
>>(SECTION_EXCLUDE):  Swap values.


Yes, this patch is ok


r~


Re: Swap SECTION_EXCLUDE and SECTION_MACH_DEP

2012-03-12 Thread Sriraman Tallam
Hi Richard,

  Is this ok for trunk? Asking you because you approved the patch the
first time around.

Thanks,
-Sri.

On Fri, Mar 9, 2012 at 3:10 PM, Sriraman Tallam  wrote:
> Please see:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52545
>
> SECTION_EXCLUDE should not take up bits reserved for SECTION_MACH_DEP
>
> Patch:
>
>        PR 52545
>        * output.h (SECTION_MACH_DEP)
>        (SECTION_EXCLUDE):  Swap values.
>
>
>
> Index: output.h
> ===
> --- output.h    (revision 185120)
> +++ output.h    (working copy)
> @@ -446,8 +446,8 @@
>  #define SECTION_STYLE_MASK 0x60    /* bits used for SECTION_STYLE */
>  #define SECTION_COMMON   0x80      /* contains common data */
>  #define SECTION_RELRO   0x100      /* data is readonly after relocation
> processing */
> -#define SECTION_MACH_DEP 0x200     /* subsequent bits reserved for 
> target */
> -#define SECTION_EXCLUDE  0x400      /* discarded by the linker */
> +#define SECTION_EXCLUDE  0x200      /* discarded by the linker */
> +#define SECTION_MACH_DEP 0x400     /* subsequent bits reserved for 
> target */
>
> Ok to submit?
>
> Thanks.
> -Sri.
>
>
> On Fri, Mar 9, 2012 at 3:07 PM, Sriraman Tallam  wrote:
>>


Re: [google/4.6] Add powerpc64-grtev2-linux-gnu.xfail (issue5794044)

2012-03-12 Thread Diego Novillo
On Fri, Mar 9, 2012 at 16:54, Doug Kwan  wrote:
> Hi Diego,
>
>    This patch adds the XFAIL file for powerpc64-grtev2-linux-gnu in 4.6.
>
> -Doug
>
> 2012-03-09   Doug Kwan  
>
>        * contrib/testsuite-management/powerpc64-grtev2-linux-gnu.xfail:
>        New file.

OK.  BTW, these failures are present in vanilla ppc64 builds as well?


Diego.


[RFA/ARM]: Correct Neon testsuite generation

2012-03-12 Thread Matthew Gretton-Dann
All,

The commit to fix PR51534 did not update the testsuite (as no changes were
expected there).

Unfortunately, this means that I didn't notice that the Neon testsuite generator
is broken.  The attached patch fixes the generator.

Checked by re-running the Neon testsuite and arm_neon.h generators and ensuring 
no
changes in the generated testsuite/header.

OK for trunk?

OK for backporting to GCC 4.7?

Thanks,

Matt

gcc/ChangeLog:

2012-03-12  Matthew Gretton-Dann  

* config/arm/neon.ml (ops): Fixup expected instructions for
unsigned vector compares.
-- 
Matthew Gretton-Dann
Principal Engineer, PD Software, ARM Ltd.diff --git a/gcc/config/arm/neon.ml b/gcc/config/arm/neon.ml
index 363e55c..85eb5ec 100644
--- a/gcc/config/arm/neon.ml
+++ b/gcc/config/arm/neon.ml
@@ -780,14 +780,19 @@ let ops =
 
 (* Comparison, greater-than or equal.  *)
 Vcge, [], All (3, Dreg), "vcge", cmp_sign_matters, F32 :: s_8_32;
-Vcge, [Builtin_name "vcgeu"], All (3, Dreg), "vcge", cmp_sign_matters, 
u_8_32;
+Vcge, [Instruction_name ["vcge"]; Builtin_name "vcgeu"],
+  All (3, Dreg), "vcge", cmp_sign_matters,
+  u_8_32;
 Vcge, [], All (3, Qreg), "vcgeQ", cmp_sign_matters, F32 :: s_8_32;
-Vcge, [Builtin_name "vcgeu"], All (3, Qreg), "vcgeQ", cmp_sign_matters, 
u_8_32;
+Vcge, [Instruction_name ["vcge"]; Builtin_name "vcgeu"],
+  All (3, Qreg), "vcgeQ", cmp_sign_matters,
+  u_8_32;
 
 (* Comparison, less-than or equal.  *)
 Vcle, [Flipped "vcge"], All (3, Dreg), "vcle", cmp_sign_matters,
   F32 :: s_8_32;
-Vcle, [Flipped "vcgeu"], All (3, Dreg), "vcle", cmp_sign_matters,
+Vcle, [Instruction_name ["vcge"]; Flipped "vcgeu"],
+  All (3, Dreg), "vcle", cmp_sign_matters,
   u_8_32;
 Vcle, [Instruction_name ["vcge"]; Flipped "vcgeQ"],
   All (3, Qreg), "vcleQ", cmp_sign_matters,
@@ -798,14 +803,19 @@ let ops =
 
 (* Comparison, greater-than.  *)
 Vcgt, [], All (3, Dreg), "vcgt", cmp_sign_matters, F32 :: s_8_32;
-Vcgt, [Builtin_name "vcgtu"], All (3, Dreg), "vcgt", cmp_sign_matters, 
u_8_32;
+Vcgt, [Instruction_name ["vcgt"]; Builtin_name "vcgtu"],
+  All (3, Dreg), "vcgt", cmp_sign_matters,
+  u_8_32;
 Vcgt, [], All (3, Qreg), "vcgtQ", cmp_sign_matters, F32 :: s_8_32;
-Vcgt, [Builtin_name "vcgtu"], All (3, Qreg), "vcgtQ", cmp_sign_matters, 
u_8_32;
+Vcgt, [Instruction_name ["vcgt"]; Builtin_name "vcgtu"],
+  All (3, Qreg), "vcgtQ", cmp_sign_matters,
+  u_8_32;
 
 (* Comparison, less-than.  *)
 Vclt, [Flipped "vcgt"], All (3, Dreg), "vclt", cmp_sign_matters,
   F32 :: s_8_32;
-Vclt, [Flipped "vcgtu"], All (3, Dreg), "vclt", cmp_sign_matters,
+Vclt, [Instruction_name ["vcgt"]; Flipped "vcgtu"],
+  All (3, Dreg), "vclt", cmp_sign_matters,
   u_8_32;
 Vclt, [Instruction_name ["vcgt"]; Flipped "vcgtQ"],
   All (3, Qreg), "vcltQ", cmp_sign_matters,

Re: Remove obsolete IRIX 6.5 support

2012-03-12 Thread Bruce Korb
On Mon, Mar 12, 2012 at 10:03 AM, Rainer Orth
 wrote:

I'm happy with the stuff going away!  :)


Fix sgi typos

2012-03-12 Thread Rainer Orth
While working on the IRIX 6.5 removal patch, I came across a couple of
typos.  Fixed as follows.

Will install as obvious, I only wonder what to do about the typo in
ACATS?

Rainer


2012-03-10  Rainer Orth  

libgcc:
* config/arm/crtn.S: Fix typo.

gcc/testsuite:
* ada/acats/tests/cd/cdd1001.a (CDD1001): Fix typo.

gcc:
* config/microblaze/microblaze.md: Fix typo.
* tree-if-conv.c: Likewise.
* tree-vect-patterns.c: Likewise.

# HG changeset patch
# Parent e0cba5670633af032245b95c9efe3254a8cf9eed
Fix sgi typos

diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -1,5 +1,5 @@
 ;; microblaze.md -- Machine description for Xilinx MicroBlaze processors.
-;; Copyright 2009, 2010 Free Software Foundation, Inc.
+;; Copyright 2009, 2010, 2012 Free Software Foundation, Inc.
 
 ;; Contributed by Michael Eager .
 
@@ -1024,7 +1024,7 @@
   }
 )
 
-;; Added for status resgisters 
+;; Added for status registers
 (define_insn "movsi_status"
   [(set (match_operand:SI 0 "register_operand" "=d,d,z")
 (match_operand:SI 1 "register_operand" "z,d,d"))]
diff --git a/gcc/testsuite/ada/acats/tests/cd/cdd1001.a b/gcc/testsuite/ada/acats/tests/cd/cdd1001.a
--- a/gcc/testsuite/ada/acats/tests/cd/cdd1001.a
+++ b/gcc/testsuite/ada/acats/tests/cd/cdd1001.a
@@ -84,7 +84,7 @@ begin
 for I in B'Range loop
 	if B (I).all /= Stream_Element
 			   (Ident_Int (Integer (I)) * Ident_Int (3)) then
-	Failed ("Unable to build access values desginating elements " &
+	Failed ("Unable to build access values designating elements " &
 		"of a Stream_Element_Array");
 	end if;
 end loop;
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -1,5 +1,5 @@
 /* If-conversion for vectorizer.
-   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by Devang Patel 
 
@@ -712,7 +712,7 @@ if_convertible_gimple_assign_stmt_p (gim
 /* Return true when STMT is if-convertible.
 
A statement is if-convertible if:
-   - it is an if-convertible GIMPLE_ASSGIN,
+   - it is an if-convertible GIMPLE_ASSIGN,
- it is a GIMPLE_LABEL or a GIMPLE_COND.  */
 
 static bool
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -462,7 +462,7 @@ vect_handle_widen_op_by_const (gimple st
 
where type 'TYPE' is at least double the size of type 'type'.
 
-   Also detect unsgigned cases:
+   Also detect unsigned cases:
 
  unsigned type a_t, b_t;
  unsigned TYPE u_prod_T;
diff --git a/libgcc/config/arm/crtn.S b/libgcc/config/arm/crtn.S
--- a/libgcc/config/arm/crtn.S
+++ b/libgcc/config/arm/crtn.S
@@ -1,4 +1,4 @@
-#   Copyright (C) 2001, 2004, 2008, 2009, 2010, 2011
+#   Copyright (C) 2001, 2004, 2008, 2009, 2010, 2011, 2012
 #   Free Software Foundation, Inc.
 #   Written By Nick Clifton
 # 
@@ -47,7 +47,7 @@
 	#
 	# Note - we do not try any fancy optimizations of the return
 	# sequences here, it is just not worth it.  Instead keep things
-	# simple.  Restore all the save resgisters, including the link
+	# simple.  Restore all the save registers, including the link
 	# register and then perform the correct function return instruction.
 	# We also save/restore r3 to ensure stack alignment.
 .macro FUNC_END


-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


[Patch,AVR]: Fix PR52488 (insane stack usage)

2012-03-12 Thread Georg-Johann Lay
...and now to the right mailing list...

This patch cuts down insane stack offsets for 8-bit SP targets to a value the
involved insns can handle.

Background is that newlib generates such insane offsets (2050 bytes of stack
for a device with 128 bytes of RAM) because of extension PR51345, i.e. new
multilib variants for 8-bit SP targets.

The CFA notes still contain the original size as requested by the source so
that -Wstack-usage= will still work as intended.

The generated code will never be functional, of course, but there should never
be an ICE.

This patch is less aggressive than the patch proposed in the PR, i.e. it is
silent and does not issue an error so that newlib can still be built. If the
user wants additional sanity checking, he has to use -Wstack-usage= or similar
options.

Passed testsuite.

Ok for trunk?

Johann

PR target/52488
* config/avr/avr.c (avr_prologue_setup_frame): Cut down stack
offset (size) to a value the insns can deal with.
(expand_epilogue): Ditto.

Index: config/avr/avr.c
===
--- config/avr/avr.c	(revision 185100)
+++ config/avr/avr.c	(working copy)
@@ -827,7 +827,11 @@ avr_prologue_setup_frame (HOST_WIDE_INT
   bool isr_p = cfun->machine->is_interrupt || cfun->machine->is_signal;
   int live_seq = sequent_regs_live ();
 
+  HOST_WIDE_INT size_max
+= (HOST_WIDE_INT) GET_MODE_MASK (AVR_HAVE_8BIT_SP ? QImode : Pmode);
+
   bool minimize = (TARGET_CALL_PROLOGUES
+   && size < size_max
&& live_seq
&& !isr_p
&& !cfun->machine->is_OS_task
@@ -933,6 +937,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT
   leaf function and thus X has already been saved.  */
   
   int irq_state = -1;
+  HOST_WIDE_INT size_cfa = size;
   rtx fp_plus_insns, fp, my_fp;
 
   gcc_assert (frame_pointer_needed
@@ -951,6 +956,27 @@ avr_prologue_setup_frame (HOST_WIDE_INT
   my_fp = all_regs_rtx[FRAME_POINTER_REGNUM];
 }
 
+  /* Cut down size and avoid size = 0 so that we don't run
+ into ICE like PR52488 in the remainder.  */
+
+  if (size > size_max)
+{
+  /* Don't error so that insane code from newlib still compiles
+ and does not break building newlib.  As PR51345 is implemented
+ now, there are multilib variants with -mtiny-stack.
+ 
+ If user wants sanity checks he can use -Wstack-usage=
+ or similar options.
+
+ For CFA we emit the original, non-saturated size so that
+ the generic machinery is aware of the real stack usage and
+ will print the above diagnostic as expected.  */
+  
+  size = size_max;
+}
+
+  size = trunc_int_for_mode (size, GET_MODE (my_fp));
+  
   /  Method 1: Adjust frame pointer  /
   
   start_sequence ();
@@ -975,7 +1001,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT
   RTX_FRAME_RELATED_P (insn) = 1;
   add_reg_note (insn, REG_CFA_ADJUST_CFA,
 gen_rtx_SET (VOIDmode, fp,
- plus_constant (fp, -size)));
+ plus_constant (fp, -size_cfa)));
 }
   
   /* Copy to stack pointer.  Note that since we've already
@@ -1003,7 +1029,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT
   add_reg_note (insn, REG_CFA_ADJUST_CFA,
 gen_rtx_SET (VOIDmode, stack_pointer_rtx,
  plus_constant (stack_pointer_rtx,
--size)));
+-size_cfa)));
 }
   
   fp_plus_insns = get_insns ();
@@ -1026,7 +1052,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT
   add_reg_note (insn, REG_CFA_ADJUST_CFA,
 gen_rtx_SET (VOIDmode, stack_pointer_rtx,
  plus_constant (stack_pointer_rtx,
--size)));
+-size_cfa)));
   if (frame_pointer_needed)
 {
   insn = emit_move_insn (fp, stack_pointer_rtx);
@@ -1048,7 +1074,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT
   emit_insn (fp_plus_insns);
 }
 
-  cfun->machine->stack_usage += size;
+  cfun->machine->stack_usage += size_cfa;
 } /* !minimize && size != 0 */
 } /* !minimize */
 }
@@ -1261,6 +1287,7 @@ expand_epilogue (bool sibcall_p)
   int irq_state = -1;
   rtx fp, my_fp;
   rtx fp_plus_insns;
+  HOST_

Remove DWARF_OFFSET_SIZE, DWARF_INITIAL_LENGTH_SIZE

2012-03-12 Thread Rainer Orth
With the IRIX port gone (shortly), there are no targets that define a
non-default DWARF_OFFSET_SIZE or DWARF_INITIAL_LENGTH_SIZE any longer.
I therefore propose to remove the code handling this.

The following (pretty mechanical) patch does this.  Bootstrapped without
regressions on i386-pc-solaris2.11, ok for mainline?

Rainer


2012-03-11  Rainer Orth  

* defaults.h (DWARF_OFFSET_SIZE): Remove.
* config/sparc/freebsd.h (DWARF_OFFSET_SIZE): Remove comment.
* config/sparc/linux64.h : Remove comment.
* config/sparc/linux64.h : Likewise.
* system.h (DWARF_OFFSET_SIZE): Poison.

* dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE): Remove.
(DWARF_CIE_ID): Remove non-default DWARF_OFFSET_SIZE,
DWARF_INITIAL_LENGTH_SIZE handling.
(output_fde): Likewise.
(output_call_frame_info): Likewise.
(DWARF_REF_SIZE): Likewise.
(DWARF_COMPILE_UNIT_HEADER_SIZE): Likewise.
(DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Likeiwise.
(DWARF_PUBNAMES_HEADER_SIZE): Likewise.
(DWARF_ARANGES_HEADER_SIZE): Likewise.
(DWARF_ARANGES_PAD_SIZE): Likewise.
(AT_string_form): Likewise.
(size_of_die): Likewise.
(size_of_pubnames): Likewise.
(value_format): Likewise.
(output_die): Likewise.
(output_compilation_unit_header): Likewise.
(output_comdat_type_unit): Likewise.
(output_pubnames): Likewise.
(output_aranges): Likewise.
(output_line_info): Likewise.
(output_macinfo_op): Likewise.
(optimize_macinfo_range): Likewise.
(output_macinfo): Likewise.

(DW_FORM_data): Remove.
(DW_FORM_ref): Remove.
(value_format): Replace DW_FORM_data by DW_FORM_data4.
Replace DW_FORM_ref by DW_FORM_ref4.

# HG changeset patch
# Parent 15a86d35ec84fea1404f4ca7d5f98f602c7dd70d
Remove DWARF_OFFSET_SIZE, DWARF_INITIAL_LENGTH_SIZE

diff --git a/gcc/config/sparc/freebsd.h b/gcc/config/sparc/freebsd.h
--- a/gcc/config/sparc/freebsd.h
+++ b/gcc/config/sparc/freebsd.h
@@ -1,5 +1,5 @@
 /* Definitions for Sun SPARC64 running FreeBSD using the ELF format
-   Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2010, 2011
+   Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by David E. O'Brien  and BSDi.
 
@@ -124,15 +124,6 @@ along with GCC; see the file COPYING3.  
 #undef  DBX_CONTIN_CHAR
 #define DBX_CONTIN_CHAR	'?'
 
-/* DWARF bits.  */
-
-/* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets. 
-   Obviously the Dwarf2 folks havn't tried to actually build systems
-   with their spec.  On a 64-bit system, only 64-bit relocs become
-   RELATIVE relocations.  */
-
-/* #define DWARF_OFFSET_SIZE PTR_SIZE */
-
 #ifdef HAVE_AS_TLS
 #undef TARGET_SUN_TLS
 #undef TARGET_GNU_TLS
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -1,6 +1,6 @@
 /* Definitions for 64-bit SPARC running Linux-based GNU systems with ELF.
Copyright 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-   2009, 2010, 2011 Free Software Foundation, Inc.
+   2009, 2010, 2011, 2012 Free Software Foundation, Inc.
Contributed by David S. Miller (da...@caip.rutgers.edu)
 
 This file is part of GCC.
@@ -236,15 +236,6 @@ do {	\
 #undef  LOCAL_LABEL_PREFIX
 #define LOCAL_LABEL_PREFIX  "."
 
-/* DWARF bits.  */
-
-/* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets. 
-   Obviously the Dwarf2 folks haven't tried to actually build systems
-   with their spec.  On a 64-bit system, only 64-bit relocs become
-   RELATIVE relocations.  */
-
-/* #define DWARF_OFFSET_SIZE PTR_SIZE */
-
 #undef DITF_CONVERSION_LIBFUNCS
 #define DITF_CONVERSION_LIBFUNCS 1
 
diff --git a/gcc/defaults.h b/gcc/defaults.h
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -462,14 +462,6 @@ see the files COPYING3 and COPYING.RUNTI
 #define DWARF2_ADDR_SIZE (POINTER_SIZE / BITS_PER_UNIT)
 #endif
 
-/* The size in bytes of a DWARF field indicating an offset or length
-   relative to a debug info section, specified to be 4 bytes in the
-   DWARF-2 specification.  The SGI/MIPS ABI defines it to be the same
-   as PTR_SIZE.  */
-#ifndef DWARF_OFFSET_SIZE
-#define DWARF_OFFSET_SIZE 4
-#endif
-
 /* The size in bytes of a DWARF 4 type signature.  */
 #ifndef DWARF_TYPE_SIGNATURE_SIZE
 #define DWARF_TYPE_SIGNATURE_SIZE 8
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -162,18 +162,6 @@ static GTY(()) section *debug_frame_sect
 /* Maximum size (in bytes) of an artificially generated label.  */
 #define MAX_ARTIFICIAL_LABEL_BYTES	30
 
-/* According to the (draft) DWARF 3 specification, the initial length
-   should either be 4 or 12 bytes.  When it's 12 bytes, the first 4
-   bytes are 0x, followed by the length stored in the next 8
-   bytes.
-
-   Howev

[Patch,AVR]; PR52499 fix MODE_CODE_BASE_REG_CLASS type

2012-03-12 Thread Georg-Johann Lay
This fixes a problem if avr-gcc is built with C++

Lightly tested.

Ok for trunk?

Johann

PR target/52499
* config/avr/avr.c (avr_mode_code_base_reg_class): Change return
type from reg_class_t to enum reg_class.
* config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto.
Index: config/avr/avr-protos.h
===
--- config/avr/avr-protos.h	(revision 185099)
+++ config/avr/avr-protos.h	(working copy)
@@ -115,7 +115,7 @@ extern int avr_simplify_comparison_p (en
 extern RTX_CODE avr_normalize_condition (RTX_CODE condition);
 extern void out_shift_with_cnt (const char *templ, rtx insn,
 rtx operands[], int *len, int t_len);
-extern reg_class_t avr_mode_code_base_reg_class (enum machine_mode, addr_space_t, RTX_CODE, RTX_CODE);
+extern enum reg_class avr_mode_code_base_reg_class (enum machine_mode, addr_space_t, RTX_CODE, RTX_CODE);
 extern bool avr_regno_mode_code_ok_for_base_p (int, enum machine_mode, addr_space_t, RTX_CODE, RTX_CODE);
 extern rtx avr_incoming_return_addr_rtx (void);
 extern rtx avr_legitimize_reload_address (rtx*, enum machine_mode, int, int, int, int, rtx (*)(rtx,int));
Index: config/avr/avr.c
===
--- config/avr/avr.c	(revision 185100)
+++ config/avr/avr.c	(working copy)
@@ -8983,7 +8983,7 @@ avr_hard_regno_mode_ok (int regno, enum
 
 /* Implement `MODE_CODE_BASE_REG_CLASS'.  */
 
-reg_class_t
+enum reg_class
 avr_mode_code_base_reg_class (enum machine_mode mode ATTRIBUTE_UNUSED,
   addr_space_t as, RTX_CODE outer_code,
   RTX_CODE index_code ATTRIBUTE_UNUSED)


Re: Remove non-GAS non-ELF support in alpha backend

2012-03-12 Thread Richard Henderson
On 03/12/12 09:57, Joseph S. Myers wrote:
> I wonder whether it will be possible for a future cleanup to make alpha 
> targets use toplevel elfos.h, and for Alpha GNU/Linux toplevel gnu-user.h 
> and linux.h as well?

Probably we can, at least to a fairly large degree.


r~


Re: Remove non-GAS non-ELF support in alpha backend

2012-03-12 Thread Joseph S. Myers
On Mon, 12 Mar 2012, Rainer Orth wrote:

> While having the osf removal patch reviewed, it turned out that with the
> last non-gas non-ELF alpha port gone, there's considerable cleanup
> potential in the alpha backend.  The following patch implements this:

I wonder whether it will be possible for a future cleanup to make alpha 
targets use toplevel elfos.h, and for Alpha GNU/Linux toplevel gnu-user.h 
and linux.h as well?

-- 
Joseph S. Myers
jos...@codesourcery.com


Re: PATCH: Call gen_tls_global_dynamic_64_ and en_tls_local_dynamic_base_64_

2012-03-12 Thread H.J. Lu
On Mon, Mar 12, 2012 at 12:46 AM, Uros Bizjak  wrote:
> On Mon, Mar 12, 2012 at 12:26 AM, H.J. Lu  wrote:
>
>> Pmode may be DImode for x32.  This patch calls
>> gen_tls_global_dynamic_64_ and gen_tls_local_dynamic_base_64_,
>> depending on Pmode.  Tested on Linux/x86-64.  OK for trunk?
>>
>> 2012-03-11  H.J. Lu  
>>
>>        * config/i386/i386.c (legitimize_tls_address): Call
>>        gen_tls_global_dynamic_64_ and
>>        gen_tls_local_dynamic_base_64_, depending on Pmode.
>>
>>        * config/i386/i386.md (*tls_global_dynamic_64): Renamed to ...
>>        (*tls_global_dynamic_64_): This.
>>        (tls_global_dynamic_64): Renamed to ...
>>        (tls_global_dynamic_64_): This.
>>        (*tls_local_dynamic_base_64): Renamed to ...
>>        (*tls_local_dynamic_base_64): This.
>>        (tls_local_dynamic_base_64): Renamed to ...
>>        (tls_local_dynamic_base_64): This.
>>
>> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
>> index d673101..fc8fa12 100644
>> --- a/gcc/config/i386/i386.c
>> +++ b/gcc/config/i386/i386.c
>> @@ -12533,7 +12543,12 @@ legitimize_tls_address (rtx x, enum tls_model 
>> model, bool for_mov)
>>              rtx rax = gen_rtx_REG (Pmode, AX_REG), insns;
>>
>>              start_sequence ();
>> -             emit_call_insn (gen_tls_global_dynamic_64 (rax, x, caddr));
>> +             if (Pmode == DImode)
>> +               emit_call_insn (gen_tls_global_dynamic_64_di (rax, x,
>> +                                                             caddr));
>> +             else
>> +               emit_call_insn (gen_tls_global_dynamic_64_si (rax, x,
>> +                                                             caddr));
>>              insns = get_insns ();
>>              end_sequence ();
>>
>> @@ -12581,7 +12596,12 @@ legitimize_tls_address (rtx x, enum tls_model 
>> model, bool for_mov)
>>              rtx rax = gen_rtx_REG (Pmode, AX_REG), insns, eqv;
>>
>>              start_sequence ();
>> -             emit_call_insn (gen_tls_local_dynamic_base_64 (rax, caddr));
>> +             if (Pmode == DImode)
>> +               emit_call_insn (gen_tls_local_dynamic_base_64_di (rax,
>> +                                                                 caddr));
>> +             else
>> +               emit_call_insn (gen_tls_local_dynamic_base_64_si (rax,
>> +                                                                 caddr));
>>              insns = get_insns ();
>>              end_sequence ();
>
> Please use indirect functions here, see many examples in the code.
>
> OK with this change.
>
> Thanks,
> Uros.

This is the patch I checked in.

Thanks.


-- 
H.J.
---
2012-03-12  H.J. Lu  

* config/i386/i386.c (ix86_gen_tls_global_dynamic_64): New.
(ix86_gen_tls_local_dynamic_base_64): Likewise.
(ix86_option_override_internal): Set ix86_gen_tls_global_dynamic_64
and ix86_gen_tls_local_dynamic_base_64.
(legitimize_tls_address): Use ix86_gen_tls_global_dynamic_64 and
ix86_gen_tls_local_dynamic_base_64.

* config/i386/i386.md (*tls_global_dynamic_64): Renamed to ...
(*tls_global_dynamic_64_): This.
(tls_global_dynamic_64): Renamed to ...
(tls_global_dynamic_64_): This.
(*tls_local_dynamic_base_64): Renamed to ...
(*tls_local_dynamic_base_64_): This.
(tls_local_dynamic_base_64): Renamed to ...
(tls_local_dynamic_base_64_): This.
2012-03-12  H.J. Lu  

* config/i386/i386.c (ix86_gen_tls_global_dynamic_64): New.
(ix86_gen_tls_local_dynamic_base_64): Likewise.
(ix86_option_override_internal): Set ix86_gen_tls_global_dynamic_64
and ix86_gen_tls_local_dynamic_base_64.
(legitimize_tls_address): Use ix86_gen_tls_global_dynamic_64 and
ix86_gen_tls_local_dynamic_base_64.

* config/i386/i386.md (*tls_global_dynamic_64): Renamed to ...
(*tls_global_dynamic_64_): This.
(tls_global_dynamic_64): Renamed to ...
(tls_global_dynamic_64_): This.
(*tls_local_dynamic_base_64): Renamed to ...
(*tls_local_dynamic_base_64_): This.
(tls_local_dynamic_base_64): Renamed to ...
(tls_local_dynamic_base_64_): This.

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index d85dc25..dbcf5a9 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2444,6 +2444,8 @@ static rtx (*ix86_gen_andsp) (rtx, rtx, rtx);
 static rtx (*ix86_gen_allocate_stack_worker) (rtx, rtx);
 static rtx (*ix86_gen_adjust_stack_and_probe) (rtx, rtx, rtx);
 static rtx (*ix86_gen_probe_stack_range) (rtx, rtx, rtx);
+static rtx (*ix86_gen_tls_global_dynamic_64) (rtx, rtx, rtx);
+static rtx (*ix86_gen_tls_local_dynamic_base_64) (rtx, rtx);
 
 /* Preferred alignment for stack boundary in bits.  */
 unsigned int ix86_preferred_stack_boundary;
@@ -3754,9 +3756,19 @@ ix86_option_override_internal (bool main_args_p)
 {
   ix86_gen_leave = gen_leave_rex64;
   if (Pmode == DImode)
- 

Re: [PR51752] publication safety violations in loop invariant motion pass

2012-03-12 Thread Aldy Hernandez

On 03/10/12 08:14, Torvald Riegel wrote:

On Fri, 2012-03-09 at 15:48 -0600, Aldy Hernandez wrote:

Torvald is this what you were thinking of?


Yes, but with an exit in the else branch or something that can cause x
not being read after the condition.  I _suppose_ that your original
example would be an allowed transformation but just because x would be
read anyway independently of flag's value; we can assume data-race
freedom, and thus we must be able to read x in a data-race-free way even
if flag is false, so flag's value actually doesn't matter.

What about modifying the example like below?  In this case, if flag2 is
true, flag's value will matter and we can't move the load to x before
it.  Will PRE still introduce "tmp = x + 4" in such an example?

Torvald


+  __transaction_atomic {
+if (flag)
+  y = x + 4;
+else
+  // stuff

  if (flag2)
return;

+z = x + 4;
+  }


Hmmm, by adding the exit, PRE introduces the read of "x + 4" correctly 
*after* the read of flag2, so something like this:


__transaction_atomic {
if (flag) {
tmp = x + 4;
y = tmp;
} else {
if (flag2)
return;
tmp = x + 4;
}
z = tmp;

So... by your logic, this is allowed because the read of "x" would 
happen anyway (it is not inserted in the "flag2 != 0" case).


I'm back to having no testcase, so perhaps I should drop this patch 
until we can come up with a PRE testcase that actually triggers a 
publication safety violation.


Richi, you mentioned partial PRE inserting code into code paths that 
previously did not have reads.  Do you have an example?  As much as I 
tried, I could not trigger a partial PRE, but that may be because I 
don't understand the algorithm very well.


Thanks guys.
Aldy


Re: Remove obsolete Tru64 UNIX V5.1B support

2012-03-12 Thread Rainer Orth
David Daney  writes:

> On 03/06/2012 05:14 AM, Rainer Orth wrote:
>> "Joseph S. Myers"  writes:
>>
There's one particular issue: the change to java/io/File.java required
my to regenerate the .class file in classpath.  I've used Sun javac
-target 1.5 for that and hope I got it right.
>>>
>>> I'd have expected regeneration to use GCJ built to use ECJ, though I don't
>>> know.
>>
>> I've never tried this.  Given that the .class file lives below
>> libjava/classpath and has to be synced with upstream Classpath anyway, I
>> hope the Java maintainers will take care of that.
>>
>
> This it documented (although perhaps badly) in install/configure.html
>
> You should use --enable-java-maintainer-mode, this will cause the build to
> use ecj and gjavah to regenerate all the generated files in the 'standard'
> manner.

I tried that route, but failed: even with ecj1 and gjavah scripts in
PATH, I get

/var/gcc/gcc-4.8.0-20120309/11-gcc/./gcc/gcj 
-B/var/gcc/gcc-4.8.0-20120309/11-gcc/i386-pc-solaris2.11/amd64/libjava/ 
-B/var/gcc/gcc-4.8.0-20120309/11-gcc/i386-pc-solaris2.11/amd64/libjava/ 
-B/var/gcc/gcc-4.8.0-20120309/11-gcc/./gcc/ 
-B/usr/local/i386-pc-solaris2.11/bin/ -B/usr/local/i386-pc-solaris2.11/lib/ 
-isystem /usr/local/i386-pc-solaris2.11/include -isystem 
/usr/local/i386-pc-solaris2.11/sys-include  -m64 -C -g  -fsource=1.5 
-ftarget=1.5 --bootclasspath='' 
--classpath=/vol/gcc/src/hg/trunk/solaris/libjava:/var/gcc/gcc-4.8.0-20120309/11-gcc/i386-pc-solaris2.11/amd64/libjava:/vol/gcc/src/hg/trunk/solaris/libjava/classpath:/vol/gcc/src/hg/trunk/solaris/libjava/classpath/external/w3c_dom:/vol/gcc/src/hg/trunk/solaris/libjava/classpath/external/sax:/vol/gcc/src/hg/trunk/solaris/libjava/classpath/external/relaxngDatatype:/vol/gcc/src/hg/trunk/solaris/libjava/classpath/external/jsr166:.::
 -d /vol/gcc/src/hg/trunk/solaris/libjava/classpath/lib @classes
no classpath specified
make[6]: *** [compile-classes] Error 1

I gave up and checked in the File.class file produced with Sun javac.

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: Remove non-GAS non-ELF support in alpha backend

2012-03-12 Thread Richard Henderson
On 03/12/12 09:22, Rainer Orth wrote:
> There are only two issues:
> 
> * In alpha.c (alpha_option_override), it's unclear if the optimize > 0
>   test can be removed completely.

Yeah, I guess leave that for now.

> * During testing, I ran into this error:
> 
>   alpha.md:5861: `*builtin_setjmp_receiver_er_1' matches 
> `*builtin_setjmp_receiver_er_sl_1'
>   alpha.md:5856: previous definition of `*builtin_setjmp_receiver_er_sl_1'

Delete builtin_setjmp_receiver_er_1, which ought to have had && 
!TARGET_AS_CAN_SUBTRACT_LABELS,
but since patterns are matched in order, was implied by the filtering of the 
previous pattern.


r~


Re: Remove obsolete Tru64 UNIX V5.1B support

2012-03-12 Thread Rainer Orth
Paolo Carlini  writes:

> On 03/12/2012 05:06 PM, Rainer Orth wrote:
>> I think the remaining changes are either obvious or covered by osf or
>> testsuite maintainerships, so I've applied the patch. Thanks. Rainer
> Thanks, but please remove all the spurious 'libstdc++v3' from the
> ChangeLog entry and make sure it's wrapped to 80 columns.

Oops, sorry, will do ASAP.

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Remove non-GAS non-ELF support in alpha backend

2012-03-12 Thread Rainer Orth
While having the osf removal patch reviewed, it turned out that with the
last non-gas non-ELF alpha port gone, there's considerable cleanup
potential in the alpha backend.  The following patch implements this:

* HAVE_STAMP_H was only defined by osf5.h, not configure, so the code is
  stale.

* All remaining alpha targets use gas, so TARGET_GAS and MASK_GAS can
  go.  I keep -mgas as a no-op, but completely remove -malpha-as which
  can only ever have been used on osf.

* Likewise, all references to ECOFF can be removed, every port that
  remains is ELF.

* AFAICS, the remaining ports use DWARF exclusively, so {SDB, DBX,
  MIPS}_DEBUGGING_INFO references can be removed.

There are only two issues:

* In alpha.c (alpha_option_override), it's unclear if the optimize > 0
  test can be removed completely.

* During testing, I ran into this error:

  alpha.md:5861: `*builtin_setjmp_receiver_er_1' matches 
`*builtin_setjmp_receiver_er_sl_1'
  alpha.md:5856: previous definition of `*builtin_setjmp_receiver_er_sl_1'

  The condition was the same before I remove the &&
  TARGET_AS_CAN_SUBTRACT_LABELS, actually, but to allow the patch to
  build, I'm adding && 1 for the moment.  No idea what's the proper fix.

Tested with i386-solaris2.11 x alpha-freebsd6.0 and i386-solaris2.11 x
alpha-vms C-only crosses.

Ok for mainline?

Rainer


2012-03-09  Rainer Orth  

gcc:
* config/alpha/alpha.c [HAVE_STAMP_H]: Remove.
(alpha_file_start) [MS_STAMP]: Remove.

* config/alpha/elf.h (TARGET_GAS): Remove.
* config/alpha/freebsd.h (TARGET_DEFAULT): Remove.
* config/alpha/linux.h (TARGET_DEFAULT): Remove.
* config/alpha/netbsd.h (TARGET_DEFAULT): Remove.
* config/alpha/vms.h (TARGET_DEFAULT): Remove MASK_GAS.
* config.gcc (alpha*-*-linux*): Remove target_cpu_default.
(alpha*-*-freebsd*): Likewise.
(alpha*-*-netbsd*): Likewise.
(alpha*-*-openbsd*): Likewise.
(alpha*-*-*): Remove target_cpu_default2.
* config/alpha/alpha.c (alpha_output_filename): Remove !TARGET_GAS
handling.
* config/alpha/alpha.h (TARGET_AS_CAN_SUBTRACT_LABELS): Remove.
(TARGET_AS_SLASH_BEFORE_SUFFIX): Remove.
* config/alpha/alpha.c (print_operand): Always assume
TARGET_AS_SLASH_BEFORE_SUFFIX.
* config/alpha/alpha.md ("*builtin_setjmp_receiver_er_sl_1"):
Remove TARGET_AS_CAN_SUBTRACT_LABELS.
* config/alpha/alpha.opt (malpha-as): Remove.
(mgas): Ignore.
* doc/invoke.texi (Option Summary, DEC Alpha Options): Remove
-malpha-as, -mgas.
Remove DEC Unix reference.

* config/alpha/alpha.h (OBJECT_FORMAT_COFF): Remove.
(EXTENDED_COFF): Remove.
* config/alpha/elf.h (OBJECT_FORMAT_COFF): Don't undef.
(EXTENDED_COFF): Don't undef.
* config/alpha/alpha.c (alpha_file_start): Always assume
OBJECT_FORMAT_ELF.
[!OBJECT_FORMAT_ELF]: Remove.

* config/alpha/alpha.h (SDB_DEBUGGING_INFO): Remove.
(DBX_DEBUGGING_INFO): Remove.
(MIPS_DEBUGGING_INFO): Remove.
(PREFERRED_DEBUGGING_TYPE): Remove.
(DBX_OUTPUT_SOURCE_LINE): Remove.
(SDB_OUTPUT_SOURCE_LINE): Remove.
(DBX_CONTIN_LENGTH): Remove.
(NO_DBX_FUNCTION_END): Remove.
(ASM_STABS_OP): Remove.
(ASM_STABN_OP): Remove.
(ASM_STABD_OP): Remove.
(SDB_ALLOW_FORWARD_REFERENCES): Remove.
(SDB_ALLOW_UNKNOWN_REFERENCES): Remove.
(PUT_SDB_DEF): Remove.
(PUT_SDB_PLAIN_DEF): Remove.
(PUT_SDB_TYPE): Remove.
(sdb_label_count): Remove.
(PUT_SDB_BLOCK_START): Remove.
(PUT_SDB_BLOCK_END): Remove.
(PUT_SDB_FUNCTION_START): Remove.
(PUT_SDB_FUNCTION_END): Remove.
(PUT_SDB_EPILOGUE_END): Remove.
* config/alpha/elf.h (SDB_DEBUGGING_INFO): Don't undef.
(MIPS_DEBUGGING_INFO): Don't undef.
(DBX_DEBUGGING_INFO): Don't undef.
* config/alpha/vms.h (SDB_DEBUGGING_INFO): Don't undef.
(MIPS_DEBUGGING_INFO): Don't undef.
(DBX_DEBUGGING_INFO): Don't undef.
* config/alpha/freebsd.h (DBX_CONTIN_CHAR): Remove.
* config/alpha/alpha.c (alpha_option_override): Remove SDB_DEBUG
handling.
(alpha_start_function): Likewise.
(sdb_label_count): Remove.
(alpha_output_filename): Remove DBX_DEBUG handling.
(alpha_file_start): Likewise.

# HG changeset patch
# Parent d29db3ec27f94b839c51faadd5c8c42c56066a09
Remove non-GAS non-ELF support in alpha backend

diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -761,25 +761,21 @@ case ${target} in
 alpha*-*-linux*)
 	tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
 	extra_options="${extra_options} alpha/elf.opt"
-	target_cpu_default="MASK_GAS"
 	;;
 alpha*-*-freebsd*)
 	tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd

Re: [C++ Patch] for c++/52465

2012-03-12 Thread Fabien Chêne
Salut Dodji,

2012/3/12 Dodji Seketeli :
[...]
>> Index: gcc/cp/decl.c
>> ===
>> --- gcc/cp/decl.c     (revision 184891)
>> +++ gcc/cp/decl.c     (working copy)
>> @@ -8686,6 +8686,9 @@ grokdeclarator (const cp_declarator *dec
>>        type = NULL_TREE;
>>        type_was_error_mark_node = true;
>>      }
>> +
>> +  type = strip_using_decl (type);
>> +
>
> I am a little bit curious as to why this change is necessary.  It seems
> to me that the test case of your patch would pass even without this
> change, wouldn't it?

Yes, this testcase would pass, but an existing testcase wouldn't. I
don't remeber which one, but I think it was related to using
declarations that refer to a typedef.

struct A { typedef int T; };
stuct B : A { using B::T; };

-- 
Fabien


Re: Remove obsolete Tru64 UNIX V5.1B support

2012-03-12 Thread Paolo Carlini
On 03/12/2012 05:06 PM, Rainer Orth wrote:
> I think the remaining changes are either obvious or covered by osf or
> testsuite maintainerships, so I've applied the patch. Thanks. Rainer
Thanks, but please remove all the spurious 'libstdc++v3' from the
ChangeLog entry and make sure it's wrapped to 80 columns.

Thanks,
Paolo.


[build] Remove extra_passes

2012-03-12 Thread Rainer Orth
As suggested, this patch removes the now unused extra_passes mechanism.

Bootstrapped with no regressions on i386-pc-solaris2.11, ok for
mainline?

Rainer


2012-03-09  Rainer Orth  

* config.gcc (extra_passes): Remove.
* configure.ac (extra_passes): Don't substitute.
* configure: Regenerate.
* Makefile.in (EXTRA_PASSES): Remove.
(GCC_PASSES): Remove $(EXTRA_PASSES).
(MOSTLYCLEANFILES): Likewise.
(native): Likewise.
(install-common): Likewise.

# HG changeset patch
# Parent 72aa91c9cd9c14a295c4c4f7c8e60b83e9ce7f2f
Remove extra_passes

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -670,11 +670,8 @@ INHIBIT_LIBC_CFLAGS = -Dinhibit_libc
 endif
 
 # List of extra executables that should be compiled for this target machine
-# that are used for compiling from source code to object code.
+# that are used when linking.
 # The rules for compiling them should be in the t-* file for the machine.
-EXTRA_PASSES =@extra_passes@
-
-# Like EXTRA_PASSES, but these are used when linking.
 EXTRA_PROGRAMS = @extra_programs@
 
 # List of extra object files that should be compiled and linked with
@@ -724,7 +721,7 @@ COMPILERS = cc1$(exeext) @all_compilers@
 
 # List of things which should already be built whenever we try to use xgcc
 # to compile anything (without linking).
-GCC_PASSES=xgcc$(exeext) cc1$(exeext) specs $(EXTRA_PASSES)
+GCC_PASSES=xgcc$(exeext) cc1$(exeext) specs
 
 # Directory to link to, when using the target `maketest'.
 DIR = ../gcc
@@ -1481,7 +1478,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-con
  tm-preds.h tm-constrs.h checksum-options \
  tree-check.h min-insn-modes.c insn-modes.c insn-modes.h \
  genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \
- xgcc$(exeext) cpp$(exeext) cc1$(exeext) $(EXTRA_PASSES) \
+ xgcc$(exeext) cpp$(exeext) cc1$(exeext) \
  $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
  $(SPECS) collect2$(exeext) gcc-ar$(exeext) gcc-nm$(exeext) \
  gcc-ranlib$(exeext) \
@@ -1717,7 +1714,7 @@ rest.encap: lang.rest.encap
 # This is what is made with the host's compiler
 # whether making a cross compiler or not.
 native: config.status auto-host.h build-@POSUB@ $(LANGUAGES) \
-	$(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(COLLECT2) lto-wrapper$(exeext) \
+	$(EXTRA_PROGRAMS) $(COLLECT2) lto-wrapper$(exeext) \
 	gcc-ar$(exeext) gcc-nm$(exeext) gcc-ranlib$(exeext)
 
 ifeq ($(enable_plugin),yes)
@@ -4561,7 +4558,7 @@ install-common: native lang.install-comm
 	  else true; \
 	  fi; \
 	done
-	for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(COLLECT2) ..; do \
+	for file in $(EXTRA_PROGRAMS) $(COLLECT2) ..; do \
 	  if [ x"$$file" != x.. ]; then \
 	rm -f $(DESTDIR)$(libexecsubdir)/$$file; \
 	$(INSTALL_PROGRAM) $$file $(DESTDIR)$(libexecsubdir)/$$file; \
diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -129,10 +129,8 @@
 #			such a system header; otherwise "none", do not
 #			provide such a header at all.
 #
-#  extra_passes		List of extra executables compiled for this target
-#			machine, used for compiling from source to object.
-#
-#  extra_programs	Like extra_passes, but these are used when linking.
+#  extra_programs	List of extra executables compiled for this target
+#			machine, used when linking.
 #
 #  extra_options	List of target-dependent .opt files.
 #
@@ -205,7 +203,6 @@ user_headers_inc_next_pre=
 user_headers_inc_next_post=
 use_gcc_tgmath=yes
 use_gcc_stdint=none
-extra_passes=
 extra_programs=
 extra_objs=
 extra_gcc_objs=
diff --git a/gcc/configure.ac b/gcc/configure.ac
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4974,7 +4974,6 @@ AC_SUBST(user_headers_inc_next_pre)
 AC_SUBST(user_headers_inc_next_post)
 AC_SUBST(extra_headers_list)
 AC_SUBST(extra_objs)
-AC_SUBST(extra_passes)
 AC_SUBST(extra_programs)
 AC_SUBST(float_h_file)
 AC_SUBST(gcc_config_arguments)


-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: PATCH: Properly set ix86_gen_leave and ix86_gen_monitor

2012-03-12 Thread H.J. Lu
On Mon, Mar 12, 2012 at 12:40 AM, Uros Bizjak  wrote:
> On Mon, Mar 12, 2012 at 12:02 AM, H.J. Lu  wrote:
>
>> leave_rex64 works on DImode and sse3_monitor64 works on Pmode.  This
>> patch properly sets ix86_gen_leave and ix86_gen_monitor, depending on
>> TARGET_64BIT and Pmode.  Tested on Linux/x86-64.  OK for trunk?
>>
>> 2012-03-11  H.J. Lu  
>>
>>        * config/i386/i386.c (ix86_option_override_internal): Properly
>>        set ix86_gen_leave and ix86_gen_monitor.  Check Pmode == DImode.
>>
>>        * config/i386/sse.md (sse3_monitor64): Renamed to ...
>>        (sse3_monitor64_): This.
>
> Please provide more descriptive ChangeLog. You are changing the check
> on quite some global variables, please state them explicitly.

Here is the ChangeLog entry I checked in.

> Otherwise the patch is OK.
>
> BTW: I sincerely hope you reviewed all the places where these globals
> are used...
>
> Uros.

I verified that those ix86_gen_xxx function pointers I changed to
check Pmode == DImode are used to work on Pmode, like
stack or pointers.

Thanks.

-- 
H.J.
---
2012-03-12  H.J. Lu  

* config/i386/i386.c (ix86_option_override_internal): Properly
set ix86_gen_leave and ix86_gen_monitor.  Check Pmode == DImode,
instead of TARGET_64BIT, to set ix86_gen_add3, ix86_gen_sub3,
ix86_gen_one_cmpl2, ix86_gen_andsp,
ix86_gen_allocate_stack_worker, ix86_gen_adjust_stack_and_probe
and ix86_gen_probe_stack_range.

* config/i386/sse.md (sse3_monitor64): Renamed to ...
(sse3_monitor64_): This.


Re: Remove obsolete OpenBSD/MIPS support

2012-03-12 Thread Rainer Orth
Richard Sandiford  writes:

> Rainer Orth  writes:
>> I'm currently working on removing the obsolete Tru64 UNIX and IRIX
>> ports.  When IRIX is gone, the obsoleted OpenBSD/MIPS is the only
>> remaining port that uses MIPS_DEBUGGING_INFO (which I plan to remove as
>> a followup once IRIX is gone).
>>
>> The following patch has been included in a i386-pc-solaris2.10 bootstrap
>> to make sure that no obvious syntactic errors have crept in.
>>
>> Ok for mainline?
>
> Definitely.  Thanks for saving me the legwork :-)
>
> There are also some SDB_OUTPUT_SOURCE_LINE references in mips.c and
> mips.h that could go.  Removing those is preapproved if you want to
> do it as part of the same patch, otherwise I can do it this weekend.

Here's what I've installed.  The patch was bootstrapped (together with a
bunch of other removal patches to be submitted shortly) on
i386-pc-solaris2.11 and tested on an i386-solaris2.11 x mips-elf C-only
cross to make sure cc1 still builds.

Rainer


2012-02-24  Rainer Orth  

libgcc:
* config.host (mips*-*-openbsd*): Remove.

gcc:
* config.gcc (mips*-*-openbsd*): Remove.
* config/mips/openbsd.h: Remove.
* config/mips/sdb.h: Remove.

* config/mips/mips.h (SDB_OUTPUT_SOURCE_LINE): Remove.
* config/mips/mips.c (sdb_label_count): Remove.
(mips_debugger_offset): Remove #if 0 code.
(mips_output_function_prologue) [SDB_DEBUGGING_INFO]: Remove.
* config/mips/sde.h (SDB_DEBUGGING_INFO): Don't undef.

contrib:
* config-list.mk (LIST): Remove mips-openbsd.

# HG changeset patch
# Parent 629d4a30bc2bbb27d12aa73bd6e0221cecf83144
Remove obsolete OpenBSD/MIPS support

diff --git a/contrib/config-list.mk b/contrib/config-list.mk
--- a/contrib/config-list.mk
+++ b/contrib/config-list.mk
@@ -39,7 +39,7 @@ LIST = alpha-linux-gnu alpha-freebsd6 al
   mips-sgi-irix6.5OPT-with-stabsOPT-enable-threads=posixOPT-enable-obsolete \
   mips-netbsd \
   mips64el-st-linux-gnu mips64octeon-linux mipsisa64r2-linux \
-  mipsisa32r2-linux-gnu mips-openbsd mipsisa64r2-sde-elf mipsisa32-elfoabi \
+  mipsisa32r2-linux-gnu mipsisa64r2-sde-elf mipsisa32-elfoabi \
   mipsisa64-elfoabi mipsisa64r2el-elf mipsisa64sr71k-elf mipsisa64sb1-elf \
   mipsel-elf mips64-elf mips64vr-elf mips64orion-elf mips-rtems \
   mips-wrs-vxworks mipstx39-elf mmix-knuth-mmixware mn10300-elf moxie-elf \
diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -251,7 +251,6 @@ case ${target} in
  | arm*-*-uclinux*			\
  | arm*-wince-pe*			\
  | mips-sgi-irix6.5			\
- | mips*-*-openbsd*			\
  | score-*\
  | *-*-solaris2.8*			\
  )
@@ -1744,17 +1743,6 @@ mips*-*-linux*)# Linux MIPS, either 
 esac
 	test x$with_llsc != x || with_llsc=yes
 	;;
-mips*-*-openbsd*)
-	tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_OBJECT OBSD_HAS_CORRECT_SPECS"
-	target_cpu_default="MASK_ABICALLS"
-	tm_file="mips/mips.h openbsd.h openbsd-stdint.h openbsd-libpthread.h mips/openbsd.h mips/sdb.h"
-	extra_options="${extra_options} openbsd.opt"
-	case ${target} in
-	mips*el-*-openbsd*)
-	tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0";;
-	*)  tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_ENDIAN";;
-esac
-	;;
 mips*-sde-elf*)
 	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/sde.h"
 	tmake_file="mips/t-sde"
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -494,9 +494,6 @@ int num_source_filenames;
written anything yet.  */
 const char *current_function_file = "";
 
-/* A label counter used by PUT_SDB_BLOCK_START and PUT_SDB_BLOCK_END.  */
-int sdb_label_count;
-
 /* Arrays that map GCC register numbers to debugger register numbers.  */
 int mips_dbx_regno[FIRST_PSEUDO_REGISTER];
 int mips_dwarf_regno[FIRST_PSEUDO_REGISTER];
@@ -8114,13 +8111,6 @@ mips_debugger_offset (rtx addr, HOST_WID
 	offset += cfun->machine->frame.hard_frame_pointer_offset;
 }
 
-  /* sdbout_parms does not want this to crash for unrecognized cases.  */
-#if 0
-  else if (reg != arg_pointer_rtx)
-fatal_insn ("mips_debugger_offset called with non stack/frame/arg pointer",
-		addr);
-#endif
-
   return offset;
 }
 
@@ -10129,11 +10119,6 @@ mips_output_function_prologue (FILE *fil
 {
   const char *fnname;
 
-#ifdef SDB_DEBUGGING_INFO
-  if (debug_info_level != DINFO_LEVEL_TERSE && write_symbols == SDB_DEBUG)
-SDB_OUTPUT_SOURCE_LINE (file, DECL_SOURCE_LINE (current_function_decl));
-#endif
-
   /* In MIPS16 mode, we may need to generate a non-MIPS16 stub to handle
  floating-point arguments.  */
   if (TARGET_MIPS16
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2551,10 +2551,6 @@ do	\
   }	\
 while (0)
 
-/* Use .loc directives for SDB line numbers.  */
-#define SDB_OUTPUT_SOURCE_LINE(STREAM, LINE)			\
-  f

[VMS/committed]: Fix ABI issue on vms/ia64

2012-03-12 Thread Tristan Gingold
Hi,

ia64/VMS doesn't closely follow the 'standard' ia64 ABI (in order to be 
backward compatible with VAX).
We recently found one mismatch while passing FP parameters.

Manually tested and checked - no test case added as this require another 
compiler to test.

Committed on trunk.

Tristan.

2012-03-12  Tristan Gingold  

* config/ia64/ia64.c (ia64_function_arg_1): Move code around.
(ia64_function_arg_advance): Ditto.

Index: gcc/config/ia64/ia64.c
===
--- gcc/config/ia64/ia64.c  (revision 185231)
+++ gcc/config/ia64/ia64.c  (working copy)
@@ -4491,6 +4491,15 @@
   if (cum->words + offset >= MAX_ARGUMENT_SLOTS)
 return 0;
 
+  /* On OpenVMS argument is either in Rn or Fn.  */
+  if (TARGET_ABI_OPEN_VMS)
+{
+  if (FLOAT_MODE_P (mode))
+   return gen_rtx_REG (mode, FR_ARG_FIRST + cum->words);
+  else
+   return gen_rtx_REG (mode, basereg + cum->words);
+}
+
   /* Check for and handle homogeneous FP aggregates.  */
   if (type)
 hfa_mode = hfa_element_mode (type, 0);
@@ -4577,15 +4586,6 @@
   return gen_rtx_PARALLEL (mode, gen_rtvec_v (i, loc));
 }
   
-  /* On OpenVMS variable argument is either in Rn or Fn.  */
-  else if (TARGET_ABI_OPEN_VMS && named == 0)
-{
-  if (FLOAT_MODE_P (mode))
-   return gen_rtx_REG (mode, FR_ARG_FIRST + cum->words);
-  else
-   return gen_rtx_REG (mode, basereg + cum->words);
-}
-
   /* Integral and aggregates go in general registers.  If we have run out of
  FR registers, then FP values must also go in general registers.  This can
  happen when we have a SFmode HFA.  */
@@ -4736,6 +4736,14 @@
   cum->atypes[cum->words] = ia64_arg_type (mode);
   cum->words += words + offset;
 
+  /* On OpenVMS argument is either in Rn or Fn.  */
+  if (TARGET_ABI_OPEN_VMS && named == 0)
+{
+  cum->int_regs = cum->words;
+  cum->fp_regs = cum->words;
+  return;
+}
+
   /* Check for and handle homogeneous FP aggregates.  */
   if (type)
 hfa_mode = hfa_element_mode (type, 0);
@@ -4776,13 +4784,6 @@
   cum->fp_regs = fp_regs;
 }
 
-  /* On OpenVMS variable argument is either in Rn or Fn.  */
-  else if (TARGET_ABI_OPEN_VMS && named == 0)
-{
-  cum->int_regs = cum->words;
-  cum->fp_regs = cum->words;
-}
-
   /* Integral and aggregates go in general registers.  So do TFmode FP values.
  If we have run out of FR registers, then other FP values must also go in
  general registers.  This can happen when we have a SFmode HFA.  */


Re: [PATCH][1/n] No longer sign-extend sizetype constants, remove TYPE_IS_SIZETYPE

2012-03-12 Thread Richard Guenther
On Fri, 9 Mar 2012, Eric Botcazou wrote:

> > Well.  I suppose fixing that negative DECL_FIELD_OFFSET thing should
> > be #1 priority.
> 
> Tentative patch attached (you need an up-to-date tree).  We cannot really get 
> rid of the negative offsets for thin pointers, so the patch pulls them out of 
> record types and uses pointer arithmetics instead.

Thanks.  That seems to get me into Ada bootstrap land together with
the following two patches applied (but not when I apply only the
first patch due to the stale TREE_OVERFLOW bits on type/decl sizes).

Richard.

2012-03-06  Richard Guenther  

* tree.c (valid_constant_size_p): New function.
* tree.h (valid_constant_size_p): Declare.
* cfgexpand.c (expand_one_var): Adjust check for too large
variables by using valid_constant_size_p.
* varasm.c (assemble_variable): Likewise.

c/
* c-decl.c (grokdeclarator): Properly check for sizes that
cover more than half of the address-space.

cp/
* decl.c (grokdeclarator): Properly check for sizes that
cover more than half of the address-space.

Index: trunk/gcc/tree.c
===
*** trunk.orig/gcc/tree.c   2012-03-06 13:54:25.0 +0100
--- trunk/gcc/tree.c2012-03-06 14:46:08.0 +0100
*** compare_tree_int (const_tree t, unsigned
*** 6829,6834 
--- 6829,6848 
  return 1;
  }
  
+ /* Return true if SIZE represents a constant size that is in bounds of
+what the middle-end and the backend accepts (covering not more than
+half of the address-space).  */
+ 
+ bool
+ valid_constant_size_p (const_tree size)
+ {
+   if (! host_integerp (size, 1)
+   || TREE_OVERFLOW (size)
+   || tree_int_cst_sign_bit (size) != 0)
+ return false;
+   return true;
+ }
+ 
  /* Return true if CODE represents an associative tree code.  Otherwise
 return false.  */
  bool
Index: trunk/gcc/varasm.c
===
*** trunk.orig/gcc/varasm.c 2012-03-06 13:54:25.0 +0100
--- trunk/gcc/varasm.c  2012-03-06 14:46:08.0 +0100
*** assemble_variable (tree decl, int top_le
*** 1987,1993 
  return;
  
if (! dont_output_data
!   && ! host_integerp (DECL_SIZE_UNIT (decl), 1))
  {
error ("size of variable %q+D is too large", decl);
return;
--- 1987,1993 
  return;
  
if (! dont_output_data
!   && ! valid_constant_size_p (DECL_SIZE_UNIT (decl)))
  {
error ("size of variable %q+D is too large", decl);
return;
Index: trunk/gcc/c-decl.c
===
*** trunk.orig/gcc/c-decl.c 2012-03-06 13:54:25.0 +0100
--- trunk/gcc/c-decl.c  2012-03-06 14:46:08.0 +0100
*** grokdeclarator (const struct c_declarato
*** 5798,5809 
}
  }
  
!   /* Did array size calculations overflow?  */
! 
if (TREE_CODE (type) == ARRAY_TYPE
&& COMPLETE_TYPE_P (type)
&& TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST
!   && TREE_OVERFLOW (TYPE_SIZE_UNIT (type)))
  {
if (name)
error_at (loc, "size of array %qE is too large", name);
--- 5798,5809 
}
  }
  
!   /* Did array size calculations overflow or does the array cover more
!  than half of the address-space?  */
if (TREE_CODE (type) == ARRAY_TYPE
&& COMPLETE_TYPE_P (type)
&& TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST
!   && ! valid_constant_size_p (TYPE_SIZE_UNIT (type)))
  {
if (name)
error_at (loc, "size of array %qE is too large", name);
Index: trunk/gcc/cp/decl.c
===
*** trunk.orig/gcc/cp/decl.c2012-03-06 13:54:25.0 +0100
--- trunk/gcc/cp/decl.c 2012-03-06 14:46:08.0 +0100
*** grokdeclarator (const cp_declarator *dec
*** 9635,9646 
  error ("non-parameter %qs cannot be a parameter pack", name);
  }
  
!   /* Did array size calculations overflow?  */
! 
if (TREE_CODE (type) == ARRAY_TYPE
&& COMPLETE_TYPE_P (type)
&& TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST
!   && TREE_OVERFLOW (TYPE_SIZE_UNIT (type)))
  {
error ("size of array %qs is too large", name);
/* If we proceed with the array type as it is, we'll eventually
--- 9635,9646 
  error ("non-parameter %qs cannot be a parameter pack", name);
  }
  
!   /* Did array size calculations overflow or does the array cover more
!  than half of the address-space?  */
if (TREE_CODE (type) == ARRAY_TYPE
&& COMPLETE_TYPE_P (type)
&& TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST
!   && ! valid_constant_size_p (TYPE_SIZE_UNIT (type)))
  {
error ("size of array %qs is too large", name);
/* If we proceed with t

Re: [doc] GCC 4.7 Solaris updates to install.texi

2012-03-12 Thread Richard Guenther
On Mon, 12 Mar 2012, Rainer Orth wrote:

> The following patch updates install.texi for Solaris, and applies
> equally to the 4.7 branch and mainline.
> 
> Tested with make doc/gccinstall.info doc/gccinstall.pdf, ok for mainline
> and 4.7 branch?

Ok.

Thanks,
Richard.

>   Rainer
> 
> 
> 2012-03-11  Rainer Orth  
> 
>   * doc/install.texi (Specific, i?86-*-solaris2.[89]): Update
>   binutils reference.
>   (Specific, i?86-*-solaris2.10): Remove GCC 4.0 reference.
>   Update binutils references.
>   (Specific, *-*-solaris2*): Mention bundled GCC in Solaris 10 and 11.
>   Update binutils reference.
>   Update Sun as/GNU ld caveat.
>   Document binutils largefile requirement for LTO plugin.
>   Remove referent to alternate libpthread.
> 
> 

-- 
Richard Guenther 
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

Re: [PATCH 2/3] Move MEM_REF expansion to a new function

2012-03-12 Thread Michael Matz
Hi,

On Mon, 12 Mar 2012, Martin Jambor wrote:

> when we expand a misaligned MEM_REF on the LHS, we must not call the
> code in expand_expr_real_1 if the subsequent patch is applied, because
> the code generates code extracting the contents of the memory to a
> register, which is of course bad if the intent is to write into that
> memory.

Then expand_expr_real_1 should be called with EXPAND_WRITE modifier, 
instead of any of the others.  Then it will (or should) return an lvalue.  
That might still be wrong for alignment reasons, but writing into the so 
returned rtx will change the original object.

> Therefore expand_assignment should expand MEM_REFs itself,
> just as it do when it encounters naked misaligned ones.

I think this goes into the wrong direction.  expand_assignment shouldn't 
create an lvalue rtx for any REFs itself.  It should call expand_expr with 
EXPAND_WRITE, and that should do the right thing (i.e. what's now done 
directly in expand_assignment).

I realize the docu of EXPAND_WRITE is lacking, but here's what I think it 
should do (and what I think it actually also mostly does already): Given 
EXPAND_WRITE expand_expr is required to be called on an (sub)object, i.e. 
an lvalue, and it should return an RTX lvalue (a REG or MEM) that if 
written into is changing the originally specified tree lvalue (i.e. not 
some temporary storage).

That doesn't mean that the result of expand_expr(EXPAND_WRITE) is directly 
usable in a simple RTL (set) pattern as LHS in all cases.  For instance it 
won't be directly usable when it's misalign.  Dealing with this situation 
is left to the caller, i.e. expand_assignment mostly.

> - When expanding the base, the two functions differ in the
>   expand_modifier they pass down to expand_expr.  expand_assignment
>   uses EXPAND_NORMAL while expand_expr_real_1 passes EXPAND_SUM.
>   According to the comment in expr.h the latter seemed more permissive
>   and so I used that, even though I admit I do not really know what
>   the implications of this modifier are.  Is it OK to use EXPAND_SUM
>   also on a LHS?

No, but it might not matter in the situations you are facing, haven't 
checked.  EXPAND_SUM can return a PLUS rtx, e.g.
  (plus (p60) (const_int 4))
for an offsetted address.  Naturally you can't assign into such a plus 
rtx.  But if you only expand the base with that modifier (which for 
BLKmode bases actually means expanding to a MEM containing the address of 
base) you should be fine with EXPAND_SUM, it won't be used I think.


Ciao,
Michael.


[doc] GCC 4.7 Solaris updates to install.texi

2012-03-12 Thread Rainer Orth
The following patch updates install.texi for Solaris, and applies
equally to the 4.7 branch and mainline.

Tested with make doc/gccinstall.info doc/gccinstall.pdf, ok for mainline
and 4.7 branch?

Rainer


2012-03-11  Rainer Orth  

* doc/install.texi (Specific, i?86-*-solaris2.[89]): Update
binutils reference.
(Specific, i?86-*-solaris2.10): Remove GCC 4.0 reference.
Update binutils references.
(Specific, *-*-solaris2*): Mention bundled GCC in Solaris 10 and 11.
Update binutils reference.
Update Sun as/GNU ld caveat.
Document binutils largefile requirement for LTO plugin.
Remove referent to alternate libpthread.

# HG changeset patch
# Parent 87d293abd3111de02ec54b8b863d495e7bf7e1f8
GCC 4.7 Solaris updates to install.texi

diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -3612,7 +3612,7 @@ The Sun assembler in Solaris 8 and 9 has
 While GCC works around them, several features are missing, so it is
 @c FIXME: which ones?
 recommended to use the GNU assembler instead.  There is no bundled
-version, but the current version, from GNU binutils 2.21, is known to
+version, but the current version, from GNU binutils 2.22, is known to
 work.
 
 Solaris@tie{}2/x86 doesn't support the execution of SSE/SSE2 instructions
@@ -3628,8 +3628,7 @@ you have the patch installed, you can co
 
 @end html
 @heading @anchor{ix86-x-solaris210}i?86-*-solaris2.10
-Use this for Solaris 10 or later on x86 and x86-64 systems.  This
-configuration is supported by GCC 4.0 and later versions only.  Starting
+Use this for Solaris 10 or later on x86 and x86-64 systems.  Starting
 with GCC 4.7, there is also a 64-bit @samp{amd64-*-solaris2.1[0-9]*} or
 @samp{x86_64-*-solaris2.1[0-9]*} configuration that corresponds to
 @samp{sparcv9-sun-solaris2*}.
@@ -3638,7 +3637,7 @@ It is recommended that you configure GCC
 @file{/usr/sfw/bin/gas}.  The versions included in Solaris 10, from GNU
 binutils 2.15, and Solaris 11, from GNU binutils 2.19, work fine,
 although the current version, from GNU binutils
-2.21, is known to work, too.  Recent versions of the Sun assembler in
+2.22, is known to work, too.  Recent versions of the Sun assembler in
 @file{/usr/ccs/bin/as} work almost as well, though.
 @c FIXME: as patch requirements?
 
@@ -3646,7 +3645,7 @@ For linking, the Sun linker, is preferre
 linker instead, which is available in @file{/usr/sfw/bin/gld}, note that
 due to a packaging bug the version in Solaris 10, from GNU binutils
 2.15, cannot be used, while the version in Solaris 11, from GNU binutils
-2.19, works, as does the latest version, from GNU binutils 2.21.
+2.19, works, as does the latest version, from GNU binutils 2.22.
 
 To use GNU @command{as}, configure with the options
 @option{--with-gnu-as --with-as=@//usr/@/sfw/@/bin/@/gas}.  It may be necessary
@@ -4217,8 +4216,10 @@ Support for Solaris 8 has been obsoleted
 enabled by configuring with @option{--enable-obsolete}.  Support will be
 removed in GCC 4.8.  Support for Solaris 7 has been removed in GCC 4.6.
 
-Sun does not ship a C compiler with Solaris 2, though you can download
-the Sun Studio compilers for free.  Alternatively,
+Sun does not ship a C compiler with Solaris 2 before Solaris 10, though
+you can download the Sun Studio compilers for free.  In Solaris 10 and
+11, GCC 3.4.3 is available in @command{/usr/sfw/bin/gcc}.  Solaris 11
+also provides GCC 4.5.2 in @command{/usr/gcc/4.5/bin/gcc}.  Alternatively,
 you can install a pre-built GCC to bootstrap and install GCC.  See the
 @uref{binaries.html,,binaries page} for details.
 
@@ -4261,17 +4262,19 @@ We recommend the use of the Sun assemble
 conjunction with the Sun linker.  The GNU @command{as}
 versions included in Solaris 10, from GNU binutils 2.15, and Solaris 11,
 from GNU binutils 2.19, are known to work.  They can be found in
-@file{/usr/sfw/bin/gas}.  Current versions of GNU binutils (2.21)
+@file{/usr/sfw/bin/gas}.  Current versions of GNU binutils (2.22)
 are known to work as well.  Note that your mileage may vary
 if you use a combination of the GNU tools and the Sun tools: while the
 combination GNU @command{as} + Sun @command{ld} should reasonably work,
-the reverse combination Sun @command{as} + GNU @command{ld} is known to
-cause memory corruption at runtime in some cases for C++ programs.
+the reverse combination Sun @command{as} + GNU @command{ld} may fail to
+build or cause memory corruption at runtime in some cases for C++ programs.
 @c FIXME: still?
 GNU @command{ld} usually works as well, although the version included in
 Solaris 10 cannot be used due to several bugs.  Again, the current
-version (2.21) is known to work, but generally lacks platform specific
-features, so better stay with Sun @command{ld}.
+version (2.22) is known to work, but generally lacks platform specific
+features, so better stay with Sun @command{ld}.  To use the LTO linker
+plugin (

Re: [doc] GCC 4.7 IRIX, Tru64 UNIX updates to install.texi

2012-03-12 Thread Richard Guenther
On Mon, 12 Mar 2012, Rainer Orth wrote:

> Reviewing install.texi for the 4.7 release, I found that it only needs
> trivial updates for Tru64 UNIX and IRIX.
> 
> Tested with make doc/gccinstall.info doc/gccinstall.pdf.
> 
> Ok for 4.7 branch?  I won't apply the patch to mainline since I'm about
> to remove both ports there.

Ok.

Thanks,
Richard.

> Thanks.
>   Rainer
> 
> 
> 2012-03-11  Rainer Orth  
> 
>   * doc/install.texi (Specific, alpha*-dec-osf5.1): Update binutils
>   reference.
>   (Specific, mips-sgi-irix6): Likewise.


[doc] GCC 4.7 IRIX, Tru64 UNIX updates to install.texi

2012-03-12 Thread Rainer Orth
Reviewing install.texi for the 4.7 release, I found that it only needs
trivial updates for Tru64 UNIX and IRIX.

Tested with make doc/gccinstall.info doc/gccinstall.pdf.

Ok for 4.7 branch?  I won't apply the patch to mainline since I'm about
to remove both ports there.

Thanks.
Rainer


2012-03-11  Rainer Orth  

* doc/install.texi (Specific, alpha*-dec-osf5.1): Update binutils
reference.
(Specific, mips-sgi-irix6): Likewise.

# HG changeset patch
# Parent bf29b6f1cf94c37151c9da1d6014e7faf6d74984
GCC 4.7 IRIX, Tru64 UNIX updates to install.texi

diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -3175,7 +3175,7 @@ or applying the patch in
 the OS version used, you need a data segment size between 512 MB and
 1 GB, so simply use @command{ulimit -Sd unlimited}.
 
-As of GNU binutils 2.21, neither GNU @command{as} nor GNU @command{ld}
+As of GNU binutils 2.22, neither GNU @command{as} nor GNU @command{ld}
 are supported on Tru64 UNIX, so you must not configure GCC with
 @option{--with-gnu-as} or @option{--with-gnu-ld}.
 
@@ -4066,7 +4066,7 @@ Look for @file{/usr/lib64/libc.so.1} to 
 have the 64-bit libraries installed.
 
 GCC must be configured with GNU @command{as}.  The latest version, from GNU
-binutils 2.21, is known to work.  On the other hand, bootstrap fails
+binutils 2.22, is known to work.  On the other hand, bootstrap fails
 with GNU @command{ld} at least since GNU binutils 2.17.
 
 The @option{--enable-libgcj}


-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: [PATCH][ARM] Do not call covert during RTL expansion

2012-03-12 Thread Ramana Radhakrishnan
On 12 March 2012 10:22, Richard Guenther  wrote:
>
> convert is supposed to be called only from frontend code as it
> may raise errors.
>
> The call in neon_dereference_pointer is from RTL expansion
> (and not necessary).
>
> Fixed as follows, I built a cross-cc1 for checking.
>
> Ok?

Ok. From my reading of the code,  I agree this call is not necessary.

ramana


Re: [PATCH, i386] RTM support

2012-03-12 Thread H.J. Lu
On Sun, Mar 11, 2012 at 1:16 AM, Kirill Yukhin  wrote:
>>
>> The patch is OK for mainline, if there are no further comments in next 24h.
>
> Thank you!
>
> According to Tobias's input, I've added few lines about RTM to
> doc/invoke.texi. If no objections - I'll commit the patch tomorrow.
>

I think it breaks GCC bootstrap.

-- 
H.J.


Re: [PATCH 2/3] Move MEM_REF expansion to a new function

2012-03-12 Thread Richard Guenther
On Mon, 12 Mar 2012, Martin Jambor wrote:

> Hi,
> 
> when we expand a misaligned MEM_REF on the LHS, we must not call the
> code in expand_expr_real_1 if the subsequent patch is applied, because
> the code generates code extracting the contents of the memory to a
> register, which is of course bad if the intent is to write into that
> memory.  Therefore expand_assignment should expand MEM_REFs itself,
> just as it do when it encounters naked misaligned ones.

Just a quick comment here - the expand_expr_real_1 code needs
to be guarded with exactly the same conditions as the misaligned
LHS case to be able to call expand_expr on it and generate a
naked MEM.  So if that is not working you have a bug in the RHS
side handling ;)

Richard.


  1   2   >