[00/13] check hash table counts

2022-12-26 Thread Alexandre Oliva via Gcc-patches
entry)) + dels--; + } + } + if (elmts || dels) + hashtab_chk_error (); +} } /* This function deletes an element with the given COMPARABLE value -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolc

[01/13] scoped tables: insert before further lookups

2022-12-26 Thread Alexandre Oliva via Gcc-patches
, + element); + record_expr (element2, NULL, '2'); return retval; } -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many p

[02/13] varpool: do not add NULL vnodes to referenced

2022-12-26 Thread Alexandre Oliva via Gcc-patches
gcc_checking_assert (vnode); referenced.add (vnode); } } -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about inj

[03/13] tree-inline decl_map: skip mapping NULL to itself

2022-12-26 Thread Alexandre Oliva via Gcc-patches
again, we won't want to duplicate it a second time. */ - if (key != value) + if (key != value && value) id->decl_map->put (value, value); } -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist

[04/13] [C++] constraint: insert norm entry once

2022-12-26 Thread Alexandre Oliva via Gcc-patches
the recursive call. */ -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org>

[05/13] ssa-loop-niter: skip caching of null operands

2022-12-26 Thread Alexandre Oliva via Gcc-patches
t; n; i++) { e = TREE_OPERAND (expr, i); + if (!e) + continue; /* SCEV analysis feeds us with a proper expression graph matching the SSA graph. Avoid turning it into a tree here, thus handle tree sharing -- Alexandre Oliva

[07/13] postreload-gcse: no insert on mere lookup

2022-12-26 Thread Alexandre Oliva via Gcc-patches
= NULL; - slot = expr_table->find_slot_with_hash (tmp_expr, hash, INSERT); + slot = expr_table->find_slot_with_hash (tmp_expr, hash, NO_INSERT); obstack_free (&expr_obstack, tmp_expr); if (!slot) -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/

[06/13] tree-inline decl_map: skip mapping result's NULL default def

2022-12-26 Thread Alexandre Oliva via Gcc-patches
default_def = ssa_default_def (id->src_cfun, result)) + { + temp = make_ssa_name (temp); + insert_decl_map (id, default_def, temp); + } insert_init_stmt (id, entry_bb, gimple_build_assign (temp, var)); } else -- Alexandre Oliva, happy hacker

[08/13] tm: complete tm_restart insertion

2022-12-26 Thread Alexandre Oliva via Gcc-patches
= *slot; if (n == NULL) { - n = ggc_alloc (); + *slot = n = ggc_alloc (); *n = dummy; } else -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes

[09/13] [C++] constexpr: request insert iff depth is ok

2022-12-26 Thread Alexandre Oliva via Gcc-patches
slot can move during evaluation of the body. */ -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts.

[10/13] lto: drop dummy partition mapping

2022-12-26 Thread Alexandre Oliva via Gcc-patches
= new_partition (""); - pmap.put (NULL, partition); npartitions++; } -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people c

[11/13] ada: don't map NULL decl to locus

