public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/66163] [6 Regression] Not working Firefox built with LTO
Date: Fri, 15 May 2015 16:43:00 -0000	[thread overview]
Message-ID: <bug-66163-4-Mfy5Aow3N8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66163-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66163

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> This really sounds like a bug in Firefox. This argument is not valid to be
> null. Hmm, I suspect there should be an undefined sanitizer that should be
> added to catch this case if not already there.

Well, I can try to update my Firefox tree to verify that the issue still
persists. I'm wondering how can call a class method having this == NULL?

Are you talking about ubsan?
>From gcc-bugs-return-486364-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri May 15 17:00:10 2015
Return-Path: <gcc-bugs-return-486364-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 50300 invoked by alias); 15 May 2015 17:00:10 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 50186 invoked by uid 48); 15 May 2015 17:00:05 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66130] "invalid use of non-static member function" message could be clearer
Date: Fri, 15 May 2015 17:00:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords: easyhack, patch
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66130-4-RhNllxbhGp@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66130-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66130-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg01204.txt.bz2
Content-length: 1733

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66130

--- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Paolo Carlini from comment #9)
> But the error message is about l->*ptr, not about ptr per se. 

Yes, but the location should already point to l->*ptr. I'm thinking in cases
such as:

struct Local
{
  void f();
  int z;
};

Local *l;
void (Local::*j)();
int Local::*i;
decltype((l->*j)) x;

where printing "invalid use of non-static member function 'void (Local::*j)()'"
seems more useful than "invalid use of non-static member function 'l->*j'" in
order to spot the typo (i vs j).

> that in such cases using dump_type (or %qT at the call site) on TREE_TYPE
> (t) (TREE_TYPE (expr)) should be Ok.

Yes!

@@ -1826,11 +1826,16 @@ invalid_nonstatic_memfn_p (tree expr, ts
   if (is_overloaded_fn (expr) && !really_overloaded_fn (expr))
     expr = get_first_fn (expr);
   if (DECL_NONSTATIC_MEMBER_FUNCTION_P (expr))
     {
       if (complain & tf_error)
-        error ("invalid use of non-static member function");
+       {
+         if (DECL_P (expr))
+           error_at (loc, "invalid use of non-static member function %qD",
expr);
+         else
+           error_at (loc, "invalid use of non-static member function %qT",
TREE_TYPE (expr));
+       }
       return true;
     }
   return false;
 }


prints:

test.cc:10:17: error: invalid use of non-static member function ‘void
(Local::)()’
 decltype((l->*j)) x;
                 ^

which looks fine to me, except for the column location, but that seems harder
to fix.

We could also print a "note: declared here" to be extra helpful, but I'll leave
that to whoever gets to finish this ;-)
>From gcc-bugs-return-486365-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri May 15 17:34:52 2015
Return-Path: <gcc-bugs-return-486365-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 60234 invoked by alias); 15 May 2015 17:34:52 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 60191 invoked by uid 55); 15 May 2015 17:34:48 -0000
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/64454] optimize (x%5)%5
Date: Fri, 15 May 2015 17:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: glisse at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-64454-4-cAyFPmX4Fw@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64454-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64454-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg01205.txt.bz2
Content-length: 653

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd454

--- Comment #11 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Fri May 15 17:34:15 2015
New Revision: 223221

URL: https://gcc.gnu.org/viewcvs?rev"3221&root=gcc&view=rev
Log:
2015-05-15  Marc Glisse  <marc.glisse@inria.fr>

        PR tree-optimization/64454
gcc/
        * match.pd ((X % Y) % Y, (X % Y) < Y): New patterns.
        (-1 - A -> ~A): Remove unnecessary condition.
gcc/testsuite/
        * gcc.dg/modmod.c: New testcase.


Added:
    trunk/gcc/testsuite/gcc.dg/modmod.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/match.pd
    trunk/gcc/testsuite/ChangeLog


  parent reply	other threads:[~2015-05-15 16:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 16:07 [Bug tree-optimization/66163] New: " marxin at gcc dot gnu.org
2015-05-15 16:14 ` [Bug tree-optimization/66163] " pinskia at gcc dot gnu.org
2015-05-15 16:43 ` marxin at gcc dot gnu.org [this message]
2015-05-15 19:27 ` hubicka at gcc dot gnu.org
2015-05-16  7:51 ` mpolacek at gcc dot gnu.org
2015-05-16 21:57 ` hubicka at gcc dot gnu.org
2015-05-18 11:52 ` rguenth at gcc dot gnu.org
2015-05-18 11:53 ` rguenth at gcc dot gnu.org
2015-05-18 14:02 ` marxin at gcc dot gnu.org
2015-05-18 14:32 ` hubicka at ucw dot cz
2015-05-18 14:33 ` hubicka at gcc dot gnu.org
2015-05-19  6:47 ` law at redhat dot com
2015-06-09 12:56 ` marxin at gcc dot gnu.org
2015-06-09 16:55 ` hubicka at ucw dot cz
2015-06-09 18:15 ` marxin at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-66163-4-Mfy5Aow3N8@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).