mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-18 10:30:42 +08:00
Reset when -gtoggle is used in gcc_options.
PR debug/102955 gcc/ChangeLog: * opts.c (finish_options): Reset flag_gtoggle when it is used. gcc/testsuite/ChangeLog: * g++.dg/pr102955.C: New test.
This commit is contained in:
parent
155f6b2be4
commit
14c7041a1f
@ -1377,6 +1377,8 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
|
||||
|
||||
if (flag_gtoggle)
|
||||
{
|
||||
/* Make sure to process -gtoggle only once. */
|
||||
flag_gtoggle = false;
|
||||
if (debug_info_level == DINFO_LEVEL_NONE)
|
||||
{
|
||||
debug_info_level = DINFO_LEVEL_NORMAL;
|
||||
|
14
gcc/testsuite/g++.dg/pr102955.C
Normal file
14
gcc/testsuite/g++.dg/pr102955.C
Normal file
@ -0,0 +1,14 @@
|
||||
/* PR debug/102955 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-g -gtoggle" } */
|
||||
|
||||
#pragma GCC optimize "0"
|
||||
struct j
|
||||
{
|
||||
explicit j ();
|
||||
~j ();
|
||||
};
|
||||
void g (void)
|
||||
{
|
||||
new j();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user