2022-12-26 Thread Alexandre Oliva via Gcc-patches
ocus, bool clear_column, *locus = linemap_position_for_line_and_column (line_table, map, line, column); - if (file_map && file_map[file - 1].Instance) + if (decl && file_map && file_map[file - 1].Instance) decl_to_instance_map->put (decl, file_map[file - 1].Instan

[12/13] hash set: reject attempts to add empty values

2022-12-26 Thread Alexandre Oliva via Gcc-patches
); if (!existed) - new (e) Key (k); + { + new (e) Key (k); + // Catch attempts to insert e.g. a NULL pointer. + gcc_checking_assert (!Traits::is_empty (*e)); + } return existed; } -- Alexandre Oliva, happy hackerhttps

[13/13] hash-map: reject empty-looking insertions

2022-12-26 Thread Alexandre Oliva via Gcc-patches
else e->m_value = v; @@ -203,6 +204,7 @@ public: { e->m_key = k; new ((void *)&e->m_value) Value (); + gcc_checking_assert (!Traits::is_empty (*e)); } if (existed != NULL) -- Alexandre Oliva, happy hackerhttps://

Re: [05/13] ssa-loop-niter: skip caching of null operands

2022-12-27 Thread Alexandre Oliva via Gcc-patches
r not that > was a valid state or not? I'm pretty sure the case I hit was a CALL_EXPR. Thanks for the reviews! Happy GNU Year! -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformati

[14/17] parloops: don't request insert that won't be completed

2022-12-28 Thread Alexandre Oliva via Gcc-patches
gsi == NULL + ? NO_INSERT + : INSERT); + if (!slot || !slot->to) { if (gsi == NULL) return NULL; -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free

[15/17] prevent hash set/map insertion of deleted entries

2022-12-28 Thread Alexandre Oliva via Gcc-patches
8d 100644 --- a/gcc/hash-set.h +++ b/gcc/hash-set.h @@ -61,7 +61,8 @@ public: { new (e) Key (k); // Catch attempts to insert e.g. a NULL pointer. - gcc_checking_assert (!Traits::is_empty (*e)); + gcc_checking_assert (!Traits::is_empty (*e) + &

[16/17] check hash table counts at expand

2022-12-28 Thread Alexandre Oliva via Gcc-patches
if (is_deleted (*entry)) + n_deleted--; + else if (hash != Descriptor::hash (*entry) + && Descriptor::equal (*entry, comparable)) + hashtab_chk_error (); + } } + if (hash_table_sanitize_eq_limit >= m_size) +gcc_checking_assert (!n_elements && !n

[17/17] check hash table insertions

2022-12-28 Thread Alexandre Oliva via Gcc-patches
On Dec 27, 2022, Alexandre Oliva wrote: > The number of bugs it revealed tells me that leaving callers in charge > of completing insertions is too error prone. I found this > verification code a bit too expensive to enable in general. Here's a relatively cheap, checking-only

Re: [17/17] check hash table insertions

2022-12-28 Thread Alexandre Oliva via Gcc-patches
presentation. The one-pending-insertion strategy I implemented was the only one I could find that addressed all of the pitfalls without significant overhead. It caught even one case that the mere element-counting had failed to catch. -- Alexandre Oliva, happy hackerhttps://FSFLA.

Re: [17/17] check hash table insertions

2022-12-30 Thread Alexandre Oliva via Gcc-patches
On Dec 29, 2022, Richard Biener wrote: >> Am 29.12.2022 um 00:06 schrieb Alexandre Oliva : >> >> On Dec 28, 2022, Richard Biener wrote: >> >>> I wonder if on INSERT, pushing a DELETED marker would fix the dangling >>> insert and search duri

Re: [17/17] check hash table insertions

2022-12-30 Thread Alexandre Oliva via Gcc-patches
> Thanks and happy holidays! Happy GNU Year! :-) -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check t

[18/18] hash table: enforce testing is_empty before is_deleted

2023-01-12 Thread Alexandre Oliva via Gcc-patches
if (is_deleted (entry)) + if (is_empty (entry)) + continue; + else if (is_deleted (entry)) mark_deleted (nentries[i]); - else if (!is_empty (entry)) + else new ((void*) (nentries + i)) value_type (entry); } m_entries = n

Re: [RFC] Introduce -finline-memset-loops

2023-01-13 Thread Alexandre Oliva via Gcc-patches
Hello, Richard, Thank you for the feedback. On Jan 12, 2023, Richard Biener wrote: > On Tue, Dec 27, 2022 at 5:12 AM Alexandre Oliva via Gcc-patches > wrote: >> This patch extends the memset expansion to start with a loop, so as to >> still take advantage of known alignm

Re: [RFC] Introduce -finline-memset-loops

2023-01-13 Thread Alexandre Oliva via Gcc-patches
Hello, Paul, On Jan 13, 2023, Paul Koning wrote: >> On Jan 13, 2023, at 8:54 PM, Alexandre Oliva via Gcc-patches >> wrote: >> Target-specific code is great for tight optimizations, but the main >> purpose of this feature is not an optimization. AFAICT it actually

[PR106746] drop cselib addr lookup in debug insn mem

2023-01-14 Thread Alexandre Oliva via Gcc-patches
0, 6, 1, 8, 1, 2, 8, 6, +1, 8, 4, 9, 3, 8, 4, 6, 0, 9, 0, 1, 8, 2, 3); + v *= c; + w &= c; + *r = (U) v + (U) w; +} -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Di

Re: [RFC] Introduce -finline-memset-loops

