public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/102772] [12 regression] g++.dg/torture/pr80334.C FAILs
Date: Thu, 31 Mar 2022 13:46:20 +0000	[thread overview]
Message-ID: <bug-102772-4-A1kuriT0na@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102772-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #37 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #36 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Created attachment 52719
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52719&action=edit
> gcc12-pr102772.patch
>
> So like this?

Mostly.  There were some issues, though:

* Initially, the patch caused the bootstrap to fail:

In file included from
/var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/i386-pc-solaris2.11/bits/c++allocator.h:33,
                 from
/var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/bits/allocator.h:46,
                 from
/var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/memory:64,
                 from
/vol/gcc/src/hg/master/local/libstdc++-v3/src/c++98/allocator-inst.cc:29:
/var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/bits/new_allocator.h:
In member function '_Tp* std::__new_allocator<_Tp>::allocate(size_type, const
void*)':
/var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/bits/new_allocator.h:130:24:
error: expected primary-expression before ')' token
  130 |         if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
      |                        ^
      |             ^~~~~~~
/var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/bits/new_allocator.h:130:13:
note: (if you use '-fpermissive', G++ will accept your code, but allowing the
use of an undeclared name is deprecated)
/var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/bits/new_allocator.h:132:54:
error: there are no arguments to 'alignof' that depend on a template parameter,
so a declaration of 'alignof' must be available [-fpermissive]
  132 |             std::align_val_t __al = std::align_val_t(alignof(_Tp));
      |                                                      ^~~~~~~
/var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/bits/new_allocator.h:132:53:
error: expected primary-expression before '(' token
  132 |             std::align_val_t __al = std::align_val_t(alignof(_Tp));
      |                                                     ^
/var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/bits/new_allocator.h:132:65:
error: expected primary-expression before ')' token
  132 |             std::align_val_t __al = std::align_val_t(alignof(_Tp));
      |                                                                 ^

  and several more, affecting

  include/ext/bitmap_allocator.h
  include/ext/mt_allocator.h
  include/ext/pool_allocator.h

  AFAICS, alignof is C++ >= 11 only.  I've used the attached patch to
  use __alignof__ instead, although I don't know if that's the best fix.

* With that, the build completed and g++.dg/torture/pr80334.C PASSes.

  And yes, my tree did include

changeset:   259338:c7f332059508
bookmark:    trunk
tag:         qparent
user:        Jakub Jelinek <jakub@redhat.com>
date:        Wed Mar 30 16:47:10 2022 +0200
summary:     Revert "testsuite: Change pr80334.C testcase to dg-do compile
[PR102772]"

* However, there were quite a number of 32-bit regressions:

+FAIL: g++.dg/cpp1z/aligned-new4.C    (test for warnings, line 11)
+FAIL: g++.dg/cpp1z/aligned-new4a.C    (test for warnings, line 11)
+FAIL: g++.dg/diagnostic/recur-align.C  -std=gnu++14  (test for warnings, line
13)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14  (test for
warnings, line 132)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14  (test for
warnings, line 136)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14  (test for
warnings, line 140)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14  (test for
warnings, line 155)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14  (test for
warnings, line 180)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14  (test for
warnings, line 210)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14  (test for
warnings, line 233)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14  (test for
warnings,
 line 241)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14  (test for
warnings, line 41)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14  (test for
warnings, line 43)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14 (test for excess
errors)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14 note (test for
warnings, line 178)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14 note (test for
warnings, line 208)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14 note (test for
warnings, line 231)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++14 note (test for
warnings, line 238)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98  (test for
warnings, line 132)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98  (test for
warnings, line 136)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98  (test for
warnings, line 140)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98  (test for
warnings, line 155)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98  (test for
warnings, line 180)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98  (test for
warnings, line 210)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98  (test for
warnings, line 233)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98  (test for
warnings, line 241)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98  (test for
warnings, line 41)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98  (test for
warnings, line 43)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98 (test for excess
errors)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98 note (test for
warnings, line 178)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98 note (test for
warnings, line 208)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98 note (test for
warnings, line 231)
+FAIL: g++.dg/warn/Wmismatched-new-delete-2.C  -std=gnu++98 note (test for
warnings, line 238)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++14  (test for
warnings, line 108)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++14  (test for
warnings, line 110)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++14  (test for
warnings, line 116)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++14  (test for
warnings, line 122)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++14  (test for
warnings, line 128)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++14  (test for
warnings, line 138)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++14  (test for
warnings, line 144)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++14  (test for
warnings, line 150)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++14  (test for
warnings, line 156)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++14 (test for excess
errors)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++98  (test for
warnings, line 108)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++98  (test for
warnings, line 110)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++98  (test for
warnings, line 116)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++98  (test for
warnings, line 122)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++98  (test for
warnings, line 128)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++98  (test for
warnings, line 138)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++98  (test for
warnings, line 144)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++98  (test for
warnings, line 150)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++98  (test for
warnings, line 156)
+FAIL: g++.dg/warn/Wmismatched-new-delete-6.C  -std=gnu++98 (test for excess
errors)
+FAIL: g++.dg/warn/Wmismatched-new-delete-7.C  -std=gnu++14 (test for excess
errors)
+FAIL: g++.dg/warn/Wmismatched-new-delete-7.C  -std=gnu++98 (test for excess
errors)

  I don't really understand what's going on here.

  There were two more

