public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97190] New: [11 Regression] ICE in get_location_from_adhoc_loc at libcpp/line-map.c:257 since r11-2928-gd14c547abd484d35
@ 2020-09-24  7:50 marxin at gcc dot gnu.org
  2020-09-24  7:50 ` [Bug tree-optimization/97190] " marxin at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-09-24  7:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97190
           Summary: [11 Regression] ICE in get_location_from_adhoc_loc at
                    libcpp/line-map.c:257 since r11-2928-gd14c547abd484d35
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: msebor at gcc dot gnu.org
  Target Milestone: ---

The following ICEs:

$ cat strncat.c
#include <string.h>
#include <stdlib.h>

test1(char *to, int to_size, char from) { strncat(to, from, 2); }
main() {
  size_t to_size = 0;
  char *to = malloc(to_size);
  char from;
  test1(to, to_size, from);
}

$ gcc strncat.c -c -O1
strncat.c:4:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    4 | test1(char *to, int to_size, char from) { strncat(to, from, 2); }
      | ^~~~~
strncat.c: In function ‘test1’:
strncat.c:4:55: warning: passing argument 2 of ‘strncat’ makes pointer from
integer without a cast [-Wint-conversion]
    4 | test1(char *to, int to_size, char from) { strncat(to, from, 2); }
      |                                                       ^~~~
      |                                                       |
      |                                                       char
In file included from strncat.c:1:
/usr/include/string.h:133:71: note: expected ‘const char * restrict’ but
argument is of type ‘char’
  133 | extern char *strncat (char *__restrict __dest, const char *__restrict
__src,
      |                                               
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
strncat.c: At top level:
strncat.c:5:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    5 | main() {
      | ^~~~
In function ‘test1’,
    inlined from ‘main’ at strncat.c:9:3:
strncat.c:4:43: warning: ‘strncat’ specified bound 2 exceeds destination size 0
[-Wstringop-overflow=]
    4 | test1(char *to, int to_size, char from) { strncat(to, from, 2); }
      |                                           ^~~~~~~~~~~~~~~~~~~~

during RTL pass: expand
strncat.c: In function ‘main’:
strncat.c:4:43: internal compiler error: Segmentation fault
0xb1b95f crash_signal
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/toplev.c:329
0x7ffff76a652f ???
       
/usr/src/debug/glibc-2.31-6.3.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x14c3a67 get_location_from_adhoc_loc(line_maps const*, unsigned int)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/libcpp/line-map.c:257
0x14c3a67 linemap_resolve_location(line_maps*, unsigned int,
location_resolution_kind, line_map_ordinary const**)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/libcpp/line-map.c:1540
0x149afa9 diagnostic_report_current_module(diagnostic_context*, unsigned int)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/diagnostic.c:683
0xb64481 diagnostic_report_current_function(diagnostic_context*,
diagnostic_info*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/tree-diagnostic.c:39
0xb644c0 default_tree_diagnostic_starter
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/tree-diagnostic.c:48
0x149a1f6 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/diagnostic.c:1206
0x149c6c7 diagnostic_impl
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/diagnostic.c:1355
0x149c6c7 inform(unsigned int, char const*, ...)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/diagnostic.c:1434
0x7226db maybe_warn_for_bound
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/builtins.c:3483
0x725f28 maybe_warn_for_bound
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/builtins.c:3361
0x725f28 check_access(tree_node*, tree_node*, tree_node*, tree_node*,
tree_node*, access_mode, access_data const*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/builtins.c:4071
0x7295cf expand_builtin_strncat
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/builtins.c:5284
0x72c136 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/builtins.c:8665
0x849652 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/expr.c:11243
0x74b73e expand_expr
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/expr.h:282
0x74b73e expand_call_stmt
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/cfgexpand.c:2703
0x74b73e expand_gimple_stmt_1
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/cfgexpand.c:3686
0x74b73e expand_gimple_stmt
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/cfgexpand.c:3851
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] 5+ messages in thread

* [Bug tree-optimization/97190] [11 Regression] ICE in get_location_from_adhoc_loc at libcpp/line-map.c:257 since r11-2928-gd14c547abd484d35
  2020-09-24  7:50 [Bug tree-optimization/97190] New: [11 Regression] ICE in get_location_from_adhoc_loc at libcpp/line-map.c:257 since r11-2928-gd14c547abd484d35 marxin at gcc dot gnu.org
@ 2020-09-24  7:50 ` marxin at gcc dot gnu.org
  2020-09-24  8:51 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-09-24  7:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-09-24
     Ever confirmed|0                           |1
      Known to work|                            |10.2.0
      Known to fail|                            |11.0

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

