public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113968] New: ICE: in create_tmp_var, at gimple-expr.cc:488 with -fcontracts and invalid member in contract
@ 2024-02-17 10:39 zsojka at seznam dot cz
  2024-02-17 14:53 ` [Bug c++/113968] " mpolacek at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: zsojka at seznam dot cz @ 2024-02-17 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113968
           Summary: ICE: in create_tmp_var, at gimple-expr.cc:488 with
                    -fcontracts and invalid member in contract
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: error-recovery, ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 57446
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57446&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -fcontracts testcase.C 
testcase.C:4:20: error: 'struct A' has no member named 'm'
    4 | void f(A a)[[pre:a.m]] {}
      |                    ^
testcase.C: In function 'void f(A)':
testcase.C:4:22: internal compiler error: in create_tmp_var, at
gimple-expr.cc:488
    4 | void f(A a)[[pre:a.m]] {}
      |                      ^
0x85aa24 create_tmp_var(tree_node*, char const*)
        /repo/gcc-trunk/gcc/gimple-expr.cc:488
0x85aa24 create_tmp_var(tree_node*, char const*)
        /repo/gcc-trunk/gcc/gimple-expr.cc:478
0x14b275a create_tmp_from_val
        /repo/gcc-trunk/gcc/gimplify.cc:568
0x14b275a lookup_tmp_var
        /repo/gcc-trunk/gcc/gimplify.cc:590
0x14b275a internal_get_tmp_var
        /repo/gcc-trunk/gcc/gimplify.cc:645
0x14ad29f get_formal_tmp_var(tree_node*, gimple**)
        /repo/gcc-trunk/gcc/gimplify.cc:673
0x14ad29f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /repo/gcc-trunk/gcc/gimplify.cc:18804
0x14c0011 gimplify_expr
        /repo/gcc-trunk/gcc/gimplify.cc:18849
0x14c0011 gimplify_arg(tree_node**, gimple**, unsigned int, bool)
        /repo/gcc-trunk/gcc/gimplify.cc:3751
0x14c06b3 gimplify_call_expr
        /repo/gcc-trunk/gcc/gimplify.cc:4036
0x14adc56 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /repo/gcc-trunk/gcc/gimplify.cc:17749
0x14c5b43 gimplify_cleanup_point_expr
        /repo/gcc-trunk/gcc/gimplify.cc:7480
0x14adc37 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /repo/gcc-trunk/gcc/gimplify.cc:18173
0x14c5195 gimplify_stmt(tree_node**, gimple**)
        /repo/gcc-trunk/gcc/gimplify.cc:7480
0x14c5195 gimplify_body(tree_node*, bool)
        /repo/gcc-trunk/gcc/gimplify.cc:19047
0x14c55dc gimplify_function_tree(tree_node*)
        /repo/gcc-trunk/gcc/gimplify.cc:19246
0x12d2657 cgraph_node::analyze()
        /repo/gcc-trunk/gcc/cgraphunit.cc:685
0x12d5277 analyze_functions
        /repo/gcc-trunk/gcc/cgraphunit.cc:1249
0x12d61fd symbol_table::finalize_compilation_unit()
        /repo/gcc-trunk/gcc/cgraphunit.cc:2556
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-9043-20240217001708-gd70f155b074-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-9043-20240217001708-gd70f155b074-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240217 (experimental) (GCC)

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

* [Bug c++/113968] ICE: in create_tmp_var, at gimple-expr.cc:488 with -fcontracts and invalid member in contract
  2024-02-17 10:39 [Bug c++/113968] New: ICE: in create_tmp_var, at gimple-expr.cc:488 with -fcontracts and invalid member in contract zsojka at seznam dot cz
@ 2024-02-17 14:53 ` mpolacek at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-02-17 14:53 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-02-17
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.

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

end of thread, other threads:[~2024-02-17 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17 10:39 [Bug c++/113968] New: ICE: in create_tmp_var, at gimple-expr.cc:488 with -fcontracts and invalid member in contract zsojka at seznam dot cz
2024-02-17 14:53 ` [Bug c++/113968] " mpolacek 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).