Re: [SFN+LVU+IEPM v4 9/9] [IEPM] Introduce inline entry point markers

2018-02-27 Thread Alexandre Oliva
On Feb 21, 2018, Alexandre Oliva <aol...@redhat.com> wrote: > On Feb 15, 2018, Szabolcs Nagy <szabolcs.n...@arm.com> wrote: >> i see assembler slow downs with these location view patches >> i opened https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84408 > [LVU] rese

Re: [PR81611] improve auto-inc

2018-02-27 Thread Alexandre Oliva
reg0_use = NULL; + } + + mem_insn.insn = reg0_use; + + if (mem_insn.insn + && find_address ( (mem_insn.insn), + inc_insn.reg0) == -1) {

Re: [PATCH] Fix C++ ref op= ICE in the gimplifier with -g (PR c++/84704)

2018-03-05 Thread Alexandre Oliva
I suppose my concerns are unfounded, and in case they aren't, we'll soon find out ;-) So, no objections from me; thanks for looking into this! -- Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFL

Re: [PR c++/84593] ice on braced init with uninit ref field

2018-03-05 Thread Alexandre Oliva
On Mar 2, 2018, Jason Merrill <ja...@redhat.com> wrote: > On Fri, Mar 2, 2018 at 2:57 AM, Alexandre Oliva <aol...@redhat.com> wrote: >> + gcc_assert (TREE_CODE (type) == REFERENCE_TYPE); >> + init = fold (convert (type, integer_zero_node)); > Maybe bui

Re: [PR84620] output symbolic entry_view as data2, not addr

2018-03-05 Thread Alexandre Oliva
On Mar 2, 2018, Alexandre Oliva <aol...@redhat.com> wrote: > Mark Wielaard is implementing support for LVU and IEPM in elfutils, and > he was surprised by the encoding of DW_AT_GNU_entry_view; so was I! > When GCC computes and outputs views internally (broken without interna

Re: [C++] [PR84231] overload on cond_expr in template

2018-03-05 Thread Alexandre Oliva
+}; + +format f; + +template +void function_template(bool b) +{ + // Compiles OK with array lvalue: + f % (b ? "x" : "x"); + + // Used to fails with pointer rvalue: + f % (b ? "" : "x"); +} + +void normal_function(bool b) +{ + // Both cases compile OK i

Re: [PR c++/84593] ice on braced init with uninit ref field

2018-03-05 Thread Alexandre Oliva
{ + int x; + int c = 0; + int +} c = {}; // { dg-error "uninitialized reference" } -- Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFLA.org/ FSF Latin America board member Free Soft

gOlogy: do not change code in isolate-paths for warnings only

2018-10-21 Thread Alexandre Oliva
te_erroneous_paths_attribute) + { + tree zero = build_zero_cst (TREE_TYPE (val)); + gimple_return_set_retval (return_stmt, zero); + update_stmt (stmt); + } } }

gOlogy: fix debug binds in auto-inc-dec

2018-10-21 Thread Alexandre Oliva
e = XCNEWVEC (rtx_insn *, max_reg); + else +/* An earlier function may have had debug binds. */ +reg_next_debug_use = NULL; reg_next_use = XCNEWVEC (rtx_insn *, max_reg); reg_next_inc_use = XCNEWVEC (rtx_insn *, max_reg); reg_next_def = XCNEWVEC (rtx_insn *, max_reg); FOR_EACH_BB

Re: introduce --enable-mingw-full32 to default to --large-address-aware

2018-10-11 Thread Alexandre Oliva
the patch, adjusted as requested and retested. Ok to install? introduce --enable-large-address-aware From: Alexandre Oliva Add a configure knob for mingw32 and 64 toolchains to default passing --large-address-aware to the linker, when creating 32-bit binaries. -Wl,--disable-large-address-a

Re: introduce --enable-mingw-full32 to default to --large-address-aware

2018-10-31 Thread Alexandre Oliva
On Oct 12, 2018, Alexandre Oliva wrote: > * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define, > based on MINGW_DEFAULT_LARGE_ADDR_AWARE. > (LINK_SPEC): Insert it. > * config/i386/mingw-264.h: Likewise. ^ s/2/w/, fi

gOlogy: skip dbranch at -Og

2018-10-25 Thread Alexandre Oliva
{ OPT_LEVELS_1_PLUS, OPT_fguess_branch_probability, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_fcprop_registers, NULL, 1 }, -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree

[PR86438] compare-elim: cope with set of in_b

2018-11-08 Thread Alexandre Oliva
+ f + d; + check ((x >> 32) >> 32, x); + return 0; +} -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist Hay que enGNUrecerse, pero sin perder la terGNUra jamás-GNUChe

