Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-07-13 Thread Alexandre Oliva
stall if it does? (I haven't tested it at all) add offload target to testname for pass/fail message From: Alexandre Oliva Offload tests that scan dump files may run multiple times, once per offload target, but the test result messages do not mention the offload target, so we may seem to

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-07-13 Thread Alexandre Oliva
.) Thanks for the offer. Here's what I've been able to come up with, totally untested. Ok to install after you give it a spin? revamp intelmic-mkoffload aux dump names From: Alexandre Oliva Rework intelmic-mkoffload into the new aux and dump file naming semantics. Obe

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-07-13 Thread Alexandre Oliva
FWIW, I spotted two bugs in the completely untested patch by running it through the compiler. s/dmp_filename/dump_filename/g will fix it. -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he's left :

Re: [PATCH PR96230] driver: ICE in process_command, at gcc.c:5095

2020-07-23 Thread Alexandre Oliva
e more tests, fixes the misbehavior, and adds comments to conditions that led me down investigations that wasted a lot of time while looking into this problem and trying to make for more widespread changes. Tested on x86_64-linux-gnu. Ok to install? [PR96230] some -dumpbase-ext fixes From:

[PR95720] protect gluefile and wrap_flags with -Wl too (was: Re: drop -aux{dir,base}, revamp -dump{dir,base})

2020-07-23 Thread Alexandre Oliva
"$nopts" } } } + foreach i { gluefile wrap_flags } { + global $i + if {[info exists $i]} { + set opts [set $i] + set nopts [gcc_adjust_linker_flags_list $opts] + if { $nopts != $opts } { +

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-07-24 Thread Alexandre Oliva
ears to work fine. Aah, thanks. Here's the combined patch for this subthread, that I'm installing shortly. revamp intelmic-mkoffload aux dump names From: Alexandre Oliva Rework intelmic-mkoffload into the new aux and dump file naming semantics. Obey -save-temps. Co-Authored-By: Thom

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-07-24 Thread Alexandre Oliva
code, since I see complaints about missing the actual hardware in the dejagnu logs. So please let me know if you run into any issues with this minor incremental change. Here's what I'm installing shortly. Thanks again, add offload target to testname for pass/fail message From: Al

[RFC, WIP] introduce attribute exalias

2020-07-29 Thread Alexandre Oliva
irtfun(); + +/* { dg-final { scan-assembler "FOOCLS_VOID_TI" } } */ +/* { dg-final { scan-assembler "FOOCLS_CHAR_TI" } } */ +/* { dg-final { scan-assembler "FOOCLS_SHORT_ST" } } */ +/* { dg-final { scan-assembler "FOOCLS_SHO

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-07 Thread Alexandre Oliva
ng extra stores to the end of the prologue, at least as a default implementation for a target hook, that could be overridden with something that does the job in more efficient but target-specific ways. -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer

[PATCH] introduce attribute exalias

2020-08-07 Thread Alexandre Oliva
o. + +template <> +struct __attribute__ ((__exalias__ ("FOOCLS_INT_TI"))) +foo +{ + virtual ~foo() {} + virtual void __attribute__ ((__exalias__ ("F

Re: [PATCH] tree: Fix -fcompare-debug issues due to protected_set_expr_location [PR94323]

2020-03-26 Thread Alexandre Oliva
perations of inserting stmts that search for nondebug stmts, and the direct link might help with them, if the flag alone wouldn't. -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he's left :( G

Re: [PATCH] tree: Fix -fcompare-debug issues due to protected_set_expr_location [PR94323]

2020-03-26 Thread Alexandre Oliva
plify functions early on and that would address most of the differences, and optimizers would take care of any unnecessary SAVE_EXPRs, it might not matter much, and avoiding the current runtime overheads in skipping debug stmts early on might more than make up for that. -- Alexandre Oliva, fre

unreliable/confusing dg-add-options arm_fp16_alternatives

2020-03-27 Thread Alexandre Oliva
an arm_fp16_hw requirement to this test - add to check_effective_target_arm_fp16_alternative_ok_nocache above a check for arm_fp16, besides arm32. Unrelated potential fix, assuming it's a cut&pasto rather than intended: - drop the et_arm_neon_fp16_flags settings from the unrelated (?

update polytypes.c -flax-vector-conversions msg

2020-04-08 Thread Alexandre Oliva
t 1 of 's64_8'" "" { target *-*-* } .-1 } */ u64_8 (v64_8); /* { dg-error "incompatible type for argument 1 of 'u64_8'" } */ p64_8 (v64_8); -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist

require tls_runtime for tls execution test

2020-04-08 Thread Alexandre Oliva
o run } */ /* { dg-options "-O2" } */ /* { dg-additional-options "-mcmodel=large" { target aarch64-*-* } } */ -/* { dg-require-effective-target tls } */ +/* { dg-require-effective-target tls_runtime } */ /* { dg-add-options tls } */ struct S { int a, b, c, d, e; }; --

Re: unreliable/confusing dg-add-options arm_fp16_alternatives

2020-04-08 Thread Alexandre Oliva
On Mar 27, 2020, Alexandre Oliva wrote: > So, here are some potential fixes: > - install the patchlet for fp16-aapcs-3.c above, and be done with it > - add an arm_fp16_hw requirement to this test > - add to check_effective_target_arm_fp16_alternative_ok_nocache above a > che

Re: [PATCH] cselib, var-tracking: Improve debug info after the cselib sp tracking changes [PR94495]

2020-04-09 Thread Alexandre Oliva
e_pointer_needed functions. Beautiful, thanks! -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he's left :( GNU Toolchain Engineer Live long and free, and prosper ethically

introduce target tmpnam and require it in tests relying on it

2020-04-09 Thread Alexandre Oliva
FILE *f = fopen (n, "w"); +fclose (f); +remove (n); +return 0; +} } ""] +} + # Return 1 if target has packed layout of structure members by # default, 0 otherwise. Note that this is slightly different than # whether the target has "natural alig

