public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "brooks at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/104874] New: Non-compile test in string_vector_iterators.cc test fails for the wrong reason. Date: Thu, 10 Mar 2022 22:49:56 +0000 [thread overview] Message-ID: <bug-104874-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104874 Bug ID: 104874 Summary: Non-compile test in string_vector_iterators.cc test fails for the wrong reason. Product: gcc Version: unknown Status: UNCONFIRMED Severity: minor Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: brooks at gcc dot gnu.org Target Milestone: --- The testsuite/24_iterators/random_access/string_vector_iterators.cc test contains the following code blob, in every version since the test originated with the initial libstdc++ checkin in April 2000, through to current HEAD: 569 #ifdef ITER24_F8 570 std::vector<const int> v(1); 571 std::vector<const int>::reference r(v.begin()[0]); 572 r = 1; // cannot assign through reference to const 573 failures++; 574 #endif This code actually fails to compile on the first line because the template parameter of a std::container object cannot be const. This indicates a stronger problem with these non-compile tests, which is that they're not actually testing what we think they're testing. (As far as I can tell, they're not checked at all, and so should either be deleted or replaced with proper dejagnu non-compile tests.)
next reply other threads:[~2022-03-10 22:49 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-10 22:49 brooks at gcc dot gnu.org [this message] 2022-03-10 22:58 ` [Bug libstdc++/104874] " redi 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-104874-4@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: linkBe 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).