Re: introduce --enable-mingw-full32 to default to --large-address-aware

2018-11-08 Thread Alexandre Oliva
On Nov 7, 2018, JonY <10wa...@gmail.com> wrote: > On 11/07/2018 08:34 AM, Alexandre Oliva wrote: >> On Nov 1, 2018, JonY wrote: >> >>> Looks like it causes an error on 64bit: >>> /usr/libexec/gcc/x86_64-w64-mingw32/ld: unrecognized option >&

Re: [RFC] support --with-multilib-list=@/path/name

2018-11-12 Thread Alexandre Oliva
GCC. The macros expected +to be defined in these fragments are not stable across GCC releases, so +make sure they define the @code{MULTILIB}-related macros expected by +the version of GCC you are building. +@ifnothtml +@xref{Target Fragment,, Target Makefile Fragments, gccint, GNU Compiler +Collection (

Re: [PR81878]: fix --disable-bootstrap --enable-languages=ada, and cross-back gnattools build

2018-11-13 Thread Alexandre Oliva
the bootstrap to build tools linked with the runtime built with it. It seems to me you'd run into a catch-22 without that. -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evang

[PR81878]: fix --disable-bootstrap --enable-languages=ada, and cross-back gnattools build

2018-11-12 Thread Alexandre Oliva
"x$cross_compiling/$build/$host" = "xno/$host/$target" ; then + default_gnattools_target="gnattools-native" +else + default_gnattools_target="gnattools-cross" +fi +AC_SUBST([default_gnattools_target]) + # Output: create a Makefile. AC_CONFIG_FILES([Makefile]) -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist Hay que enGNUrecerse, pero sin perder la terGNUra jamás-GNUChe

Re: [PR81878]: fix --disable-bootstrap --enable-languages=ada, and cross-back gnattools build

2018-11-13 Thread Alexandre Oliva
nd symmetry, I'm not jumping right onto it ;-) -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist Hay que enGNUrecerse, pero sin perder la terGNUra jamás-GNUChe

Re: introduce --enable-mingw-full32 to default to --large-address-aware

2018-11-07 Thread Alexandre Oliva
w32 is supposed to support biarch at all, I might be able to fix the implementation of --enable-large-address-aware there. As for the problem you reported on x86_64-w64-mingw32, I'm afraid I'll need some more information to be able to duplicate that and try to fix it. Thanks, -- Alexandre Oliva,

[PR87793] reject non-toplevel unspecs in debug loc exprs on x86

2018-11-06 Thread Alexandre Oliva
oadable_handler++) + if (fit_loadable_handler->type == img_type) + fit_loadable_handler->handler(img_data, img_len); +} -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolch

[PR87874] avoid const-wide-int subreg in LRA

2018-11-06 Thread Alexandre Oliva
__int128 ks = uint64_max / 2 + 1; + +while (s7 < 1) + while (nb < 2) +{ + for (ks = 0; ks < 3; ++ks) +{ +} + + ++nb; +} + } +} +} +#endi

Re: [PR86438] compare-elim: cope with set of in_b

2018-11-09 Thread Alexandre Oliva
__builtin_abort (); +} + +int +main (void) +{ + u64 d = (g ? 5 : 4); + u32 f = __builtin_sub_overflow_p (d, (u128) d, (u64) 0); + u128 x = g + f + d; + check (x >> (sizeof (u64) * __CHAR_BIT__), x); + return 0; +} -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo B

Re: introduce --enable-mingw-full32 to default to --large-address-aware

2018-11-09 Thread Alexandre Oliva
n that defaulted to 32-bit. */ +# define LINK_SPEC_LARGE_ADDR_AWARE \ + "%{!shared:%{!mdll:%{!m64:--large-address-aware}}}" #endif #define LINK_SPEC "%{mwindows:--subsystem windows} \ -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free

[RFC] support --with-multilib-list=@/path/name

2018-11-09 Thread Alexandre Oliva
multilib lists to be configured. Whether multiple +such files can be used together depends on the contents of the supplied +files. See @file{gcc/config/arm/t-*profile} for examples of what such +Makefile fragments ought to look like. The table below gives the combination of ISAs, architectures, F

introduce --enable-mingw-full32 to default to --large-address-aware

2018-10-04 Thread Alexandre Oliva
cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define. --- gcc/config/i386/cygming.h |4 1 file changed, 4 insertions(+) diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h index cfe563f47af0b..d7c7dd7057bf6 100644 --- a/gcc/config/i386/cygming.h +++ b/gcc/config/i386/cygming