Re: introduce target tmpnam and require it in tests relying on it

2020-04-17 Thread Alexandre Oliva
On Apr 9, 2020, Alexandre Oliva wrote: > Some target C libraries that aren't recognized as freestanding don't > have filesystem support, so calling tmpnam, fopen/open and > remove/unlink fails to link. > This patch introduces a tmpnam effective target to the testsuite, an

[rs6000] fix mffsl emulation

2020-04-23 Thread Alexandre Oliva
tin_mffsl(), conv_val.d); +mffsl_val.ll, mffs_val.ll); #else abort(); #endif -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he's left :( GNU Toolchain Engineer Live long and free, and prosper ethically

Re: introduce target tmpnam and require it in tests relying on it

2020-04-23 Thread Alexandre Oliva
On Apr 21, 2020, Bernhard Reutner-Fischer wrote: > On 17 April 2020 21:21:41 CEST, Martin Sebor via Gcc-patches > wrote: >> On 4/17/20 11:48 AM, Alexandre Oliva wrote: >>> On Apr 9, 2020, Alexandre Oliva wrote: >>> >>>> Some target C libraries th

Re: [rs6000] fix mffsl emulation

2020-04-24 Thread Alexandre Oliva
Hello, Segher, On Apr 23, 2020, Segher Boessenkool wrote: > On Thu, Apr 23, 2020 at 05:08:55AM -0300, Alexandre Oliva wrote: >> I wasn't sure simplify_gen_subreg might possibly emit any code in >> obscure cases, > It never does, it just returns an RTX. Where would it

Re: introduce target tmpnam and require it in tests relying on it

2020-04-24 Thread Alexandre Oliva
] +} + # Return 1 if target has packed layout of structure members by # default, 0 otherwise. Note that this is slightly different than # whether the target has "natural alignment": both attributes may be -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he's left :( GNU Toolchain Engineer Live long and free, and prosper ethically

Re: [rs6000] fix mffsl emulation

2020-04-27 Thread Alexandre Oliva
d test_mffsl.c with and without -mpower9-misc. Regstrapping on ppc64le-linux-gnu. Ok to install? [rs6000] fix mffsl emulation From: Alexandre Oliva The emulation of mffsl with mffs, used when !TARGET_P9_MISC, is going through the motions, but not storing the result in the given operands[0]; it

Re: [rs6000] fix mffsl emulation

2020-04-28 Thread Alexandre Oliva
ay for the 9 branch, > after waiting to see if any fallout appears. Thanks, here's what I'm checking in... [rs6000] fix mffsl emulation From: Alexandre Oliva The emulation of mffsl with mffs, used when !TARGET_P9_MISC, is going through the motions, but not storing the result in

Re: introduce target tmpnam and require it in tests relying on it

