public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-5515] Fix crash in libcc1
@ 2023-11-16  4:45 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-11-16  4:45 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6d16e460240fe547cb7d9648f91494126213c835

commit r14-5515-g6d16e460240fe547cb7d9648f91494126213c835
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Nov 14 22:27:52 2023 -0700

    Fix crash in libcc1
    
    The gdb tests of the libcc1 plugin have been failing lately.  I
    tracked this down to a crash trying to access an enum's underlying
    type.  This patch fixes the crash by setting this type.
    
    
            * libcc1plugin.cc (plugin_build_enum_type): Set
            ENUM_UNDERLYING_TYPE.

Diff:
---
 libcc1/libcc1plugin.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
index 283eaf20685..34dcd89b1b3 100644
--- a/libcc1/libcc1plugin.cc
+++ b/libcc1/libcc1plugin.cc
@@ -454,6 +454,7 @@ plugin_build_enum_type (cc1_plugin::connection *self,
 
   TYPE_PRECISION (result) = TYPE_PRECISION (underlying_int_type);
   TYPE_UNSIGNED (result) = TYPE_UNSIGNED (underlying_int_type);
+  ENUM_UNDERLYING_TYPE (result) = underlying_int_type;
 
   plugin_context *ctx = static_cast<plugin_context *> (self);
   return convert_out (ctx->preserve (result));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-16  4:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-16  4:45 [gcc r14-5515] Fix crash in libcc1 Tom Tromey

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).