public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug web/104254] New: -freport-bug should be mentioned on https://gcc.gnu.org/bugs/
@ 2022-01-26 22:42 pinskia at gcc dot gnu.org
  2022-01-27  8:53 ` [Bug web/104254] " marxin at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-26 22:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104254
           Summary: -freport-bug should be mentioned on
                    https://gcc.gnu.org/bugs/
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: web
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Wile having -freport-bug is good, it is not mentioned on
https://gcc.gnu.org/bugs/ . Having it listed as another way of getting the
preprocessed source for an internal compiler error would be a good idea and
maybe even save some time for some users trying to find the preprocessed source
since it lists the file that needs to be attached in the error message.

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

* [Bug web/104254] -freport-bug should be mentioned on https://gcc.gnu.org/bugs/
  2022-01-26 22:42 [Bug web/104254] New: -freport-bug should be mentioned on https://gcc.gnu.org/bugs/ pinskia at gcc dot gnu.org
@ 2022-01-27  8:53 ` marxin at gcc dot gnu.org
  2022-01-27  8:55 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-27  8:53 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-01-27

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
I support that. Can you please update the wiki page?

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

* [Bug web/104254] -freport-bug should be mentioned on https://gcc.gnu.org/bugs/
  2022-01-26 22:42 [Bug web/104254] New: -freport-bug should be mentioned on https://gcc.gnu.org/bugs/ pinskia at gcc dot gnu.org
  2022-01-27  8:53 ` [Bug web/104254] " marxin at gcc dot gnu.org
@ 2022-01-27  8:55 ` marxin at gcc dot gnu.org
  2022-01-27  9:08 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-27  8:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
One possible improvement can be promoting the option when an ICE happens:

$ g++ pr100019.C -c -w
pr100019.C: In instantiation of ‘void f(auto:1 ...) [with auto:1 = {int}]’:
pr100019.C:8:4:   required from here
pr100019.C:3:19: internal compiler error: Segmentation fault
    3 |     try {} catch (decltype(args)) {}
      |                   ^~~~~~~~~~~~~~
0x124ce2a crash_signal
        /home/marxin/Programming/gcc/gcc/toplev.cc:322
0x7ffff789b41f ???
       
/usr/src/debug/glibc-2.34-4.3.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0xc49ffb invalid_nonstatic_memfn_p(unsigned int, tree_node*, int)
...
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Let me prepare a patch for it.

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

* [Bug web/104254] -freport-bug should be mentioned on https://gcc.gnu.org/bugs/
  2022-01-26 22:42 [Bug web/104254] New: -freport-bug should be mentioned on https://gcc.gnu.org/bugs/ pinskia at gcc dot gnu.org
  2022-01-27  8:53 ` [Bug web/104254] " marxin at gcc dot gnu.org
  2022-01-27  8:55 ` marxin at gcc dot gnu.org
