public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66857] New: Reference not bound to lvalue
@ 2015-07-13 12:23 sebastian.lauwers at gmail dot com
  2015-07-13 12:24 ` [Bug c++/66857] " sebastian.lauwers at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sebastian.lauwers at gmail dot com @ 2015-07-13 12:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66857
           Summary: Reference not bound to lvalue
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sebastian.lauwers at gmail dot com
  Target Milestone: ---

Created attachment 35967
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35967&action=edit
preprocessed code

Reporting this as it seems to be a regression from gcc 4.9.2. The following
code works on gcc 4.9.2, but asserts on gcc 5.1.1:

=========== 8< ==========
#include <cassert>

const int i = 0;

struct Test {
    Test(const int& rhs) {
        assert(&rhs == &i);
    }
};

int main(void) {
    Test test = i;
}
=========== >8 ==========

If line 12 is changed to:

    Test test(i);

The assertion is not triggered.

Please let me know if further information is required.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-08-14 16:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13 12:23 [Bug c++/66857] New: Reference not bound to lvalue sebastian.lauwers at gmail dot com
2015-07-13 12:24 ` [Bug c++/66857] " sebastian.lauwers at gmail dot com
2015-07-13 12:28 ` redi at gcc dot gnu.org
2015-07-13 13:07 ` [Bug c++/66857] [5/6 Regression] " redi at gcc dot gnu.org
2015-07-13 23:44 ` ppalka at gcc dot gnu.org
2015-07-15 14:24 ` jason at gcc dot gnu.org
2015-07-25 23:16 ` ppalka at gcc dot gnu.org
2015-08-14 16:33 ` jason at gcc dot gnu.org
2015-08-14 16:33 ` jason at gcc dot gnu.org

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).