2023-01-19 Thread Alexandre Oliva via Gcc-patches
On Jan 16, 2023, Richard Biener wrote: > On Sat, Jan 14, 2023 at 2:55 AM Alexandre Oliva wrote: >> Target-specific code is great for tight optimizations, but the main >> purpose of this feature is not an optimization. AFAICT it actually >> slows things down in general (du

[PR97714] final: accept markers at line 0

2020-12-22 Thread Alexandre Oliva via Gcc-patches
--- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/pr97714.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O -g" } */ + +void +function () +{ + if (0) +{ +#line 0 "whatever" +} +} -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Softwa

Re: [PATCH] Support multilib-aware target lib flags self-specs overriding

2022-11-05 Thread Alexandre Oliva via Gcc-patches
On Oct 6, 2022, Alexandre Oliva wrote: > I'd much rather we could use -fmultiflags, a far more elegant > arrangement IMHO, so... > Ping? https://gcc.gnu.org/pipermail/gcc-patches/2022-June/597419.html >> for gcc/ChangeLog >> * common.opt (fmultiflags): New. >

Re: [PATCH v2 #1/2] enable adjustment of return_pc debug attrs

2023-04-27 Thread Alexandre Oliva via Gcc-patches
On Apr 14, 2023, Alexandre Oliva wrote: > On Mar 23, 2023, Alexandre Oliva wrote: >> This patch introduces infrastructure for targets to add an offset to >> the label issued after the call_insn to set the call_return_pc >> attribute. This will be used on rs6000, that som

harden-conditionals: detach values before compares

2023-04-27 Thread Alexandre Oliva via Gcc-patches
g-final { scan-tree-dump-times {__asm__[(]"" : "=g" _[0-9]* : "0" j_[0-9]*[(]D[)][)][;][\n][ ]*_[0-9]* = j_[0-9]*[(]D[)] != 0;[\n] *_[0-9]* = _[0-9]* == 0} 1 "hardcmp" } } */ +/* { dg-final { scan-tree-dump-times {__asm__[(]"" : "=g" _[0-9]*

[FYI] Use CONFIG_SHELL-/bin/sh in genmultilib

2023-04-27 Thread Alexandre Oliva via Gcc-patches
ot; "${toosdirnames}" "${enable_multilib}"` + dirout=`${CONFIG_SHELL-/bin/sh} ./tmpmultilib3 "${combo}" "${todirnames}" "${toosdirnames}" "${enable_multilib}"` copts="/${copts}/" - optout=`./tmpmultilib4 "$

[libstdc++] use strtold for from_chars even without locale

2023-05-04 Thread Alexandre Oliva via Gcc-patches
,9 +682,11 @@ namespace ec = errc(); } return n; +#if _GLIBCXX_HAVE_USELOCALE } else if (errno == ENOMEM) ec = errc::not_enough_memory; +#endif return 0; } -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blog

[vxworks] [testsuite] [aarch64] use builtin in pred-not-gen-4.c

2023-05-04 Thread Alexandre Oliva via Gcc-patches
tin_isunordered(w[i], 0)) ? x[i] + w[i] : y[i] - w[i]; } } -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very fe

Re: [libstdc++] use strtold for from_chars even without locale

2023-05-04 Thread Alexandre Oliva via Gcc-patches
mind, patch withdrawn. I guess I should look into how to xfail or skip the tests involving full-precision long doubles on targets that are limited to doubles with lower precision to convert chars to long doubles. It's a pity to xfail the whole tests over an expected issue. Thanks, -- Alexan

Re: [libstdc++] use strtold for from_chars even without locale

2023-05-05 Thread Alexandre Oliva via Gcc-patches
from_chars limited to double-precision" { aarch64-*-vxworks* } } + // { dg-require-effective-target ieee_floats } // { dg-require-effective-target size32plus } // { dg-require-cmath "" } -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software

[FYI] [docs] note that -g opts are implicitly negatable too

2023-01-26 Thread Alexandre Oliva via Gcc-patches
`f'', ``g'', ``W'' or ``m'' are assumed to have a ``no-'' form unless +this property is used. @item Negative(@var{othername}) The option will turn off another option @var{othername}, which is -- Alexandre Oliva, happy hackerhttps:/

Re: [PATCH] sched-deps, cselib: Fix up some -fcompare-debug issues and regressions [PR108463]

2023-02-02 Thread Alexandre Oliva via Gcc-patches
to me, thanks! > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? FWIW, I'd approve it if I had the authority to do so :-) > I'd think we would need to differentiate between num_debug_mems and > num_mems depending on if setting_insn is non-N

[PATCH] [PR105665] ivopts: check defs of names in base for undefs

2022-05-27 Thread Alexandre Oliva via Gcc-patches
rees = 0; @@ -8192,6 +8249,7 @@ tree_ssa_iv_optimize (void) auto_bitmap toremove; tree_ssa_iv_optimize_init (&data); + mark_ssa_undefs (); /* Optimize the loops starting with the innermost ones. */ for (auto loop : loops_list (cfun, LI_FROM_INNERMOST)) -- Alexandre Oliva,

[COMMITTED] [Ada, build] Rename OSCONS_CC to GCC_FOR_ADA_RTS

2022-05-27 Thread Alexandre Oliva via Gcc-patches
-Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(MISCLIB) - cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ -| sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \ + cd $(RTS

Re: [PATCH] Support multilib-aware target lib flags self-specs overriding

2022-05-28 Thread Alexandre Oliva via Gcc-patches
On May 20, 2022, Alexandre Oliva wrote: > Regstrapped on x86_64-linux-gnu. Ok to install? Ping? https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595356.html > for gcc/ChangeLog > * common.opt (multiflags): New. > * doc/invoke.texi: Document it. >

Re: [PATCH] [PR105665] ivopts: check defs of names in base for undefs

2022-05-31 Thread Alexandre Oliva via Gcc-patches
suitable IV. >> +int a, b, c[1], d[2], *e = c; >> +int main() { >> + int f = 0; >> + for (; b < 2; b++) { >> +int g; >> +if (f) >> + g++, b = 40; >> +a = d[b * b]; >> +for (f = 0; f < 3; f++) { >> + if

Re: [PATCH] [PR105665] ivopts: check defs of names in base for undefs

2022-06-01 Thread Alexandre Oliva via Gcc-patches
On Jun 1, 2022, Richard Biener wrote: > On Tue, May 31, 2022 at 3:27 PM Alexandre Oliva wrote: >int i; >if (flag) > i = init; >i++; > still would (the propagation stops at i++). Uh, are you sure? That doesn't sound right. I meant for the pr

Re: [PATCH] [PR105665] ivopts: check defs of names in base for undefs

2022-06-02 Thread Alexandre Oliva via Gcc-patches
On Jun 1, 2022, Alexandre Oliva wrote: > Now I'm thinking we can go for an even stricter predicate to disable > the optimization: if a non-PHI use of a maybe-undefined dominates the > loop, then we can still perform the optimization: Here it is. [PR105665] ivopts: check defs of

Re: [PATCH] configure: arrange to use appropriate objcopy

2022-06-02 Thread Alexandre Oliva via Gcc-patches
COPY_FOR_TARGET): New. > Handle objcopy. Ok, thanks -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few che

Re: [PATCH] [PR105665] ivopts: check defs of names in base for undefs

2022-06-03 Thread Alexandre Oliva via Gcc-patches
ck >> + if (dump_file) > likewise ditto > OK with those changes. Thanks, here's what I'm installing momentarily. [PR105665] ivopts: check defs of names in base for undefs From: Alexandre Oliva The patch for PR 100810 tested for undefined SSA_NAMEs appearing

[PATCH, FYI] libcody: fix nonportable shell code in revision.stamp build rule

2022-06-03 Thread Alexandre Oliva via Gcc-patches
us --porcelain 2>/dev/null | grep -vq '^ ' ;\ - then revision+=M ;\ + then revision=$${revision}M ;\ fi ;\ else revision=unknown ;\ fi ;\ -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activ

Re: [PATCH] Support multilib-aware target lib flags self-specs overriding

2022-06-03 Thread Alexandre Oliva via Gcc-patches
On Jun 1, 2022, Hans-Peter Nilsson wrote: > On Fri, 20 May 2022, Alexandre Oliva via Gcc-patches wrote: >> >> This patch introduces -multiflags, short for multilib TFLAGS, as an >> option that does nothing by default, but that can be added to TFLAGS >> and mapped

Re: [PING][PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425]

2022-06-20 Thread Alexandre Oliva via Gcc-patches
y for cases in which exec_prefix != prefix, but takes some work for libdir and includedir to be expanded correctly during configure. E.g., libdir is normally set to ${exec_prefix}/lib, and exec_prefix defaults to ${prefix}, but a shell won't expand multiple layers of macros like make d

[PATCH] libstdc++: testsuite: work around bitset namespace pollution

2022-06-20 Thread Alexandre Oliva via Gcc-patches
dex 8faded348479a..dfba27ed3afa1 100644 --- a/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc +++ b/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc @@ -26,6 +26,7 @@ void test01() { using namespace std; + using std::bitset; // Work around struct ::bitset on rtems

[PATCH] libstdc++: testsuite: require cmath for nexttowardl

2022-06-20 Thread Alexandre Oliva via Gcc-patches
"" } #include -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me ab

[PATCH] libstdc++: testsuite: require cmath for exp simd

2022-06-20 Thread Alexandre Oliva via Gcc-patches
100644 --- a/libstdc++-v3/testsuite/experimental/simd/standard_abi_usable_2.cc +++ b/libstdc++-v3/testsuite/experimental/simd/standard_abi_usable_2.cc @@ -1,4 +1,5 @@ // { dg-options "-std=c++17 -ffast-math" } // { dg-do compile } +// { dg-require-cmath "" } #include &quo

[PATCH] libstdc++: testsuite: use cmath long double overloads

2022-06-20 Thread Alexandre Oliva via Gcc-patches
= ldexpl(testcase, exponent); + testcase = ldexp(testcase, exponent); if (testcase == 0.0L || isinf(testcase)) continue; -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer

[PATCH] libstdc++-v3: testsuite: complex proj requirements

2022-06-20 Thread Alexandre Oliva via Gcc-patches
: we don't have a test for + C99_COMPLEX, and these macros may vary depending on -std=*, but + macro tests wouldn't take them into account. */ +#if ! (_GLIBCXX_USE_C99_COMPLEX || _GLIBCXX_USE_C99_MATH_TR1) + if (true) +return 0; +#endif + test01(); test02(); test0

[PATCH] aarch64: testsuite: symbol-range compile only

2022-06-20 Thread Alexandre Oliva via Gcc-patches
{ dg-options "-O3 -save-temps -mcmodel=small" } */ char fixed_regs[0x8000]; -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply

[PATCH] testsuite: outputs.exp: test for skip_atsave more thoroughly

2022-06-20 Thread Alexandre Oliva via Gcc-patches
atsave_test_out [outest "$b-skip-atsave?" $sing "@/dev/null -o $b.exe -save-temps" {} {{.args.1}}] +if { [lindex [lindex $atsave_test_out 0] 0] == "$b.args.1" } { + set skip_atsave 1 +} +} + # Driver-chosen outputs. outest "$b-1 asm default 1&quo

[PATCH] testsuite: outputs.exp: cleanup before running tests (was: Re: [PATCH] testsuite: outputs.exp: test for skip_atsave more thoroughly)

2022-06-20 Thread Alexandre Oliva via Gcc-patches
On Jun 21, 2022, Alexandre Oliva wrote: > * gcc.misc-tests/outputs.exp (outest): Introduce quiet mode, Use the just-added dry-run infrastructure to clean up files that may have been left over by interrupted runs of outputs.exp, which used to lead to spurious non-repeatable (self-fix

[PATCH] testsuite: pthread: call sched_yield for non-preemptive targets

2022-06-20 Thread Alexandre Oliva via Gcc-patches
mp;workspace, add1bit); tmp3=__sync_fetch_and_sub (&workspace, add1bit); @@ -178,6 +182,8 @@ main () t, err); }; + sched_yield (); + #ifdef _WIN32 Sleep (5000); #else @@ -187,6 +193,8 @@ main () /* Stop please. */ __sync_lock_test_and_set (&doquit, 1ll);

[PATCH] libstdc++: testsuite: call sched_yield for nonpreemptive targets

2022-06-20 Thread Alexandre Oliva via Gcc-patches
. +sched_yield (); } while (sleeping) { -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts

[PATCH] Introduce -nolibstdc++ option

2022-06-20 Thread Alexandre Oliva via Gcc-patches
-lc" } +// { dg-additional-options "-fno-rtti -nolibstdc++" } // { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } // { dg-xfail-if "AIX weak" { powerpc-ibm-aix* } } -- Alexandre Oliva, happy hackerhttp

[PATCH] c++: testsuite: require lto_incremental in pr90990_0.C

2022-06-20 Thread Alexandre Oliva via Gcc-patches
; -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org>

[PATCH] libstdc++: eh_globals: gthreads: reset _S_init before deleting key

2022-06-20 Thread Alexandre Oliva via Gcc-patches
l, so that, should + __gthread_key_delete throw an exception, it won't rely on + the key being deleted. */ + _S_init = false; + __gthread_key_delete(_M_key); + } } __eh_globals_init(const __eh_globals_init&) = delete; -- Alexandre

Re: [PATCH] libstdc++: testsuite: call sched_yield for nonpreemptive targets

2022-06-21 Thread Alexandre Oliva via Gcc-patches
On Jun 21, 2022, Jonathan Wakely wrote: > On Tue, 21 Jun 2022 at 06:54, Alexandre Oliva via Libstdc++ > wrote: >> >> >> As in the gcc testsuite, systems without preemptive multi-threading >> require sched_yield calls to be placed at points in which a contex

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-21 Thread Alexandre Oliva via Gcc-patches
going to have much use one way or another, aside from this testcase. -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very

Re: [PATCH] aarch64: testsuite: symbol-range compile only

2022-06-21 Thread Alexandre Oliva via Gcc-patches
On Jun 21, 2022, Richard Sandiford wrote: > Could we instead have a new target selector for whether the memory > map includes xGB of RAM? How about this? Testing on aarch64-rtems6.0. Ok to install? aarch64: testsuite: symbol-range fallback to compile From: Alexandre Oliva On some

[PATCH] libstdc++: testsuite: use -lbsd for net_ts on RTEMS

2022-06-21 Thread Alexandre Oliva via Gcc-patches
} return $flags } -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org>

