public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/102766] New: [12 Regression] internal compiler error: in df_insn_delete, at df-scan.c:949
@ 2021-10-15  8:31 burnus at gcc dot gnu.org
  2021-10-15  9:17 ` [Bug bootstrap/102766] [12 Regression][nvptx] " burnus at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-15  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102766
           Summary: [12 Regression] internal compiler error: in
                    df_insn_delete, at df-scan.c:949
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: build, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-gnu-linux
            Target: nvptx-none

In $(BUILD)/nvptx-none/mgomp/libgomp when compiling with -O2 -mgomp:

during RTL pass: final
In file included from libgomp/config/nvptx/task.c:41:
libgomp/config/nvptx/../../task.c: In function 'gomp_create_target_task':
libgomp/config/nvptx/../../task.c:921:1: internal compiler error: in
df_insn_delete, at df-scan.c:949
  921 | }
      | ^

0x8a9b86 df_insn_delete(rtx_insn*)  gcc/df-scan.c:949
0x845875 delete_insn(rtx_insn*)     gcc/cfgrtl.c:178
0x1119f7d reemit_marker_as_note     gcc/var-tracking.c:10024
0x111d193 delete_vta_debug_insn     gcc/var-tracking.c:10366

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

* [Bug bootstrap/102766] [12 Regression][nvptx] internal compiler error: in df_insn_delete, at df-scan.c:949
  2021-10-15  8:31 [Bug bootstrap/102766] New: [12 Regression] internal compiler error: in df_insn_delete, at df-scan.c:949 burnus at gcc dot gnu.org
@ 2021-10-15  9:17 ` burnus at gcc dot gnu.org
  2021-10-15  9:22 ` marxin at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-15  9:17 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
                 CC|                            |vries at gcc dot gnu.org
            Summary|[12 Regression] internal    |[12 Regression][nvptx]
                   |compiler error: in          |internal compiler error: in
                   |df_insn_delete, at          |df_insn_delete, at
                   |df-scan.c:949               |df-scan.c:949

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Bisecting shows that the ICE is exposed due to the var-tracking changes:

commit g:4cb52980e5d5fb64a393d385923da1b51ab34606
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Oct 12 14:31:50 2021 +0200

    Eliminate AUTODETECT_VALUE usage in options.

    gcc/ChangeLog:

        * common.opt: Stop using AUTODETECT_VALUE
        and use EnabledBy where possible.
        * opts.c: Enable OPT_fvar_tracking with optimize >= 1.
        * toplev.c (AUTODETECT_VALUE): Remove macro.
        (process_options): Simplify by using EnabledBy and
        OPT_fvar_tracking.  Use OPTION_SET_P macro instead of
        AUTODETECT_VALUE.

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

* [Bug bootstrap/102766] [12 Regression][nvptx] internal compiler error: in df_insn_delete, at df-scan.c:949
  2021-10-15  8:31 [Bug bootstrap/102766] New: [12 Regression] internal compiler error: in df_insn_delete, at df-scan.c:949 burnus at gcc dot gnu.org
  2021-10-15  9:17 ` [Bug bootstrap/102766] [12 Regression][nvptx] " burnus at gcc dot gnu.org
@ 2021-10-15  9:22 ` marxin at gcc dot gnu.org
  2021-10-15  9:39 ` burnus at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-15  9:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-10-15
             Status|UNCONFIRMED                 |WAITING
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Can you please provide a pre-processed source file?

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

* [Bug bootstrap/102766] [12 Regression][nvptx] internal compiler error: in df_insn_delete, at df-scan.c:949
  2021-10-15  8:31 [Bug bootstrap/102766] New: [12 Regression] internal compiler error: in df_insn_delete, at df-scan.c:949 burnus at gcc dot gnu.org
  2021-10-15  9:17 ` [Bug bootstrap/102766] [12 Regression][nvptx] " burnus at gcc dot gnu.org
  2021-10-15  9:22 ` marxin at gcc dot gnu.org
