public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48118] New: g++ sometimes incorrectly allows copying a volatile trivially-copyable class
@ 2011-03-14 18:40 jason at gcc dot gnu.org
  2011-03-14 18:43 ` [Bug c++/48118] [4.3/4.4/4.5/4.6/4.7 regression] g++ sometimes allows copying a volatile class jason at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-14 18:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48118

           Summary: g++ sometimes incorrectly allows copying a volatile
                    trivially-copyable class
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jason@gcc.gnu.org


As noticed in PR 48113, we fail to give an error for the call to f below even
though it involves copying a volatile object and A doesn't have a copy
constructor that allows a volatile argument.

struct A { };

void f (A);
void (*g)(A);

int main()
{
  volatile A a;
  f(a);
  g(a);
}


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

* [Bug c++/48118] [4.3/4.4/4.5/4.6/4.7 regression] g++ sometimes allows copying a volatile class
  2011-03-14 18:40 [Bug c++/48118] New: g++ sometimes incorrectly allows copying a volatile trivially-copyable class jason at gcc dot gnu.org
@ 2011-03-14 18:43 ` jason at gcc dot gnu.org
  2011-03-15 10:09 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-14 18:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48118

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |2.95, 3.4.6
           Keywords|                            |accepts-invalid
   Last reconfirmed|                            |2011.03.14 18:43:43
                 CC|                            |redi at gcc dot gnu.org
     Ever Confirmed|0                           |1
            Summary|g++ sometimes incorrectly   |[4.3/4.4/4.5/4.6/4.7
                   |allows copying a volatile   |regression] g++ sometimes
                   |trivially-copyable class    |allows copying a volatile
                   |                            |class
      Known to fail|                            |4.0.4, 4.6.0


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

* [Bug c++/48118] [4.3/4.4/4.5/4.6/4.7 regression] g++ sometimes allows copying a volatile class
  2011-03-14 18:40 [Bug c++/48118] New: g++ sometimes incorrectly allows copying a volatile trivially-copyable class jason at gcc dot gnu.org
  2011-03-14 18:43 ` [Bug c++/48118] [4.3/4.4/4.5/4.6/4.7 regression] g++ sometimes allows copying a volatile class jason at gcc dot gnu.org
@ 2011-03-15 10:09 ` rguenth at gcc dot gnu.org
  2011-03-17  0:22 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-15 10:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48118

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.6


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

* [Bug c++/48118] [4.3/4.4/4.5/4.6/4.7 regression] g++ sometimes allows copying a volatile class
  2011-03-14 18:40 [Bug c++/48118] New: g++ sometimes incorrectly allows copying a volatile trivially-copyable class jason at gcc dot gnu.org
  2011-03-14 18:43 ` [Bug c++/48118] [4.3/4.4/4.5/4.6/4.7 regression] g++ sometimes allows copying a volatile class jason at gcc dot gnu.org
  2011-03-15 10:09 ` rguenth at gcc dot gnu.org
@ 2011-03-17  0:22 ` jakub at gcc dot gnu.org
  2011-03-18 15:15 ` jason at gcc dot gnu.org
  2011-03-18 18:45 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-17  0:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48118

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
                 CC|                            |jakub at gcc dot gnu.org


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

* [Bug c++/48118] [4.3/4.4/4.5/4.6/4.7 regression] g++ sometimes allows copying a volatile class
  2011-03-14 18:40 [Bug c++/48118] New: g++ sometimes incorrectly allows copying a volatile trivially-copyable class jason at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-03-17  0:22 ` jakub at gcc dot gnu.org
@ 2011-03-18 15:15 ` jason at gcc dot gnu.org
  2011-03-18 18:45 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-18 15:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48118

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-18 15:07:09 UTC ---
Author: jason
Date: Fri Mar 18 15:07:04 2011
New Revision: 171147

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171147
Log:
    PR c++/48118
    * call.c (build_over_call): Don't skip ck_rvalue.

Added:
    trunk/gcc/testsuite/g++.dg/overload/volatile1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/48118] [4.3/4.4/4.5/4.6/4.7 regression] g++ sometimes allows copying a volatile class
  2011-03-14 18:40 [Bug c++/48118] New: g++ sometimes incorrectly allows copying a volatile trivially-copyable class jason at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-03-18 15:15 ` jason at gcc dot gnu.org
@ 2011-03-18 18:45 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-18 18:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48118

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|4.3.6                       |4.7.0

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-18 17:48:17 UTC ---
Fixed for 4.7.  Might backport to 4.6.1 (along with the two other patches) if
no problems turn up.


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

end of thread, other threads:[~2011-03-18 17:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-14 18:40 [Bug c++/48118] New: g++ sometimes incorrectly allows copying a volatile trivially-copyable class jason at gcc dot gnu.org
2011-03-14 18:43 ` [Bug c++/48118] [4.3/4.4/4.5/4.6/4.7 regression] g++ sometimes allows copying a volatile class jason at gcc dot gnu.org
2011-03-15 10:09 ` rguenth at gcc dot gnu.org
2011-03-17  0:22 ` jakub at gcc dot gnu.org
2011-03-18 15:15 ` jason at gcc dot gnu.org
2011-03-18 18:45 ` 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).