[PATCH] libstdc++: testsuite: tolerate non-cancelling sleep

2022-06-21 Thread Alexandre Oliva via Gcc-patches
rget system doesn't make sleep a cancellation point... + pthread_testcancel(); +} } int main() -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many pe

[PATCH] libstdc++: 60241.cc: tolerate slightly shorter aggregate sleep

2022-06-21 Thread Alexandre Oliva via Gcc-patches
(start + time); sleeping = false; }); while (!sleeping) -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very

[PATCH] libstdc++: async: tolerate slightly shorter sleep

2022-06-21 Thread Alexandre Oliva via Gcc-patches
more times // than necessary. -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org>

[PATCH] libstdc++: testsuite: avoid predictable mkstemp

2022-06-21 Thread Alexandre Oliva via Gcc-patches
= __gnu_test::nonexistent_path(); - auto to = __gnu_test::nonexistent_path(); std::error_code ec; create_directories(from/"a/b/c"); + auto to = __gnu_test::nonexistent_path(); { __gnu_test::scoped_file f(to); copy(from, to, ec); -- Alexandre Oliva, happy hacker

[PATCH] libstdc++: testsuite: test symlnks ifdef _GLIBCXX_HAVE_SYMLINK

2022-06-21 Thread Alexandre Oliva via Gcc-patches
__MINGW64__) +#if defined(__MINGW32__) || defined(__MINGW64__) \ + || !defined (_GLIBCXX_HAVE_SYMLINK) // No symlink support #else std::error_code ec; -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engin