2020-04-28 Thread Alexandre Oliva
86_64-linux-gnu. Ok to install? document effective target fileio From: Alexandre Oliva check_effective_target_fileio was added to gcc/testsuite/lib/target-supports.exp the other day, without documentation. This patch adds the corresponding documentation. for gcc/ChangeLog * doc/sour

Re: new x86 cmpmemsi expander, and adjustments for cmpstrn*

2019-09-25 Thread Alexandre Oliva
On Sep 10, 2019, Alexandre Oliva wrote: > This patchset fixes some latent problems in cmpstrn* patterns for x86, > and introduces cmpmemsi for short fixed-size memcmp. Ping? https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00701.html > Would it make sense to install the test program

Re: [PATCH] DWARF array bounds missing from C++ array definitions

2019-09-25 Thread Alexandre Oliva
On Sep 13, 2019, Richard Biener wrote: > On Fri, Sep 13, 2019 at 1:32 AM Alexandre Oliva wrote: >> On Sep 12, 2019, Richard Biener wrote: >> > So - maybe we can have the patch a bit cleaner by adding >> > a flag to add_type_attribute saying we only want it if it

[FYI] [Ada] set DECL_SIZE_UNIT for zero-sized fields

2019-09-26 Thread Alexandre Oliva
field) = size_zero_node; SET_DECL_OFFSET_ALIGN (gnu_field, BIGGEST_ALIGNMENT); DECL_FIELD_BIT_OFFSET (gnu_field) = bitsize_zero_node; -- Alexandre Oliva, freedom fighter he/him https://FSFLA.org/blogs/lxo Be the change, be Free!FSF VP & FSF Latin America board me

Re: [PATCH] DWARF array bounds missing from C++ array definitions

2019-10-01 Thread Alexandre Oliva
On Sep 26, 2019, Richard Biener wrote: > On Thu, Sep 26, 2019 at 4:05 AM Alexandre Oliva wrote: > Heh, I don't have one - which usually makes me simply inline the > beast into the single caller :P > Maybe simply have_new_type_for_decl_with_old_die_p? > Or new_type_f

Store float for pow result test

2019-10-01 Thread Alexandre Oliva
741a37f 100644 --- a/gcc/testsuite/gcc.dg/torture/pr41094.c +++ b/gcc/testsuite/gcc.dg/torture/pr41094.c @@ -13,7 +13,8 @@ double foo(void) int main() { - if (foo() != 2.0) + double r = foo (); + if (r != 2.0) abort (); return 0; } -- Alexandre Oliva, freedom fighter he/him https:/

[x86] recompute opt flags after opt level change

2019-10-01 Thread Alexandre Oliva
-we check -miamcu so that -freg-struct-return is always -turned on if -miamcu is used. */ - if (TARGET_IAMCU_P (opts->x_target_flags)) - opts->x_flag_pcc_struct_return = 0; - else - opts->x_flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RE

use call-clobbered reg to disalign the stack