Re: introduce --enable-mingw-full32 to default to --large-address-aware

2018-10-09 Thread Alexandre Oliva
rop -mingw from the option name. I'd retain the current defaults of each target, unless there's a strong reason to change them. -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain Engineer

Re: introduce --enable-mingw-full32 to default to --large-address-aware

2018-10-09 Thread Alexandre Oliva
On Oct 10, 2018, JonY <10wa...@gmail.com> wrote: > On 10/10/2018 03:24 AM, Alexandre Oliva wrote: >> On Oct 9, 2018, JonY <10wa...@gmail.com> wrote: >> Now, if you wish it to affect Cygwin as well, I could implement that, >> and drop -mingw from the option name.

Re: introduce --enable-mingw-full32 to default to --large-address-aware

2018-10-08 Thread Alexandre Oliva
enable-mingw-large-address-aware} option arranges for +MinGW executables to be linked using the @option{--large-address-aware} +option, that enables the use of more than 2GB of memory. If GCC is +configured with this option, its effects can be reversed by passing the +@option{-Wl,--disable-large

Re: [PATCH][2/n] Make _INLINE_ENTRY markers have the location we finally need

2018-10-01 Thread Alexandre Oliva
ove, and I'm sure any problem along these lines that arises, if any, can be fixed without much trouble. So, as far as I'm concerned, go for it, and thanks! -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolch

Re: [PR87054] fix unaligned access

2018-09-24 Thread Alexandre Oliva
. [PR87054] adjust testcase for 32-bit x86 From: Alexandre Oliva The test assumed __int128 to be available whenever __SSE__ was defined, but this assumption doesn't hold on 32-bit x86. Fixed. for gcc/testsuite/ChangeLog PR middle-end/87054 * gcc.dg/pr87054.c: Adjust for no __i

adjust dinst.adb's expectations for location views

2018-09-25 Thread Alexandre Oliva
]" } } */ +-- { dg-final { scan-assembler "loc \[0-9] 5 \[0-9]( is_stmt \[0-9])? discriminator 4\[ \n]" } } */ with DInst_Pkg; -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist

Re: [Ada] Introduce -gnatd_A to set Opt.Disable_ALI_File

2018-09-27 Thread Alexandre Oliva
From: Alexandre Oliva for gcc/ada/ChangeLog * gcc-interface/lang-specs.h (default_compilers): When given fcompare-debug-second, adjust auxbase like cc1, and pass gnatd_A. * gcc-interface/misc.c (flag_compare_debug): Remove variable. (gnat_post_option

[PATCH] [PR87012] canonicalize ref type for tmpl arg

2018-11-16 Thread Alexandre Oliva
+using ref = T&; + +int x; + +template class T, T> +struct X { }; + +struct Y : X { }; -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist Hay que enGNU

[PATCH] [PR86747] tsubst friend tpl ctxt before looking it up for dupes

2018-11-16 Thread Alexandre Oliva
index ..5b0a0bb95146 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr86747.C @@ -0,0 +1,8 @@ +// { dg-do compile } + +template class A { + template class C; // #1 + template friend class C; // #2 +}; + +A a; -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change

Re: [C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...)

2019-01-16 Thread Alexandre Oliva
llee_fndecl_nofold (expr)) + if (DECL_CONSTRUCTOR_P (fn) || DECL_DESTRUCTOR_P (fn)) + return expr; + maybe_warn_nodiscard (expr, implicit); break; -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board membe

Re: [C++ PATCH] [PR87768] do not suppress location wrappers when tsubsting

2019-01-16 Thread Alexandre Oliva
On Jan 2, 2019, Jason Merrill wrote: > On 12/30/18 11:31 PM, Alexandre Oliva wrote: >> Concepts-checking and other kinds of early tsubsting may often take >> place while location wrappers are suppressed, e.g. because we've >> triggered template instantiation within tem

Re: [C++ PATCH] [PR86648] use auto identifier for class placeholder templates