@ 2021-10-15  9:39 ` burnus at gcc dot gnu.org
  2021-10-15  9:45 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-15  9:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
... However, there is no effect when using
  -f(no-)var-tracking(-uninit),
it has still an ICE in all cases.

(Well, except that -fvar-tracking-uninit shows the following before the ICE:
cc1: error: variable tracking requested, but not supported by this debug format
[-Werror])

  * * *

And I observe that the following option is now set:

1511      if (!OPTION_SET_P (flag_var_tracking_uninit))
1512         flag_var_tracking_uninit = flag_var_tracking;


While the code before is entered and explicitly sets it to 0:

(gdb) p debug_hooks->var_location == do_nothing_debug_hooks.var_location
$5 = true

1481      /* We know which debug output will be used so we can set
flag_var_tracking
1482         and flag_var_tracking_uninit if the user has not specified them. 
*/
1483      if (debug_info_level < DINFO_LEVEL_NORMAL
1484          || !dwarf_debuginfo_p ()
1485          || debug_hooks->var_location ==
do_nothing_debug_hooks.var_location)
1486        {
1487          if ((OPTION_SET_P (flag_var_tracking) && flag_var_tracking == 1)
1488              || (OPTION_SET_P (flag_var_tracking_uninit)
1489                  && flag_var_tracking_uninit == 1))
1490            {
1491              if (debug_info_level < DINFO_LEVEL_NORMAL)
1492                warning_at (UNKNOWN_LOCATION, 0,
1493                            "variable tracking requested, but useless
unless "
1494                            "producing debug info");
1495              else
1496                warning_at (UNKNOWN_LOCATION, 0,
1497                            "variable tracking requested, but not supported
"
1498                            "by this debug format");
1499            }
1500          flag_var_tracking = 0;
1501          flag_var_tracking_uninit = 0;
1502        }

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

* [Bug bootstrap/102766] [12 Regression][nvptx] internal compiler error: in df_insn_delete, at df-scan.c:949
  2021-10-15  8:31 [Bug bootstrap/102766] New: [12 Regression] internal compiler error: in df_insn_delete, at df-scan.c:949 burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-10-15  9:39 ` burnus at gcc dot gnu.org
@ 2021-10-15  9:45 ` marxin at gcc dot gnu.org
  2021-10-15 10:32 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-15  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=102585

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Ok, so it's something close to PR102585.

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

* [Bug bootstrap/102766] [12 Regression][nvptx] internal compiler error: in df_insn_delete, at df-scan.c:949
  2021-10-15  8:31 [Bug bootstrap/102766] New: [12 Regression] internal compiler error: in df_insn_delete, at df-scan.c:949 burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-10-15  9:45 ` marxin at gcc dot gnu.org
@ 2021-10-15 10:32 ` marxin at gcc dot gnu.org
  2021-10-15 10:43 ` burnus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-15 10:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:

$ cat task.i
void gomp_thread();

void gomp_create_target_task() {
  gomp_thread();
  __builtin_unreachable();
}

$ /dev/shm/objdir2/gcc/xgcc -B/dev/shm/objdir2/gcc/ task.i -c -O2  -g
during RTL pass: final
task.i: In function ‘gomp_create_target_task’:
task.i:6:1: internal compiler error: in df_insn_delete, at df-scan.c:949
    6 | }
      | ^
0xcf8940 df_insn_delete(rtx_insn*)
        /home/marxin/Programming/gcc/gcc/df-scan.c:949
0xc7fa5d delete_insn(rtx_insn*)
        /home/marxin/Programming/gcc/gcc/cfgrtl.c:178
0x181533c reemit_marker_as_note
        /home/marxin/Programming/gcc/gcc/var-tracking.c:10024
0x18162a6 delete_vta_debug_insn
        /home/marxin/Programming/gcc/gcc/var-tracking.c:10366
0x18165a0 delete_vta_debug_insns(bool)
        /home/marxin/Programming/gcc/gcc/var-tracking.c:10411
0xe26655 rest_of_handle_final
        /home/marxin/Programming/gcc/gcc/final.c:4279
0xe26ad8 execute
        /home/marxin/Programming/gcc/gcc/final.c:4363
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.

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