[PATCH] libstdc++: retry removal of dir entries if dir removal fails

2022-06-21 Thread Alexandre Oliva via Gcc-patches
amp; p, error_code& ec) // Remove p itself, which is either a non-directory or is now empty. if (int last = fs::remove(p, ec); !ec) return count + last; + if (count > init_count) +goto retry; return -1; } -- Alexandre Oliva, happy hacker

[PATCH] libstdc++: testsuite: fs rename to self may fail

2022-06-21 Thread Alexandre Oliva via Gcc-patches
VERIFY( is_regular_file(p2) ); + fs::remove(p1, ec); fs::remove(p2, ec); } -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about inj

[PATCH] libstdc++: testsuite: skip fs space tests if not available

2022-06-21 Thread Alexandre Oliva via Gcc-patches
fine HAVE_SPACE 0 +#endif + namespace fs = std::experimental::filesystem; bool check(fs::space_info const& s) @@ -60,6 +67,9 @@ test02() int main() { + if (!HAVE_SPACE) +return 0; + test01(); test02(); } -- Alexandre Oliva, happy hackerhttps://FSFLA.org/b

[PATCH] libstdc++: testsuite: skip fs last_write_time tests if not available

2022-06-21 Thread Alexandre Oliva via Gcc-patches
defined (_GLIBCXX_HAVE_SYS_STAT_H) +# define HAVE_LWT 1 +#else +# define HAVE_LWT 0 +#endif + using time_type = std::experimental::filesystem::file_time_type; namespace chrono = std::chrono; @@ -175,6 +183,9 @@ test02() int main() { + if (!HAVE_LWT) +return 0; + test01(); te

