Re: RFC [1/3] divmod transform v2

2016-10-16 Thread Prathamesh Kulkarni
On 16 October 2016 at 11:29, Prathamesh Kulkarni
 wrote:
> Hi,
> After approval from Bernd Schmidt, I committed the patch to remove
> optab functions for
> sdivmod_optab and udivmod_optab in optabs.def, which removes the block
> for divmod patch.
>
> This patch is mostly the same as previous one, except it drops
> targeting __udivmoddi4() because
> it gave undefined reference link error for calling __udivmoddi4() on
> aarch64-linux-gnu.
> It appears aarch64 has hardware insn for DImode div, so __udivmoddi4()
> isn't needed for the target
> (it was a bug in my patch that called __udivmoddi4() even though
> aarch64 supported hardware div).
>
> However this makes me wonder if it's guaranteed that __udivmoddi4()
> will be available for a target if it doesn't have hardware div and
> divmod insn and doesn't have target-specific libfunc for
> DImode divmod ? To be conservative, the attached patch doesn't
> generate call to __udivmoddi4.
>
> Passes bootstrap+test on x86_64-unknown-linux.
> Cross-tested on arm*-*-*, aarch64*-*-*.
> Verified that there are no regressions with SPEC2006 on
I mean no regressions from correctness perspective, I didn't benchmark
the patch.
> x86_64-unknown-linux-gnu.
> OK to commit ?
>
> Thanks,
> Prathamesh


Re: [Patch, fortran] Implement inquire(iolength= ) for DTIO

2016-10-16 Thread Dominique d'Humières
Dear Jerry,

The new test fails unless I replace 64 with 16 in 'if (rl.ne.64) call abort’. 
This seems consistent with your comment

> The language seems a little obscure. I think the first sentence means
> don't expect inquire to use a UDDTIO procedure and the second sentence
> says when you use a derived type that has UDDTIO procedures
> in the output list, treat them as if they don't and use the default derived 
> type lengths.

The end of the line

  inquire(iolength=rl) rl, kl, chairman, rl, chairman, t;

looks suspicious. Should nit be

  inquire(iolength=rl) rl, kl, chairman, rl, chairman, tl

?

TIA

Dominique



PATCH to tidy up code in c-warn.c

2016-10-16 Thread Marek Polacek
Found when looking at something else.  find_array_ref_with_const_idx_r would
uselessly keep on looking for other array refs with constant indices, even
though finding one is enough.  So return when something is found, instead of
just ignoring the subtrees.

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

2016-10-16  Marek Polacek  

* c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
Return immediately when finding a match.
(warn_tautological_cmp): Remove a boolean variable that is no longer
needed.

