symbolic views everywhere,
+ instead of special-casing zero views, but then we'd be unable to
+ optimize out locviewlists that contain only zeros. */
static bool
output_asm_line_debug_info (void)
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be the change
ot; : "x");
+}
+
+void normal_function(bool b)
+{
+ // Both cases compile OK in non-template function:
+ f % (b ? "x" : "x");
+ f % (b ? "" : "x");
+
+ function_template(b);
+}
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoli
On Feb 8, 2018, Jason Merrill wrote:
> On 02/07/2018 02:36 AM, Alexandre Oliva wrote:
>> +/* Output symbol LAB1 as an unsigned LEB128 quantity. */
> Let's mention here that the value of LAB1 must be an assemble-time
> constant (such as a view counter), since we can't
On Jan 25, 2018, Alexandre Oliva wrote:
> On Jan 24, 2018, Jakub Jelinek wrote:
>> I think this asks for
>> if (flag_checking)
>> gcc_assert (block_within_block_p (block,
>> DECL_INITIAL (current_function_decl),
>> true));
> 'k, changed.
>> Ot
On Feb 8, 2018, Jason Merrill wrote:
> On Thu, Feb 8, 2018 at 7:56 AM, Alexandre Oliva wrote:
>> On Feb 7, 2018, Jason Merrill wrote:
>>
>>> OK, that makes sense. But I'm still uncomfortable with choosing an
>>> existing opcode for that purpose, which
On Feb 9, 2018, Jeff Law wrote:
> On 02/08/2018 08:53 PM, Alan Modra wrote:
>> On Fri, Feb 09, 2018 at 01:21:27AM -0200, Alexandre Oliva wrote:
>>> Here's what I checked in, right after the LVU patch.
>>>
>>> [IEPM] Introduce inline entry point marke
On Feb 9, 2018, Jeff Law wrote:
> On 02/08/2018 08:53 PM, Alan Modra wrote:
>> On Fri, Feb 09, 2018 at 01:21:27AM -0200, Alexandre Oliva wrote:
>>> Here's what I checked in, right after the LVU patch.
>>>
>>> [IEPM] Introduce inline entry point marke
On Feb 9, 2018, Jakub Jelinek wrote:
> On Fri, Feb 09, 2018 at 07:01:25PM -0200, Alexandre Oliva wrote:
>> So, as discussed on IRC, I'm trying to use a target hook to allow
>> targets to indicate that their length attrs have been assessed for this
>> purpose
On Feb 9, 2018, Alexandre Oliva wrote:
> On Feb 9, 2018, Jeff Law wrote:
>> On 02/08/2018 08:53 PM, Alan Modra wrote:
>>> On Fri, Feb 09, 2018 at 01:21:27AM -0200, Alexandre Oliva wrote:
>>>> Here's what I checked in, right after the LVU patch.
>>>
as gone through more than my initial smoke testing on x86_64, but my
own testing will take some time, and I wanted to give you something that
at least stood a chance of fixing the problem before crashing in bed :-)
[LVU] deal with md final_scan_insn
From: Alexandre Oliva
Ports call final_scan_insn
- a/gcc/final.c
+++ b/gcc/final.c
@@ -2521,6 +2521,15 @@ final_scan_insn (rtx_insn *insn, FILE *file, int
optimize_p ATTRIBUTE_UNUSED,
if (align && NEXT_INSN (insn))
{
+ if (!DECL_IGNORED_P (current_function_decl)
+ && debug_variable
oncern about them was
unjustified, and the space they take up is tolerable. Or maybe we can
find some way to get the most out of them without actually breaking
anything. We'll see...
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be the change you wish to see
note needs to be emitted before INSN.
Sets IS_STMT to TRUE if the line should be marked as a possible
--
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 me
of the same macro that was already there, right
before the locview block output:
ASM_OUTPUT_LABEL (asm_out_file, list_head->ll_symbol);
Shouldn't it be ASM_OUTPUT_DEBUG_LABEL too?
is fixing these enough to address the problem you reported?
Thanks,
--
Alexandre Oliva, freedom fighterh
On Feb 11, 2018, Andreas Schwab wrote:
> On Feb 09 2018, Alexandre Oliva wrote:
>> + if (list_head->vl_symbol && dwarf2out_locviews_in_attribute ())
>> +{
>> + ASM_OUTPUT_LABEL (asm_out_file, list_head->vl_symbol);
> That needs to use ASM_OU
On Feb 9, 2018, Alexandre Oliva wrote:
> On Feb 9, 2018, Jakub Jelinek wrote:
>> On Fri, Feb 09, 2018 at 07:01:25PM -0200, Alexandre Oliva wrote:
>>> So, as discussed on IRC, I'm trying to use a target hook to allow
>>> targets to indicate that their length a
On Feb 12, 2018, Andreas Schwab wrote:
> On Feb 12 2018, Alexandre Oliva wrote:
>> On Feb 11, 2018, Andreas Schwab wrote:
>>
>>> On Feb 09 2018, Alexandre Oliva wrote:
>>
>>>> + if (list_head->vl_symbol && dwarf2out_locviews_in_a
On Feb 12, 2018, Alexandre Oliva wrote:
> This patch supersedes the previous one. Testing underway... Ok if it
> succeeds?
I failed to update the patch I posted after making a correct to symbol
poisoning, that had caused builds to fail right away, sorry. Thanks,
Rainer, for catchi
table->view++;
}
if (file_num != table->file_num)
diff --git a/gcc/testsuite/gcc.dg/graphite/pr84404.c
b/gcc/testsuite/gcc.dg/graphite/pr84404.c
new file mode 100644
index ..858e651cfab7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr84404.c
@@ -0,0 +1,18 @@
+/* { dg
therwise used, the stmt will
be cleaned up in clean_unused_block_pointer. */
- if (is_gimple_debug (stmt))
+ if (is_gimple_debug (stmt)
+ && (debug_inline_points != 4 || !gimple_debug_inline_entry_p
(stmt)))
continue;
if (gimple_clobber_p (stmt))
--
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 Software Evangelist|Red Hat Brasil GNU Toolchain Engineer
On Feb 15, 2018, Jason Merrill wrote:
> On Thu, Feb 8, 2018 at 9:09 PM, Alexandre Oliva wrote:
>> + /* If it was supposed to be an rvalue but it's not, adjust
>> +one of the operands so that any overload resolution
>> +taking this CON
= get_next_ref (REGNO (inc_insn.reg0), bb,
+ reg_next_def);
+
+ if (other_insn && luid > DF_INSN_LUID (other_insn))
+ reg0_use = NULL;
+ }
+
+ mem_insn.insn = reg0_use;
+
+
mplate(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 in non-template function:
+ f % (b ? "x&q
On Feb 21, 2018, Alexandre Oliva wrote:
> On Feb 15, 2018, Szabolcs Nagy wrote:
>> i see assembler slow downs with these location view patches
>> i opened https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84408
> [LVU] reset view at function entry, omit views at line
"cannot resolve overloaded function" }
+}
--
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 Software Evangelist|Red Hat Brasil GNU Toolchain Engineer
p;b;
+} 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 Software Evangelist|Red Hat Brasil GNU Toolchain Engineer
..ee709f4200fe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr84596.C
@@ -0,0 +1,7 @@
+// PR c++/84596
+// { dg-do compile { target c++11 } }
+
+template
+void b(int c) {
+ static_assert (c, "c"); // { dg-error "non-constant|not a constant" }
+}
--
Alexandre Oliva, freedom fighter
On Mar 1, 2018, Marek Polacek wrote:
> Here's my take on this; Alex, sorry for interfering.
No worries, thanks a lot for taking care of this!
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free!
On Feb 28, 2018, Jason Merrill wrote:
> On Wed, Feb 28, 2018 at 7:08 AM, Alexandre Oliva wrote:
>> Don't allow the initializer expr to be NULL in a ctor initializer
>> list, make it error_marker_node instead.
> I don't want error_mark_nodes in a CONSTRUCTOR, ei
On Feb 28, 2018, Jason Merrill wrote:
> On Wed, Feb 28, 2018 at 7:06 AM, Alexandre Oliva wrote:
>> We ICEd when returning a stmt expr that ends with an overloaded
>> function. It's ill-formed when we can't convert the function name to
>> the return type, but we s
On Feb 28, 2018, Jason Merrill wrote:
> On Wed, Feb 28, 2018 at 12:24 AM, Alexandre Oliva wrote:
>> + if (processing_template_decl)
>> +result_type = cp_build_reference_type (result_type, !is_lvalue);
> If !is_lvalue, we don't want a reference type at all, as th
WIDE_INT
GTY ((tag ("dw_val_class_unsigned_const"))) val_unsigned;
+ char * GTY ((tag ("dw_val_class_symview"))) val_symbolic_view;
double_int GTY ((tag ("dw_val_class_const_double"))) val_double;
wide_int_ptr GTY ((tag ("dw_val_class_wide_int"
ppose 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://FSFLA
On Mar 2, 2018, Jason Merrill wrote:
> On Fri, Mar 2, 2018 at 2:57 AM, Alexandre Oliva wrote:
>> + gcc_assert (TREE_CODE (type) == REFERENCE_TYPE);
>> + init = fold (convert (type, integer_zero_node));
> Maybe build_zero_cst?
Sure.
I wonder, is there any reason
On Mar 2, 2018, Alexandre Oliva 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 internal
> view resets), it output
p;) { return *this; }
+};
+
+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)
+{
+ // B
x;
+ int c = 0;
+ int &b;
+} 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 S
ed, but would it in
practice?
I can see that mandatory [us]leb128 fields could be a problem, but are
there any fields that involve offsets into .debug_info, and that must be
represented as [us]leb128? I don't think so.
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
Y
ew file mode 100644
index ..543a307d6c12
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr84682-3.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* This is like pr84682-1.c, but with an extra memory constraint, to
+ check that we don't disable process_address altogether just because
+
loating point constant value, or a vector constant value. */
@@ -233,6 +234,7 @@ struct GTY(()) dw_val_node {
} GTY ((tag ("dw_val_class_vms_delta"))) val_vms_delta;
dw_discr_value GTY ((tag ("dw_val_class_discr_value"))) val_discr_value;
dw_discr_list_ref G
{
} GTY ((tag ("dw_val_class_vms_delta"))) val_vms_delta;
dw_discr_value GTY ((tag ("dw_val_class_discr_value"))) val_discr_value;
dw_discr_list_ref GTY ((tag ("dw_val_class_discr_list"))) val_discr_list;
+ char * GTY ((tag ("dw_val_c
dg-warning "parenthesized initializer in array new|invalid
conversion" }
+}
--
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 Software Evangelis
r,
decl_spec_token_start->location,
input_location);
+ parser->auto_is_implicit_function_template_parm_p
+= saved_auto_is_implicit_function_template_parm_p;
+
return make_parameter_declarator (&decl_specifiers,
+ b/gcc/testsuite/g++.dg/cpp0x/pr84647.C
@@ -0,0 +1,3 @@
+// { dg-do compile { target c++11 } }
+
+void (*a)(auto b = c()); // { dg-error "parameter declaration|depend on a
template|undeclared name|not declared|default arguments|typeless
expression|implicit template" }
--
Alexandre Oliva,
s like an address, when you're
part of the very code that's supposed to tell the rest of the compiler
what a legitimate address should look like.
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free!
.C
new file mode 100644
index ..bc1567f3fe77
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/pr84789.C
@@ -0,0 +1,13 @@
+// { dg-do compile }
+
+struct A
+{
+ typedef int I;
+};
+
+template struct B : A {};
+
+template struct C : B
+{
+ B::A::I::I i; // { dg-error "typename" }
+};
ldn't be a problem for this and
+// similar cases.
+Destructible() && requires (Args&&...args) {
+new T{ (Args&&)args... };
+};
+
+int main() {
+using T = int[2][2];
+// GCC has not implemented initialization of multi-dimensional
+// arrays
plate struct S1;
+
+template struct S1>{ template struct S2:S2{}; }; // { dg-error "missing" }
+//^ the error should be here, but it is^here, thus the weird line break
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be the change you wish to see in th
On Mar 17, 2018, Alexandre Oliva wrote:
> We shouldn't substitute templates into short-circuited-out concepts
> constraints, but we do, and to add insult to injury, we issue a
> sorry() error when a concept that shouldn't even have been substituted
> attempts to perform a m
On Mar 20, 2018, Jason Merrill wrote:
> On Sat, Mar 17, 2018 at 8:13 AM, Alexandre Oliva wrote:
>> As we go through each of the template parameters, substituting it with
>> corresponding template arguments, an incorrect argument list might
>> cause us to index argument vect
On Mar 20, 2018, Jason Merrill wrote:
> On Sat, Mar 17, 2018 at 8:11 AM, Alexandre Oliva wrote:
>> - sorry
>> - ("cannot initialize multi-dimensional array with initializer");
> This shouldn't even be a sorry anymore
> Let's make
On Mar 20, 2018, Jason Merrill wrote:
> On Sat, Mar 10, 2018 at 6:57 AM, Alexandre Oliva wrote:
>> A parenthesized initializer is only accepted when new()ing an array in
>> permissive mode. We were not careful, however, to convert the
>> TREE_LIST initializer to the array
er->auto_is_implicit_function_template_parm_p, false);
+ (void)cleanup;
+
/* First, parse name of the attribute, a.k.a attribute-token. */
token = cp_lexer_peek_token (parser->lexer);
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be the change you wish to see in
On Mar 20, 2018, Jason Merrill wrote:
> On Fri, Mar 16, 2018 at 5:38 PM, Alexandre Oliva wrote:
>> resolve_typename_type may peek into template types that might still be
>> specialized. In some cases, e.g. g++.dg/template/friend48.C or
>> g++.dg/template/decl2.C, that
On Mar 20, 2018, Jason Merrill wrote:
> On Tue, Mar 20, 2018 at 4:15 PM, Alexandre Oliva wrote:
>> Should we aim at rejecting the declaration of U?
> Yes.
Like this?
[PR c++/71251] check tmpl parms in template using decl
Check that template using decls have the correct number o
onsume
tokens till the end of the declaration, but I figured we might as well
try to parse them and see whether there were any other legitimate errors
to report.
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandh
On Mar 20, 2018, Jason Merrill wrote:
> On Tue, Mar 20, 2018 at 6:07 PM, Alexandre Oliva wrote:
>> On Mar 20, 2018, Jason Merrill wrote:
>>> that doesn't mean it's wrong to peek.
>> Huh? We're referencing members of an unrelated template that AFAIK
>
On Mar 20, 2018, Jason Merrill wrote:
> On Tue, Mar 20, 2018 at 5:57 PM, Alexandre Oliva wrote:
>> On Mar 20, 2018, Jason Merrill wrote:
> Let's put this in cp-tree.h, with warning_sentinel.
>> + (void)cleanup;
> There are lots of RAII variables without this ex
uses GNU extensions, so disable -ansi
#include
@@ -13,5 +13,5 @@ public:
main() {
A* a;
-a = new A[2](1,false);
+a = new A[2](1,false); // { dg-error "parenthesized" }
}
--
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 Software Evangelist|Red Hat Brasil GNU Toolchain Engineer
sked not
+// to issue errors, this shouldn't be a problem for this and
+// similar cases.
+Destructible() && requires (Args&&...args) {
+new T{ (Args&&)args... };
+};
+
+int main() {
+ using T = int[2][2];
+// GCC has not implemented initializ
On Mar 21, 2018, Jason Merrill wrote:
> On Tue, Mar 20, 2018 at 11:27 PM, Alexandre Oliva wrote:
>> I understood you were saying it was ok to peek in this case. Would you
>> please state, for clarity, what your stance is on peeking in this case,
>> specifically, in the
-pedantic-error default
+// { dg-options "" }
+
+void a() {
+ a[0](); // { dg-warning "arithmetic" }
+}
--
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 L
ed with this, and only the
latter one (linked to from PR84942), that I'm going to install tonight,
affects this case. I didn't include the testcase in the patch assuming
your testcase adn patch would go in, but it will certainly require
adjustments for the expected error messages.
--
On Mar 22, 2018, Jason Merrill wrote:
> On Tue, Mar 20, 2018 at 10:29 PM, Alexandre Oliva wrote:
>> On Mar 20, 2018, Jason Merrill wrote:
>>
>>>> + if (id == error_mark_node)
>>>> +return error_mark_node;
>>
>>> Why wait unti
te template
+using U = void; // { dg-error "too many" }
+
+template
+using V = void;
+
+template struct X {
+ template template
+ using U = void; // { dg-error "too many" }
+
+ template
+ using V = void;
+};
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
Y
}
+
+template void a() {
+ typedef struct {
+void b() try { b; } catch (short) {
+}
+ } c;
+}
--
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
Fr
; }))) // { dg-error "constant" }
+ {
+ }
+};
--
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 Software Evangelist|Red Hat Brasil GNU Toolchain Engineer
On Mar 23, 2018, Jason Merrill wrote:
> On Thu, Mar 22, 2018 at 7:00 PM, Alexandre Oliva wrote:
>> fn[0]() ICEs because we end up with addr_expr of a decl, and that
>> should only happen for artificial or otherwise special internal
>> functions. For anything else, we
in g++-dg.exp, or should I manually test these
additional variants?
Anyway, thanks for the report, I'll try to figure out why this fails
with concepts.
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Fre
late struct B : A {};
template struct C : B
{
- B::A::I::I i; // { dg-error "typename" }
+ B::A::I::I i; // { dg-error "not a class type|does not name a
type|typename" }
};
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be the change you wis
r()
+{
+ foo<0, auto>(bar); // { dg-bogus "unimplemented|no matching function" "" {
xfail *-*-* } }
+}
diff --git a/gcc/testsuite/g++.dg/concepts/pr84979.C
b/gcc/testsuite/g++.dg/concepts/pr84979.C
new file mode 100644
index ..c70b3756f2b8
--- /dev/null
+++ b
On Mar 23, 2018, Jason Merrill wrote:
> On Thu, Mar 22, 2018 at 7:00 PM, Alexandre Oliva wrote:
>> fn[0]() ICEs because we end up with addr_expr of a decl, and that
>> should only happen for artificial or otherwise special internal
>> functions. For anything else, we
finds when searching for a FUNCTION_DECL.
Anyway, given the accumulated constraints I've been given WRT to this
bug, I'm afraid I've run out of ideas. I welcome suggestions as to how
to proceed.
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be the
On Mar 23, 2018, Jason Merrill wrote:
> On Fri, Mar 23, 2018 at 3:38 PM, Alexandre Oliva wrote:
>> + /* Concepts allows 'auto' in template arguments, even multiple
>> + 'auto's in a single argument.
> I think that's only intended for class temp
On Mar 28, 2018, Jason Merrill wrote:
> On Wed, Mar 28, 2018 at 5:06 AM, Alexandre Oliva wrote:
>> On Mar 23, 2018, Jason Merrill wrote:
>>
>>> On Fri, Mar 23, 2018 at 3:38 PM, Alexandre Oliva wrote:
>>>> + /* Concepts allows 'auto' in template
l depend on whether cp_build_addr_expr_1
gets called again after template substitution and overload resolution.
--
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 m
On Mar 29, 2018, Alexandre Oliva wrote:
> On Mar 28, 2018, Jason Merrill wrote:
>> It looks like cp_build_addr_expr_1 already calls mark_used for single
>> static member functions, it should probably do the same for single
>> non-member functions.
> ultimately select,
On Mar 29, 2018, Alexandre Oliva wrote:
> Here's a patch that should take care of the marking a namespace-scoped
> or static member function as used when taking its address, thus working
> around (fixing?) the reported problem.
> Regstrapping now. Ok to install if it pass
027.C
@@ -0,0 +1,8 @@
+// { dg-do compile }
+
+// Avoid -pedantic-error default
+// { dg-options "" }
+
+struct A { static int a; };
+
+int t = A::A ? : 0; // { dg-error "cannot resolve" }
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be the chan
ic d *b;
+} * d::b(__builtin_offsetof(struct { // { dg-error "types may not be defined" }
+ int i;
+ struct a { // { dg-error "types may not be defined" }
+int c() { return .1f; }
+ };
+}, i));
--
Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/
You must be
On Mar 30, 2018, Jason Merrill wrote:
> On Thu, Mar 29, 2018 at 6:24 PM, Alexandre Oliva wrote:
>> AFAICT we wouldn't always know, within cp_parser_template_id, whether
>> the id is a type or a function.
> True, it looks like sometimes we build a TEMPLATE_ID_EXPR wi
te/g++.dg/pr84943.C
new file mode 100644
index ..36f75a164119
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr84943.C
@@ -0,0 +1,8 @@
+// { dg-do compile }
+
+// Avoid -pedantic-error default
+// { dg-options "" }
+
+void a() {
+ a[0](); // { dg-warning "arithmetic" }
+
+void bar()
+{
+ foo(); // { dg-error "invalid|no match" }
+}
--
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 Software Evangelist|Red Hat Brasil GNU Toolchain Engineer
On Mar 30, 2018, Jason Merrill wrote:
> On Fri, Mar 30, 2018 at 3:55 AM, Alexandre Oliva wrote:
>> Types defined within a __builtin_offsetof argument don't always get
>> properly recorded as members of their context types
>> I suppose this means I should look for ano
On Apr 2, 2018, Jason Merrill wrote:
> On Sat, Mar 31, 2018 at 2:24 AM, Alexandre Oliva wrote:
>> On Mar 30, 2018, Jason Merrill wrote:
>>
>>> I don't think we need this; if arg is overloaded, we take the
>>> type_unknown_p early exit, so the code l
On Apr 2, 2018, Jason Merrill wrote:
> On Sat, Mar 31, 2018 at 4:23 AM, Alexandre Oliva wrote:
>> On Mar 30, 2018, Jason Merrill wrote:
>> template
>> void foo(T t) {
>> typename T::template C u = t;
>> T::template C (t);
>> T::template C:
On Apr 2, 2018, Jason Merrill wrote:
> On Sat, Mar 31, 2018 at 7:12 AM, Alexandre Oliva wrote:
>> struct a {
>> static int const z, i = __builtin_offsetof(struct b { int j; }, j);
>> b c;
>> };
>> int const a::z = __builtin_offsetof(struct d { int k; }, k
On Apr 3, 2018, Jason Merrill wrote:
> On Tue, Apr 3, 2018 at 3:54 AM, Alexandre Oliva wrote:
>> On Apr 2, 2018, Jason Merrill wrote:
>>
>>> On Sat, Mar 31, 2018 at 4:23 AM, Alexandre Oliva wrote:
>>>> On Mar 30, 2018, Jason Merrill wrote:
>>>&
On Apr 3, 2018, Jason Merrill wrote:
> On Tue, Apr 3, 2018 at 11:47 AM, Jason Merrill wrote:
>> On Tue, Apr 3, 2018 at 3:44 AM, Alexandre Oliva wrote:
>>> + if ((complain & tf_conv))
>>> +return false;
>> I think we want to return true.
Yeah, i
On Apr 3, 2018, Alexandre Oliva wrote:
> On Apr 2, 2018, Jason Merrill wrote:
>> On Sat, Mar 31, 2018 at 7:12 AM, Alexandre Oliva wrote:
>>> struct a {
>>> static int const z, i = __builtin_offsetof(struct b { int j; }, j);
>>> b c;
>>> };
>
On Apr 4, 2018, Jason Merrill wrote:
> On Tue, Apr 3, 2018 at 11:25 PM, Alexandre Oliva wrote:
>> I still think we could attempt to retain the extension as it is, parsing
>> types introduced in data member initializers within the scope of the
>> class containing the da
dg-error "yields a type" }
+}
+
+struct T2 {
+ template struct C {
+C(T2&);
+static void f(T2&, C&);
+ };
+ template static void D(T2&);
+};
+
+void f(T1& t1, T2& t2) {
+ foo1 (t2);
+ foo2 (t1);
+}
diff --git a/gcc/testsuite/g++.dg/concepts/pr84979.C
b/gc
do compile }
+
+struct d {
+ static d *b;
+} * d::b(__builtin_offsetof(struct { // { dg-error "types may not be defined" }
+ int i;
+ struct a { // { dg-error "types may not be defined" }
+int c() { return .1f; }
+ };
+}, i));
--
Alexandre Oliva, freedom fighterhttp://
context
at LOC for diagnostics and to restore it later. */
@@ -10096,6 +10108,9 @@ push_tinst_level_loc (tree tldcl, tree targs,
location_t loc)
&& TREE_CODE (tldcl) != FUNCTION_DECL)
fprintf (stderr, " %s", decl_as_string (tldcl, TFF_DECL_SPECIFIERS));
+ if (!tin
PR middle-end/87054
* 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
48c5037862254..55fcb7be4afa7 100644
--- 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
2/-mno-sse.
[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: Ad
\[ \n]" } } */
+-- { 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
mpile
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_optio
his move, 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 boa
801 - 900 of 1959 matches
Mail list logo