* [committed,testsuite] Fix dg-error for a darwin testcase
@ 2014-11-15 16:07 FX
2014-11-15 16:57 ` [committed,testsuite] Fix missing includes for darwin testcases FX
0 siblings, 1 reply; 8+ messages in thread
From: FX @ 2014-11-15 16:07 UTC (permalink / raw)
To: gcc-patches; +Cc: Iain Sandoe, Mike Stump
Committed as trivial, as the error wording changed due to more precise diagnostics: it now says ‘CFStringRef {aka const struct __CFString *}’ instead of just ‘CFStringRef’
FX
2014-10-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* gcc.dg/darwin-cfstring-format-1.c: Adjust dg-error.
Index: gcc.dg/darwin-cfstring-format-1.c
===================================================================
--- gcc.dg/darwin-cfstring-format-1.c (revision 217599)
+++ gcc.dg/darwin-cfstring-format-1.c (working copy)
@@ -18,7 +18,7 @@ int s2 (int a, CFStringRef fmt, ... ) __
int s2a (int a, CFStringRef fmt, ... ) __attribute__((format(CFString, 2, 2))) ; /* { dg-error "format string argument follows the args to be formatted" } */
int s3 (const char *fmt, ... ) __attribute__((format(__CFString__, 1, 2))) ; /* { dg-error "format argument should be a .CFString. reference but a string was found" } */
-int s4 (CFStringRef fmt, ... ) __attribute__((format(printf, 1, 2))) ; /* { dg-error "found a .CFStringRef. but the format argument should be a string" } */
+int s4 (CFStringRef fmt, ... ) __attribute__((format(printf, 1, 2))) ; /* { dg-error "found a .CFStringRef.* but the format argument should be a string" } */
char *s5 (char dum, char *fmt1, ... ) __attribute__((format_arg(2))) ; /* OK */
CFStringRef s6 (CFStringRef dum, CFStringRef fmt1, ... ) __attribute__((format_arg(2))) ; /* OK */
^ permalink raw reply [flat|nested] 8+ messages in thread
* [committed,testsuite] Fix missing includes for darwin testcases
2014-11-15 16:07 [committed,testsuite] Fix dg-error for a darwin testcase FX
@ 2014-11-15 16:57 ` FX
2014-11-15 17:20 ` [committed,testsuite] Only run gcc.dg/tree-ssa/pr61144.c when aliases are supported FX
0 siblings, 1 reply; 8+ messages in thread
From: FX @ 2014-11-15 16:57 UTC (permalink / raw)
To: FX; +Cc: gcc-patches, Iain Sandoe, Mike Stump
Committed as trivial.
And also, fixed wrong date on my earlier ChangeLog entry :)
FX
2014-11-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* gcc.dg/pubtypes-3.c: Include <string.h>.
* gcc.dg/pubtypes-4.c: Likewise.
Index: gcc.dg/pubtypes-3.c
===================================================================
--- gcc.dg/pubtypes-3.c (revision 217599)
+++ gcc.dg/pubtypes-3.c (working copy)
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
struct used_struct
{
Index: gcc.dg/pubtypes-4.c
===================================================================
--- gcc.dg/pubtypes-4.c (revision 217599)
+++ gcc.dg/pubtypes-4.c (working copy)
@@ -11,6 +11,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
struct used_struct
{
^ permalink raw reply [flat|nested] 8+ messages in thread
* [committed,testsuite] Only run gcc.dg/tree-ssa/pr61144.c when aliases are supported
2014-11-15 16:57 ` [committed,testsuite] Fix missing includes for darwin testcases FX
@ 2014-11-15 17:20 ` FX
2014-11-15 20:22 ` [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets FX
0 siblings, 1 reply; 8+ messages in thread
From: FX @ 2014-11-15 17:20 UTC (permalink / raw)
To: gcc-patches
All other tests in gcc.dg/ that use __attribute__((__alias__())) are guarded by dg-require-alias.
Let’s do the same for gcc.dg/tree-ssa/pr61144.c, otherwise it complains on darwin.
2014-11-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* gcc.dg/tree-ssa/pr61144.c: Add dg-require-alias.
Index: gcc.dg/tree-ssa/pr61144.c
===================================================================
--- gcc.dg/tree-ssa/pr61144.c (revision 217599)
+++ gcc.dg/tree-ssa/pr61144.c (working copy)
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-require-weak "" } */
+/* { dg-require-alias "" } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
static int dummy = 0;
extern int foo __attribute__((__weak__, __alias__("dummy")));
^ permalink raw reply [flat|nested] 8+ messages in thread
* [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets
2014-11-15 17:20 ` [committed,testsuite] Only run gcc.dg/tree-ssa/pr61144.c when aliases are supported FX
@ 2014-11-15 20:22 ` FX
2014-11-15 20:45 ` H.J. Lu
0 siblings, 1 reply; 8+ messages in thread
From: FX @ 2014-11-15 20:22 UTC (permalink / raw)
To: gcc-patches
Don’t run gcc.target/i386/sibcall-1.c on PIC targets.
2014-11-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/60104
* gcc.target/i386/sibcall-1.c: Don't run on pic targets.
Index: gcc.target/i386/sibcall-1.c
===================================================================
--- gcc.target/i386/sibcall-1.c (revision 217599)
+++ gcc.target/i386/sibcall-1.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target ia32 } } */
+/* { dg-do compile { target { ia32 && nonpic } } } */
/* { dg-options "-O2" } */
extern int (*foo)(int);
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets
2014-11-15 20:22 ` [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets FX
@ 2014-11-15 20:45 ` H.J. Lu
2014-11-15 21:37 ` FX
0 siblings, 1 reply; 8+ messages in thread
From: H.J. Lu @ 2014-11-15 20:45 UTC (permalink / raw)
To: FX; +Cc: gcc-patches
On Sat, Nov 15, 2014 at 11:46 AM, FX <fxcoudert@gmail.com> wrote:
> Don’t run gcc.target/i386/sibcall-1.c on PIC targets.
>
>
> 2014-11-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
>
> PR target/60104
> * gcc.target/i386/sibcall-1.c: Don't run on pic targets.
>
>
> Index: gcc.target/i386/sibcall-1.c
> ===================================================================
> --- gcc.target/i386/sibcall-1.c (revision 217599)
> +++ gcc.target/i386/sibcall-1.c (working copy)
> @@ -1,4 +1,4 @@
> -/* { dg-do compile { target ia32 } } */
> +/* { dg-do compile { target { ia32 && nonpic } } } */
> /* { dg-options "-O2" } */
>
> extern int (*foo)(int);
>
This looks wrong. This test should pass for 64-bit or ia32 && nonpic.
--
H.J.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets
2014-11-15 20:45 ` H.J. Lu
@ 2014-11-15 21:37 ` FX
2014-11-15 21:56 ` H.J. Lu
0 siblings, 1 reply; 8+ messages in thread
From: FX @ 2014-11-15 21:37 UTC (permalink / raw)
To: H.J. Lu; +Cc: gcc-patches
> This looks wrong. This test should pass for 64-bit or ia32 && nonpic.
It was Kai’s original testcase, so I don’t want to modify it too much, other than make it skip where it clearly fails.
FX
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets
2014-11-15 21:37 ` FX
@ 2014-11-15 21:56 ` H.J. Lu
2014-11-15 23:25 ` H.J. Lu
0 siblings, 1 reply; 8+ messages in thread
From: H.J. Lu @ 2014-11-15 21:56 UTC (permalink / raw)
To: FX; +Cc: gcc-patches
On Sat, Nov 15, 2014 at 12:22 PM, FX <fxcoudert@gmail.com> wrote:
>> This looks wrong. This test should pass for 64-bit or ia32 && nonpic.
>
> It was Kai’s original testcase, so I don’t want to modify it too much, other than make it skip where it clearly fails.
>
Original bug report was filed against x86-64:
The attached testcase is a greatly reduced interpreter loop,
containing a simple load and indirect branch:
goto *addresses[*pc++]
gcc 4.8.2 (as well as older versions) with -O2 produces the following
x86-64 output:
movq addresses.1721(,%rax,8), %rax
jmp *%rax
Since the loaded value is not used after the branch, there's no need
to hold it in a register, so the load could be folded into the branch.
This would improve code size and instruction count.
Add a testcase only for ia32 makes no senses at all.
H.J.
--
H.J.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets
2014-11-15 21:56 ` H.J. Lu
@ 2014-11-15 23:25 ` H.J. Lu
0 siblings, 0 replies; 8+ messages in thread
From: H.J. Lu @ 2014-11-15 23:25 UTC (permalink / raw)
To: FX; +Cc: gcc-patches
On Sat, Nov 15, 2014 at 12:29 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Sat, Nov 15, 2014 at 12:22 PM, FX <fxcoudert@gmail.com> wrote:
>>> This looks wrong. This test should pass for 64-bit or ia32 && nonpic.
>>
>> It was Kai’s original testcase, so I don’t want to modify it too much, other than make it skip where it clearly fails.
>>
>
> Original bug report was filed against x86-64:
>
> The attached testcase is a greatly reduced interpreter loop,
> containing a simple load and indirect branch:
>
> goto *addresses[*pc++]
>
> gcc 4.8.2 (as well as older versions) with -O2 produces the following
> x86-64 output:
>
> movq addresses.1721(,%rax,8), %rax
> jmp *%rax
>
> Since the loaded value is not used after the branch, there's no need
> to hold it in a register, so the load could be folded into the branch.
> This would improve code size and instruction count.
>
> Add a testcase only for ia32 makes no senses at all.
>
I checked in this to run it on non-x32 targets.
H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog (revision 217612)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2014-11-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/sibcall-1.c: Don't run on x32 targets,
+ instead of run on ia32 targets.
+
2014-11-15 Marek Polacek <polacek@redhat.com>
PR middle-end/63884
Index: gcc.target/i386/sibcall-1.c
===================================================================
--- gcc.target/i386/sibcall-1.c (revision 217612)
+++ gcc.target/i386/sibcall-1.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { ia32 && nonpic } } } */
+/* { dg-do compile { target { { ! x32 } && nonpic } } } */
/* { dg-options "-O2" } */
extern int (*foo)(int);
--
H.J.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-11-15 23:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-15 16:07 [committed,testsuite] Fix dg-error for a darwin testcase FX
2014-11-15 16:57 ` [committed,testsuite] Fix missing includes for darwin testcases FX
2014-11-15 17:20 ` [committed,testsuite] Only run gcc.dg/tree-ssa/pr61144.c when aliases are supported FX
2014-11-15 20:22 ` [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets FX
2014-11-15 20:45 ` H.J. Lu
2014-11-15 21:37 ` FX
2014-11-15 21:56 ` H.J. Lu
2014-11-15 23:25 ` H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).