On Mon, Jun 16, 2014 at 01:23:04PM +0200, Jakub Jelinek wrote:
On Mon, Jun 16, 2014 at 12:39:07PM +0200, Marek Polacek wrote:
Jason/Joseph, could you please look at the C++/C FE parts?
As mentioned on IRC, you need to differentiate between taking address
and not taking address.
struct S
On Thu, Jun 19, 2014 at 04:56:53PM +0200, Marek Polacek wrote:
Regtested/bootstrapped on x86_64-linux. How does this look?
Now even bootstrap-ubsan passed, with 92258 runtime errors:
index 1 out of bounds for type 'rtunion [1]' - heh.
Marek
the internal function before calling
print_call_name, since that gets NULL node - and we can't determine
CALL_EXPR_IFN.
I added some docs as well, as promised.
2014-06-20 Marek Polacek pola...@redhat.com
* asan.c (pass_sanopt::execute): Handle IFN_UBSAN_BOUNDS.
* flag-types.h
On Fri, Jun 20, 2014 at 10:57:47AM +0200, Jakub Jelinek wrote:
On Fri, Jun 20, 2014 at 10:43:04AM +0200, Marek Polacek wrote:
+
+/* Internal function code. */
+ENUM_BITFIELD(internal_fn) ifn : 5;
Any reason for the : 5 here? I mean, the union also contains
unsigned int, so
On Fri, Jun 20, 2014 at 11:39:23AM +0200, Jakub Jelinek wrote:
On Fri, Jun 20, 2014 at 11:34:26AM +0200, Marek Polacek wrote:
On Fri, Jun 20, 2014 at 10:57:47AM +0200, Jakub Jelinek wrote:
On Fri, Jun 20, 2014 at 10:43:04AM +0200, Marek Polacek wrote:
+
+/* Internal function code
On Thu, Jun 19, 2014 at 07:47:54PM +0200, Jakub Jelinek wrote:
On Thu, Jun 19, 2014 at 04:56:53PM +0200, Marek Polacek wrote:
+ /* Don't instrument this FMA-like array in non-strict
Also, please don't use FMA to mean flexible member array, it is
flexible array member, but more importantly
it in gengenrtl.c as that doesn't include
rtl.h) so this won't happen again.
Verified that the bootstrap crashes by bootstrapping with changed
RTX_FLD_WIDTH/RTX_HWINT_WIDTH, otherwise the bootstrapp passes.
Ok for trunk?
2014-06-20 Marek Polacek pola...@redhat.com
* genpreds.c (verify_rtx_codes
On Fri, Jun 20, 2014 at 09:01:14PM +0200, Jakub Jelinek wrote:
On Fri, Jun 20, 2014 at 07:36:41PM +0200, Marek Polacek wrote:
2014-06-20 Marek Polacek pola...@redhat.com
* genpreds.c (verify_rtx_codes): New function.
(main): Call it.
* rtl.h (RTX_FLD_WIDTH
On Fri, Jun 20, 2014 at 11:10:18PM +0200, Jakub Jelinek wrote:
On Fri, Jun 20, 2014 at 01:55:41PM -0600, Jeff Law wrote:
like spot. Most RTLs are allocated through rtx_alloc and the size
is determined from RTX_HDR_SIZE (i.e. offsetof) and/or RTX_CODE_SIZE,
so your rtl.h change IMHO
On Sun, Jun 22, 2014 at 10:33:57PM +0200, Gerald Pfeifer wrote:
On Mon, 2 Jun 2014, Marek Polacek wrote:
* c-typeck.c (parser_build_binary_op): Warn when logical not is used
on the left hand side operand of a comparison.
This...
+/* Warn about logical not used on the left hand
We ICEd on the following testcase since the void type has a NULL
TYPE_SIZE_UNIT. I took Andrew's patch from gcc@ ML and added
a testcase.
Regtested/bootstrapped on x86_64-linux, ok for trunk?
2014-06-23 Marek Polacek pola...@redhat.com
Andrew MacLeod amacl...@redhat.com
On Mon, Jun 23, 2014 at 04:39:55PM +0200, Marek Polacek wrote:
--- gcc/testsuite/c-c++-common/pr61553.c
+++ gcc/testsuite/c-c++-common/pr61553.c
@@ -0,0 +1,8 @@
+/* PR c/61553 */
+/* { dg-do compile } */
+
+void
+foo (char *s)
+{
+ __atomic_store (s, (void *) 0, __ATOMIC_SEQ_CST);
Oops
This is the last piece to fix PR61162: it's better to point to the
expression of the return statement (if any) than to the return keyword
itself.
Tested x86_64-unknown-linux-gnu, applying to trunk.
2014-06-25 Marek Polacek pola...@redhat.com
PR c/61162
* c-parser.c
read.
Ramana, does this patch help on ARM?
Tested x86_64-unknown-linux-gnu, ok for trunk?
2014-06-25 Marek Polacek pola...@redhat.com
* c-c++-common/ubsan/bounds-2.c: Adjust dg-output.
(fn1): Remove store to out-of-bounds location. Add memory barrier.
(fn2): Likewise
it looks good to me.
Ah, sure, hopefully the following is fine then:
2014-06-25 Marek Polacek pola...@redhat.com
* c-c++-common/ubsan/bounds-2.c: Adjust dg-output.
(fn1): Remove store to out-of-bounds location. Add memory barrier.
(fn2): Likewise.
(fn5): Likewise
in
elfutils - so -Wsizeof-array-argument might be indeed useful. (The warning
didn't
trigger during GCC bootstrap though.)
Jason/Joseph, could you please look at the C++, resp. C FE parts?
Tested x86_64-unknown-linux-gnu, ok for trunk?
2014-06-26 Marek Polacek pola...@redhat.com
PR c/6940
On Fri, Jun 27, 2014 at 08:36:38AM +0200, Sebastian Huber wrote:
Thanks for your patience. It would be nice if this can be applied to GCC
4.9 as well.
Can someone please commit this for me, since I don't have write access.
I will commit it for you.
Marek
On Fri, Jun 27, 2014 at 03:22:39AM -0400, Braden Obrzut wrote:
To bring the implementation in line with changes going into the concepts
draft, use syntactical equivalence in place of logical equivalence when
matching declarations.
2014-06-27 Braden Obrzut ad...@maniacsvault.net
Two spaces
On Fri, Jun 27, 2014 at 03:41:36AM -0400, Braden Obrzut wrote:
On 06/27/2014 03:27 AM, Marek Polacek wrote:
Two spaces after you name.
I'm not sure what happened to the second space. It's there in the source I
copied. I'll have to be sure to double check the paste next time.
Please drop gcc
On Sun, Jun 29, 2014 at 10:00:34PM +0200, Jan Hubicka wrote:
On Sun, 29 Jun 2014, Chen Gang wrote:
NEWDECL dereferences shared data of OLDDECL, or when free NEWDECL, also
have effect with OLDDECL. At present, only fix the related reference for
current issue. If find another related
Marek Polacek pola...@redhat.com
* convert.c (convert_to_integer): Don't instrument conversions if the
function has no_sanitize_undefined attribute.
* ubsan.c: Don't run the ubsan pass if the function has
no_sanitize_undefined attribute.
c/
* c-decl.c
On Fri, Jun 27, 2014 at 08:49:24AM +0200, Marek Polacek wrote:
On Fri, Jun 27, 2014 at 08:36:38AM +0200, Sebastian Huber wrote:
Thanks for your patience. It would be nice if this can be applied to GCC
4.9 as well.
Can someone please commit this for me, since I don't have write access
On Mon, Jun 30, 2014 at 03:00:11PM +0200, Jakub Jelinek wrote:
Actually, please change current_function_decl != 0 to
current_function_decl != NULL_TREE everywhere in the patch.
Ok with that change.
Ok, I'm applying the following then.
2014-06-30 Marek Polacek pola...@redhat.com
pointer type seems to be too
austere. (We say expected T but argument is of type U when passing
arguments.)
This is for C/ObjC only, since in C++, we'd issue cannot convert error.
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2014-06-30 Marek Polacek pola...@redhat.com
PR c
the
user that or * may be used to fix the code.
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2014-06-30 Marek Polacek pola...@redhat.com
* doc/invoke.texi: Document -Wint-conversion.
c-family/
* c.opt (Wint-conversion): New option.
c/
* c-typeck.c
On Thu, Jun 26, 2014 at 06:42:09AM -0700, Teresa Johnson wrote:
2014-06-26 Teresa Johnson tejohn...@google.com
* c-family/c-common.h (get_dump_info): Declare.
* c-family/c-gimplify.c (c_genericize): Use saved dump files.
* c-family/c-opts.c (c_common_parse_file):
On Mon, Jun 30, 2014 at 08:14:52PM +, Joseph S. Myers wrote:
On Mon, 30 Jun 2014, Marek Polacek wrote:
This patch adds the -Wincompatible-pointer-types option for a warning
we already have, so it's possible to suppress this specific warning, or
use it with -Werror= and so
On Mon, Jun 30, 2014 at 08:16:01PM +, Joseph S. Myers wrote:
On Mon, 30 Jun 2014, Marek Polacek wrote:
Basically everything I wrote in the patch for -Wincompatible-pointer-types
applies here as well. A new option, -Wint-conversion (to be compatible
with clang), is added to allow more
On Mon, Jun 30, 2014 at 11:07:57PM +0200, Gerald Pfeifer wrote:
On Mon, 30 Jun 2014, Jakub Jelinek wrote:
We don't have gcc-4.10/ directory, because the version of the next
release is still to be decided (hopefully at Cauldron next month).
I'm a bit worried we'll miss entries in the
On Wed, Jul 02, 2014 at 07:27:07PM -0700, Jason Merrill wrote:
On 06/26/2014 03:22 PM, Marek Polacek wrote:
The following is a revamped patch for -Wsizeof-array-argument.
Its purpose is to detect suspicious usage of the sizeof operator on an array
function parameter.
Then the name should
On Mon, Jun 30, 2014 at 01:50:12PM -0600, Jeff Law wrote:
On 03/04/14 09:40, Marek Polacek wrote:
This should fix ICE on insane alignment. Normally, check_user_alignment
detects e.g. alignment 1 32, but not 1 28. However, record_align
is in bits, so it's actually 8 * (1 28) and that's
unsigned).
Yeah, I did that. One issue with that is that round_up now wraps
the value, so I had to add a check for huge size before rounding up,
otherwise we'd regress on e.g. PR42611.
How about the following?
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2014-07-03 Marek Polacek pola
On Sat, Jun 28, 2014 at 06:52:00PM +0200, Gerald Pfeifer wrote:
On Fri, 20 Jun 2014, Marek Polacek wrote:
+@item -fsanitize=bounds
+@opindex fsanitize=bounds
+
+This option enables instrumentation of array bounds. Various out of bounds
+accesses are detected. Flexible array members
On Thu, Jul 03, 2014 at 12:46:35PM +0200, Jakub Jelinek wrote:
On Thu, Jul 03, 2014 at 12:41:46PM +0200, Marek Polacek wrote:
On Sat, Jun 28, 2014 at 06:52:00PM +0200, Gerald Pfeifer wrote:
On Fri, 20 Jun 2014, Marek Polacek wrote:
+@item -fsanitize=bounds
+@opindex fsanitize=bounds
(will commit as obvious).
2014-07-06 Marek Polacek pola...@redhat.com
* g++.dg/ipa/imm-devirt-1.C: Fix regexp in dg-final.
* g++.dg/ipa/imm-devirt-2.C: Likewise.
diff --git gcc/testsuite/g++.dg/ipa/imm-devirt-1.C
gcc/testsuite/g++.dg/ipa/imm-devirt-1.C
index 115277f..85f1a8f
pass then expands this internal
call, and if the pointer points outside of the object, it issues
a runtime error.
Bootstrapped(-ubsan)/regtested on x86_64-linux, ok for trunk?
2014-07-13 Marek Polacek pola...@redhat.com
* ubsan.h (struct ubsan_mismatch_data):
* asan.c
On Tue, Jul 15, 2014 at 09:54:02AM +0200, Gerald Pfeifer wrote:
On Tue, 15 Jul 2014, Richard Biener wrote:
Seems like somebody is mirroring gitweb urls.
2014-07-15 Richard Biener rguent...@suse.de
* robots.txt: Disallow /git/
Makes sense. (I checked, and we already block /svn
look ok.
Bootstrapped/regtested on x86_64-linux, ok for trunk?
Ok also for 4.9/4.8?
2014-07-14 Marek Polacek pola...@redhat.com
Manuel López-Ibáñez m...@gcc.gnu.org
PR c/57653
* c-opts.c (c_finish_options): If -imacros is in effect, return.
* c-c++-common
We were missing a check that the TYPE_MAX_VALUE is not NULL.
If it is, we ICE later when gimplifying the UBSAN_BOUNDS call arguments.
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2014-07-15 Marek Polacek pola...@redhat.com
* c-ubsan.c (ubsan_instrument_bounds): Don't
implicit_decl_warning wasn't getting a location, so the column info
was poor. It's easy to fix this up.
Bootstrapped/regtested on x86_64-linux, applying to trunk.
2014-07-20 Marek Polacek pola...@redhat.com
PR c/61852
* c-decl.c (implicit_decl_warning): Add location_t
on x86_64-linux, ok for trunk?
2014-07-23 Marek Polacek pola...@redhat.com
PR c/61861
* macro.c (builtin_macro): Add location parameter. Set
location of builtin macro to the expansion point.
(enter_macro_context): Pass location to builtin_macro.
* gcc.dg
Jakub reported to me that bounds-2.c test fails with
-fstack-protector-strong -Os. The following hack fixes it.
Tested x86_64-linux, applying to trunk as obvious.
2014-07-23 Marek Polacek pola...@redhat.com
* c-c++-common/ubsan/bounds-2.c (fn4): Adjust to check the array size
CCing Dodji, please, can you have a look? (I don't believe it is
caused by yours
https://gcc.gnu.org/ml/gcc-patches/2014-07/msg01063.html though,
this was wrong even in 4.8 and maybe earlier.)
On Wed, Jul 23, 2014 at 03:15:53PM +0200, Marek Polacek wrote:
Bultin macros like __FILE__, __DATE__
[Though Dodji is on a vacation for next two weeks, so if anyone else
can review this patch, it would be appreciated.]
On Wed, Jul 23, 2014 at 05:39:51PM +0200, Marek Polacek wrote:
CCing Dodji, please, can you have a look? (I don't believe it is
caused by yours
https://gcc.gnu.org/ml/gcc
to trunk.
2014-07-23 Marek Polacek pola...@redhat.com
PR c/57653
* c-opts.c (c_finish_options): If -imacros is in effect, return.
* c-c++-common/pr57653.c: New test.
* c-c++-common/pr57653.h: New file.
* c-c++-common/pr57653-2.c: New test.
* c-c
Marc reported that using .* regexp can cause spurious fails, so
fixed by using \[^\n\]* instead.
Tested on x86_64-linux, applying to trunk.
2014-07-26 Marek Polacek pola...@redhat.com
* gcc.dg/pr61077.c: Use \[^\n\]* instead of .* in the regexp.
diff --git gcc/testsuite/gcc.dg
Wodr in common.opt was missing a Var, which means:
1) we ICE with -Wodr, since -Wodr isn't handled in opts.c;
2) -Wno-odr wouldn't work.
Thus fixed. I'd think this doesn't need a testcase...
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2014-07-27 Marek Polacek pola...@redhat.com
On Mon, Jul 28, 2014 at 10:23:36AM +0200, Jan Hubicka wrote:
On Sun, Jul 27, 2014 at 1:02 PM, Marek Polacek pola...@redhat.com wrote:
Wodr in common.opt was missing a Var, which means:
1) we ICE with -Wodr, since -Wodr isn't handled in opts.c;
2) -Wno-odr wouldn't work.
Thus fixed
-Wodr entry was missing an @item. Plus some corrections.
Ok for trunk?
2014-07-28 Marek Polacek pola...@redhat.com
* doc/invoke.texi (-Wno-odr): Fix @item entry. Tweak wording.
diff --git gcc/doc/invoke.texi gcc/doc/invoke.texi
index aaa5a68..7cebb9e 100644
--- gcc/doc/invoke.texi
On Tue, Jul 29, 2014 at 02:58:03PM -0400, David Malcolm wrote:
This is possibly a dumb question, but what happens for a static local,
rather than an auto local? e.g.
int *f (void)
{
static int i;
return i;
}
This is fine. The variable i has a static storage duration, so is
On Wed, Jul 30, 2014 at 08:31:35AM +0200, Tobias Burnus wrote:
This patch adds the files gcc-5/{changes,criteria}.html - and populates the
former with Fortran changes; the latter is a copy of the GCC 4.9 file.
Is the patch OK?
Thanks for the patch!
gcc-5/changes.html | 60
On Tue, Nov 11, 2014 at 03:24:48AM +0530, Prathamesh Kulkarni wrote:
* gcc/c/c-decl.c
(warn_cxx_compat_finish_struct): Add new parameter of type location_t.
Warn for empty struct.
(finish_struct): Pass loc to warn_cxx_compat_finish_struct.
* gcc/testsuite/gcc.dg/Wcxx-compat-22.c:
On Tue, Nov 11, 2014 at 04:45:46AM +0530, Prathamesh Kulkarni wrote:
Index: gcc/c/c-decl.c
===
--- gcc/c/c-decl.c(revision 217287)
+++ gcc/c/c-decl.c(working copy)
@@ -606,6 +606,8 @@
/* If warn_cxx_compat, a list of
On Tue, Nov 11, 2014 at 12:13:32PM +0100, Marc Glisse wrote:
On Tue, 11 Nov 2014, Marek Polacek wrote:
@@ -7506,12 +7509,19 @@
/* Finish up struct info used by -Wc++-compat. */
static void
-warn_cxx_compat_finish_struct (tree fieldlist)
+warn_cxx_compat_finish_struct (tree fieldlist
allowed this
transformation for constants, because VRP seems to rely on that
(abs_extent_range calls fold_unary).
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2014-11-11 Marek Polacek pola...@redhat.com
* fold-const.c (fold_unary_loc): Don't call fold_negate_expr
when doing
On Tue, Nov 11, 2014 at 11:27:21PM +0530, Prathamesh Kulkarni wrote:
I tried the following:
struct A { struct B {}; int x; } /* { dg-warning empty struct has
size 0 in C } */
/* { dg-bogus delcaration
does not declare anything } */
but it fails in
On Wed, Nov 12, 2014 at 02:08:03AM +0530, Prathamesh Kulkarni wrote:
Is this version okay ?
I have no further comments on this patch, so deferring to Joseph.
Thanks,
Marek
On Tue, Nov 11, 2014 at 07:45:40PM +0100, Richard Biener wrote:
On November 11, 2014 6:49:34 PM CET, Jakub Jelinek ja...@redhat.com wrote:
On Tue, Nov 11, 2014 at 06:40:25PM +0100, Marek Polacek wrote:
--- gcc/fold-const.c
+++ gcc/fold-const.c
@@ -7862,9 +7862,15 @@ fold_unary_loc
for trunk?
2014-11-12 Marek Polacek pola...@redhat.com
* match.pd (A - (-B) - A + B): Check for TYPE_OVERFLOW_WRAPS
and SANITIZE_SI_OVERFLOW.
* fold-const.c (fold_binary_loc): Likewise.
* c-c++-common/ubsan/overflow-sub-4.c: New test.
* c-c++-common/ubsan
\[^\n\r]*(\n|\r\n|\r) } */
but since the note's are already gone, the test fails.
The following patch moves the path prunning code into a separate
procedure and fixes the failures.
Ok for trunk?
2014-11-12 Marek Polacek pola...@redhat.com
* lib/gcc-dg.exp (${tool}_load): Call
Marek Polacek pola...@redhat.com
* fold-const.c (fold_binary_loc): Don't fold if the result
is undefined.
* match.pd (A + (-B) - A - B, A - (-B) - A + B,
-(-A) - A): Likewise.
* c-c++-common/ubsan/overflow-sub-4.c: New test.
* c-c++-common/ubsan
On Wed, Nov 12, 2014 at 03:35:06PM +0100, Manuel López-Ibáñez wrote:
../../libcpp/line-map.c:667:65: error: suggest braces around empty body in
an 'if' statement [-Werror=empty-body]
I just (r217418) bootstrapped this code and it did not produce this
error (or warning). Could you give
On Wed, Nov 12, 2014 at 03:22:41PM +0100, Richard Biener wrote:
TYPE_OVERFLOW_SANITIZES?
Can I call it sanitize_fold_p and put it as a static inline fn
into tree.h?
Marek
This patch introduces TYPE_OVERFLOW_SANITIZED predicate to
consolidate a common check.
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2014-11-12 Marek Polacek pola...@redhat.com
* tree.h (TYPE_OVERFLOW_SANITIZED): Define.
* fold-const.c (fold_binary_loc): Use
On Thu, Nov 13, 2014 at 12:55:40AM -0500, tsaund...@mozilla.com wrote:
From: Trevor Saunders tsaund...@mozilla.com
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index b70c56c..227509a 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -14032,14 +14032,34 @@
bit baffling ;).
So - can you invert the predicates (and uses)? In the
sanitizer you then can guard instrumentations with
TYPE_OVERFLOW_SANITIZED.
Done.
Ok with that change.
Thanks, this is the inverted version:
2014-11-13 Marek Polacek pola...@redhat.com
* tree.h
On Thu, Nov 13, 2014 at 02:05:52PM +0200, Janne Blomqvist wrote:
Thanks for the quick review, committed as r217480.
This broke bootstrap because of implicit declaration of free.
The following (untested) should fix it, ok for trunk?
2014-11-13 Marek Polacek pola...@redhat.com
On Thu, Nov 13, 2014 at 04:59:09PM +0100, Jakub Jelinek wrote:
On Thu, Nov 13, 2014 at 04:57:08PM +0100, Marek Polacek wrote:
On Thu, Nov 13, 2014 at 02:05:52PM +0200, Janne Blomqvist wrote:
Thanks for the quick review, committed as r217480.
This broke bootstrap because of implicit
?). Now, BUILT_IN_TRAP should probably be also
marked as const+cold; I'm happy to do that as a follow-up.
Bootstrapped/regtested on power8-linux, ok for trunk?
2014-11-13 Marek Polacek pola...@redhat.com
PR sanitizer/63839
* asan.c (ATTR_CONST_NORETURN_NOTHROW_LEAF_LIST
Bootstrapped/regtested on power8-linux, ok for trunk?
2014-11-13 Marek Polacek pola...@redhat.com
* tree.c (build_common_builtin_nodes): Remove doubled ECF_LEAF.
diff --git gcc/tree.c gcc/tree.c
index cf37a19..5c6fe0b 100644
--- gcc/tree.c
+++ gcc/tree.c
@@ -9935,7 +9935,7
Marek Polacek pola...@redhat.com
PR sanitizer/63839
* asan.c (ATTR_CONST_NORETURN_NOTHROW_LEAF_LIST,
ATTR_COLD_CONST_NORETURN_NOTHROW_LEAF_LIST): Define.
* builtin-attrs.def (ATTR_COLD_CONST_NORETURN_NOTHROW_LEAF_LIST):
Define.
* builtins.c
.)
Bootstrapped/regtested on power8-linux.
2014-11-14 Marek Polacek pola...@redhat.com
* fold-const.c (fold_negate_expr): Don't fold INTEGER_CST if
that overflows when SANITIZE_SI_OVERFLOW is on. Guard -(-A)
folding with TYPE_OVERFLOW_SANITIZED.
* c-c++-common/ubsan
, ok for trunk?
2014-11-14 Marek Polacek pola...@redhat.com
PR sanitizer/63866
* asan.c (asan_global_struct): Create a TYPE_DECL for __asan_global,
put it into TYPE_NAME and TYPE_STUB_DECL.
* ubsan.c (ubsan_type_descriptor_type): New variable.
Function
on powerpc64-linux, ok for trunk?
2014-11-15 Marek Polacek pola...@redhat.com
PR middle-end/63884
c-family/
* array-notation-common.c (is_sec_implicit_index_fn): Return false
for NULL fndecl.
(extract_array_notation_exprs): Return for NULL node.
testsuite
On Mon, Nov 17, 2014 at 06:40:26AM +0800, Chen Gang wrote:
According to the next code, 'pretty_name' may need additional bytes more
than 16. For simplify thinking and being extensible in future, extent it
to 256 bytes, directly.
I think + 128 bytes should be enough for everyone.
Marek
On Mon, Nov 17, 2014 at 08:38:19AM +0100, Jakub Jelinek wrote:
On Mon, Nov 17, 2014 at 08:16:32AM +0100, Marek Polacek wrote:
On Mon, Nov 17, 2014 at 06:40:26AM +0800, Chen Gang wrote:
According to the next code, 'pretty_name' may need additional bytes more
than 16. For simplify thinking
-19 Marek Polacek pola...@redhat.com
PR sanitizer/63879
* fold-const.c (negate_expr_p) case NEGATE_EXPR: Return
!TYPE_OVERFLOW_SANITIZED.
(fold_negate_expr) case INTEGER_CST: Fold when overflow
does not trap and when overflow wraps, or when
As the testcase shows, we should really check first that we
have a MEM_REF, otherwise subsequent TREE_OPERAND might ICE.
On an invalid testcase we might get e.g. STRING_CST.
Bootstrapped/regtested on power8-linux, ok for trunk?
2014-11-19 Marek Polacek pola...@redhat.com
PR sanitizer
On Wed, Nov 19, 2014 at 03:12:05PM +0100, Jakub Jelinek wrote:
On Wed, Nov 19, 2014 at 02:51:11PM +0100, Marek Polacek wrote:
As the testcase shows, we should really check first that we
have a MEM_REF, otherwise subsequent TREE_OPERAND might ICE.
On an invalid testcase we might get e.g
On Wed, Nov 19, 2014 at 04:24:25PM +0100, Markus Trippelsdorf wrote:
;; Return 1 if op is a constant integer valid for addition
@@ -827,7 +827,7 @@
(define_predicate mask_operand
(match_code const_int)
{
- HOST_WIDE_INT c, lsb;
+ unsigned HOST_WIDE_INT c, lsb;
c = INTVAL
On Wed, Nov 19, 2014 at 04:32:43PM +, Andrew Stubbs wrote:
+ if (warning_at (gimple_location (elt-stmt),
+ OPT_Waggressive_loop_optimizations,
+ Loop exit may only be reached after
undefined behaviour.))
-unknown-linux-gnu/libsanitizer/ubsan/.libs/ -B
../x86_64-unknown-linux-gnu/libgfortran/.libs/ -O -fsanitize=undefined
testcase.f -lgfortran; ./a.out
on the testcase attached in PR - and it doesn't ICE.
Bootstrapped/regtested on ppc64-linux, ok for trunk?
2014-11-19 Marek Polacek pola...@redhat.com
on ppc64-linux, ok for trunk?
2014-11-20 Marek Polacek pola...@redhat.com
PR sanitizer/63956
* constexpr.c: Include ubsan.h.
(cxx_eval_call_expression): Bail out for IFN_UBSAN_{NULL,BOUNDS}
internal functions and for ubsan builtins in constexpr functions
On Thu, Nov 20, 2014 at 06:27:25PM +0100, Jakub Jelinek wrote:
On Thu, Nov 20, 2014 at 06:14:52PM +0100, Marek Polacek wrote:
+ if (!current_function_decl is_ubsan_builtin_p (fun))
+return void_node;
+
I don't understand the !current_function_decl here.
That is because I only
-niter.c:3420:38: error: ‘struct
vecgimple_statement_base*’ has no member named ‘empty’
if (exit_warned !problem_stmts.empty ())
^
make: *** [tree-ssa-loop-niter.o] Error 1
I'm applying the following.
2014-11-20 Marek Polacek pola...@redhat.com
.
Bootstrapped/regtested on ppc64-linux, ok for trunk?
2014-11-21 Marek Polacek pola...@redhat.com
* constexpr.c (literal_type_p): Return true for void type in C++14.
* g++.dg/cpp0x/constexpr-function2.C: Limit dg-error to C++11.
* g++.dg/cpp0x/constexpr-neg1.C
for a shift containing UB. So I wrote a function that checks whether
the shift operation is ok.
I'm not sure yet if anything else needs similar treatment.
Bootstrapped/regtested on ppc64-linux, ok for trunk?
2014-11-24 Marek Polacek pola...@redhat.com
* constexpr.c (cxx_eval_check_shift_p
functions.
Bootstrapped/regtested on ppc64-linux, ok for trunk?
2014-11-24 Marek Polacek pola...@redhat.com
PR c/63877
* c-decl.c (start_function): Disable -Wmissing-declarations warning
for inline functions.
* gcc.dg/pr63877.c: New test.
diff --git gcc/c/c
On Mon, Nov 24, 2014 at 04:49:25PM +0100, Jakub Jelinek wrote:
On Mon, Nov 24, 2014 at 02:51:14PM +0100, Marek Polacek wrote:
--- gcc/cp/constexpr.c
+++ gcc/cp/constexpr.c
@@ -1451,6 +1451,43 @@ verify_constant (tree t, bool allow_non_constant,
bool *non_constant_p,
return
On Mon, Nov 24, 2014 at 05:05:08PM +0100, Jakub Jelinek wrote:
On Mon, Nov 24, 2014 at 04:58:22PM +0100, Marek Polacek wrote:
Consider say:
constexpr int p = 1;
constexpr int foo (int a)
{
return a (int) p;
}
constexpr int bar (int a)
{
return ((int) p
Ping.
On Wed, Nov 19, 2014 at 08:09:21PM +0100, Marek Polacek wrote:
As discussed in the PR, the problem here is that when running gfortran,
the __builtin_object_size decl isn't available, because c-family's
c_define_builtins wasn't called. One way how to fix this is to build
ok?
Bootstrapped/regtested on ppc64-linux; ubsan.exp tested even on x86_64.
2014-11-26 Marek Polacek pola...@redhat.com
PR c/63862
c-family/
* c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
to op1_utype.
c/
* c-typeck.c (build_binary_op
On Wed, Nov 26, 2014 at 06:50:29PM +0100, Jakub Jelinek wrote:
On Wed, Nov 26, 2014 at 06:39:44PM +0100, Marek Polacek wrote:
Both C11 and C++14 standards specify that integral promotions are
performed on both operands of a shift-expression. This we do just
fine. But then we convert
On Wed, Nov 26, 2014 at 12:03:45PM -0500, Jason Merrill wrote:
On 11/20/2014 02:04 PM, Marek Polacek wrote:
+ if (fun == NULL_TREE)
+switch (CALL_EXPR_IFN (t))
+ {
+ case IFN_UBSAN_NULL:
+ case IFN_UBSAN_BOUNDS:
+return void_node;
+ default:
+break
then?
Bootstrapped/regtested on ppc64-linux.
2014-11-27 Marek Polacek pola...@redhat.com
* constexpr.c (cxx_eval_check_shift_p): New function.
(cxx_eval_binary_expression): Call it.
* g++.dg/cpp0x/constexpr-shift1.C: New test.
* g++.dg/cpp1y/constexpr-shift1.C: New
is the best
thing we can do until we have type demotion/promotion pass. Seems
that unsigned_type_node there works well.
(What happened to Kai's type elevation pass?)
Bootstrapped/regtested on ppc64-linux, ok for trunk?
2014-11-27 Marek Polacek pola...@redhat.com
PR c/63862
c-family
On Fri, Sep 26, 2014 at 02:16:05PM +0200, Bernd Edlinger wrote:
Boot-Strapped and Regression-tested on x86_64-linux-gnu
Ok for trunk?
-ENOPATCH.
Marek
this approach make sense?
2014-09-30 Marek Polacek pola...@redhat.com
* gcc.c-torture/compile/2120-2.c: Use -fgnu89-inline.
* gcc.c-torture/compile/2009-1.c: Likewise.
* gcc.c-torture/compile/2009-2.c: Likewise.
* gcc.c-torture/compile/20021120-1.c
==
results with this patch and gnu11 as a default.
Ok for trunk?
2014-10-02 Marek Polacek pola...@redhat.com
* gcc.dg/tree-ssa/20030530-2.c: Add function declarations.
* gcc.dg/tree-ssa/20030708-1.c: Likewise.
* gcc.dg/tree-ssa/20030709-2.c: Likewise.
* gcc.dg
and/or defaulting to int.
Yeah, probably, thanks.
The following uses -std=gnu89 for ~15 tests.
2014-10-02 Marek Polacek pola...@redhat.com
* gcc.dg/tree-ssa/20030731-1.c: Use -std=gnu89.
* gcc.dg/tree-ssa/20030729-1.c: Likewise.
* gcc.dg/tree-ssa/20030807-8.c: Likewise
1 - 100 of 4207 matches
Mail list logo