GolfScript, 107 bytes
-1:ab;6:ba;...=;1%ab% {....~\fi@@=43.=+\""'" ([{}])"'~+?+~'"([{}]) "'""\+=.34=@@if\~....} %ba%1;=...;ab:6;ba:1- Newlines are artistic. fi is a noop, but the entire code is executed.
With the exception of 7 bytes (both bytes in fi, both bytes in 43, the first " in the second non-empty string, the \ after the second empty string and the last ~), no single byte can be removed without breaking the code or altering the output.
At the cost of 48 bytes, this can be improved upon:
0!*1{!}\;:);0:f;0:i;-1:ab;9:ba; ...=;1%ab%{....i@f@@fi@@=@.=@\) +""'"([{}])"'~+?+~'"([{}])"'""+ (\@=.@=@@if@@f@i....}%ba%1;=... ;ab:9;ba:1-;i:0;f:0;(:;\{!}1*!0 As before, the entire code is executed. The difference is that all bytes affect the output.
Tests and examples
$ base64 > palindrome.gs -d <<< LTE6YWI7NjpiYTsuLi49OzElYWIley4uLi5+XGZpQEA9NDMuPStcIiInIihbe31dKSInfis/K34nIihbe31dKSInIiJcKz0uMzQ9QEBpZlx+Li4uLn0lYmElMTs9Li4uO2FiOjY7YmE6MS0= $ wc -c palindrome.gs 107 palindrome.gs $ rev palindrome.gs | tr '([{}])' ')]}{[(' | diff - palindrome.gs $ echo -n 'r(a[c{"e"}c]a)r' | golfscript palindrome.gs 11-5 $ echo -n 'totallynotapalindrome' | golfscript palindrome.gs 00-6 $ for i in {1..106}; do > head -c $i palindrome.gs > tmp.gs > tail -c +$[i+2] palindrome.gs >> tmp.gs > [ "$(echo -n 'r(a[c{"e"}c]a)r' | golfscript tmp.gs 2> /dev/null)" = "11-5" ] && echo $i > done; rm tmp.gs 28 29 33 34 57 68 80 97 98 99 How it works
-1:ab;6:ba; # Save -1 in “ab” and 6 in “ba”. Discard. ... # Duplicate the input string thrice. =; # Verify that the two topmost copies are equal; push 1. Discard. 1% # Save every element from the input string in a new string. ab% # Reverse the input string. { # For each character in the input string: ....~\ # Duplicate the character four times, negate the last copy and swap. fi # Variable “fi” is undefined; this does nothing. @@= # Verify that the negated character and the character are different; push 0. 43.= # Push 43, duplicate and verify equality; push 1. +\ # Add the two topmost integers. Result: 1 '' # Push that string. '"([{}])"' # Push that string. ~+ # Evaluate the second string and concatenate. Result: '([{}])' ? # Retrieve the characters position in '([{}])'. -1 means not present. +~ # Add 1 to the position and negate. Examples: -1 -> -1 0 -> -2 1 -> -3 '"([{}])"' # Push that string. '' # Push that string. \+ # Swap and concatenate. Result: '"([{}])"' (Observe the double quotes.) =. # Retrieve the corresponding character and duplicate it. 34= # If the character is a double quote, the index was -1. @@if # In that case, replace the double quote with the original character. \~ # Swap the new character with the original one and negate the latter. .... # Duplicate four times. }% # ba% # Save every sixth element in a new string. This discards dummy values. 1; # Push 1 and discard. = # Push 1 if the modified string matches the original one and 0 otherwise. ...; # Duplicate thrice and discard the last copy. ab:6; # Save -1 in “6” and discard. ba:1- # Save 6 in “1” and subtract.w