[PATCH] libstdc++: fs: rtems subdir renaming

2022-06-21 Thread Alexandre Oliva via Gcc-patches
ename a directory to an existing directory +#else // Can rename a non-empty directory to the name of an empty directory. ec = bad_ec; fs::rename(dir/"subdir2", dir/"subdir", ec); @@ -165,10 +172,12 @@ test_directories() VERIFY( is_directory(dir/"subdir") ); VE

[PATCH] libstdc++-v3: check for openat

2022-06-21 Thread Alexandre Oliva via Gcc-patches
ff --git a/libstdc++-v3/src/filesystem/dir-common.h b/libstdc++-v3/src/filesystem/dir-common.h index 365fd527f4d68..669780ea23fe5 100644 --- a/libstdc++-v3/src/filesystem/dir-common.h +++ b/libstdc++-v3/src/filesystem/dir-common.h @@ -199,7 +199,7 @@ struct _Dir_base #endif -#ifdef AT_FDCWD +#

Re: [PATCH] libstdc++: testsuite: fs rename to self may fail

2022-06-22 Thread Alexandre Oliva via Gcc-patches
Hello, Sebastian, On Jun 22, 2022, Sebastian Huber wrote: > On 22/06/2022 08:24, Alexandre Oliva via Libstdc++ wrote: >> rtems6's rename() implementation errors with EEXIST when the rename-to >> filename exists, even when renaming a file to itself or when renaming >> a