2019-10-07 Thread Alexandre Oliva
int reg asm ("ecx"); + asm ("pushl\t%0": : "r" (reg) : "memory"); /* Disalign runtime stack. */ result = self_aligning_function (g_1, g_2); if (result != 42) abort (); - asm ("popl %esi"); + asm ("popl\t%0" : "=r"

Re: RFA [PATCH] * lock-and-run.sh: Check for process existence rather than timeout.

2019-10-18 Thread Alexandre Oliva
n up, and then errored out, instead of retrying forever or breaking the lock and proceeding? Several programs that rely on lock files (git and svn come to mind) seem to be taking such an approach these days, presumably because of all the difficulties in automating the double-checking in all pote

Re: RFA [PATCH] * lock-and-run.sh: Check for process existence rather than timeout.

2019-10-21 Thread Alexandre Oliva
On Oct 21, 2019, Jason Merrill wrote: > On Sat, Oct 19, 2019 at 12:08 AM Alexandre Oliva wrote: >> We might also wish to use different lock-breaking logic for that case, >> too, e.g. checking that the timestamp of the dir didn't change by >> comparing `ls -ld $lo

avoid infinite loops in rpo fre

2020-05-07 Thread Alexandre Oliva
/* For all values we only valueize to an available leader which means we can use SSA name info without restriction. */ - tem = rpo_avail->eliminate_avail (vn_context_bb, tem); + tem = rpo_avail->eliminate_avail (bb, tem); if (tem)

[PR77691] x86-vxworks malloc aligns to 8 bytes like solaris

2020-05-08 Thread Alexandre Oliva
p = r1->allocate(2, alignof(char)); VERIFY( bytes_allocated == 2 ); +#ifndef BAD_MAX_ALIGN_T VERIFY( aligned(p) ); +#endif r1->deallocate(p, 2, alignof(char)); VERIFY( bytes_allocated == 0 ); -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ F

Re: avoid infinite loops in rpo fre

2020-05-08 Thread Alexandre Oliva
that could bring us back to the one just eliminated. Do you by any chance have a simple argument to rule out this possibility? Thanks in advance, -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he'

Re: [PR77691] x86-vxworks malloc aligns to 8 bytes like solaris

2020-05-13 Thread Alexandre Oliva
Hello, Jonathan, On May 9, 2020, Jonathan Wakely wrote: > On 08/05/20 17:22 -0300, Alexandre Oliva wrote: >> (Couldn't r1->allocate(2, alignof(char)) possibly return a pointer >> that's *not* aligned? Maybe we should drop the test even >> if !defined(BAD_M

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-05-19 Thread Alexandre Oliva
bs or ldscripts in the board config name files that gcc would regard as additional inputs. I'll post followups with each of the patches for review. -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-05-19 Thread Alexandre Oliva
On May 19, 2020, Alexandre Oliva wrote: > - fix spurious outputs.exp test failures on targets that do not support > -gsplit-dwarf cope with -gsplit-dwarf errors From: Alexandre Oliva On targets that did not support -gsplit-dwarf, we'd get tons of spurious failures. This patc

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-05-19 Thread Alexandre Oliva
On May 19, 2020, Alexandre Oliva wrote: > - fix a build problem when targeting platforms with an executable suffix aux and dump revamp: fix target exec suffix handling HAVE_TARGET_EXECUTABLE_SUFFIX is defined only in gcc.c, and in a way that requires testing whether it's defined, rat

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-05-19 Thread Alexandre Oliva
On May 19, 2020, Alexandre Oliva wrote: > - fix for outputs.exp for platforms with nonempty ldflags, libs, > ldscripts, or output_format in the dejagnu board configuration, and > for link tests with aux dumps in the testsuite when ldflags, libs or > ldscripts in the board confi

Re: collect2.exe errors not pruned

2020-05-19 Thread Alexandre Oliva
Hello, Joseph, Andrew, Thanks for your feedback. On Feb 28, 2020, Joseph Myers wrote: > On Fri, 28 Feb 2020, Alexandre Oliva wrote: >> I'm not sure it's appropriate for the error to not omit the host >> platform's executable suffix, just as it omits directory

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-05-21 Thread Alexandre Oliva
On May 19, 2020, Richard Biener wrote: > On Tue, 19 May 2020, Alexandre Oliva wrote: >> I've refreshed the patch, approved back on Jan 22 for gcc-11, in >> refs/users/aoliva/heads/aux-dump-revamp, and committed 3 other related >> patches on top of it, that I hope to ge

Re: [PATCH] More c++ math reject macros

2020-05-22 Thread Alexandre Oliva
ctions themselves, that might be implemented by macros in C, and we can't allow such macro implementations to pollute all C++ namespaces. Patch is ok with the following ChangeLog entry: * crossconfig.m4 <*-vxworks>: Check for more math decls. * configure: Rebuild. Thanks!

Re: collect2.exe errors not pruned

2020-05-25 Thread Alexandre Oliva
On May 19, 2020, Joseph Myers wrote: > On Tue, 19 May 2020, Alexandre Oliva wrote: >> > I don't think the error should mention .exe, but I also don't think the >> > error should mention collect2 (see what I said in >> > <https://gcc.gnu.org/ml/gcc-pa

Re: ChangeLog files - server and client scripts

2020-05-25 Thread Alexandre Oliva
{2}-\d{2})\ {2}(?P.* <.*>)') additional_author_regex = re.compile(r'^\t(?P\ *)?(?P.* <.*>)') -changelog_regex = re.compile(r'^([a-z0-9+-/]*)/ChangeLog:?') +changelog_regex = re.compile(r'^(?:[fF]or +)([a-z0-9+-/]*)/ChangeLog:?') pr_regex = re.c

Re: ChangeLog files - server and client scripts

2020-05-26 Thread Alexandre Oliva
t it broke cases without 'for' because I missed a '?' in the regexp. Good thing I had to adjust for the old format to be able to push it ;-) 2x0 ;-) >> Do any hooks need to be adjusted to match? > Yes, we sync the script from the GCC repository. Here's what I'

[wwwdocs] Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-05-26 Thread Alexandre Oliva
On May 21, 2020, Alexandre Oliva wrote: > On May 19, 2020, Richard Biener wrote: >> Thanks again for doing this. May I also suggest to prepare a short >> entry for gcc-11/changes.html with these things (like "Output of >> auxiliary files changed. See https://

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-05-26 Thread Alexandre Oliva
; compilation terminated.^M > xg++: error: unrecognized command-line option '-dA'; did you mean '-A' No luck duplicating these with my builds of gcc master :-( (conversation on IRC) Thanks for the binary, I've managed to duplicate the problem using your binary. Inv

Re: [PR77691] x86-vxworks malloc aligns to 8 bytes like solaris

2020-05-26 Thread Alexandre Oliva
TS feature so not guaranteed to be stable. > The target maintainers can decide if they'd rather have GCC 10.2 be > consistent with 10.1 or with master. Olivier Hainque, with his vxworks maintainer hat on, gave me a go ahead to install it the patch in the gcc-10 branch, so I'm putt

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-05-26 Thread Alexandre Oliva
On May 26, 2020, Richard Biener wrote: > All visible by testing on x86_64-linux. Interesting bug. You wouldn't have hit it if you enabled Ada. That's because I'd missed the %< directives that validate_switches mishandled in the Ada specs, so validate_switches handled the %{d*} and validated -d

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-05-26 Thread Alexandre Oliva
On May 26, 2020, Richard Biener wrote: > xgcc: error: unrecognized command-line option '-dumpbase'^M > xg++: error: unrecognized command-line option '-dA'; did you mean '-A' Here's a proper patch submission. I'm still throwing tests at it, but it's already proved (with a non-bootstrapped buil

Re: [rs6000] fix mffsl emulation

2020-05-26 Thread Alexandre Oliva
On Apr 28, 2020, Segher Boessenkool wrote: > Okay for trunk with such tweaks. Thank you! Also okay for the 9 branch, > after waiting to see if any fallout appears. Thanks, I've just pushed it to the gcc-9 branch. -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.or

Re: Broken build

2020-05-27 Thread Alexandre Oliva
autotest-gcc1/cris-elf/gccobj/cris-elf/./newlib > -sim3 -lm -o Is it correct to assume that -sim3 is NOT a separate command-line option, and that there is a directory named newlib-sim3 ? > Can you please have a look? Sure, thanks! Sorry about this undesirable surprise. -- Alexandre Oli

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-05-27 Thread Alexandre Oliva
On May 27, 2020, Andreas Schwab wrote: > Looks like tcl 8.5.5 has a bug: Ugh, how unfortunate. > % glob -nocomplain -path {} -- {a.{out,exe}} > % glob -nocomplain -path {} -- {a.{out,exe}*} > a.out Thanks for tracking that down, I'll put in some work around for that. --

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-05-27 Thread Alexandre Oliva
outputs.exp: no lto, linker default output, cdtor temps, empty args From: Alexandre Oliva This patch fixes various issues in the testsuite that came up after the dump/aux output revamp, namely: - many outputs.exp tests used -flto without checking that LTO was supported, getting lots of

Re: Broken build

2020-05-27 Thread Alexandre Oliva
hat and most of the other fallout at https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546659.html Jeff Law has already aprpoved it, and I'll probably check it in very shortly, as soon as I get a few more test results. Please be sure to let me know in case it does not fix the problem for

Re: Broken build

2020-06-02 Thread Alexandre Oliva
change the names of # gcc auxiliary outputs. @@ -300,7 +300,7 @@ proc gcc_adjust_linker_flags {} { if {![is_remote host]} { set dest [target_info name] - foreach i { ldflags libs ldscripts } { + foreach i { ldflags libs ldscript } { if {[board_info $dest exists $

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-06-02 Thread Alexandre Oliva
On May 27, 2020, Alexandre Oliva wrote: > - The prepending of -Wl, to file names in ldflags et al was done in a > way that introduced empty arguments when consecutive blanks appeared > in these board configuration knobs. Skip the empty strings between > consecutive blanks to avoid

[FYI] [Ada] remove last traces of -auxbase

2020-06-02 Thread Alexandre Oliva
eed not be stored in ALI -- files and may safely be ignored by non GCC back-ends. -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he's left :( GNU Toolchain Engineer Live long and fr

Re: [PATCH] Do not copy NULL string with memcpy.

2020-06-02 Thread Alexandre Oliva
+ dumpdir_length, input_basename, basename_length); Please let me know if you'd prefer me to take this PR over. -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he's left :( GNU Toolchain Engineer

Re: [PATCH] Do not copy NULL string with memcpy.

2020-06-04 Thread Alexandre Oliva
On Jun 3, 2020, Martin Liška wrote: > On 6/3/20 5:58 AM, Alexandre Oliva wrote: >> Please let me know if you'd prefer me to take this PR over. > Yes, please take a look. Here's what I've regstrapped on x86_64-linux-gnu. It makes both memcpy calls condition

[PR51447] restore the global reg var before returning from main

2020-06-05 Thread Alexandre Oliva
ocal_lab: if (ptr != &&nonlocal_lab) abort (); +#ifdef __x86_64__ + ptr = save; /* Restore the call-saved register. */ +#endif return 0; } -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he'

Re: [x86] recompute opt flags after opt level change

2020-12-16 Thread Alexandre Oliva
Hello, Martin, On Dec 16, 2020, Martin Liška wrote: > On 10/1/19 10:58 AM, Alexandre Oliva wrote: >> + if (opts->x_flag_asynchronous_unwind_tables == 2) >> +opts->x_flag_unwind_tables >> + = opts->x_flag_asynchronous_unwind_tables = 1; > Anyway t

Add dg-require-wchars to libstdc++ testsuite

2020-12-22 Thread Alexandre Oliva
T" + puts $f "# error No wchar header." + puts $f "#endif" + close $f + + set lines [v3_target_compile $src /dev/null preprocess ""] + file delete $src + + if [string match "" $lines] { + # No error message, preproc

Add conditional include of vxWorks.h for kernel mode

2020-12-22 Thread Alexandre Oliva
gcc/testsuite/gcc.target/powerpc/pr87466.c index 2bb292cfed1f8..047bae25821d8 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr87466.c +++ b/gcc/testsuite/gcc.target/powerpc/pr87466.c @@ -1,6 +1,12 @@ /* { dg-do compile { target powerpc*-*-* } } */ /* { dg-options "-O2" } */ +/* VxWorks kernel modules require the inclusion of + before any other system header. */ +#if defined(__vxworks) && !defined(__RTP__) +#include +#endif + #include #include -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

mark some tests in gcc.target/arm as requiring "fpic" support

2020-12-22 Thread Alexandre Oliva
a/gcc/testsuite/gcc.target/arm/tlscall.c b/gcc/testsuite/gcc.target/arm/tlscall.c index 71366effa3e3b..8d5609ae13215 100644 --- a/gcc/testsuite/gcc.target/arm/tlscall.c +++ b/gcc/testsuite/gcc.target/arm/tlscall.c @@ -2,6 +2,7 @@ /* { dg-do assemble } */ /* { dg-options "-O2 -fPIC -mtls-dialect=gnu2" } */ +/* { dg-require-effective-target fpic } */ /* { dg-skip-if "FDPIC does not support gnu2 TLS dialect" { arm*-*-uclinuxfdpiceabi } "*" "" } */ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

Split wchars tests from the normal variant

2020-12-22 Thread Alexandre Oliva
wchars {} } + +#include + +void +test01(const char* first, const char* last) +{ +#if _GLIBCXX_USE_WCHAR_T + wchar_t wc; +#else + enum W { } wc; +#endif + + std::from_chars(first, last, wc); // { dg-error "no matching" } + std::from_chars(first, last, wc, 10); // { dg-error "

Add missing vxworks filters to lib/target-supports.exp functions

2020-12-22 Thread Alexandre Oliva
-vxworks*] } { + # VxWorks doesn't have mempcpy but our way to test fails + # to detect as we're doing partial links for kernel modules. + return 0 + } return [check_function_available "mempcpy"] } -- Alexandre Oliva, happy hacker https://FSFLA.org/bl

Fix VxWorks xfail filters on pthread-init-?.c

2020-12-22 Thread Alexandre Oliva
definition of PTHREAD_MUTEX_INITIALIZER is missing an initializer for + mutexAttr.mutexAttrType in kernel mode for various VxWorks versions. */ +/* { dg-xfail-if "missing initializer" { vxworks_kernel } } */ #include "pthread-init-common.h" -- Alexandre Oliva, happy hac

gcc.dg/intmax_t-1.c compiles without error on VxWorks 7 SR06x0

2020-12-22 Thread Alexandre Oliva
amp;& { ! *-*-vxworks7r* } } } } 0 } */ /* Compile with -Wall to get a warning if built-in and system intmax_t don't match. */ -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