2019-01-16 Thread Alexandre Oliva
On Jan 8, 2019, Jason Merrill wrote: > On 12/28/18 2:45 PM, Alexandre Oliva wrote: >> + if (template_placeholder_p (t) >> + && DECL_P (CLASS_PLACEHOLDER_TEMPLATE (t)) >> + && TYPE_IDENTIFIER (TREE_TYPE (CLASS_PLACEHOLDER_TEMPLATE (t &

[C++ PATCH] [PR87770] test partial specializations for type dependence

2019-01-17 Thread Alexandre Oliva
{ dg-do compile } + +template struct d { + template d(e); +}; +template <> template d::d(e); +template <> template d::d(e) { + long g; + (void)g; +} +template d::d(char); -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin

[PR86153] simplify more overflow tests in VRP

2018-12-18 Thread Alexandre Oliva
nerally profitable to do so. */ + vro.intersect (vr0); + if (vro.undefined_p ()) + return boolean_false_node; + vri.intersect (vr0); + if (vri.undefined_p ()) + return boolean_true_node; + } } if ((ret = vrp_evaluate_conditional_warnv_with_ops_using_ran

Re: [RFC] support --with-multilib-list=@/path/name

2018-12-20 Thread Alexandre Oliva
On Dec 7, 2018, Alexandre Oliva wrote: > Any objections, further requests or advice, before I put it in and FTR, I've just checked it in. -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain Engin

Re: [PATCH] [PR86823] retain deferred access checks from outside firewall

2018-12-13 Thread Alexandre Oliva
On Dec 6, 2018, Alexandre Oliva wrote: > I'm giving your proposed patch a full round of testing along with other > patches. [PR86823] retain deferred access checks from outside firewall We used to preserve deferred access check along with resolved template ids, but a tentative p

Re: [PATCH] [PR87012] canonicalize ref type for tmpl arg

2018-12-13 Thread Alexandre Oliva
ndex ..fd3eea47c390 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr87012.C @@ -0,0 +1,11 @@ +// { dg-do compile { target c++11 } } + +template +using ref = T&; + +int x; + +template class T, T> +struct X { }; + +struct Y : X { }; -- Alexandre Oliva, freedom fighter https://FSFLA.org

Re: [C++ PATCH] [PR c++/87814] undefer deferred noexcept on tsubst if request

2018-12-14 Thread Alexandre Oliva
On Dec 6, 2018, Alexandre Oliva wrote: > Regstrapped on x86_64- and i686-linux-gnu, mistakenly along with a patch > with a known regression, and got only that known regression. Retesting > without it. Ok to install? Ping? That retesting confirmed no regressions. https://gcc.gnu.o

Re: [C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...)

2018-12-14 Thread Alexandre Oliva
}; + struct boo : foo { + using foo::foo; + }; + struct bor : boo { + template + /* constexpr */ bor(T ... args) : boo(args...) {} + }; + struct bar : bor { + using bor::bor; + }; + void f() noexcept(noexcept(bar{0,1})); +} + } +} --

Re: [C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...)

2018-12-14 Thread Alexandre Oliva
constexpr_noninherited_ctor { + struct foo { + template + constexpr foo(T, ...) {} + }; + struct boo : foo { + using foo::foo; + }; + struct bor : boo { + template + /* constexpr */ bor(T ... args) : boo(args...) {} + }; + struct bar : bor { +

Re: [C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...)

2018-12-14 Thread Alexandre Oliva
On Dec 6, 2018, Alexandre Oliva wrote: > Regstrapped on x86_64- and i686-linux-gnu, mistakenly along with a patch > with a known regression, and got only that known regression. Retesting > without it. Ok to install? Ping? That round of retesting confirmed no regressions. https://gc

Re: [RFC] support --with-multilib-list=@/path/name

2018-12-07 Thread Alexandre Oliva
On Nov 12, 2018, Alexandre Oliva wrote: > I'm having second thoughts on specifying external files with a > full pathname, though, as it might lead to accidental GPL violations. Here's a patch that takes the multilib list file from gcc/config/arm. Any objections, further requests or

Re: [PATCH] [PR86823] retain deferred access checks from outside firewall

2018-12-06 Thread Alexandre Oliva
I'm giving your proposed patch a full round of testing along with other patches. -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist Hay que enGNUrecerse, per

[C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...)

2018-12-06 Thread Alexandre Oliva
}; + struct bar : bor { + using bor::bor; + }; + void f() noexcept(noexcept(bar{0,1})); +} + } +} -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist Hay que enGNUrecerse, pero sin perder la terGNUra jamás-GNUChe

[C++ PATCH] [PR c++/87814] undefer deferred noexcept on tsubst if request

2018-12-06 Thread Alexandre Oliva
uple_::compressed_tuple_; +}; + +int main() { +(void)noexcept(adaptor_cursor{(int*)0}); +} -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist Hay que enGNU

Re: [PATCH] [PR86397] set p_t_decl while canonicalizing eh specs for mangling

2018-12-04 Thread Alexandre Oliva
] resolve nondependent noexcept specs early in C++1[14] From: Alexandre Oliva build_noexcept_spec refrained from resolving nondependent noexcept expressions when they were not part of the function types (C++ 11 and 14). This caused problems during mangling: canonical_eh_spec, when called on the

