public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/22381] New: Ada produces mis-match (non compatible) types in MODIFY_EXPR
@ 2005-07-09 0:27 pinskia at gcc dot gnu dot org
2005-07-09 0:34 ` [Bug ada/22381] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-09 0:27 UTC (permalink / raw)
To: gcc-bugs
Take the following reduced testcase:
package body GNAT.Sockets is
function To_Inet_Addr return Inet_Addr_Type
is
Result : Inet_Addr_Type;
begin
return Result;
end To_Inet_Addr;
end GNAT.Sockets;
package GNAT.Sockets is
type Family_Type is (Family_Inet, Family_Inet6);
type Inet_Addr_Type (Family : Family_Type := Family_Inet) is private;
function To_Inet_Addr return Inet_Addr_Type;
private
subtype Inet_Addr_Comp_Type is Natural range 0 .. 255;
type Inet_Addr_VN_Type is array (Natural range <>) of Inet_Addr_Comp_Type;
subtype Inet_Addr_V4_Type is Inet_Addr_VN_Type (1 .. 4);
subtype Inet_Addr_V6_Type is Inet_Addr_VN_Type (1 .. 16);
type Inet_Addr_Type (Family : Family_Type := Family_Inet) is record
case Family is
when Family_Inet =>
Sin_V4 : Inet_Addr_V4_Type := (others => 0);
when Family_Inet6 =>
Sin_V6 : Inet_Addr_V6_Type := (others => 0);
end case;
end record;
end GNAT.Sockets;
Using the patch in PR 22368, we get an ICE:
g-socket.adb: In function 'GNAT.SOCKETS.TO_INET_ADDR':
g-socket.adb:8: error: statement types mismatch
*TARGETD.469 = resultD.524;
struct gnat__sockets__inet_addr_typeD.454
struct gnat__sockets__to_inet_addr__result___PAD
Looking at the types we are missing a COMPONENT_REF.
--
Summary: Ada produces mis-match (non compatible) types in
MODIFY_EXPR
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 22368
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/22381] Ada produces mis-match (non compatible) types in MODIFY_EXPR
2005-07-09 0:27 [Bug ada/22381] New: Ada produces mis-match (non compatible) types in MODIFY_EXPR pinskia at gcc dot gnu dot org
@ 2005-07-09 0:34 ` pinskia at gcc dot gnu dot org
2005-07-12 1:49 ` bosch at gcc dot gnu dot org
2005-09-06 8:32 ` ebotcazou at gcc dot gnu dot org
2 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-09 0:34 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |bosch at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/22381] Ada produces mis-match (non compatible) types in MODIFY_EXPR
2005-07-09 0:27 [Bug ada/22381] New: Ada produces mis-match (non compatible) types in MODIFY_EXPR pinskia at gcc dot gnu dot org
2005-07-09 0:34 ` [Bug ada/22381] " pinskia at gcc dot gnu dot org
@ 2005-07-12 1:49 ` bosch at gcc dot gnu dot org
2005-09-06 8:32 ` ebotcazou at gcc dot gnu dot org
2 siblings, 0 replies; 7+ messages in thread
From: bosch at gcc dot gnu dot org @ 2005-07-12 1:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bosch at gcc dot gnu dot org 2005-07-12 01:46 -------
This seems a problem where Gigi adds padding, but does not add a convert. The padding is added at
decl.c:698, and 20 lines later, there is a complex condition to figure out when and when not to add a
"convert". This condition seems to be wrong, as for this test case no conversion to the padded type is
added, while there should have been one.
-Geert
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |kenner at gcc dot gnu dot
| |org
AssignedTo|unassigned at gcc dot gnu |bosch at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-07-12 01:46:26
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/22381] Ada produces mis-match (non compatible) types in MODIFY_EXPR
2005-07-09 0:27 [Bug ada/22381] New: Ada produces mis-match (non compatible) types in MODIFY_EXPR pinskia at gcc dot gnu dot org
2005-07-09 0:34 ` [Bug ada/22381] " pinskia at gcc dot gnu dot org
2005-07-12 1:49 ` bosch at gcc dot gnu dot org
@ 2005-09-06 8:32 ` ebotcazou at gcc dot gnu dot org
2 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-09-06 8:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2005-09-06 08:32 -------
Investigating.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|bosch at gcc dot gnu dot org|ebotcazou at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/22381] Ada produces mis-match (non compatible) types in MODIFY_EXPR
[not found] <bug-22381-6528@http.gcc.gnu.org/bugzilla/>
2005-10-21 15:46 ` cvs-commit at gcc dot gnu dot org
2005-10-21 15:48 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-21 15:55 ` ebotcazou at gcc dot gnu dot org
2 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-10-21 15:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ebotcazou at gcc dot gnu dot org 2005-10-21 15:55 -------
See http://gcc.gnu.org/ml/gcc-patches/2005-10/msg01309.html
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/22381] Ada produces mis-match (non compatible) types in MODIFY_EXPR
[not found] <bug-22381-6528@http.gcc.gnu.org/bugzilla/>
2005-10-21 15:46 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-21 15:48 ` cvs-commit at gcc dot gnu dot org
2005-10-21 15:55 ` ebotcazou at gcc dot gnu dot org
2 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-21 15:48 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]
------- Comment #5 from cvs-commit at gcc dot gnu dot org 2005-10-21 15:48 -------
Subject: Bug 22381
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: ebotcazou@gcc.gnu.org 2005-10-21 15:47:47
Modified files:
gcc/ada : ChangeLog utils2.c gigi.h trans.c
Log message:
PR ada/21937
PR ada/22328
PR ada/22381
PR ada/22383
PR ada/22419
PR ada/22420
* utils2.c (build_return_expr): New helper function.
* gigi.h (build_return_expr): Declare it.
* trans.c (Subprogram_Body_to_gnu): Use build_return_expr instead
of manually building the RETURN_EXPR tree.
(call_to_gnu): Pass MODIFY_EXPR through build_binary_op.
(gnat_to_gnu) <N_Return_Statement>: Pass MODIFY_EXPR through
build_binary_op for the "target pointer" case. Use build_return_expr
instead of manually building the RETURN_EXPR tree.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.638.4.16&r2=1.638.4.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/utils2.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.44.6.1&r2=1.44.6.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/gigi.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.33.10.1&r2=1.33.10.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/trans.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.90.6.3&r2=1.90.6.4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/22381] Ada produces mis-match (non compatible) types in MODIFY_EXPR
[not found] <bug-22381-6528@http.gcc.gnu.org/bugzilla/>
@ 2005-10-21 15:46 ` cvs-commit at gcc dot gnu dot org
2005-10-21 15:48 ` cvs-commit at gcc dot gnu dot org
2005-10-21 15:55 ` ebotcazou at gcc dot gnu dot org
2 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-21 15:46 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1375 bytes --]
------- Comment #4 from cvs-commit at gcc dot gnu dot org 2005-10-21 15:46 -------
Subject: Bug 22381
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: ebotcazou@gcc.gnu.org 2005-10-21 15:46:19
Modified files:
gcc/ada : ChangeLog utils2.c gigi.h trans.c
Log message:
PR ada/21937
PR ada/22328
PR ada/22381
PR ada/22383
PR ada/22419
PR ada/22420
* utils2.c (build_return_expr): New helper function.
* gigi.h (build_return_expr): Declare it.
* trans.c (Subprogram_Body_to_gnu): Use build_return_expr instead
of manually building the RETURN_EXPR tree.
(call_to_gnu): Pass MODIFY_EXPR through build_binary_op.
(gnat_to_gnu) <N_Return_Statement>: Pass MODIFY_EXPR through
build_binary_op for the "target pointer" case. Use build_return_expr
instead of manually building the RETURN_EXPR tree.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/ChangeLog.diff?cvsroot=gcc&r1=1.685&r2=1.686
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/utils2.c.diff?cvsroot=gcc&r1=1.50&r2=1.51
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/gigi.h.diff?cvsroot=gcc&r1=1.38&r2=1.39
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/trans.c.diff?cvsroot=gcc&r1=1.102&r2=1.103
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22381
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-10-21 15:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-09 0:27 [Bug ada/22381] New: Ada produces mis-match (non compatible) types in MODIFY_EXPR pinskia at gcc dot gnu dot org
2005-07-09 0:34 ` [Bug ada/22381] " pinskia at gcc dot gnu dot org
2005-07-12 1:49 ` bosch at gcc dot gnu dot org
2005-09-06 8:32 ` ebotcazou at gcc dot gnu dot org
[not found] <bug-22381-6528@http.gcc.gnu.org/bugzilla/>
2005-10-21 15:46 ` cvs-commit at gcc dot gnu dot org
2005-10-21 15:48 ` cvs-commit at gcc dot gnu dot org
2005-10-21 15:55 ` ebotcazou at gcc dot gnu dot 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).