Re: [PATCH] gcc/configure.ac: fix --enable-fixed-point enablement [PR34422]

2022-06-22 Thread Alexandre Oliva via Gcc-patches
n supported targets, and decaying it to no if unsupported, with a warning only if it was yes. >> with an appropriate ChangeLog? It's good practice to post the proposed ChangeLog entry along with the patch, so that it can also be reviewed. Thanks, -- Alexandre Oliva, happy hacker

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-22 Thread Alexandre Oliva via Gcc-patches
slike for the spelling and change the patch to use -nostdlib++. -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but ver

Re: [PATCH] libstdc++: 60241.cc: tolerate slightly shorter aggregate sleep

2022-06-22 Thread Alexandre Oliva via Gcc-patches
On Jun 22, 2022, Sebastian Huber wrote: > The clock_nanosleep() uses the coarse resolution Thanks for looking into this. So, is it missing a rounding-up to ensure the sleep time is >= the requested time, or is it even more elaborate than that? -- Alexandre Oliva, happy

Re: [PATCH] libstdc++: 60241.cc: tolerate slightly shorter aggregate sleep

2022-06-22 Thread Alexandre Oliva via Gcc-patches
On Jun 22, 2022, Sebastian Huber wrote: > The clock_nanosleep() uses the coarse resolution which may give a time > before now(). Uhh, sorry, hit send too early. I also meant to ask whether you'd like me to file an RTEMS ticket about this issue. -- Alexandre Oliva, h

Re: [PATCH] libstdc++: retry removal of dir entries if dir removal fails

2022-06-22 Thread Alexandre Oliva via Gcc-patches
mv foo temp wait ls -d temp/foo temp/foo might be removed if you happened to be iterating in temp when the 'mv' commands run. Is that another kind of race that needs to be considered? If a dir is moved while we're visiting it, should we stop visiting it? What about its par

Re: [PATCH] libstdc++: testsuite: fs rename to self may fail

2022-06-22 Thread Alexandre Oliva via Gcc-patches
On Jun 22, 2022, Jonathan Wakely wrote: > On Wed, 22 Jun 2022 at 08:02, Alexandre Oliva via Libstdc++ > wrote: >> >> Hello, Sebastian, >> >> On Jun 22, 2022, Sebastian Huber wrote: >> >> > On 22/06/2022 08:24, Alexandre Oliva via Libstdc++

Re: [PATCH] libstdc++: testsuite: test symlnks ifdef _GLIBCXX_HAVE_SYMLINK

2022-06-22 Thread Alexandre Oliva via Gcc-patches
s in testsuite_fs.h, so I'll shortly post new versions of those patches for review. -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply abo

Re: [PATCH] libstdc++-v3: check for openat

2022-06-22 Thread Alexandre Oliva via Gcc-patches
per class could demand base paths or CWD in the !HAVE_OPENAT case, and enable both uses otherwise, offering some additional type safety that the current abstraction doesn't. Does that make sense to you? -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blog

Re: [PATCH] libstdc++: testsuite: fs rename to self may fail

2022-06-22 Thread Alexandre Oliva via Gcc-patches
case for xfail until it gets fixed in the kernel, where atomic filesystem operations belong :-( Would a patch to add: // { dg-xfail-if "::rename is not POSIX-compliant" { target *-*-rtems* } } to rename.cc tests be acceptable? I'm afraid I can't go further down this rabbit

Re: [PATCH] libstdc++: testsuite: test symlnks ifdef _GLIBCXX_HAVE_SYMLINK

2022-06-23 Thread Alexandre Oliva via Gcc-patches
executable UNRESOLVED: 26_numerics/random/random_device/entropy.cc compilation failed to produce executable error: 'log2' is not a member of 'std'; did you mean 'log'? -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software A

Re: [PATCH] aarch64: testsuite: symbol-range compile only

2022-06-23 Thread Alexandre Oliva via Gcc-patches
ive_target_two_plus_gigs { } { +return [check_no_compiler_messages two_plus_gigs executable { + int dummy[0x8000]; + int main () { return 0; } +}] +} + # Return 1 if we're generating 32-bit code using default options, 0 # otherwise. -- Alexandre Oliva, happy hacker

Re: [PATCH] libstdc++: testsuite: test symlnks ifdef _GLIBCXX_HAVE_SYMLINK

2022-06-23 Thread Alexandre Oliva via Gcc-patches
trace { set cond "_GLIBCXX_HAVE_STACKTRACE" - return [v3_check_preprocessor_condition stacktrace $cond] + return [v3_check_preprocessor_condition stacktrace $cond ""] }] } @@ -1358,7 +1369,7 @@ proc check_effective_target_stacktrace { } { proc check_effective_t

Re: [PATCH] libstdc++: testsuite: skip fs last_write_time tests if not available

2022-06-23 Thread Alexandre Oliva via Gcc-patches
@ -47,6 +47,11 @@ namespace test_fs = std::experimental::filesystem; #define NO_SYMLINKS #endif +#if !defined (_GLIBCXX_HAVE_SYS_STATVFS_H) \ + && !defined (_GLIBCXX_FILESYSTEM_IS_WINDOWS) +#define NO_SPACE +#endif + namespace __gnu_test { #define PATH_CHK(p1, p2, fn) \ -- Alex

Re: [PATCH] libstdc++: testsuite: skip fs space tests if not available

2022-06-23 Thread Alexandre Oliva via Gcc-patches
TIMENSAT || _GLIBCXX_USE_UTIME)) +#define NO_LAST_WRITE_TIME 1 +#endif + namespace __gnu_test { #define PATH_CHK(p1, p2, fn) \ -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org>

