public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/99270] New: Testsuite 27_io/headers/cstdio/types_std.cc failure on DragonFly
@ 2021-02-25 14:09 rimvydas.jas at gmail dot com
  2021-02-25 14:38 ` [Bug libstdc++/99270] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: rimvydas.jas at gmail dot com @ 2021-02-25 14:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99270
           Summary: Testsuite 27_io/headers/cstdio/types_std.cc failure on
                    DragonFly
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rimvydas.jas at gmail dot com
  Target Milestone: ---

Testsuite on x86_64-*-dragonfly gives:

Running target unix
FAIL: 27_io/headers/cstdio/types_std.cc (test for excess errors)

spawn -ignore SIGHUP /build/trunk/./gcc/xg++ -shared-libgcc
-B/build/trunk/./gcc -nostdinc++
-L/build/trunk/x86_64-unknown-dragonfly5.9/libstdc++-v3/src
-L/build/trunk/x86_64-unknown-dragonfly5.9/libstdc++-v3/src/.libs
-L/build/trunk/x86_64-unknown-dragonfly5.9/libstdc++-v3/libsupc++/.libs
-B/opt/gcc11f/x86_64-unknown-dragonfly5.9/bin/
-B/opt/gcc11f/x86_64-unknown-dragonfly5.9/lib/ -isystem
/opt/gcc11f/x86_64-unknown-dragonfly5.9/include -isystem
/opt/gcc11f/x86_64-unknown-dragonfly5.9/sys-include -fchecking=1
-B/build/trunk/x86_64-unknown-dragonfly5.9/./libstdc++-v3/src/.libs
-fmessage-length=0 -fno-show-column -ffunction-sections -fdata-sections -g -O2
-DLOCALEDIR="." -nostdinc++
-I/build/trunk/x86_64-unknown-dragonfly5.9/libstdc++-v3/include/x86_64-unknown-dragonfly5.9
-I/build/trunk/x86_64-unknown-dragonfly5.9/libstdc++-v3/include
-I/data/gg/libstdc++-v3/libsupc++ -I/data/gg/libstdc++-v3/include/backward
-I/data/gg/libstdc++-v3/testsuite/util
/data/gg/libstdc++-v3/testsuite/27_io/headers/cstdio/types_std.cc
-fdiagnostics-plain-output -S -o types_std.s
/data/gg/libstdc++-v3/testsuite/27_io/headers/cstdio/types_std.cc:25: error:
aggregate 'FILE gnu::f' has incomplete type and cannot be defined
compiler exited with status 1
FAIL: 27_io/headers/cstdio/types_std.cc (test for excess errors)
Excess errors:
/data/gg/libstdc++-v3/testsuite/27_io/headers/cstdio/types_std.cc:25: error:
aggregate 'FILE gnu::f' has incomplete type and cannot be defined

extra_tool_flags are:

On DragonFly the FILE type is declared as opaque struct and its internals are
never exposed on purpose:
typedef struct __FILE FILE;

Even cppreference mentions that std::FILE may be semantically non-copyable.
Could "std::FILE f;" test be excluded by #if !defined(__DragonFly__) or simply
changed to a more usual use case of "std::FILE *fp;" ?

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

* [Bug libstdc++/99270] Testsuite 27_io/headers/cstdio/types_std.cc failure on DragonFly
  2021-02-25 14:09 [Bug libstdc++/99270] New: Testsuite 27_io/headers/cstdio/types_std.cc failure on DragonFly rimvydas.jas at gmail dot com
@ 2021-02-25 14:38 ` redi at gcc dot gnu.org
  2021-02-25 15:01 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2021-02-25 14:38 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-02-25
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Rimvydas (RJ) from comment #0)
> simply changed to a more usual use case of "std::FILE *fp;" ?

Yes, I think that, or declaring extern std::FILE f; instead.

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

* [Bug libstdc++/99270] Testsuite 27_io/headers/cstdio/types_std.cc failure on DragonFly
  2021-02-25 14:09 [Bug libstdc++/99270] New: Testsuite 27_io/headers/cstdio/types_std.cc failure on DragonFly rimvydas.jas at gmail dot com
  2021-02-25 14:38 ` [Bug libstdc++/99270] " redi at gcc dot gnu.org
@ 2021-02-25 15:01 ` redi at gcc dot gnu.org
  2021-02-25 15:36 ` cvs-commit at gcc dot gnu.org
  2021-02-25 15:36 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2021-02-25 15:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Interestingly, in C99 we have:

  Types are partitioned into object types (types that fully describe objects),
  function types (types that describe functions), and incomplete types (types
  that describe objects but lack information needed to determine their sizes).

And FILE is specified to be an object type, which means it can't be incomplete.

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1439.pdf changed that text for
C11 so that incomplete types are a sub-category of object type, and
intentionally didn't change the definition of FILE, allowing it to be
incomplete (see last page of N1439).

Not that it matters, we should fix the test either way. Just a curiosity.

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

* [Bug libstdc++/99270] Testsuite 27_io/headers/cstdio/types_std.cc failure on DragonFly
  2021-02-25 14:09 [Bug libstdc++/99270] New: Testsuite 27_io/headers/cstdio/types_std.cc failure on DragonFly rimvydas.jas at gmail dot com
  2021-02-25 14:38 ` [Bug libstdc++/99270] " redi at gcc dot gnu.org
  2021-02-25 15:01 ` redi at gcc dot gnu.org
@ 2021-02-25 15:36 ` cvs-commit at gcc dot gnu.org
  2021-02-25 15:36 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-25 15:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:31002af9040876dfb6444fabd524b11ca0739519

commit r11-7391-g31002af9040876dfb6444fabd524b11ca0739519
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Feb 25 15:31:19 2021 +0000

    libstdc++: Do not assume std::FILE is complete [PR 99270]

    libstdc++-v3/ChangeLog:

            PR libstdc++/99270
            * testsuite/27_io/headers/cstdio/types_std.cc: Use pointer to
            FILE instead of FILE.

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

* [Bug libstdc++/99270] Testsuite 27_io/headers/cstdio/types_std.cc failure on DragonFly
  2021-02-25 14:09 [Bug libstdc++/99270] New: Testsuite 27_io/headers/cstdio/types_std.cc failure on DragonFly rimvydas.jas at gmail dot com
                   ` (2 preceding siblings ...)
  2021-02-25 15:36 ` cvs-commit at gcc dot gnu.org
@ 2021-02-25 15:36 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2021-02-25 15:36 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Thanks

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

end of thread, other threads:[~2021-02-25 15:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25 14:09 [Bug libstdc++/99270] New: Testsuite 27_io/headers/cstdio/types_std.cc failure on DragonFly rimvydas.jas at gmail dot com
2021-02-25 14:38 ` [Bug libstdc++/99270] " redi at gcc dot gnu.org
2021-02-25 15:01 ` redi at gcc dot gnu.org
2021-02-25 15:36 ` cvs-commit at gcc dot gnu.org
2021-02-25 15:36 ` redi 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).