diff --git gcc/c-family/c-warn.c gcc/c-family/c-warn.c
index 88544ce..904f6d3 100644
--- gcc/c-family/c-warn.c
+++ gcc/c-family/c-warn.c
@@ -256,17 +256,14 @@ warn_logical_operator (location_t location, enum 
tree_code code, tree type,
with constant indices.  */
 
 static tree
-find_array_ref_with_const_idx_r (tree *expr_p, int *walk_subtrees, void *data)
+find_array_ref_with_const_idx_r (tree *expr_p, int *, void *)
 {
   tree expr = *expr_p;
 
   if ((TREE_CODE (expr) == ARRAY_REF
|| TREE_CODE (expr) == ARRAY_RANGE_REF)
   && TREE_CODE (TREE_OPERAND (expr, 1)) == INTEGER_CST)
-{
-  *(bool *) data = true;
-  *walk_subtrees = 0;
-}
+return integer_type_node;
 
   return NULL_TREE;
 }
@@ -312,10 +309,8 @@ warn_tautological_cmp (location_t loc, enum tree_code 
code, tree lhs, tree rhs)
 {
   /* Don't warn about array references with constant indices;
 these are likely to come from a macro.  */
-  bool found = false;
-  walk_tree_without_duplicates (&lhs, find_array_ref_with_const_idx_r,
-   &found);
-  if (found)
+  if (walk_tree_without_duplicates (&lhs, find_array_ref_with_const_idx_r,
+   NULL))
return;
   const bool always_true = (code == EQ_EXPR || code == LE_EXPR
|| code == GE_EXPR || code == UNLE_EXPR

Marek


Re: [PATCH] rs6000: Fix shrink-wrap-separate for AIX

2016-10-16 Thread David Edelsohn
On Sat, Oct 15, 2016 at 2:16 PM, Segher Boessenkool
 wrote:
> On Sat, Oct 15, 2016 at 07:55:47AM -0400, David Edelsohn wrote:
>> Maybe rs6000 always should prefer inline save-restore when SWS is
>> enabled, except for optimize_size?
>
> Yes, that would be a good optimization probably.
>
> try_shrink_wrapping_separate already does nothing unless you have
> optimize_function_for_speed_p (cfun), so that will do what you want
> already.

Maybe something like the following:

* config/rs6000/rs6000.c (rs6000_savres_strategy) [AIX,ELFv2]: Inline
FPR save and restore if shrink-wrapping and not optimizing for size.

Index: rs6000.c
===
--- rs6000.c(revision 241210)
+++ rs6000.c(working copy)
@@ -25445,7 +25445,8 @@
   else
 {
   gcc_checking_assert (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2);
-  if (info->first_fp_reg_save > 61)
+  if ((!optimize_size && flag_shrink_wrap_separate)
+ || info->first_fp_reg_save > 61)
strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS;
   strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS;
   strategy |= SAVE_INLINE_VRS | REST_INLINE_VRS;

Thanks, David


Re: [v3 PATCH] Make sure the return value of malloc_allocator::allocate is zero-initialized so that checking it for non-zero works later.

2016-10-16 Thread Jonathan Wakely

On 15/10/16 23:44 +0300, Ville Voutilainen wrote:

On 15 October 2016 at 22:44, Ville Voutilainen
 wrote:

2016-10-15  Ville Voutilainen  

Make sure the return value of malloc_allocator::allocate
is zero-initialized so that checking it for non-zero works
later.
* include/ext/malloc_allocator.h (malloc_allocator::allocate):
Initialize the return value.


A new patch, with small sanity tests added.

2016-10-15  Ville Voutilainen  

   Make sure the return value of malloc_allocator::allocate
   is zero-initialized so that checking it for non-zero works
   later.
   * include/ext/malloc_allocator.h (malloc_allocator::allocate):
   Initialize the return value.
   * testsuite/ext/malloc_allocator/sanity.cc: New.


Oops, thanks for catching that. OK for trunk.


[Ada] Set Always_Compatible_Rep to False everywhere

2016-10-16 Thread Eric Botcazou
It's not clear why this was set to True in some configuration files.

Applied on the mainline.


2016-10-16  Eric Botcazou  

* system-aix.ads (Always_Compatible_Rep): Change to False.
* system-aix64.ads (Always_Compatible_Rep): Likewise.
* system-hpux-ia64.ads (Always_Compatible_Rep): Likewise.
* system-hpux.ads (Always_Compatible_Rep): Likewise.
* system-linux-alpha.ads (Always_Compatible_Rep): Likewise.
* system-linux-hppa.ads (Always_Compatible_Rep): Likewise.
* system-linux-ia64.ads (Always_Compatible_Rep): Likewise.
* system-linux-mips.ads (Always_Compatible_Rep): Likewise.
* system-linux-mips64el.ads (Always_Compatible_Rep): Likewise.
* system-linux-mipsel.ads (Always_Compatible_Rep): Likewise.
* system-linux-s390.ads (Always_Compatible_Rep): Likewise.
* system-linux-s390x.ads (Always_Compatible_Rep): Likewise.
* system-linux-sh4.ads (Always_Compatible_Rep): Likewise.
* system-linux-sparc.ads (Always_Compatible_Rep): Likewise.
* system-linux-sparcv9.ads (Always_Compatible_Rep): Likewise.
* system-rtems.ads (Always_Compatible_Rep): Likewise.

-- 
Eric BotcazouIndex: system-aix64.ads
===
--- system-aix64.ads	(revision 241147)
+++ system-aix64.ads	(working copy)
@@ -7,7 +7,7 @@
 -- S p e c  --
 --   (PPC/AIX64 Version)--
 --  --
---  Copyright (C) 2009-2015, Free Software Foundation, Inc. --
+--  Copyright (C) 2009-2016, Free Software Foundation, Inc. --
 --  --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -148,7 +148,7 @@ private
Support_Composite_Assign  : constant Boolean := True;
Support_Composite_Compare : constant Boolean := True;
Support_Long_Shifts   : constant Boolean := True;
-   Always_Compatible_Rep : constant Boolean := True;
+   Always_Compatible_Rep : constant Boolean := False;
Suppress_Standard_Library : constant Boolean := False;
Use_Ada_Main_Program_Name : constant Boolean := False;
Frontend_Exceptions   : constant Boolean := False;
Index: system-aix.ads
===
--- system-aix.ads	(revision 241147)
+++ system-aix.ads	(working copy)
@@ -7,7 +7,7 @@
 -- S p e c  --
 --(AIX/PPC Version) --
 --  --
---  Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+--  Copyright (C) 1992-2016, Free Software Foundation, Inc. --
 --  --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -148,7 +148,7 @@ private
Support_Composite_Assign  : constant Boolean := True;
Support_Composite_Compare : constant Boolean := True;
Support_Long_Shifts   : constant Boolean := True;
-   Always_Compatible_Rep : constant Boolean := True;
+   Always_Compatible_Rep : constant Boolean := False;
Suppress_Standard_Library : constant Boolean := False;
Use_Ada_Main_Program_Name : constant Boolean := False;
Frontend_Exceptions   : constant Boolean := False;
Index: system-hpux.ads
===
--- system-hpux.ads	(revision 241147)
+++ system-hpux.ads	(working copy)
@@ -7,7 +7,7 @@
 -- S p e c  --
 -- (HP-UX Version)  --
 --  --
---  Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+--  Copyright (C) 1992-2016, Free Software Foundation, Inc. --
 --  --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -138,7 +138,7 @@ private
Support_Composite_Assign  : constant Boolean := True;
Support_Composite_Compare : constant Boolean := True;
Support_Long_Shifts   : constant Boolean := True;
-   Always_Compatible_Rep : constant Boolean := True;
+   Always_Compatible_Rep : constant Boolean := False;
Suppress_Stand

Re: [Ada] Set Always_Compatible_Rep to False everywhere

2016-10-16 Thread Andreas Schwab
On Okt 16 2016, Eric Botcazou  wrote:

>   * system-aix.ads (Always_Compatible_Rep): Change to False.
>   * system-aix64.ads (Always_Compatible_Rep): Likewise.
>   * system-hpux-ia64.ads (Always_Compatible_Rep): Likewise.
>   * system-hpux.ads (Always_Compatible_Rep): Likewise.
>   * system-linux-alpha.ads (Always_Compatible_Rep): Likewise.
>   * system-linux-hppa.ads (Always_Compatible_Rep): Likewise.
>   * system-linux-ia64.ads (Always_Compatible_Rep): Likewise.
>   * system-linux-mips.ads (Always_Compatible_Rep): Likewise.
>   * system-linux-mips64el.ads (Always_Compatible_Rep): Likewise.
>   * system-linux-mipsel.ads (Always_Compatible_Rep): Likewise.
>   * system-linux-s390.ads (Always_Compatible_Rep): Likewise.
>   * system-linux-s390x.ads (Always_Compatible_Rep): Likewise.
>   * system-linux-sh4.ads (Always_Compatible_Rep): Likewise.
>   * system-linux-sparc.ads (Always_Compatible_Rep): Likewise.
>   * system-linux-sparcv9.ads (Always_Compatible_Rep): Likewise.
>   * system-rtems.ads (Always_Compatible_Rep): Likewise.

Can this be refactored to avoid having to duplicate the whole file for
every target?

Andreas.

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


Re: [Patch, fortran] Implement inquire(iolength= ) for DTIO

2016-10-16 Thread Dominique d'Humières
Dear Jerry,

> The new test fails unless I replace 64 with 16 in 'if (rl.ne.64) call abort’. 
> This seems consistent with your comment

I have not been clear enough: I have to replace 64 with 16 even with your patch.

Dominique



Re: [Patch, fortran] Implement inquire(iolength= ) for DTIO

2016-10-16 Thread Dominique d'Humières
Forget it! It seems that I did not apply the patch!-(

Sorry for the noise.

Dominique

> Le 16 oct. 2016 à 18:42, Dominique d'Humières  a écrit :
> 
> Dear Jerry,
> 
>> The new test fails unless I replace 64 with 16 in 'if (rl.ne.64) call 
>> abort’. This seems consistent with your comment
> 
> I have not been clear enough: I have to replace 64 with 16 even with your 
> patch.
> 
> Dominique
> 



Re: [patch] Fix GC issue triggered by arithmetic overflow checking

2016-10-16 Thread Eric Botcazou
> 2016-10-11  Eric Botcazou  
> 
>   * tree.h (build_complex_type): Add second parameter with default.
>   * tree.c (build_complex_type): Add NAMED second parameter and adjust
>   recursive call.  Create a TYPE_DECL only if NAMED is true.
>   (build_common_tree_nodes): Pass true in calls to build_complex_type.

May I backport it to the 6 branch?  It fixes the bootstrap comparison failure 
on x86-64/Solaris reported under PR bootstrap/77995 (x86-64 has patterns for 
unsigned arithmetic overflow checking on the 6 branch too).

-- 
Eric Botcazou


[SPARC] Do not create bogus CONST_VECTORs

2016-10-16 Thread Eric Botcazou
The compiler was creating bogus CONST_VECTORs under specific circumstances in 
sparc_expand_vector_init.  Fixed by using the same test as the x86 back-end.

Tested on SPARC/Solaris, applied on all active branches.


2016-10-16  Eric Botcazou  

* config/sparc/sparc.c (sparc_expand_vector_init): Only accept literal
constants in CONST_VECTORs.

-- 
Eric BotcazouIndex: config/sparc/sparc.c
===
--- config/sparc/sparc.c	(revision 241205)
+++ config/sparc/sparc.c	(working copy)
@@ -12366,14 +12366,13 @@ sparc_expand_vector_init (rtx target, rt
   const machine_mode inner_mode = GET_MODE_INNER (mode);
   const int n_elts = GET_MODE_NUNITS (mode);
   int i, n_var = 0;
-  bool all_same;
+  bool all_same = true;
   rtx mem;
 
-  all_same = true;
   for (i = 0; i < n_elts; i++)
 {
   rtx x = XVECEXP (vals, 0, i);
-  if (!CONSTANT_P (x))
+  if (!(CONST_SCALAR_INT_P (x) || CONST_DOUBLE_P (x) || CONST_FIXED_P (x)))
 	n_var++;
 
   if (i > 0 && !rtx_equal_p (x, XVECEXP (vals, 0, 0)))


Re: [Ada] Set Always_Compatible_Rep to False everywhere

2016-10-16 Thread Eric Botcazou
> Can this be refactored to avoid having to duplicate the whole file for
> every target?

I'm not sure, maybe entries could be omitted if they match the default though.

-- 
Eric Botcazou


Re: [PATCH, C++] Warn on redefinition of builtin functions (PR c++/71973)

2016-10-16 Thread Bernd Edlinger
On 10/06/16 16:11, Bernd Edlinger wrote:
> Hi!
>
> Currently C++ does not warn at all when built-in functions are
> re-defined with a different signature, while C does warn on that
> even without -Wall.
>
> Thus I'd like to propose a -Wall enabled warning for that in C++ only.
>
> Initially I tried to warn unconditionally but that made too  many tests
> in the C++ testsuite emit that warning :-(
>
> So making the warning dependent on -Wall is a compromise due
> to the very many compile only tests, that use this "feature".
>
> There is also a wrong-code side on this redefinition, because
> even if the new function has the nothrow attribute the code is
> generated as if it could throw.  Fixed as well.
>
> This is an updated version of the patch that was posted
> here: https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01463.html
> ... but got no response so far.
>
> I have seen a few warnings in system headers, when -Wsystem-headers
> is used, and fixed most of them, for instance strftime got a
> redefinition warning, because the const struct tm* parameter has to be
> handled as the FILE* in other builtin functions.
>
> As a little surprise, it turned out, there were warnings missing
> from strftime in C due to the type conflict when merging the builtin
> with the actual declaration, see the format warnings in the test case
> testsuite/g++.dg/pr71973-2.C, which were not working previously in C++.
>
> Then there are cases, where a builtin function and C++ overloads
> have the same name like the abs function from cstdlib.  Due to
> missing strictness in duplicate_decls the builtin got merged with
> one of the C++ overloads.  That was visible due to the new warning.
>
> I believe a builtin function always needs an extern "C" declaration.
> Additional C++ overloads are possible, but do not redefine the builtin
> function, and create additional overloads.
>
> However these warnings remain, and I have no idea if the header
> file is correct or the warning:
>
> /usr/include/unistd.h:551:12: warning: declaration of 'int execve(const
> char*, char* const*, char* const*)' conflicts with built-in declaration
> 'int execve(const char*, const char**, const char**)'
> [-Wbuiltin-function-redefined]
>  extern int execve (const char *__path, char *const __argv[],
> ^~
> /usr/include/unistd.h:563:12: warning: declaration of 'int execv(const
> char*, char* const*)' conflicts with built-in declaration 'int
> execv(const char*, const char**)' [-Wbuiltin-function-redefined]
>  extern int execv (const char *__path, char *const __argv[])
> ^
> /usr/include/unistd.h:578:12: warning: declaration of 'int execvp(const
> char*, char* const*)' conflicts with built-in declaration 'int
> execvp(const char*, const char**)' [-Wbuiltin-function-redefined]
>  extern int execvp (const char *__file, char *const __argv[])
> ^~
>
> Interesting is that, these do not happen with -std=c++03/11/14 but only
> with -std=gnu++03/11/14.  I could not figure out how to resolve that.
>
> As said, this is only visible with -Wsystem-headers, and would not
> happen, if the declaration in unistd.h would match the builtin function
> prototype.
>

Just in case anybody wants to know, I digged into the warnings
about execv/e/p, and found the following:


First these builtins are declared with DEF_EXT_LIB_BUILTIN, and thus
the builtin function without __builtin_ in the name is only visible with
gnu extensions, therefore the warning does not happen with -std=c++XX
only with -std=gnu++XX.

Second, the declaration in the glibc header files simply look wrong,
because the type of argv, and envp is "char *const *" while the
builtin function wants "const char**", thus only the array of char*
itself is const, not the actual char stings they point to.

Third, in C the  builtins are not diagnosed, because C does only look
at the mode of the parameters see match_builtin_function_types in
c/c-decl.c, which may itself be wrong, because that makes an ABI
decision dependent on the mode of the parameter.

What was broken, because of that mismatch?

Except the missing warning about the redeclared builtin function, there
was also some hidden bug in the execv-builtins:

That is with -fprofile-arcs the execv/e/p is not replaced
with a call to __gcov_execv/e/p, and thus if a C++ program is
left through one of these functions the profile information is
not saved.

This is not fixed with the patch as is:

It would of course be fixed by changing the glibc headers, or if it
turns out that the GCC built-in is actually using the wrong prototype
that would also be possible to fix.

Any ideas which way to go on here?

Maybe a new fix-include rule?


Thanks
Bernd.


Re: [patch v2] Get rid of stack trampolines for nested functions (0/4)

2016-10-16 Thread Eric Botcazou
> this is the updated version of the patch initially posted at:
>   https://gcc.gnu.org/ml/gcc-patches/2016-06/msg02016.html
> It takes into account Jeff's remarks, both on the code and the
> documentation.
> 
> As discussed, I'm going to split it into 4 parts: common infrastructure, Ada
> front-end bits, individual back-end changes, testsuite.  It was
> bootstrapped and regtested on x86_64-suse-linux but AdaCore has been using
> it on native platforms (Linux, Windows, Solaris, etc) and various
> architectures (x86, PowerPC, SPARC, ARM, etc) for years.

I've installed part #1, #2, #4 and part #3 for x86, PowerPC, SPARC and IA-64.
The PowerPC and SPARC bits as approved, the x86 and IA-64 bits as obvious.

This was tested on x86/Linux, x86-64/Linux, PowerPC/Linux, PowerPC64/Linux, 
IA-64/Linux, SPARC/Solaris and SPARC64/Solaris.

I'll repost the remaining bits for Aarch64, ARM, Alpha, MIPS and HP-PA.

-- 
Eric Botcazou


Re: [PATCH] Fix PR55152

2016-10-16 Thread Andrew Pinski
On Tue, Oct 4, 2016 at 2:50 AM, Richard Biener  wrote:
> On Tue, 4 Oct 2016, Marc Glisse wrote:
>
>> On Tue, 4 Oct 2016, Richard Biener wrote:
>>
>> > Possibly.  Though then for FP we also want - abs (a) -> copysign (a, -1).
>>
>> I thought this might fix PR 62055, but at least on x86_64, we generate much
>> worse code for copysign(,-1) than for -abs :-(
>
> I would have expected copysign(,-1) to be a simple IOR ...
>
> double foo (double x)
> {
>   return __builtin_copysign (x, -1.);
> }
>
> foo:
> .LFB0:
> .cfi_startproc
> movsd   .LC0(%rip), %xmm1
> movapd  %xmm1, %xmm2
> andpd   .LC2(%rip), %xmm2
> andpd   .LC1(%rip), %xmm0
> orpd%xmm2, %xmm0
> ret
>
> ICK. -fabs (x) yields
>
> foo:
> .LFB0:
> .cfi_startproc
> andpd  .LC0(%rip), %xmm0
> xorpd  .LC1(%rip), %xmm0
> ret
>
> I expected a simple orpd .LC0(%rip), %xmm0 ...

That is recorded already as PR62055 :).

Thanks,
Andrew

>
> Richard.


[PATCH/AARCH64] Fix some testcases for AARCH64 ILP32

2016-10-16 Thread Andrew Pinski
Hi,
  These testcases use long for 64bit integer which means they will
fail with -mabi=ilp32 on aarch64.  This reduces the number of failures
down for ILP32.

OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions
(including with a multi-lib for ilp32).

Thanks,
Andrew Pinski

testsuite/ChangeLog:
* gcc.dg/tree-ssa/sra-17.c: Use long long instead of long.
* gcc.dg/tree-ssa/sra-18.c: Likewise.
* gcc.target/aarch64/aapcs64/test_align-7.c: Likewise.
* gcc.target/aarch64/cinc_common_1.c: Likewise.
* gcc.target/aarch64/combine_bfi_1.c: Likewise.
* gcc.target/aarch64/fmul_fcvt_1.c: Likewise.
* gcc.target/aarch64/mult-synth_4.c: Likewise.
* gcc.target/aarch64/pr68102_1.c: Likewise.
* gcc.target/aarch64/target_attr_3.c: Likewise.
Index: testsuite/gcc.dg/tree-ssa/sra-17.c
===
--- testsuite/gcc.dg/tree-ssa/sra-17.c  (revision 241217)
+++ testsuite/gcc.dg/tree-ssa/sra-17.c  (working copy)
@@ -7,7 +7,7 @@ extern void abort (void);
 int
 main (int argc, char **argv)
 {
-  long a[4] = { 7, 19, 11, 255 };
+  long long a[4] = { 7, 19, 11, 255 };
   int tot = 0;
   for (int i = 0; i < 4; i++)
 tot = (tot*256) + a[i];
Index: testsuite/gcc.dg/tree-ssa/sra-18.c
===
--- testsuite/gcc.dg/tree-ssa/sra-18.c  (revision 241217)
+++ testsuite/gcc.dg/tree-ssa/sra-18.c  (working copy)
@@ -3,7 +3,7 @@
 /* { dg-additional-options "-mcpu=ev4" { target alpha*-*-* } } */
 
 extern void abort (void);
-struct foo { long x; };
+struct foo { long long x; };
 
 struct bar { struct foo f[2]; };
 
Index: testsuite/gcc.target/aarch64/aapcs64/test_align-7.c
===
--- testsuite/gcc.target/aarch64/aapcs64/test_align-7.c (revision 241217)
+++ testsuite/gcc.target/aarch64/aapcs64/test_align-7.c (working copy)
@@ -7,8 +7,8 @@
 
 struct s
   {
-long x;
-long y;
+long long x;
+long long y;
   };
 
 /* This still has size 16, so is still passed by value.  */
Index: testsuite/gcc.target/aarch64/cinc_common_1.c
===
--- testsuite/gcc.target/aarch64/cinc_common_1.c(revision 241217)
+++ testsuite/gcc.target/aarch64/cinc_common_1.c(working copy)
@@ -15,14 +15,14 @@ barsi (int x)
   return x > 100 ? x + 4 : x + 3;
 }
 
-long
-foodi (long x)
+long long
+foodi (long long x)
 {
   return x > 100 ? x - 2 : x - 1;
 }
 
-long
-bardi (long x)
+long long
+bardi (long long x)
 {
   return x > 100 ? x + 4 : x + 3;
 }
Index: testsuite/gcc.target/aarch64/combine_bfi_1.c
===
--- testsuite/gcc.target/aarch64/combine_bfi_1.c(revision 241217)
+++ testsuite/gcc.target/aarch64/combine_bfi_1.c(working copy)
@@ -25,8 +25,8 @@ f4 (int x, int y)
   return (x & ~0xff) | (y & 0xff);
 }
 
-long
-f5 (long x, long y)
+long long
+f5 (long long x, long long y)
 {
   return (x & ~0xull) | (y & 0x);
 }
Index: testsuite/gcc.target/aarch64/fmul_fcvt_1.c
===
--- testsuite/gcc.target/aarch64/fmul_fcvt_1.c  (revision 241217)
+++ testsuite/gcc.target/aarch64/fmul_fcvt_1.c  (working copy)
@@ -27,13 +27,13 @@ ulsffoo##__a (float x)  \
 }
 
 #define FUNC_DEFD(__a) \
-long   \
+long long  \
 dffoo##__a (double x)  \
 {  \
   return x * __a##.0;  \
 }  \
\
-unsigned long  \
+unsigned long long \
 udffoo##__a (double x) \
 {  \
   return x * __a##.0;  \
@@ -101,18 +101,18 @@ do
\
   __builtin_abort ();  \
 if (usffoo##__a (__b) != (unsigned int)(__b * __a))\
   __builtin_abort ();  \
-if (lsffoo##__a (__b) != (long)(__b * __a))\
+if (lsffoo##__a (__b) != (long long)(__b * __a))   \
   __builtin_abort ();  \
-if (ulsffoo##__a (__b) != (unsigned long)(__b * __a))  \
+if (ulsffoo##__a (__b) != (unsigned long long)(__b * __a)) \
   __builtin_abort ();  \
   } while (0)
 
 #define FUNC_TESTD(__a, __b)   \
 do \
   {\
-if (dffoo##__a (__b) != (long)(__b * __a)) \
+if (dffoo##__a (__b) != (long long)(__b * __a))\
   __builtin_abort ();  \
-if (udffoo##__a (__b) != (unsigned long)(__b * __a))   \
+if (udffoo##__a (__b) != (unsigned long long)(__b * __a))  \
   __builtin_abort ();