+FAIL: 17_intro/headers/c++1998/all_attributes.cc (test for excess errors)

Excess errors:
/var/gcc/regression/master/11.4-gcc-gas/build/i386-pc-solaris2.11/libstdc++-v3/include/ext/malloc_allocator.h:138:
error: expected primary-expression before ')' token
/var/gcc/regression/master/11.4-gcc-gas/build/i386-pc-solaris2.11/libstdc++-v3/include/ext/malloc_allocator.h:138:
error: there are no arguments to 'alignof' that depend on a template parameter,
so a declaration of 'alignof' must be available [-fpermissive]

+FAIL: 17_intro/headers/c++1998/profile_mode.cc (test for excess errors)

Excess errors:
/var/gcc/regression/master/11.4-gcc-gas/build/i386-pc-solaris2.11/libstdc++-v3/include/ext/malloc_allocator.h:138:
error: expected primary-expression before ')' token
/var/gcc/regression/master/11.4-gcc-gas/build/i386-pc-solaris2.11/libstdc++-v3/include/ext/malloc_allocator.h:138:
error: there are no arguments to 'alignof' that depend on a template parameter,
so a declaration of 'alignof' must be available [-fpermissive]

  Those are other instances of alignof not being present in C++98, so I
  changed include/ext/malloc_allocator.h to also use __alignof__ instead
  of alignof, which makes those tests PASS.

  parent reply	other threads:[~2022-03-31 13:46 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 11:39 [Bug target/102772] New: " ro at gcc dot gnu.org
2021-10-15 11:40 ` [Bug target/102772] " ro at gcc dot gnu.org
2021-10-15 11:40 ` ro at gcc dot gnu.org
2021-10-15 11:40 ` ro at gcc dot gnu.org
2021-10-15 12:06 ` hjl.tools at gmail dot com
2021-10-15 13:02 ` rguenth at gcc dot gnu.org
2021-10-15 14:29 ` ro at CeBiTec dot Uni-Bielefeld.DE
2021-10-15 20:44 ` hjl.tools at gmail dot com
2021-11-16 11:51 ` jakub at gcc dot gnu.org
2021-11-23 12:36 ` ro at gcc dot gnu.org
2022-03-17 15:05 ` jakub at gcc dot gnu.org
2022-03-17 15:14 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-21 11:44 ` jakub at gcc dot gnu.org
2022-03-21 12:01 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-21 12:03 ` ro at gcc dot gnu.org
2022-03-21 12:03 ` ro at gcc dot gnu.org
2022-03-21 13:17 ` jakub at gcc dot gnu.org
2022-03-21 13:31 ` jakub at gcc dot gnu.org
2022-03-22 15:12 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-22 17:00 ` jakub at gcc dot gnu.org
2022-03-23 13:56 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-23 14:11 ` jakub at gcc dot gnu.org
2022-03-23 14:17 ` jakub at gcc dot gnu.org
2022-03-25 12:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-25 12:53 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-25 12:54 ` jakub at gcc dot gnu.org
2022-03-25 13:00 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-25 13:06 ` jakub at gcc dot gnu.org
2022-03-25 13:13 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-25 13:18 ` jakub at gcc dot gnu.org
2022-03-25 13:22 ` ro at gcc dot gnu.org
2022-03-25 13:49 ` jakub at gcc dot gnu.org
2022-03-30 14:06 ` cvs-commit at gcc dot gnu.org
2022-03-30 14:45 ` jakub at gcc dot gnu.org
2022-03-30 14:52 ` redi at gcc dot gnu.org
2022-03-30 14:56 ` redi at gcc dot gnu.org
2022-03-30 15:04 ` redi at gcc dot gnu.org
2022-03-30 15:13 ` redi at gcc dot gnu.org
2022-03-30 15:23 ` jakub at gcc dot gnu.org
2022-03-31 13:46 ` ro at CeBiTec dot Uni-Bielefeld.DE [this message]
2022-03-31 13:47 ` ro at gcc dot gnu.org
2022-03-31 14:16 ` redi at gcc dot gnu.org
2022-03-31 14:18 ` redi at gcc dot gnu.org
2022-03-31 14:49 ` jakub at gcc dot gnu.org
2022-03-31 15:15 ` redi at gcc dot gnu.org
2022-03-31 15:47 ` jakub at gcc dot gnu.org
2022-04-04 11:54 ` jakub at gcc dot gnu.org
2022-04-11  9:13 ` jakub at gcc dot gnu.org
2022-04-11 14:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-04-11 14:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-04-11 15:29 ` jakub at gcc dot gnu.org
2022-04-12  7:53 ` jakub at gcc dot gnu.org
2022-04-13 14:47 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-05-06  8:31 ` [Bug target/102772] [12/13 " jakub at gcc dot gnu.org
2023-05-08 12:22 ` [Bug target/102772] [12/13/14 " rguenth 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-102772-4-A1kuriT0na@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: link
Be 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).