Re: [PATCH] [PR85569] skip constexpr target_expr constructor dummy type conversion

2018-12-04 Thread Alexandre Oliva
On Nov 27, 2018, Jason Merrill wrote: > Let's replace the == comparison rather than supplement it. OK with > that change. Thanks, here's what I (re)tested and will install eventually. [PR85569] skip constexpr target_expr constructor dummy type conversion From: Alexandre Oliva The te

avoid null ptr deref in cselib_record_sets

2018-12-04 Thread Alexandre Oliva
;=0). */ scalar_int_mode mode; if (dest != orig + && sets[i].src_elt && cselib_record_sets_hook && REG_P (dest) && HARD_REGISTER_P (dest) -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free!

compute discriminator info for overrides

2018-11-20 Thread Alexandre Oliva
; - maybe_set_discriminator (INSN_LOCATION (insn)); + discriminator = compute_discriminator (INSN_LOCATION (insn)); } else { filename = NULL; linenum = 0; columnnum = 0; + discriminator = 0; } if (filename == NULL) -- Alexandre Oliva, freedom

Re: [PATCH] [PR86397] set p_t_decl while canonicalizing eh specs for mangling

2018-11-27 Thread Alexandre Oliva
On Nov 27, 2018, Jason Merrill wrote: > On 11/22/18 6:40 PM, Alexandre Oliva wrote: >> Mangling visits the base template function type, prior to template >> resolution, and on such types, exception specifications may contain >> unresolved noexcept expressions. nothrow_spe

[PATCH] [PR86397] set p_t_decl while canonicalizing eh specs for mangling

2018-11-22 Thread Alexandre Oliva
+.dg/cpp0x/pr86397-2.C @@ -0,0 +1,4 @@ +// { dg-do compile { target c++11 } } +void e(); +template void f(int() noexcept(e)) {} +template void f(int() noexcept); -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GN

[PATCH] [PR85569] skip constexpr target_expr constructor dummy type conversion

2018-11-22 Thread Alexandre Oliva
expr auto eq = equal(N); + +static_assert(compose(eq<3>, + std::plus<>{})(1,2), + "compose is constexpr"); -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Tool

[PATCH] [PR86823] retain deferred access checks from outside firewall

2018-11-16 Thread Alexandre Oliva
e/g++.dg/pr86823.C @@ -0,0 +1,15 @@ +// { dg-do compile } + +struct X { +private: + template + struct Y { +int data; + }; +public: + int value; +}; + +int main() { + typename X::Y a; // { dg-error "private" } +} -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the

[C++ PATCH] [PR87768] do not suppress location wrappers when tsubsting

2018-12-30 Thread Alexandre Oliva
ppers = saved; + } +}; + /* In a TARGET_EXPR node. */ #define TARGET_EXPR_SLOT(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 0) #define TARGET_EXPR_INITIAL(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 1) -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free!

Re: [C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...)

2018-12-28 Thread Alexandre Oliva
On Dec 28, 2018, Alexandre Oliva wrote: > I guess I still need to > fill in other gaps to in my knowledge to try and make sense of it. Done. > diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c Here's a patch based on your suggestion. [PR88146] do not instantiate

Re: [C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...)

2018-12-28 Thread Alexandre Oliva
On Dec 28, 2018, Alexandre Oliva wrote: > diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c And here's a cleaned-up patch based on my initial approach. [PR88146] avoid diagnostics diffs if cdtor_returns_this Diagnostics for testsuite/g++.dg/cpp0x/inh-ctor32.C varied across platforms. Specifica

Re: [PR86153] simplify more overflow tests in VRP

2018-12-28 Thread Alexandre Oliva
On Dec 19, 2018, Alexandre Oliva wrote: > + op1 = x; > + code = (code == LT_EXPR || code == LE_EXPR) ? LE_EXPR : GT_EXPR; So... I've done some more testing, and this alone seems to overlap nicely with what's in the trunk ATM, with a few exceptions: - for some reason, LE

Re: [C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...)

2018-12-28 Thread Alexandre Oliva
M. */ + else if (VOID_TYPE_P (TREE_TYPE (expr))) + return expr; + maybe_warn_nodiscard (expr, implicit); break; -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain Engineer

[C++ PATCH] [PR86648] use auto identifier for class placeholder templates

2018-12-28 Thread Alexandre Oliva
tsuite/g++.dg/cpp1z/pr86648.C b/gcc/testsuite/g++.dg/cpp1z/pr86648.C new file mode 100644 index ..20ee4c8c0d44 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/pr86648.C @@ -0,0 +1,5 @@ +// { dg-do compile { target c++17 } } + +template class A; +template struct B { static A a{