Add conditions on VxWorks versions for gcc.dg/vxworks/initpri?.c

2020-12-22 Thread Alexandre Oliva
vxworks_kernel } } */ +/* { dg-skip-if "vxworks7 SR06x0 now uses .init_array" { *-*-vxworks7r* } } */ /* { dg-final { scan-assembler-not "\.ctors" } } */ /* { dg-final { scan-assembler-not "\.dtors" } } */ -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs

Account for VxWorks headers in libstdc++ test on names

2020-12-22 Thread Alexandre Oliva
/ __RTP__ + +#endif // VxWorks Major >= 7 + +#endif // __VXWORKS__ + #include -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

fix testsuite/g++.dg/init/new26.C for C++-14 and later

2020-12-22 Thread Alexandre Oliva
; -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

skip testsuite/g++.dg/other/anon5.C on vxworks_kernel targets

2020-12-22 Thread Alexandre Oliva
vxworks_kernel } } // { dg-options "-gdwarf-2" } // Ignore additional message on powerpc-ibm-aix // { dg-prune-output "obtain more information" } */ -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer V

Undefine ERROR in g++.dg/tree-ssa/copyprop.C

2020-12-22 Thread Alexandre Oliva
/tree-ssa/copyprop.C @@ -8,6 +8,11 @@ #include #include #include + +#ifdef ERROR +#undef ERROR +#endif + using namespace std; template _FIter lower_bound(_FIter, _FIter, _Tp&); template struct hash { }; -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Soft

