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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-01-24
           Keywords|                            |testsuite-fail

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to seurer from comment #2)
> Yes it is a regular file.
> 
> With the previous commit it wasn't UNSUPPORTED and worked just fine:

Ah, because rather than being UNSUPPORTED, the test was skipping some checks
via #if


// { dg-additional-options "-DHAVE_TZDB" { target tzdb } }

void
test_current()
{
#ifdef HAVE_TZDB
  const tzdb& db = get_tzdb();
  const time_zone* tz = db.current_zone();
  VERIFY( tz == std::chrono::current_zone() );
#endif
}

Previously this machine did not match the effective target tzdb, and so
std::chrono::current_zone() was not tested. Now it matches the et, and so that
function is tested.

And because it's a regular file, that function doesn't work, so we get a FAIL
now. I should really have split that test into two files, one that tests the
always-available functionality and one which depends on effective target tzdb.
That would have gone from UNSUPPORTED to FAIL for the latter test, instead of
the confusing PASS -> FAIL case we have now for something that never actually
worked.

PR 108409 tracks some other causes of that function not working, but this one
is different. And that reminds me I've seen this before: gcc303 in the compile
farm is a FreeBSD 13.0 system, and /etc/localtime is a regular file there too:

$ ssh gcc303 file /etc/localtime
/etc/localtime: timezone data, version 2, 1 gmt time flag, 1 std time flag, no
leap seconds, no transition times, 1 abbreviation char

Reply via email to