Re: [PATCH] libstdc++-v3: check for openat

2022-06-23 Thread Alexandre Oliva via Gcc-patches
On Jun 22, 2022, Jonathan Wakely wrote: > There are other interactions between AT_CDCWD and ::openat not covered > by this patch. I this this also needs to check HAVE_OPENAT: Here's an updated version, tested with this additional change. libstdc++: check for openat From: Alex

Re: [PATCH] libstdc++: testsuite: fs rename to self may fail

2022-06-23 Thread Alexandre Oliva via Gcc-patches
On Jun 23, 2022, Jonathan Wakely wrote: > On Thu, 23 Jun 2022 at 07:26, Alexandre Oliva wrote: >> Would a patch to add: >> >> // { dg-xfail-if "::rename is not POSIX-compliant" { target *-*-rtems* } } >> >> to rename.cc tests be acceptable? > Yes,

Re: [PATCH] libstdc++: testsuite: use -lbsd for net_ts on RTEMS

2022-06-23 Thread Alexandre Oliva via Gcc-patches
On Jun 23, 2022, Jonathan Wakely wrote: > On Thu, 23 Jun 2022, 10:02 Sebastian Huber, < > sebastian.hu...@embedded-brains.de> wrote: >> On 22/06/2022 07:24, Alexandre Oliva via Gcc-patches wrote: >> > +} elseif { [istarget *-*-rtems*] } { >> > + # Add

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-23 Thread Alexandre Oliva via Gcc-patches
On Jun 22, 2022, Alexandre Oliva wrote: > Yeah, I suppose that makes sense, it's beneficial for users to avoid the > cognitive overload of dealing with equivalent options with different > spellings. I'll swallow my dislike for the spelling and change the > patch to use -n

Re: [PATCH] libstdc++: 60241.cc: tolerate slightly shorter aggregate sleep

2022-06-23 Thread Alexandre Oliva via Gcc-patches
v3/testsuite/30_threads/this_thread/60421.cc +++ b/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc @@ -23,6 +23,7 @@ // { dg-require-gthreads "" } // { dg-require-time "" } // { dg-require-sleep "" } +// { dg-xfail-if "nanosleep may wake up too early&q

Re: [PATCH] libstdc++: async: tolerate slightly shorter sleep

2022-06-23 Thread Alexandre Oliva via Gcc-patches
On Jun 22, 2022, Alexandre Oliva wrote: > Regstrapped on x86_64-linux-gnu, also tested with a cross to > aarch64-rtems6. Ok to install? The early wakeups are fixed for rtems6.1, so the same question raised at https://gcc.gnu.org/pipermail/gcc-patches/2022-June/597102.html apply to th

Re: [PATCH] libstdc++: testsuite: avoid predictable mkstemp

2022-06-23 Thread Alexandre Oliva via Gcc-patches
On Jun 22, 2022, Jonathan Wakely wrote: > On Wed, 22 Jun 2022 at 07:05, Alexandre Oliva via Libstdc++ > wrote: >> It was prompted by a target system with a non-random implementation of >> mkstemp, that returns a predictable sequence of filenames and selects >> the firs

Re: [PATCH] libstdc++: testsuite: test symlnks ifdef _GLIBCXX_HAVE_SYMLINK

2022-06-23 Thread Alexandre Oliva via Gcc-patches
ed __foo__) then using > NO_SYMLINKS in the dg proc will keep them in sync. 'zactly my thinking. Here's what I'm testing (same way). Ok to install if it passes? libstdc++: testsuite: conditionalize symlink tests From: Alexandre Oliva Several filesystem tests expect to

<    14   15   16   17   18   19   20   >