Remove VxWorks-specific test directives in g++.dg/warn/miss-format-1.C

2020-12-22 Thread Alexandre Oliva
/* { dg-error "not declared" "" { target *-*-vxworks* } .-2 } */ + vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" } */ va_end (ap); } -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist

Skip testsuite/g++.old-deja/g++.pt/const2.C on vxworks_kernel

2020-12-22 Thread Alexandre Oliva
/g++.old-deja/g++.pt/const2.C @@ -1,4 +1,5 @@ // { dg-do link } +// { dg-skip-if "VxWorks dkms use partial link" { vxworks_kernel } } // This test should get a linker error for the reference to A::i. // { dg-prune-output "ld: symbol" } // { dg-message "i" "&qu

Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure...

2020-12-22 Thread Alexandre Oliva
/gcc/testsuite/g++.dg/cpp1y/constexpr-66093.C @@ -19,7 +19,7 @@ private: constexpr A f() { A a{}; -for (int i = 1; i <= n; i++) { +for (int i = 0; i < n; i++) { a[i] = i; } return a; -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free So

Fix testsuite/g++.dg/opt/20050511-1.C compilation error on VxWorks 7

2020-12-22 Thread Alexandre Oliva
/opt/20050511-1.C +++ b/gcc/testsuite/g++.dg/opt/20050511-1.C @@ -5,7 +5,7 @@ #include // The VxWorks kernel headers define their own UINT32 -#if defined __vxworks && !defined __RTP__ +#if defined __vxworks #define UINT32 my_UINT32 #endif -- Alexandre Oliva, happy hacker https://F

Fix testsuite/g++.old-deja/g++.mike/p658.C build failure on VxWorks RTP

2020-12-22 Thread Alexandre Oliva
ks API. -#if defined __vxworks && !defined __RTP__ +#if defined __vxworks #undef OK #endif -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

disable some aapcs/vfp*.c test if not arm_fp16_alternative_ok

2020-12-22 Thread Alexandre Oliva
ystem. + return 0 +} global et_arm_neon_fp16_flags set et_arm_neon_fp16_flags "" if { [check_effective_target_arm32] } { -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro E

compile gcc.target/arm/{pr78255-2.c, memset-inline-2.c} with -mno-long-calls

2020-12-22 Thread Alexandre Oliva
@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -mno-long-calls" } */ extern int bar (void *); -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

g++.dg/tls/pr79288.C: Skip on vxworks_kernel (TLS model not supported)

2020-12-22 Thread Alexandre Oliva
quot; { target i?86-*-* x86_64-*-* } } } struct S -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