[PR87054] fix unaligned access

2018-09-17 Thread Alexandre Oliva
* gimplify.c (gimplify_expr): Retain alignment of addressable lvalue in dereference. From: Alexandre Oliva for gcc/testsuite/ChangeLog PR middle-end/87054 * gcc.dg/pr87054.c: New. --- gcc/gimplify.c |8 +++- gcc/testsuite/gcc.dg/pr87054.c | 29

[PR87013] check for .loc is_stmt support in the assembler

2018-09-17 Thread Alexandre Oliva
--- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -27931,8 +27931,10 @@ dwarf2out_source_line (unsigned int line, unsigned int column, if (is_stmt != table->is_stmt) { +#if HAVE_GAS_LOC_STMT fputs (" is_stmt ", asm_out_file); putc (is_stmt ? '1' : '0', asm_out_file); +#endif } if (SUPPORTS_DISCRIMINATOR && discriminator != 0) { -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist

Re: [C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...)

2018-12-19 Thread Alexandre Oliva
the same sources. -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist Hay que enGNUrecerse, pero sin perder la terGNUra jamás-GNUChe

Re: [PATCH] [PR87012] canonicalize ref type for tmpl arg

2018-12-19 Thread Alexandre Oliva
--- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr87012.C @@ -0,0 +1,11 @@ +// { dg-do compile { target c++11 } } + +template +using ref = T&; + +int x; + +template class T, T> +struct X { }; + +struct Y : X { }; -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo B

Re: [PR86153] simplify more overflow tests in VRP

2018-12-19 Thread Alexandre Oliva
itable to do so. */ - vro.intersect (vr0); - if (vro.undefined_p ()) - return boolean_false_node; - vri.intersect (vr0); - if (vri.undefined_p ()) - return boolean_true_node; - } + op1 = x; + code = (code == LT_EXPR || code == LE_EXPR) ? LE_EXPR :

Re: [C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...)

2018-12-19 Thread Alexandre Oliva
TYPE_P (TREE_TYPE (expr))) + return expr; + maybe_warn_nodiscard (expr, implicit); break; -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangel

Re: [C++ PATCH] [PR87770] test partial specializations for type dependence

2019-01-25 Thread Alexandre Oliva
file mode 100644 index ..69eff4a786fe --- /dev/null +++ b/gcc/testsuite/g++.dg/pr87770.C @@ -0,0 +1,11 @@ +// { dg-do compile } + +template struct d { + template d(e); +}; +template <> template d::d(e); +template <> template d::d(e) { + long g; + (void)g; +} +template d::d(char);

Re: [PATCH][RFC] Fix PRs 88882, 89905, 89892 (and more?)

2019-04-04 Thread Alexandre Oliva
* gcc.dg/guality/pr89892.c: New testcase. > * gcc.dg/guality/pr89905.c: Likewise. LGTM, thanks. Any reason to mention PR 2 in the Subject: but not in the ChangeLog? -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America

[PR89528] reset debug uses of return value when dropping dead RTL call

2019-04-05 Thread Alexandre Oliva
ing insn is a CALL. Asm in +DEBUG_INSN is never useful, we can't emit debug info for +that. And for volatile_insn_p, it is actually harmful - +DEBUG_INSNs shouldn't have any side-effects. */ + if (GET_CODE (src) == CALL || GET_CODE (src) == ASM_OPERANDS +

Re: [PATCH][RFC] Fix PRs 88882, 89905, 89892 (and more?)

2019-04-05 Thread Alexandre Oliva
have insns between basic blocks (aka on edges). Yeah, I've started (thought-)exploring these possibilities years ago, but didn't get very far. > I'll see to add a guality testcase for my simple loop example above > (and try to trick it into going wrong with the patch some more) and > th

[C++ debug PATCH] [PR88534] accept VAR_DECL in class literal template parms

2019-03-14 Thread Alexandre Oliva
fnc() { + +} + +void f() { +fnc(); +} -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist Hay que enGNUrecerse, pero sin perder la terGNUra jamás-GNUChe

Re: [PATCH] Fix -gdwarf-5 -gsplit-dwarf ICEs (PR debug/89498)

2019-03-14 Thread Alexandre Oliva
e view number shall be represented as an unsigned constant, using such forms as DW_FORM_data, DW_FORM_udata, or even DW_FORM_implicit_const. If this attribute is omitted, the entry point view number should be taken as zero. -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be

Re: [PATCH] Fix -gdwarf-5 -gsplit-dwarf ICEs (PR debug/89498)

2019-03-12 Thread Alexandre Oliva
On Mar 9, 2019, Alexandre Oliva wrote: > On Mar 9, 2019, Jakub Jelinek wrote: >> If so, then all we need is likely my patch + some documentation change, >> though not sure where exactly it should be documented, some Wiki we refer >> in include/dwarf2.def, or what?

Re: [PATCH] Fix -gdwarf-5 -gsplit-dwarf ICEs (PR debug/89498)

2019-03-09 Thread Alexandre Oliva
in https://people.redhat.com/aoliva/papers/sfn/ but there seem to be several extensions documented in the GCC wiki, so I guess I could do that instead, or as well. I'll take care of it, and post back when I'm done. -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change

Re: [PATCH] Fix -gdwarf-5 -gsplit-dwarf ICEs (PR debug/89498)

2019-03-09 Thread Alexandre Oliva
it compile units, I hope we can stick to it, but if you see some reason not to do that, even for an extension, we should probably go with the index-based indirection and DW_FORM_loclistx. -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin

Re: [PATCH] Fix -gdwarf-5 -gsplit-dwarf ICEs (PR debug/89498)

2019-03-08 Thread Alexandre Oliva
omputed indices to reference locview extensions to loclists. That would be a significant amount of work for little to no benefit AFAICT, and only on the short term. In the long term, I expect/hope some way to represent locviews to be adopted in standard DWARF. -- Alexandre Oliva, freedom fighter https

Re: [C++ debug PATCH] [PR88534] accept VAR_DECL in class literal template parms

2019-03-20 Thread Alexandre Oliva
, r269641) compiles it all right. Was there a subsequent fix, maybe? I didn't realize it was supposed to be rejected. -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software E