* [Bug tree-optimization/97190] [11 Regression] ICE in get_location_from_adhoc_loc at libcpp/line-map.c:257 since r11-2928-gd14c547abd484d35
  2020-09-24  7:50 [Bug tree-optimization/97190] New: [11 Regression] ICE in get_location_from_adhoc_loc at libcpp/line-map.c:257 since r11-2928-gd14c547abd484d35 marxin at gcc dot gnu.org
  2020-09-24  7:50 ` [Bug tree-optimization/97190] " marxin at gcc dot gnu.org
@ 2020-09-24  8:51 ` rguenth at gcc dot gnu.org
  2020-09-24 20:52 ` msebor at gcc dot gnu.org
  2020-09-25  7:44 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-24  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|10.0                        |11.0
   Target Milestone|---                         |11.0

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

* [Bug tree-optimization/97190] [11 Regression] ICE in get_location_from_adhoc_loc at libcpp/line-map.c:257 since r11-2928-gd14c547abd484d35
  2020-09-24  7:50 [Bug tree-optimization/97190] New: [11 Regression] ICE in get_location_from_adhoc_loc at libcpp/line-map.c:257 since r11-2928-gd14c547abd484d35 marxin at gcc dot gnu.org
  2020-09-24  7:50 ` [Bug tree-optimization/97190] " marxin at gcc dot gnu.org
  2020-09-24  8:51 ` rguenth at gcc dot gnu.org
@ 2020-09-24 20:52 ` msebor at gcc dot gnu.org
  2020-09-25  7:44 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-09-24 20:52 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
I can't reproduce the ICE with today's top of trunk.  It looks like a duplicate
of pr97175 that I fixed yesterday.

*** This bug has been marked as a duplicate of bug 97175 ***

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

* [Bug tree-optimization/97190] [11 Regression] ICE in get_location_from_adhoc_loc at libcpp/line-map.c:257 since r11-2928-gd14c547abd484d35
  2020-09-24  7:50 [Bug tree-optimization/97190] New: [11 Regression] ICE in get_location_from_adhoc_loc at libcpp/line-map.c:257 since r11-2928-gd14c547abd484d35 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-09-24 20:52 ` msebor at gcc dot gnu.org
@ 2020-09-25  7:44 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-09-25  7:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
  (In reply to Martin Sebor from comment #1)
> I can't reproduce the ICE with today's top of trunk.  It looks like a
> duplicate of pr97175 that I fixed yesterday.
> 
> *** This bug has been marked as a duplicate of bug 97175 ***

Yes, I can confirm that. Thank you for the fix.

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

end of thread, other threads:[~2020-09-25  7:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24  7:50 [Bug tree-optimization/97190] New: [11 Regression] ICE in get_location_from_adhoc_loc at libcpp/line-map.c:257 since r11-2928-gd14c547abd484d35 marxin at gcc dot gnu.org
2020-09-24  7:50 ` [Bug tree-optimization/97190] " marxin at gcc dot gnu.org
2020-09-24  8:51 ` rguenth at gcc dot gnu.org
2020-09-24 20:52 ` msebor at gcc dot gnu.org
2020-09-25  7:44 ` 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).