@ 2022-01-27  9:08 ` marxin at gcc dot gnu.org
  2022-01-27  9:14 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-27  9:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Let's compare it with Clang:

clang++ llvm.C -std=c++20
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/bin/clang-13.0.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations
-disable-free -disable-llvm-verifier -discard-value-names -main-file-name
llvm.C -mrelocation-model static -mframe-pointer=all -fmath-errno
-fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64
-tune-cpu generic -debugger-tuning=gdb
-fcoverage-compilation-dir=/home/marxin/Programming/testcases -resource-dir
/usr/lib64/clang/13.0.0 -internal-isystem
/usr/bin/../lib64/gcc/x86_64-suse-linux/11/../../../../include/c++/11
-internal-isystem
/usr/bin/../lib64/gcc/x86_64-suse-linux/11/../../../../include/c++/11/x86_64-suse-linux
-internal-isystem
/usr/bin/../lib64/gcc/x86_64-suse-linux/11/../../../../include/c++/11/backward
-internal-isystem /usr/lib64/clang/13.0.0/include -internal-isystem
/usr/local/include -internal-isystem
/usr/bin/../lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-std=c++20 -fdeprecated-macro
-fdebug-compilation-dir=/home/marxin/Programming/testcases -ferror-limit 19
-fgnuc-version=4.2.1 -fno-implicit-modules -fcxx-exceptions -fexceptions
-fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o
/tmp/llvm-19c754.o -x c++ llvm.C
1.      <eof> parser at end of file
2.      llvm.C:7:12: parsing function body 'main'
 #0 0x00007ffff0e83491 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/usr/bin/../lib64/libLLVM.so.13+0x2b82491)
 #1 0x00007ffff0e80f70 llvm::sys::RunSignalHandlers()
(/usr/bin/../lib64/libLLVM.so.13+0x2b7ff70)
 #2 0x00007ffff0e83c9d (/usr/bin/../lib64/libLLVM.so.13+0x2b82c9d)
 #3 0x00007fffedeec420 __restore_rt (/usr/bin/../lib64/libc.so.6+0x56420)
 #4 0x00007ffff5abb2af (/usr/bin/../lib64/libclang-cpp.so.13+0x17ea2af)
 #5 0x00007ffff5abda16 (/usr/bin/../lib64/libclang-cpp.so.13+0x17eca16)
 #6 0x00007ffff5a4df64 (/usr/bin/../lib64/libclang-cpp.so.13+0x177cf64)
 #7 0x00007ffff5a4945b (/usr/bin/../lib64/libclang-cpp.so.13+0x177845b)
 #8 0x00007ffff5a490ad
clang::Expr::EvaluateAsConstantExpr(clang::Expr::EvalResult&, clang::ASTContext
const&, clang::Expr::ConstantExprKind) const
(/usr/bin/../lib64/libclang-cpp.so.13+0x17780ad)
 #9 0x00007ffff6291edc clang::Sema::PopExpressionEvaluationContext()
(/usr/bin/../lib64/libclang-cpp.so.13+0x1fc0edc)
#10 0x00007ffff610eeaf clang::Sema::ActOnFinishFunctionBody(clang::Decl*,
clang::Stmt*, bool) (/usr/bin/../lib64/libclang-cpp.so.13+0x1e3deaf)
#11 0x00007ffff57c392d clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) (/usr/bin/../lib64/libclang-cpp.so.13+0x14f292d)
#12 0x00007ffff57e0044
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/usr/bin/../lib64/libclang-cpp.so.13+0x150f044)
#13 0x00007ffff5720c4e clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/usr/bin/../lib64/libclang-cpp.so.13+0x144fc4e)
#14 0x00007ffff57ded9c
clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/usr/bin/../lib64/libclang-cpp.so.13+0x150dd9c)
#15 0x00007ffff57de72d
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/usr/bin/../lib64/libclang-cpp.so.13+0x150d72d)
#16 0x00007ffff57dd855
clang::Parser::ParseExternalDeclaration(clang::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) (/usr/bin/../lib64/libclang-cpp.so.13+0x150c855)
#17 0x00007ffff57dbdcd
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/usr/bin/../lib64/libclang-cpp.so.13+0x150adcd)
#18 0x00007ffff570383d clang::ParseAST(clang::Sema&, bool, bool)
(/usr/bin/../lib64/libclang-cpp.so.13+0x143283d)
#19 0x00007ffff6ab7dae clang::CodeGenAction::ExecuteAction()
(/usr/bin/../lib64/libclang-cpp.so.13+0x27e6dae)
#20 0x00007ffff74adba4 clang::FrontendAction::Execute()
(/usr/bin/../lib64/libclang-cpp.so.13+0x31dcba4)
#21 0x00007ffff7426622
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/bin/../lib64/libclang-cpp.so.13+0x3155622)
#22 0x00007ffff75284a6
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/bin/../lib64/libclang-cpp.so.13+0x32574a6)
#23 0x00000000002144f1 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/bin/clang-13.0.0+0x2144f1)
#24 0x00000000002123a6 (/usr/bin/clang-13.0.0+0x2123a6)
#25 0x00000000002121cb main (/usr/bin/clang-13.0.0+0x2121cb)
#26 0x00007fffeded65c0 __libc_start_call_main
/usr/src/debug/glibc-2.34-4.3.x86_64/csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#27 0x00007fffeded667c call_init
/usr/src/debug/glibc-2.34-4.3.x86_64/csu/../csu/libc-start.c:128:20
#28 0x00007fffeded667c __libc_start_main@GLIBC_2.2.5
/usr/src/debug/glibc-2.34-4.3.x86_64/csu/../csu/libc-start.c:379:5
#29 0x000000000020f305 _start (/usr/bin/clang-13.0.0+0x20f305)
clang-13.0: error: unable to execute command: Segmentation fault (core dumped)
clang-13.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 13.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-13.0: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-13.0: note: diagnostic msg: /tmp/llvm-201326.cpp
clang-13.0: note: diagnostic msg: /tmp/llvm-201326.sh
clang-13.0: note: diagnostic msg: 

********************

As seen, they run -fcrash-diagnostics by default and so that one gets
Preprocessed source(s)..

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

* [Bug web/104254] -freport-bug should be mentioned on https://gcc.gnu.org/bugs/
  2022-01-26 22:42 [Bug web/104254] New: -freport-bug should be mentioned on https://gcc.gnu.org/bugs/ pinskia at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-01-27  9:08 ` marxin at gcc dot gnu.org
@ 2022-01-27  9:14 ` jakub at gcc dot gnu.org
  2022-01-27 10:45 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-27  9:14 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fedora/RHEL gcc also has
sed -i -e 's/Common Driver Var(flag_report_bug)/& Init(1)/' gcc/common.opt
and thus makes -freport-bug the default.
Perhaps it should be decided at configure time, on the other side making it the
default always will only slow things down for developers, you don't want all
the testcases that ICE in the testsuite take 3 times longer or when cvise
reducing some ICE spend much more time on it (sure, I use cc1/cc1plus etc.
directly for those, but not all people do).

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

* [Bug web/104254] -freport-bug should be mentioned on https://gcc.gnu.org/bugs/
  2022-01-26 22:42 [Bug web/104254] New: -freport-bug should be mentioned on https://gcc.gnu.org/bugs/ pinskia at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-01-27  9:14 ` jakub at gcc dot gnu.org