Re: [C++PATCH] [PR86379] do not use TREE_TYPE for USING_DECL_SCOPE

2019-02-08 Thread Alexandre Oliva
on of shared_member_p. -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist Hay que enGNUrecerse, pero sin perder la terGNUra jamás-GNUChe

Re: [C++PATCH] [PR86379] do not use TREE_TYPE for USING_DECL_SCOPE

2019-02-07 Thread Alexandre Oliva
t's good knowledge to have. I've added asserts and comments. Here's what I'm testing. [PR86379] do not use TREE_TYPE for USING_DECL_SCOPE From: Alexandre Oliva It's too risk to reuse the type field for USING_DECL_SCOPE. Language-independent parts of the compiler, such as location and non-lvalue

Re: [C++PATCH] [PR87322] move cp_evaluated up to tsubst all lambda parms

2019-02-07 Thread Alexandre Oliva
ymbol naming, e.g. if it appears in an initializer of a data member. Here's the patch I'm testing. OK if it passes? [PR87322] move cp_evaluated up to tsubst all lambda parms From: Alexandre Oliva A lambda capture variable initialized with a lambda expr taking more than one parameter got u

Re: [C++PATCH] [PR86379] do not use TREE_TYPE for USING_DECL_SCOPE

2019-02-13 Thread Alexandre Oliva
On Feb 8, 2019, Jason Merrill wrote: > On 2/8/19 4:07 AM, Alexandre Oliva wrote: >> On Feb 7, 2019, Jason Merrill wrote: >> >>> In protected_accessible_p and shared_member_p, if we're left with a >>> USING_DECL after strip_using_decl, we can't give a

[C++PATCH] [PR87322] move cp_evaluated up to tsubst all lambda parms

2019-02-06 Thread Alexandre Oliva
From: Alexandre Oliva A lambda capture variable initialized with a lambda expr taking more than one parameter got us confused. The first problem was that the parameter list was cut short during tsubsting because we tsubsted it with cp_unevaluated_operand. We reset it right after, to tsubst

Re: [C++PATCH] [PR86379] do not use TREE_TYPE for USING_DECL_SCOPE

2019-02-05 Thread Alexandre Oliva
On Feb 5, 2019, Jason Merrill wrote: > On Tue, Feb 5, 2019 at 1:37 AM Alexandre Oliva wrote: >> On Jan 31, 2019, Jason Merrill wrote: >> >> > Let's use strip_using_decl instead >> >> Aah, nice! Thanks, I'll make the changes, test them, and post a

Re: [C++ PATCH] [PR87770] test partial specializations for type dependence