* [Bug bootstrap/102766] [12 Regression][nvptx] internal compiler error: in df_insn_delete, at df-scan.c:949
  2021-10-15  8:31 [Bug bootstrap/102766] New: [12 Regression] internal compiler error: in df_insn_delete, at df-scan.c:949 burnus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-10-15 10:32 ` marxin at gcc dot gnu.org
@ 2021-10-15 10:43 ` burnus at gcc dot gnu.org
  2021-10-21 12:31 ` [Bug middle-end/102766] " burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-15 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> ---
[x86_64 build/host with target nvptx]

.../gcc/cc1 -fpreprocessed task.i -quiet -dumpbase task.c -dumpbase-ext .c
-mgomp -g -O2 -Wall -Werror -version -o task.s

 * * *

Another variant of reducted testcase:

struct gomp_task { void *fn_data; };
gomp_target_task_fn (void *data) { __builtin_unreachable (); }
gomp_create_target_task ()
{
  struct gomp_task *task;
  task = gomp_malloc (sizeof (*task));
  gomp_target_task_fn (task->fn_data);
}

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

* [Bug middle-end/102766] [12 Regression][nvptx] internal compiler error: in df_insn_delete, at df-scan.c:949
  2021-10-15  8:31 [Bug bootstrap/102766] New: [12 Regression] internal compiler error: in df_insn_delete, at df-scan.c:949 burnus at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-10-15 10:43 ` burnus at gcc dot gnu.org
@ 2021-10-21 12:31 ` burnus at gcc dot gnu.org
  2021-10-21 13:20 ` cvs-commit at gcc dot gnu.org
  2021-10-21 13:21 ` marxin at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-21 12:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Cross ref – Martin's patch (current iteration) for this PR and PR102585 is at
https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582103.html

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

* [Bug middle-end/102766] [12 Regression][nvptx] internal compiler error: in df_insn_delete, at df-scan.c:949
  2021-10-15  8:31 [Bug bootstrap/102766] New: [12 Regression] internal compiler error: in df_insn_delete, at df-scan.c:949 burnus at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-10-21 12:31 ` [Bug middle-end/102766] " burnus at gcc dot gnu.org
@ 2021-10-21 13:20 ` cvs-commit at gcc dot gnu.org
  2021-10-21 13:21 ` marxin at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-21 13:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:b4702276615ff8d43bc910e7a54fdd850ad8d461

commit r12-4608-gb4702276615ff8d43bc910e7a54fdd850ad8d461
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Oct 14 14:57:18 2021 +0200

    options: Fix variable tracking option processing.

            PR debug/102585
            PR bootstrap/102766

    gcc/ChangeLog:

            * opts.c (finish_options): Process flag_var_tracking* options
            here as they can be adjusted by optimize attribute.
            Process also flag_syntax_only and flag_gtoggle.
            * toplev.c (process_options): Remove it here.
            * common.opt: Make debug_nonbind_markers_p as PerFunction
            attribute as it depends on optimization level.

    gcc/testsuite/ChangeLog:

            * gcc.dg/pr102585.c: New test.

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

* [Bug middle-end/102766] [12 Regression][nvptx] internal compiler error: in df_insn_delete, at df-scan.c:949
  2021-10-15  8:31 [Bug bootstrap/102766] New: [12 Regression] internal compiler error: in df_insn_delete, at df-scan.c:949 burnus at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2021-10-21 13:20 ` cvs-commit at gcc dot gnu.org
@ 2021-10-21 13:21 ` marxin at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-21 13:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
Should be fixed now.

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

end of thread, other threads:[~2021-10-21 13:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15  8:31 [Bug bootstrap/102766] New: [12 Regression] internal compiler error: in df_insn_delete, at df-scan.c:949 burnus at gcc dot gnu.org
2021-10-15  9:17 ` [Bug bootstrap/102766] [12 Regression][nvptx] " burnus at gcc dot gnu.org
2021-10-15  9:22 ` marxin at gcc dot gnu.org
2021-10-15  9:39 ` burnus at gcc dot gnu.org
2021-10-15  9:45 ` marxin at gcc dot gnu.org
2021-10-15 10:32 ` marxin at gcc dot gnu.org
2021-10-15 10:43 ` burnus at gcc dot gnu.org
2021-10-21 12:31 ` [Bug middle-end/102766] " burnus at gcc dot gnu.org
2021-10-21 13:20 ` cvs-commit at gcc dot gnu.org
2021-10-21 13:21 ` marxin 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).