make FOR_EACH_IMM_USE_STMT safe for early exits (was: Re: move sincos after pre)

2020-12-22 Thread Alexandre Oliva
but + it doesn't hurt to use the macros for documentation purposes. */ #define BREAK_FROM_IMM_USE_STMT(ITER) \ { \ end_imm_use_stmt_traverse (&(ITER)); \ -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

declare getpass in analyzer/sensitive-1.c test

2020-12-24 Thread Alexandre Oliva
) (); + char test_1 (FILE *logfile) { char *password = getpass (">"); /* { dg-message "\\(1\\) sensitive value acquired here" } */ -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

use sigjmp_buf for analyzer sigsetjmp tests

2020-12-24 Thread Alexandre Oliva
nner (void) { -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

-mno-long-calls for expected regalloc in arm/fp16-aapcs-2.c test

2020-12-24 Thread Alexandre Oliva
;incompatible float-abi" { arm*-*-* } { "-mfloat-abi=hard" } } */ -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

-mno-long-calls for arm/headmerge tests

2020-12-24 Thread Alexandre Oliva
cc.target/arm/headmerge-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -mno-long-calls" } */ /* { dg-final { scan-assembler-times "120\n" 1 } } */ extern void foo1 (int); -- Alexandre Oliva, happy hacker https:

-mno-long-calls for arm/no_unique_address tests

2020-12-24 Thread Alexandre Oliva
17 -O -foptimize-sibling-calls -mno-long-calls" } */ /* { dg-add-options arm_arch_v8a_hard } */ /* { dg-final { check-function-bodies "**" "" "" } } */ -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

-mno-long-calls for mve_libcall tests

2020-12-24 Thread Alexandre Oliva
quot; } */ +/* { dg-additional-options "-march=armv8.1-m.main+mve -mfloat-abi=hard -mthumb -mfpu=auto -mno-long-calls --save-temps" } */ double foo (double a, double b, double c) -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

Re: Split wchars tests from the normal variant

2020-12-28 Thread Alexandre Oliva
On Dec 28, 2020, François Dumont wrote: > On 22/12/20 10:27 pm, Alexandre Oliva wrote: >> While updating Corentin's patch for mainline, I brought over to the >> split-out test even the preprocessor conditional that is present in the >> current version of the test,

Re: Fix VxWorks xfail filters on pthread-init-?.c

2020-12-31 Thread Alexandre Oliva
On Dec 29, 2020, Mike Stump wrote: > On Dec 22, 2020, at 1:34 PM, Alexandre Oliva wrote: >> Match xfail on kernel instead of rtp mode. >> >> Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. >> Ok to install? > Ok. Thanks > Longer te

Re: Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure...

2021-01-01 Thread Alexandre Oliva
check. >> +++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-66093.C >> @@ -19,7 +19,7 @@ private: >> >> constexpr A f() { >> A a{}; >> -for (int i = 1; i <= n; i++) { >> +for (int i = 0; i < n; i++) { >> a[i] = i; >> } >> return a; --

Re: Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure...

2021-01-01 Thread Alexandre Oliva
On Jan 1, 2021, Mike Stump wrote: > On Jan 1, 2021, at 3:37 PM, Alexandre Oliva wrote: >> >> On Dec 29, 2020, Mike Stump wrote: >> >>> a[i-1] = i; >> >> 'fraid that won't pass: >> >> for (int i = 0; i < n; i++) { >>

calibrate intervals to avoid zero in futures poll test

2021-01-04 Thread Alexandre Oliva
double wait_for_0 = print("wait_for(0s)", stop - start); start = chrono::high_resolution_clock::now(); -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

add alignment to enable store merging in strict-alignment targets

2021-01-04 Thread Alexandre Oliva
[13] = 1; a.a[14] = 0; a.a[15] = 6; } T a; }; void foo (S &); void bar (void) { S s; foo (s); } -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

use -mfpu=neon for arm/simd/vmmla_1.c

2021-01-04 Thread Alexandre Oliva
quot;-save-temps -O2 -march=armv8.2-a+i8mm -mfloat-abi=hard" } */ +/* { dg-options "-save-temps -O2 -march=armv8.2-a+i8mm -mfpu=auto -mfloat-abi=hard" } */ #include "arm_neon.h" -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Acti

<    1   2   3   4   5   6   7   8   9   10   >