@ 2022-01-27 10:45 ` marxin at gcc dot gnu.org
  2022-01-27 10:50 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-27 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> Fedora/RHEL gcc also has
> sed -i -e 's/Common Driver Var(flag_report_bug)/& Init(1)/' gcc/common.opt
> and thus makes -freport-bug the default.

Speaking with Richi, we're not planning to do that for openSUSE/SLEs.

> Perhaps it should be decided at configure time, on the other side making it
> the default always will only slow things down for developers, you don't want
> all the testcases that ICE in the testsuite take 3 times longer or when
> cvise reducing some ICE spend much more time on it (sure, I use cc1/cc1plus
> etc. directly for those, but not all people do).

Thus, we are not interested in a configure option :)

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

* [Bug web/104254] -freport-bug should be mentioned on https://gcc.gnu.org/bugs/
  2022-01-26 22:42 [Bug web/104254] New: -freport-bug should be mentioned on https://gcc.gnu.org/bugs/ pinskia at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-01-27 10:45 ` marxin at gcc dot gnu.org
@ 2022-01-27 10:50 ` marxin at gcc dot gnu.org
  2022-01-27 10:51 ` pinskia at gcc dot gnu.org
  2022-01-27 12:34 ` cvs-commit at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-27 10:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
One more comment about https://gcc.gnu.org/bugs/. Well, I think the page
contains very detailed information for reporters, and I double anybody is
actually reading that. Plus it misses a direct link to bugzilla.

What I see crucial for a bug report is what we list in 'What we need', which is
something covered with -freport-bug. I don't expect reporters seeking for a
Known issue or searching bugzilla for a similar problem. That's something
non-trivial also for GCC developers.

That said, I would recommend linking https://gcc.gnu.org/bugzilla/ when ICE
happens.

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

* [Bug web/104254] -freport-bug should be mentioned on https://gcc.gnu.org/bugs/
  2022-01-26 22:42 [Bug web/104254] New: -freport-bug should be mentioned on https://gcc.gnu.org/bugs/ pinskia at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-01-27 10:50 ` marxin at gcc dot gnu.org
@ 2022-01-27 10:51 ` pinskia at gcc dot gnu.org
  2022-01-27 12:34 ` cvs-commit at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-27 10:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note at Marvell we also turn it on by default a configure option is not needed
either.
The main reason why I filed this was because of two bug reports that came in
where the user of GCC did not attach the preprocessed source and when asked to
even add -save-temps, they didn't know how to change the cmake/make file to do
such. I tried to repeat their steps on how to reproduce the bug but could not
even get the library/programs to compile.

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

* [Bug web/104254] -freport-bug should be mentioned on https://gcc.gnu.org/bugs/
  2022-01-26 22:42 [Bug web/104254] New: -freport-bug should be mentioned on https://gcc.gnu.org/bugs/ pinskia at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-01-27 10:51 ` pinskia at gcc dot gnu.org
@ 2022-01-27 12:34 ` cvs-commit at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-27 12:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:76ef38e3178a11e76a66b4d4c0e10e85fe186a45

commit r12-6893-g76ef38e3178a11e76a66b4d4c0e10e85fe186a45
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Jan 27 11:22:42 2022 +0100

    Improve wording for -freport-bug option.

            PR web/104254

    gcc/ChangeLog:

            * diagnostic.cc (diagnostic_initialize):
            Initialize report_bug flag.
            (diagnostic_action_after_output):
            Explain that -freport-bug option can be used for pre-processed
            file creation.  Make the message shorter.
            (error_recursion): Rename Internal to internal.
            * diagnostic.h (struct diagnostic_context): New field.
            * opts.cc (common_handle_option): Init the field here.

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

end of thread, other threads:[~2022-01-27 12:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-26 22:42 [Bug web/104254] New: -freport-bug should be mentioned on https://gcc.gnu.org/bugs/ pinskia at gcc dot gnu.org
2022-01-27  8:53 ` [Bug web/104254] " marxin at gcc dot gnu.org
2022-01-27  8:55 ` marxin at gcc dot gnu.org
2022-01-27  9:08 ` marxin at gcc dot gnu.org
2022-01-27  9:14 ` jakub at gcc dot gnu.org
2022-01-27 10:45 ` marxin at gcc dot gnu.org
2022-01-27 10:50 ` marxin at gcc dot gnu.org
2022-01-27 10:51 ` pinskia at gcc dot gnu.org
2022-01-27 12:34 ` cvs-commit 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).