2019-01-29 Thread Alexandre Oliva
On Jan 29, 2019, Alexandre Oliva wrote: > The single caller does, indeed, but the function does not make that a > requirement, so others might call it and fail to check it. Should that > test be moved here too? Like this... Regstrapped on x86_64-linux-gnu. Ok to install? [PR87

Re: [C++ PATCH] [PR87770] test partial specializations for type dependence

2019-01-28 Thread Alexandre Oliva
ase, I suppose we should document that, and then we just use tinfo = DECL_TEMPLATE_INFO (node) above (right?) > And you can use get_template_info here as well. *nod*, thanks -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member G

Re: [C++ PATCH] [PR87770] test partial specializations for type dependence

2019-01-23 Thread Alexandre Oliva
nts_p (INNERMOST_TEMPLATE_ARGS (DECL_TI_ARGS (expression))))) return true; -- Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain EngineerFree Software Evangelist Hay q

Re: [C++ PATCH] [PR87770] test partial specializations for type dependence

2019-01-30 Thread Alexandre Oliva
! Here's what I regstrapped overnight. Ok to install? [PR87770] test partial specializations for type dependence From: Alexandre Oliva When instantiating a partial specialization of a template member function for a full specialization of a class template, we test whether the context of variables

[PR86218] handle ck_aggr in compare_ics in both and either conversion

2019-01-30 Thread Alexandre Oliva
(ics2->kind == ck_aggr && ics2->aggr_worst) +ics2 = ics2->aggr_worst; + /* User-defined conversion sequence U1 is a better conversion sequence than another user-defined conversion sequence U2 if they contain the same user-defined conversion operator or const

[C++PATCH] [PR86379] do not use TREE_TYPE for USING_DECL_SCOPE

2019-01-30 Thread Alexandre Oliva
expr) && !really_overloaded_fn (expr)) expr = get_first_fn (expr); - if (DECL_NONSTATIC_MEMBER_FUNCTION_P (expr)) + if (FUNCTION_OR_TEMPLATE_DECL_P (expr) + && DECL_NONSTATIC_MEMBER_FUNCTION_P (expr)) { if (complain & tf_error) { -- Alexandre Oliv

Re: [C++ PATCH] [PR87770] test partial specializations for type dependence

2019-02-04 Thread Alexandre Oliva
On Jan 30, 2019, Paolo Carlini wrote: > Hi, > On 30/01/19 17:25, Alexandre Oliva wrote: >> +static inline bool >> +instantiates_primary_template_p (tree node) > I'm rather surprised by the inline: It's (so far) a single use function, so it will likely be inlined even wit

Re: [C++PATCH] [PR86379] do not use TREE_TYPE for USING_DECL_SCOPE

2019-02-04 Thread Alexandre Oliva
akes the DECL_CONTEXT of decl and adjusts the properties of that class. If we followed USING_DECLs in decl that early, we'd adjust (again?) the member properties of USING_DECL_SCOPE(original using decl), rather than of DECL_CONTEXT (original using decl) as intended. -- Alexandre Oliva, fre

[C++PATCH] Re: [PR86218] handle ck_aggr in compare_ics in both and either conversion

2019-02-04 Thread Alexandre Oliva
On Jan 30, 2019, Alexandre Oliva wrote: > Because of rank compares, and checks for ck_list, we know that if we > see user_conv_p or ck_list in ics1, we'll also see it in ics2. This > reasoning does not extend to ck_aggr, however, so we might have > ck_aggr conversions starti

Re: [C++ debug PATCH] [PR88534] accept VAR_DECL in class literal template parms

2019-03-15 Thread Alexandre Oliva
target c++2a } } +// { dg-options "-g" } + +struct pair { + unsigned a; + unsigned b; + constexpr pair(unsigned _a, unsigned _b) noexcept: a{_a}, b{_b} { } +}; + +template void fnc() { + +} + +void f() { +fnc(); +} -- Alexandre Oliva, freedom fighter htt

Re: preserve more debug stmts in gimple jump threading

2019-05-15 Thread Alexandre Oliva
On May 15, 2019, Richard Biener wrote: > On Wed, May 15, 2019 at 10:20 AM Alexandre Oliva wrote: >> >> Gimple jump threading does not duplicate forwarder blocks that might >> be present before or after the copied block. > Empty forwarder blocks I presume? Empt

[RFC] ARM -mfpu=auto woes

2019-06-12 Thread Alexandre Oliva
uot; = "error" ] then - echo "Unknown target in --with-$which=$val" 1>&2 + echo "Unknown target in --with-fpu=$val" 1>&2 exit 1 fi fi -- Alexandre

Re: [RFC] ARM -mfpu=auto woes

2019-06-13 Thread Alexandre Oliva
On Jun 12, 2019, Alexandre Oliva wrote: > I'm looking into a regression between gcc-7 and gcc-8 that causes > compilation with -mfloat-abi=hard to fail on arm-eabi with: > $ arm-eabi-gcc -c -mfloat-abi=hard t.c > cc1: error: -mfloat-abi=hard: selected processor lacks a

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