public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97413] New: gcc-11 fails to typecheck VLA declarations on emacs-27.1: error: wrong number of arguments specified for 'access' attribute
@ 2020-10-13 22:32 slyfox at gcc dot gnu.org
  2020-10-13 22:43 ` [Bug c/97413] [11 Regression] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: slyfox at gcc dot gnu.org @ 2020-10-13 22:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97413
           Summary: gcc-11 fails to typecheck VLA declarations on
                    emacs-27.1: error: wrong number of arguments specified
                    for 'access' attribute
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

Originally observer a s build failure of emacs-27.1 on gcc-11.

Minimal reproduces:

$ cat fns.c.c
int a(long b, const int a1[b], long c, const int a2[c], int a3[c]);

$ ./xgcc -B. -c fns.c.c
fns.c.c:1:1: error: wrong number of arguments specified for 'access' attribute
    1 | int a(long b, const int a1[b], long c, const int a2[c], int a3[c]);
      | ^~~
fns.c.c:1:1: note: expected between 1 and 3, found 4

gcc-10 builds it successfully. Original emacs code is at
https://git.savannah.gnu.org/cgit/emacs.git/tree/src/fns.c#n2004 (in case I
reduced it incorrectly).

$ ./xgcc -B. -v

Reading specs from /home/slyfox/dev/git/gcc-native-quick-ggdb3/gcc/specs
COLLECT_GCC=/home/slyfox/dev/git/gcc-native-quick-ggdb3/gcc/xgcc
COLLECT_LTO_WRAPPER=/home/slyfox/dev/git/gcc-native-quick-ggdb3/gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--enable-languages=c,c++ --disable-bootstrap --with-multilib-list=m64
--prefix=/home/slyfox/dev/git/gcc-native-quick-ggdb3/../gcc-native-quick-installed-ggdb3
--disable-nls --without-isl --disable-libsanitizer --disable-libvtv
--disable-libgomp --disable-libstdcxx-pch --disable-libunwind-exceptions
CFLAGS='-O0 -ggdb3 ' CXXFLAGS='-O0 -ggdb3 ' --enable-valgrind-annotations
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20201013 (experimental) (GCC)

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

end of thread, other threads:[~2020-10-14 21:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 22:32 [Bug c/97413] New: gcc-11 fails to typecheck VLA declarations on emacs-27.1: error: wrong number of arguments specified for 'access' attribute slyfox at gcc dot gnu.org
2020-10-13 22:43 ` [Bug c/97413] [11 Regression] " mpolacek at gcc dot gnu.org
2020-10-14  0:32 ` msebor at gcc dot gnu.org
2020-10-14 21:37 ` cvs-commit at gcc dot gnu.org
2020-10-14 21:37 ` msebor 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).