public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/67668] New: erroneous type argument for unary operator one's complement
@ 2015-09-21 12:24 ka_bena at yahoo dot fr
2015-09-21 12:44 ` [Bug c/67668] " glisse at gcc dot gnu.org
2015-09-22 16:51 ` ka_bena at yahoo dot fr
0 siblings, 2 replies; 3+ messages in thread
From: ka_bena at yahoo dot fr @ 2015-09-21 12:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67668
Bug ID: 67668
Summary: erroneous type argument for unary operator one's
complement
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: ka_bena at yahoo dot fr
Target Milestone: ---
int main(void)
{
~( 1. + 0.i ) ;
~(1.) ;
return 0 ;
}
/* Results::
main_cmp1_err.c:4:3: attention : statement with no effect [-Wunused-value]
~( 1. + 0.i ) ;
^
main_cmp1_err.c:5:3: erreur: type d'argument erroné pour un complément de
bit
~(1.) ;
^
Comment:: ( 1. + 0.i ) must be an erroneous type argument for ~ .
Microsoft Windows XP Profesional version2002 Service Pack 3.
Gcc 4.8.0 win32 mingw32
*/
>From gcc-bugs-return-497725-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Sep 21 12:29:29 2015
Return-Path: <gcc-bugs-return-497725-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 32157 invoked by alias); 21 Sep 2015 12:29:29 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 32097 invoked by uid 48); 21 Sep 2015 12:29:25 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/67668] erroneous type argument for unary operator one's complement
Date: Mon, 21 Sep 2015 12:29:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-67668-4-JmGyKuDRdY@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67668-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67668-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg01703.txt.bz2
Content-length: 181
https://gcc.gnu.org/bugzilla/show_bug.cgi?idg668
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 67667 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/67668] erroneous type argument for unary operator one's complement
2015-09-21 12:24 [Bug c/67668] New: erroneous type argument for unary operator one's complement ka_bena at yahoo dot fr
@ 2015-09-21 12:44 ` glisse at gcc dot gnu.org
2015-09-22 16:51 ` ka_bena at yahoo dot fr
1 sibling, 0 replies; 3+ messages in thread
From: glisse at gcc dot gnu.org @ 2015-09-21 12:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67668
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Complex.html
-Wpedantic
What is your question exactly?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/67668] erroneous type argument for unary operator one's complement
2015-09-21 12:24 [Bug c/67668] New: erroneous type argument for unary operator one's complement ka_bena at yahoo dot fr
2015-09-21 12:44 ` [Bug c/67668] " glisse at gcc dot gnu.org
@ 2015-09-22 16:51 ` ka_bena at yahoo dot fr
1 sibling, 0 replies; 3+ messages in thread
From: ka_bena at yahoo dot fr @ 2015-09-22 16:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67668
--- Comment #4 from BENAÏSSA <ka_bena at yahoo dot fr> ---
Thank you for your quick and clear reply .
Note:
I think that using the same symbol operator for doing two different things
can be a potential source of blind errors.
I confirm that this is only a personnal point of view.
A.Benaïssa
Le Lundi 21 septembre 2015 15h41, manu at gcc dot gnu.org
<gcc-bugzilla@gcc.gnu.org> a écrit :
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67668
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |manu at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Marc is right:
The operator ‘~’ performs complex conjugation when used on a value with a
complex type. This is a GNU extension; for values of floating type, you should
use the ISO C99 functions conjf, conj and conjl, declared in <complex.h> and
also provided as built-in functions by GCC.
test.c:3:3: warning: ISO C does not support ‘~’ for complex conjugation
[-Wpedantic]
~( 1. + 0.i ) ;
^
>From gcc-bugs-return-497820-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Sep 22 17:04:08 2015
Return-Path: <gcc-bugs-return-497820-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 64005 invoked by alias); 22 Sep 2015 17:04:08 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 63971 invoked by uid 55); 22 Sep 2015 17:04:04 -0000
From: "ka_bena at yahoo dot fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/67667] erroneous type argument for unary operator one's complement
Date: Tue, 22 Sep 2015 17:04:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ka_bena at yahoo dot fr
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: DUPLICATE
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-67667-4-7L3j90HYly@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67667-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67667-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg01798.txt.bz2
Content-length: 1317
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67667
--- Comment #2 from BENAÏSSA <ka_bena at yahoo dot fr> ---
Thank you for your quick and clear reply .
Note:
I think that using the same symbol operato as GNU extension for doing two
different things
can be a potential source of blind errors .
I confirm that this is only a personnal point of view.
A.Benaïssa
Le Lundi 21 septembre 2015 13h29, redi at gcc dot gnu.org
<gcc-bugzilla@gcc.gnu.org> a écrit :
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67667
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
.
*** This bug has been marked as a duplicate of bug 67668 ***
>From gcc-bugs-return-497821-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Sep 22 17:05:38 2015
Return-Path: <gcc-bugs-return-497821-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 65187 invoked by alias); 22 Sep 2015 17:05:37 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 65154 invoked by uid 48); 22 Sep 2015 17:05:34 -0000
From: "alalaw01 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/67682] New: Missed vectorization: (another) straight-line memcpy/memset not vectorized when equivalent loop is
Date: Tue, 22 Sep 2015 17:05:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: alalaw01 at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcctarget
Message-ID: <bug-67682-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg01799.txt.bz2
Content-length: 2373
https://gcc.gnu.org/bugzilla/show_bug.cgi?idg682
Bug ID: 67682
Summary: Missed vectorization: (another) straight-line
memcpy/memset not vectorized when equivalent loop is
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: alalaw01 at gcc dot gnu.org
Target Milestone: ---
Target: aarch64
This code:
void
test (int*__restrict a, int*__restrict b)
{
a[0] = b[0];
a[1] = b[1];
a[2] = b[2];
a[3] = b[3];
a[4] = 0;
a[5] = 0;
a[6] = 0;
a[7] = 0;
}
is not vectorized; -fdump-tree-slp-details reveals
test.c:4:13: note: Build SLP failed: different operation in stmt MEM[(int
*)a_4(
D) + 28B] = 0;
test.c:4:13: note: original stmt *a_4(D) = _3;
test.c:4:13: note: === vect_slp_analyze_data_ref_dependences ==test.c:4:13: note: === vect_slp_analyze_operations ==test.c:4:13: note: not vectorized: bad operation in basic block.
test.c:4:13: note: ***** Re-trying analysis with vector size 8
...
test.c:4:13: note: Build SLP failed: different operation in stmt MEM[(int
*)a_4(D) + 28B] = 0;
test.c:4:13: note: original stmt *a_4(D) = _3;
test.c:4:13: note: === vect_slp_analyze_data_ref_dependences ==test.c:4:13: note: === vect_slp_analyze_operations ==test.c:4:13: note: not vectorized: bad operation in basic block.
(the failure with vector size 8 is expected, but vector size 4 should succeed)
Output is:
test:
ldp w4, w3, [x1]
ldp w2, w1, [x1, 8]
stp w4, w3, [x0]
stp w2, w1, [x0, 8]
stp wzr, wzr, [x0, 16]
stp wzr, wzr, [x0, 24]
ret
Curiously, a similar code but writing elements a[0..3] and a[5..8] (missing out
a[4]) is SLP'd, producing superior:
test:
ldr q0, [x1]
movi v1.4s, 0
str q1, [x0, 20]
str q0, [x0]
ret
And similarly for (equivalent to the first):
void
test (int*__restrict a, int*__restrict b)
{
for (int i = 0; i < 4; i++)
a[i] = b[i];
for (int i = 4; i < 8; i++)
a[i] = 0;
}
producing:
test:
movi v0.4s, 0
ldp x2, x3, [x1]
stp x2, x3, [x0]
str q0, [x0, 16]
ret
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-22 16:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-21 12:24 [Bug c/67668] New: erroneous type argument for unary operator one's complement ka_bena at yahoo dot fr
2015-09-21 12:44 ` [Bug c/67668] " glisse at gcc dot gnu.org
2015-09-22 16:51 ` ka_bena at yahoo dot fr
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).